From a29c3e6db03a411f1a09baff72f87650f9a8798f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 23 Jul 2013 09:08:57 +0100 Subject: [PATCH] Port to GNU/Linux systems with tinfo but not ncurses. * configure.ac (USE_NCURSES): New symbol. * src/dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX, to decide whether ncurses is being used. Without this change, GCC complains about tgetent not being declared, on a system that has tinfo installed but ncurses not installed. --- ChangeLog | 5 +++++ configure.ac | 3 +++ src/ChangeLog | 6 ++++++ src/dispnew.c | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ec76b4257e4..5c465bf2ff9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-07-23 Paul Eggert + + Port to Ubuntu 12.04 with tinfo but not ncurses. + * configure.ac (USE_NCURSES): New symbol. + 2013-07-20 Paul Eggert Fix array bounds violation when pty allocation fails. diff --git a/configure.ac b/configure.ac index dfe2181fce8..f48822480e4 100644 --- a/configure.ac +++ b/configure.ac @@ -3406,6 +3406,9 @@ if test $TERMINFO = yes; then AC_DEFINE(TERMINFO, 1, [Define to 1 if you use terminfo instead of termcap.]) TERMCAP_OBJ=terminfo.o fi +if test "X$LIBS_TERMCAP" = "X-lncurses"; then + AC_DEFINE(USE_NCURSES, 1, [Define to 1 if you use ncurses.]) +fi AC_SUBST(LIBS_TERMCAP) AC_SUBST(TERMCAP_OBJ) diff --git a/src/ChangeLog b/src/ChangeLog index cc8d7f5edee..8a51744ba4b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2013-07-23 Paul Eggert + Port to GNU/Linux systems with tinfo but not ncurses. + * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX, + to decide whether ncurses is being used. Without this change, + GCC complains about tgetent not being declared, on a system + that has tinfo installed but ncurses not installed. + * eval.c (Fprogn): Check that BODY is a proper list. Tune UNEVALLED functions by using XCAR instead of Fcar, etc. diff --git a/src/dispnew.c b/src/dispnew.c index ef75ed6d176..522a0e6a30d 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6041,7 +6041,7 @@ init_display (void) #ifdef HAVE_X11 Vwindow_system_version = make_number (11); #endif -#ifdef GNU_LINUX +#ifdef USE_NCURSES /* In some versions of ncurses, tputs crashes if we have not called tgetent. So call tgetent. */ -- 2.39.2