aboutsummaryrefslogtreecommitdiff
path: root/readline
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-04-05 17:53:05 +0000
committerMark Mitchell <mark@codesourcery.com>2005-04-05 17:53:05 +0000
commit28c08c76220adb0980448fe165c8d0c316fb49a6 (patch)
tree597f47525facd35199743ed88bc3993b3b89bb00 /readline
parent07cad7529f22fea2a346bfa58ef7504cd9a27e9f (diff)
downloadgdb-28c08c76220adb0980448fe165c8d0c316fb49a6.zip
gdb-28c08c76220adb0980448fe165c8d0c316fb49a6.tar.gz
gdb-28c08c76220adb0980448fe165c8d0c316fb49a6.tar.bz2
* gdb/ser-tcp.c (net_write_prim): Correct prototype.
* readline/input.c (rl_getc): Use getche to read console input on Windows. Revert: 2005-03-28 Mark Mitchell <mark@codesourcery.com> * gdb/event-top.c (gdb_setup_readline): Put console into character-at-a-time mode under Windows.
Diffstat (limited to 'readline')
-rw-r--r--readline/input.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/readline/input.c b/readline/input.c
index 841f05d..feef459 100644
--- a/readline/input.c
+++ b/readline/input.c
@@ -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 getche ();
+#endif
result = read (fileno (stream), &c, sizeof (unsigned char));
if (result == sizeof (unsigned char))