This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: readline rebase 5.1->6.2?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: tromey at redhat dot com, gdb at sourceware dot org, ktietz at redhat dot com
- Date: Mon, 25 Apr 2011 18:04:43 +0200
- Subject: Re: readline rebase 5.1->6.2?
- References: <20110322154327.GA8966@host1.jankratochvil.net> <83tyev7z7a.fsf@gnu.org> <20110322194836.GA23104@host1.jankratochvil.net> <83oc537wrs.fsf@gnu.org> <83oc4qpbdw.fsf@gnu.org> <m37hbejbpn.fsf@fleche.redhat.com> <83y63tvtd2.fsf@gnu.org> <83sju0vy1k.fsf@gnu.org>
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;
}