Skip to content

Commit b8a653a

Browse files
committed
patch 9.2.0269: configure: Link error on Solaris
Problem: configure: Link error on Solaris (idgn23, after v9.2.0153) Solution: Move the check for the nsl library a bit earlier, regenerate configure fixes: #19803 Signed-off-by: Christian Brabandt <[email protected]>
1 parent 30bac35 commit b8a653a

3 files changed

Lines changed: 55 additions & 53 deletions

File tree

src/auto/configure

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8820,6 +8820,57 @@ then :
88208820

88218821
LIBS="-lsocket $LIBS"
88228822

8823+
fi
8824+
8825+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8826+
printf %s "checking for gethostbyname in -lnsl... " >&6; }
8827+
if test ${ac_cv_lib_nsl_gethostbyname+y}
8828+
then :
8829+
printf %s "(cached) " >&6
8830+
else case e in #(
8831+
e) ac_check_lib_save_LIBS=$LIBS
8832+
LIBS="-lnsl $LIBS"
8833+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8834+
/* end confdefs.h. */
8835+
8836+
/* Override any GCC internal prototype to avoid an error.
8837+
Use char because int might match the return type of a GCC
8838+
builtin and then its argument prototype would still apply.
8839+
The 'extern "C"' is for builds by C++ compilers;
8840+
although this is not generally supported in C code supporting it here
8841+
has little cost and some practical benefit (sr 110532). */
8842+
#ifdef __cplusplus
8843+
extern "C"
8844+
#endif
8845+
char gethostbyname (void);
8846+
int
8847+
main (void)
8848+
{
8849+
return gethostbyname ();
8850+
;
8851+
return 0;
8852+
}
8853+
_ACEOF
8854+
if ac_fn_c_try_link "$LINENO"
8855+
then :
8856+
ac_cv_lib_nsl_gethostbyname=yes
8857+
else case e in #(
8858+
e) ac_cv_lib_nsl_gethostbyname=no ;;
8859+
esac
8860+
fi
8861+
rm -f core conftest.err conftest.$ac_objext conftest.beam \
8862+
conftest$ac_exeext conftest.$ac_ext
8863+
LIBS=$ac_check_lib_save_LIBS ;;
8864+
esac
8865+
fi
8866+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8867+
printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8868+
if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8869+
then :
8870+
printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
8871+
8872+
LIBS="-lnsl $LIBS"
8873+
88238874
fi
88248875

88258876
fi
@@ -8891,57 +8942,6 @@ then :
88918942
fi
88928943

88938944
else
8894-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8895-
printf %s "checking for gethostbyname in -lnsl... " >&6; }
8896-
if test ${ac_cv_lib_nsl_gethostbyname+y}
8897-
then :
8898-
printf %s "(cached) " >&6
8899-
else case e in #(
8900-
e) ac_check_lib_save_LIBS=$LIBS
8901-
LIBS="-lnsl $LIBS"
8902-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8903-
/* end confdefs.h. */
8904-
8905-
/* Override any GCC internal prototype to avoid an error.
8906-
Use char because int might match the return type of a GCC
8907-
builtin and then its argument prototype would still apply.
8908-
The 'extern "C"' is for builds by C++ compilers;
8909-
although this is not generally supported in C code supporting it here
8910-
has little cost and some practical benefit (sr 110532). */
8911-
#ifdef __cplusplus
8912-
extern "C"
8913-
#endif
8914-
char gethostbyname (void);
8915-
int
8916-
main (void)
8917-
{
8918-
return gethostbyname ();
8919-
;
8920-
return 0;
8921-
}
8922-
_ACEOF
8923-
if ac_fn_c_try_link "$LINENO"
8924-
then :
8925-
ac_cv_lib_nsl_gethostbyname=yes
8926-
else case e in #(
8927-
e) ac_cv_lib_nsl_gethostbyname=no ;;
8928-
esac
8929-
fi
8930-
rm -f core conftest.err conftest.$ac_objext conftest.beam \
8931-
conftest$ac_exeext conftest.$ac_ext
8932-
LIBS=$ac_check_lib_save_LIBS ;;
8933-
esac
8934-
fi
8935-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8936-
printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8937-
if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8938-
then :
8939-
printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
8940-
8941-
LIBS="-lnsl $LIBS"
8942-
8943-
fi
8944-
89458945
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
89468946
printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
89478947
if test ${vim_cv_ipv4_networking+y}

src/configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,6 +2238,8 @@ if test "$enable_channel" = "yes"; then
22382238
AC_CHECK_LIB(network, socket)
22392239
else
22402240
AC_CHECK_LIB(socket, socket)
2241+
dnl On Solaris we need the nsl library.
2242+
AC_CHECK_LIB(nsl, gethostbyname)
22412243
fi
22422244

22432245
AC_CACHE_CHECK([whether compiling with IPv6 networking is possible], [vim_cv_ipv6_networking],
@@ -2274,8 +2276,6 @@ if test "$enable_channel" = "yes"; then
22742276
AC_DEFINE(FEAT_IPV6)
22752277
AC_CHECK_FUNCS(inet_ntop)
22762278
else
2277-
dnl On Solaris we need the nsl library.
2278-
AC_CHECK_LIB(nsl, gethostbyname)
22792279
AC_CACHE_CHECK([whether compiling with IPv4 networking is possible], [vim_cv_ipv4_networking],
22802280
[AC_LINK_IFELSE([AC_LANG_PROGRAM([
22812281
#include <stdio.h>

src/version.c

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

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
269,
737739
/**/
738740
268,
739741
/**/

0 commit comments

Comments
 (0)