Skip to content

Commit

Permalink
patch 8.0.0587: configure check for return value of tgetent skipped
Browse files Browse the repository at this point in the history
Problem:    Configure check for return value of tgetent is skipped.
Solution:   Always perform the check. (Marvin Schmidt, closes #1664)
  • Loading branch information
brammool committed Apr 28, 2017
1 parent b7637c4 commit 696cbd2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
16 changes: 7 additions & 9 deletions src/auto/configure
Expand Up @@ -11506,16 +11506,15 @@ if test "x$vim_cv_terminfo" = "xyes" ; then


fi 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 "$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; } $as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; }
if ${vim_cv_tgent+:} false; then : if ${vim_cv_tgent+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else


if test "$cross_compiling" = yes; then : if test "$cross_compiling" = yes; then :


as_fn_error $? "failed to compile test program." "$LINENO" 5 as_fn_error $? "failed to compile test program." "$LINENO" 5


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


vim_cv_tgent=zero vim_cv_tgent=zero


else else


vim_cv_tgent=non-zero vim_cv_tgent=non-zero


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


if test "x$vim_cv_tgent" = "xzero" ; then if test "x$vim_cv_tgent" = "xzero" ; then
$as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h $as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h


fi
fi fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
Expand Down
28 changes: 13 additions & 15 deletions src/configure.ac
Expand Up @@ -3355,10 +3355,9 @@ if test "x$vim_cv_terminfo" = "xyes" ; then
AC_DEFINE(TERMINFO) AC_DEFINE(TERMINFO)
fi fi


if test "x$olibs" != "x$LIBS"; then AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent],
AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], [
[ AC_RUN_IFELSE([AC_LANG_SOURCE([[
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include "confdefs.h" #include "confdefs.h"
#ifdef HAVE_TERMCAP_H #ifdef HAVE_TERMCAP_H
# include <termcap.h> # include <termcap.h>
Expand All @@ -3369,18 +3368,17 @@ if test "x$olibs" != "x$LIBS"; then
#endif #endif
main() main()
{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
]])],[ ]])],[
vim_cv_tgent=zero vim_cv_tgent=zero
],[ ],[
vim_cv_tgent=non-zero vim_cv_tgent=non-zero
],[ ],[
AC_MSG_ERROR(failed to compile test program.) AC_MSG_ERROR(failed to compile test program.)
])
]) ])

])
if test "x$vim_cv_tgent" = "xzero" ; then
AC_DEFINE(TGETENT_ZERO_ERR, 0) if test "x$vim_cv_tgent" = "xzero" ; then
fi AC_DEFINE(TGETENT_ZERO_ERR, 0)
fi fi


AC_MSG_CHECKING(whether termcap.h contains ospeed) AC_MSG_CHECKING(whether termcap.h contains ospeed)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -764,6 +764,8 @@ static char *(features[]) =


static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
587,
/**/ /**/
586, 586,
/**/ /**/
Expand Down

0 comments on commit 696cbd2

Please sign in to comment.