readline rebase 5.1->6.2?

Jan Kratochvil jan.kratochvil@redhat.com
Mon Apr 25 16:05:00 GMT 2011


On Sun, 03 Apr 2011 05:00:55 +0200, Eli Zaretskii wrote:
> Note that I didn't do anything about the MinGW patches.  I suggest
> that their author(s) submit them to readline.

The only one I found is attached, it is already present in readline-6.2-001.
The configure.in part `*-mingw*)' is also present there.

Therefore I believe we can now rebase readline to 6.2-001 for gdb-7.4, I will
send some patch for test into gdb-patches.


Thanks,
Jan


--- readline-5.1-004/input.c	2005-07-05 04:30:24.000000000 +0200
+++ ./input.c	2011-04-02 10:43:16.000000000 +0200
@@ -220,6 +220,16 @@ rl_gather_tyi ()
     }
 #endif /* O_NDELAY */
 
+#if defined (__MINGW32__)
+  /* We use getch to read console input, so use the same
+     mechanism to check for more.  Otherwise, we don't know.  */
+  if (isatty (fileno (rl_instream)))
+    chars_avail = _kbhit ();
+  else
+    chars_avail = 0;
+  result = 0;
+#endif
+
   /* If there's nothing available, don't waste time trying to read
      something. */
   if (chars_avail <= 0)
@@ -305,6 +315,13 @@ _rl_input_available ()
 
 #endif
 
+#if defined (__MINGW32__)
+  /* We use getch to read console input, so use the same
+     mechanism to check for more.  Otherwise, we don't know.  */
+  if (isatty (fileno (rl_instream)))
+    return _kbhit ();
+#endif
+
   return 0;
 }
 



More information about the Gdb mailing list