This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch 3/3] readline-6.2: Revert 5.x compat., apply 6.x compat.
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 1 May 2011 14:31:12 +0200
- Subject: [patch 3/3] readline-6.2: Revert 5.x compat., apply 6.x compat.
Hi,
this patch reverts:
[patch] Fix --with-system-readline vs. readline-6.0+
http://sourceware.org/ml/gdb-patches/2009-07/msg00755.html
as I believe when there will be readline-6.2 in-tree there is no need to
support --with-system-readline with system readline-5.x.
And it also applies the change unconditionally as predicted in that mail.
Thanks,
Jan
gdb/
2011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com>
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac <--with-system-readline> (for readline_echoing_p):
Remove the test.
* tui/tui-io.c (tui_old_readline_echoing_p): Rename to ...
(tui_old_rl_echoing_p): ... here.
(tui_setup_io): Rename extern declaration readline_echoing_p to
_rl_echoing_p. Adjust assignments for the both renames.
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -539,21 +539,6 @@ if test "$with_system_readline" = yes; then
READLINE_DEPS=
READLINE_CFLAGS=
READLINE_TEXI_INCFLAG=
-
- # readline-6.0 started to use the name `_rl_echoing_p'.
- # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
-
- AC_MSG_CHECKING([for readline_echoing_p])
- save_LIBS=$LIBS
- LIBS="$LIBS $READLINE"
- AC_LINK_IFELSE(AC_LANG_PROGRAM(,[[extern int readline_echoing_p;
- return readline_echoing_p;]]),
- [READLINE_ECHOING_P=yes],
- [READLINE_ECHOING_P=no
- AC_DEFINE([readline_echoing_p], [_rl_echoing_p],
- [readline-6.0 started to use different name.])])
- LIBS="$save_LIBS"
- AC_MSG_RESULT([$READLINE_ECHOING_P])
else
READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)'
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -133,7 +133,7 @@ static Function *tui_old_rl_getc_function;
static VFunction *tui_old_rl_redisplay_function;
static VFunction *tui_old_rl_prep_terminal;
static VFunction *tui_old_rl_deprep_terminal;
-static int tui_old_readline_echoing_p;
+static int tui_old_rl_echoing_p;
/* Readline output stream.
Should be removed when readline is clean. */
@@ -506,8 +506,8 @@ tui_rl_display_match_list (char **matches, int len, int max)
void
tui_setup_io (int mode)
{
- extern int readline_echoing_p;
-
+ extern int _rl_echoing_p;
+
if (mode)
{
/* Redirect readline to TUI. */
@@ -516,12 +516,12 @@ tui_setup_io (int mode)
tui_old_rl_prep_terminal = rl_prep_term_function;
tui_old_rl_getc_function = rl_getc_function;
tui_old_rl_outstream = rl_outstream;
- tui_old_readline_echoing_p = readline_echoing_p;
+ tui_old_rl_echoing_p = _rl_echoing_p;
rl_redisplay_function = tui_redisplay_readline;
rl_deprep_term_function = tui_deprep_terminal;
rl_prep_term_function = tui_prep_terminal;
rl_getc_function = tui_getc;
- readline_echoing_p = 0;
+ _rl_echoing_p = 0;
rl_outstream = tui_rl_outstream;
rl_prompt = 0;
rl_completion_display_matches_hook = tui_rl_display_match_list;
@@ -560,7 +560,7 @@ tui_setup_io (int mode)
rl_getc_function = tui_old_rl_getc_function;
rl_outstream = tui_old_rl_outstream;
rl_completion_display_matches_hook = 0;
- readline_echoing_p = tui_old_readline_echoing_p;
+ _rl_echoing_p = tui_old_rl_echoing_p;
rl_already_prompted = 0;
/* Save tty for SIGCONT. */