To: vim_dev@googlegroups.com Subject: Patch 8.0.0587 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0587 Problem: Configure check for return value of tgetent is skipped. Solution: Always perform the check. (Marvin Schmidt, closes #1664) Files: src/configure.ac, src/auto/configure *** ../vim-8.0.0586/src/configure.ac 2017-04-21 22:59:58.377385472 +0200 --- src/configure.ac 2017-04-28 15:42:54.373361017 +0200 *************** *** 3355,3364 **** AC_DEFINE(TERMINFO) fi ! if test "x$olibs" != "x$LIBS"; then ! AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], ! [ ! AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include "confdefs.h" #ifdef HAVE_TERMCAP_H # include --- 3355,3363 ---- AC_DEFINE(TERMINFO) fi ! AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], ! [ ! AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include "confdefs.h" #ifdef HAVE_TERMCAP_H # include *************** *** 3369,3386 **** #endif main() {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } ! ]])],[ ! vim_cv_tgent=zero ! ],[ ! vim_cv_tgent=non-zero ! ],[ ! AC_MSG_ERROR(failed to compile test program.) ! ]) ]) ! ! if test "x$vim_cv_tgent" = "xzero" ; then ! AC_DEFINE(TGETENT_ZERO_ERR, 0) ! fi fi AC_MSG_CHECKING(whether termcap.h contains ospeed) --- 3368,3384 ---- #endif main() {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } ! ]])],[ ! vim_cv_tgent=zero ! ],[ ! vim_cv_tgent=non-zero ! ],[ ! AC_MSG_ERROR(failed to compile test program.) ]) ! ]) ! ! if test "x$vim_cv_tgent" = "xzero" ; then ! AC_DEFINE(TGETENT_ZERO_ERR, 0) fi AC_MSG_CHECKING(whether termcap.h contains ospeed) *** ../vim-8.0.0586/src/auto/configure 2017-04-21 22:59:58.381385448 +0200 --- src/auto/configure 2017-04-28 15:43:11.277260374 +0200 *************** *** 11506,11521 **** fi ! if test "x$olibs" != "x$LIBS"; then ! { $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5 $as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; } if ${vim_cv_tgent+:} false; then : $as_echo_n "(cached) " >&6 else ! if test "$cross_compiling" = yes; then : ! as_fn_error $? "failed to compile test program." "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext --- 11506,11520 ---- fi ! { $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5 $as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; } if ${vim_cv_tgent+:} false; then : $as_echo_n "(cached) " >&6 else ! if test "$cross_compiling" = yes; then : ! as_fn_error $? "failed to compile test program." "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext *************** *** 11535,11545 **** _ACEOF if ac_fn_c_try_run "$LINENO"; then : ! vim_cv_tgent=zero else ! vim_cv_tgent=non-zero fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ --- 11534,11544 ---- _ACEOF if ac_fn_c_try_run "$LINENO"; then : ! vim_cv_tgent=zero else ! vim_cv_tgent=non-zero fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ *************** *** 11551,11560 **** { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgent" >&5 $as_echo "$vim_cv_tgent" >&6; } ! if test "x$vim_cv_tgent" = "xzero" ; then ! $as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h - fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5 --- 11550,11558 ---- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgent" >&5 $as_echo "$vim_cv_tgent" >&6; } ! if test "x$vim_cv_tgent" = "xzero" ; then ! $as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5 *** ../vim-8.0.0586/src/version.c 2017-04-23 18:49:32.839266925 +0200 --- src/version.c 2017-04-28 15:44:48.436681700 +0200 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 587, /**/ -- TIM: Too late. ARTHUR: What? TIM: There he is! [They all turn, and see a large white RABBIT lollop a few yards out of the cave. Accompanied by terrifying chord and jarring metallic monster noise.] "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///