From 8db7d8bf6b2e83886ef88f45f08a9c74c1434b1b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 23 Mar 1999 16:40:33 +0000 Subject: Ack! It never defined HAVE_GETHOSTBYNAME_R so that code was never tested! --- configure | 70 ++++++++++++++++++++++++++++++++++++------------------------ configure.in | 4 ++++ 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/configure b/configure index 4c91160..8dedceb 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.99 +# From configure.in Revision: 1.100 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 @@ -4156,6 +4156,10 @@ if { (eval echo configure:4156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; rm -rf conftest* cat >> confdefs.h <<\EOF +#define HAVE_GETHOSTBYNAME_R 1 +EOF + + cat >> confdefs.h <<\EOF #define HAVE_GETHOSTBYNAME_R_6_ARG 1 EOF @@ -4168,9 +4172,9 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 -echo "configure:4172: checking gethostbyname_r with 5 args" >&5 +echo "configure:4176: checking gethostbyname_r with 5 args" >&5 cat > conftest.$ac_ext < @@ -4187,10 +4191,14 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF +#define HAVE_GETHOSTBYNAME_R 1 +EOF + + cat >> confdefs.h <<\EOF #define HAVE_GETHOSTBYNAME_R_5_ARG 1 EOF @@ -4203,9 +4211,9 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 -echo "configure:4207: checking gethostbyname_r with 3 args" >&5 +echo "configure:4215: checking gethostbyname_r with 3 args" >&5 cat > conftest.$ac_ext < @@ -4220,10 +4228,14 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF +#define HAVE_GETHOSTBYNAME_R 1 +EOF + + cat >> confdefs.h <<\EOF #define HAVE_GETHOSTBYNAME_R_3_ARG 1 EOF @@ -4250,12 +4262,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4254: checking for gethostbyname" >&5 +echo "configure:4266: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4308,12 +4320,13 @@ fi + # checks for system services # (none yet) # Linux requires this for correct f.p. operations echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 -echo "configure:4317: checking for __fpu_control in -lieee" >&5 +echo "configure:4330: checking for __fpu_control in -lieee" >&5 ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4321,7 +4334,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4362,7 +4375,7 @@ fi # Check for --with-fpectl echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 -echo "configure:4366: checking for --with-fpectl" >&5 +echo "configure:4379: checking for --with-fpectl" >&5 # Check whether --with-fpectl or --without-fpectl was given. if test "${with_fpectl+set}" = set; then withval="$with_fpectl" @@ -4385,7 +4398,7 @@ BeOS) ;; *) LIBM=-lm esac echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 -echo "configure:4389: checking for --with-libm=STRING" >&5 +echo "configure:4402: checking for --with-libm=STRING" >&5 # Check whether --with-libm or --without-libm was given. if test "${with_libm+set}" = set; then withval="$with_libm" @@ -4406,7 +4419,7 @@ fi # check for --with-libc=... echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 -echo "configure:4410: checking for --with-libc=STRING" >&5 +echo "configure:4423: checking for --with-libc=STRING" >&5 # Check whether --with-libc or --without-libc was given. if test "${with_libc+set}" = set; then withval="$with_libc" @@ -4430,12 +4443,12 @@ LIBS="$LIBS $LIBM" for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4434: checking for $ac_func" >&5 +echo "configure:4447: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4485,12 +4498,12 @@ done for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4489: checking for $ac_func" >&5 +echo "configure:4502: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4543,7 +4556,7 @@ LIBS=$LIBS_SAVE # check for getopt echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6 -echo "configure:4547: checking for genuine getopt" >&5 +echo "configure:4560: checking for genuine getopt" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4551,7 +4564,7 @@ else ac_cv_func_getopt=no else cat > conftest.$ac_ext < extern int optind, opterr, getopt(); @@ -4563,7 +4576,7 @@ int main() { exit(0); } EOF -if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_getopt=yes else @@ -4581,7 +4594,7 @@ test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o" # check whether malloc(0) returns NULL or not echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 -echo "configure:4585: checking what malloc(0) returns" >&5 +echo "configure:4598: checking what malloc(0) returns" >&5 if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4589,7 +4602,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #ifdef HAVE_STDLIB @@ -4608,7 +4621,7 @@ main() { exit(0); } EOF -if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_malloc_zero=nonnull else @@ -4797,6 +4810,7 @@ s%@LIBOBJS@%$LIBOBJS%g s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g +s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g s%@LIBM@%$LIBM%g s%@LIBC@%$LIBC%g diff --git a/configure.in b/configure.in index 12dcd5f..3c7db27 100644 --- a/configure.in +++ b/configure.in @@ -793,6 +793,7 @@ AC_CHECK_FUNC(gethostbyname_r, [ (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) ], [ + AC_DEFINE(HAVE_GETHOSTBYNAME_R) AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARG) AC_MSG_RESULT(yes) ], [ @@ -809,6 +810,7 @@ AC_CHECK_FUNC(gethostbyname_r, [ (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) ], [ + AC_DEFINE(HAVE_GETHOSTBYNAME_R) AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARG) AC_MSG_RESULT(yes) ], [ @@ -823,6 +825,7 @@ AC_CHECK_FUNC(gethostbyname_r, [ (void) gethostbyname_r(name, he, &data); ], [ + AC_DEFINE(HAVE_GETHOSTBYNAME_R) AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARG) AC_MSG_RESULT(yes) ], [ @@ -837,6 +840,7 @@ AC_CHECK_FUNC(gethostbyname_r, [ AC_SUBST(HAVE_GETHOSTBYNAME_R_6_ARG) AC_SUBST(HAVE_GETHOSTBYNAME_R_5_ARG) AC_SUBST(HAVE_GETHOSTBYNAME_R_3_ARG) +AC_SUBST(HAVE_GETHOSTBYNAME_R) AC_SUBST(HAVE_GETHOSTBYNAME) # checks for system services -- cgit v0.12