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.
This commit is contained in:
Paul Eggert 2013-07-23 09:08:57 +01:00
parent f274311c2c
commit a29c3e6db0
4 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
Port to Ubuntu 12.04 with tinfo but not ncurses.
* configure.ac (USE_NCURSES): New symbol.
2013-07-20 Paul Eggert <eggert@cs.ucla.edu>
Fix array bounds violation when pty allocation fails.

View file

@ -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)

View file

@ -1,5 +1,11 @@
2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
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.

View file

@ -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. */