* input.c (rl_getc): Use getch to read console input on
[deliverable/binutils-gdb.git] / readline / input.c
index 841f05d1af9ccf55a7cae4cc59beee899c6f0e3a..9120dfa8a8dc90b0b8a5c4c16b1988eb4fe8c51f 100644 (file)
@@ -424,6 +424,13 @@ rl_getc (stream)
 
   while (1)
     {
+#ifdef __MINGW32__
+      /* On Windows, use a special routine to read a single  character
+        from the console.  (Otherwise, no characters are available
+        until the user hits the return key.)  */
+      if (isatty (fileno (stream)))
+       return getch ();
+#endif
       result = read (fileno (stream), &c, sizeof (unsigned char));
 
       if (result == sizeof (unsigned char))
This page took 0.024675 seconds and 4 git commands to generate.