Skip to content

Commit 696cbd2

Browse files
committed
patch 8.0.0587: configure check for return value of tgetent skipped
Problem: Configure check for return value of tgetent is skipped. Solution: Always perform the check. (Marvin Schmidt, closes #1664)
1 parent b7637c4 commit 696cbd2

3 files changed

Lines changed: 22 additions & 24 deletions

File tree

src/auto/configure

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11506,16 +11506,15 @@ if test "x$vim_cv_terminfo" = "xyes" ; then
1150611506

1150711507
fi
1150811508

11509-
if test "x$olibs" != "x$LIBS"; then
11510-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
11509+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
1151111510
$as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; }
1151211511
if ${vim_cv_tgent+:} false; then :
1151311512
$as_echo_n "(cached) " >&6
1151411513
else
1151511514

11516-
if test "$cross_compiling" = yes; then :
11515+
if test "$cross_compiling" = yes; then :
1151711516

11518-
as_fn_error $? "failed to compile test program." "$LINENO" 5
11517+
as_fn_error $? "failed to compile test program." "$LINENO" 5
1151911518

1152011519
else
1152111520
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11535,11 +11534,11 @@ main()
1153511534
_ACEOF
1153611535
if ac_fn_c_try_run "$LINENO"; then :
1153711536

11538-
vim_cv_tgent=zero
11537+
vim_cv_tgent=zero
1153911538

1154011539
else
1154111540

11542-
vim_cv_tgent=non-zero
11541+
vim_cv_tgent=non-zero
1154311542

1154411543
fi
1154511544
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11551,10 +11550,9 @@ fi
1155111550
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgent" >&5
1155211551
$as_echo "$vim_cv_tgent" >&6; }
1155311552

11554-
if test "x$vim_cv_tgent" = "xzero" ; then
11555-
$as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h
11553+
if test "x$vim_cv_tgent" = "xzero" ; then
11554+
$as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h
1155611555

11557-
fi
1155811556
fi
1155911557

1156011558
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5

src/configure.ac

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3355,10 +3355,9 @@ if test "x$vim_cv_terminfo" = "xyes" ; then
33553355
AC_DEFINE(TERMINFO)
33563356
fi
33573357

3358-
if test "x$olibs" != "x$LIBS"; then
3359-
AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent],
3360-
[
3361-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
3358+
AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent],
3359+
[
3360+
AC_RUN_IFELSE([AC_LANG_SOURCE([[
33623361
#include "confdefs.h"
33633362
#ifdef HAVE_TERMCAP_H
33643363
# include <termcap.h>
@@ -3369,18 +3368,17 @@ if test "x$olibs" != "x$LIBS"; then
33693368
#endif
33703369
main()
33713370
{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
3372-
]])],[
3373-
vim_cv_tgent=zero
3374-
],[
3375-
vim_cv_tgent=non-zero
3376-
],[
3377-
AC_MSG_ERROR(failed to compile test program.)
3378-
])
3371+
]])],[
3372+
vim_cv_tgent=zero
3373+
],[
3374+
vim_cv_tgent=non-zero
3375+
],[
3376+
AC_MSG_ERROR(failed to compile test program.)
33793377
])
3380-
3381-
if test "x$vim_cv_tgent" = "xzero" ; then
3382-
AC_DEFINE(TGETENT_ZERO_ERR, 0)
3383-
fi
3378+
])
3379+
3380+
if test "x$vim_cv_tgent" = "xzero" ; then
3381+
AC_DEFINE(TGETENT_ZERO_ERR, 0)
33843382
fi
33853383

33863384
AC_MSG_CHECKING(whether termcap.h contains ospeed)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
587,
767769
/**/
768770
586,
769771
/**/

0 commit comments

Comments
 (0)