@@ -13311,101 +13311,35 @@ fi
1331113311# One trick here is that if we don't call AC_CHECK_FUNCS, the
1331213312# functions are marked "not found", which is perfect.
1331313313#
13314- if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNC_NAMES " = yes ; then
13314+ if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNCS " = yes ; then
1331513315_CFLAGS="$CFLAGS"
1331613316_LIBS="$LIBS"
1331713317CFLAGS="$CFLAGS $THREAD_CFLAGS"
1331813318LIBS="$LIBS $THREAD_LIBS"
13319- echo "$as_me:$LINENO: checking for strerror_r" >&5
13320- echo $ECHO_N "checking for strerror_r... $ECHO_C" >&6
13321- if test "${ac_cv_func_strerror_r+set}" = set; then
13322- echo $ECHO_N "(cached) $ECHO_C" >&6
13323- else
13324- cat >conftest.$ac_ext <<_ACEOF
13325- #line $LINENO "configure"
13326- #include "confdefs.h"
13327- /* System header to define __stub macros and hopefully few prototypes,
13328- which can conflict with char strerror_r (); below. */
13329- #include <assert.h>
13330- /* Override any gcc2 internal prototype to avoid an error. */
13331- #ifdef __cplusplus
13332- extern "C"
13333- #endif
13334- /* We use char because int might match the return type of a gcc2
13335- builtin and then its argument prototype would still apply. */
13336- char strerror_r ();
13337- char (*f) ();
1333813319
13339- #ifdef F77_DUMMY_MAIN
13340- # ifdef __cplusplus
13341- extern "C"
13342- # endif
13343- int F77_DUMMY_MAIN() { return 1; }
13344- #endif
13345- int
13346- main ()
13347- {
13348- /* The GNU C library defines this for functions which it implements
13349- to always fail with ENOSYS. Some functions are actually named
13350- something starting with __ and the normal name is an alias. */
13351- #if defined (__stub_strerror_r) || defined (__stub___strerror_r)
13352- choke me
13353- #else
13354- f = strerror_r;
13355- #endif
1335613320
13357- ;
13358- return 0;
13359- }
13360- _ACEOF
13361- rm -f conftest.$ac_objext conftest$ac_exeext
13362- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13363- (eval $ac_link) 2>&5
13364- ac_status=$?
13365- echo "$as_me:$LINENO: \$? = $ac_status" >&5
13366- (exit $ac_status); } &&
13367- { ac_try='test -s conftest$ac_exeext'
13368- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13369- (eval $ac_try) 2>&5
13370- ac_status=$?
13371- echo "$as_me:$LINENO: \$? = $ac_status" >&5
13372- (exit $ac_status); }; }; then
13373- ac_cv_func_strerror_r=yes
13374- else
13375- echo "$as_me: failed program was:" >&5
13376- cat conftest.$ac_ext >&5
13377- ac_cv_func_strerror_r=no
13378- fi
13379- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13380- fi
13381- echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r" >&5
13382- echo "${ECHO_T}$ac_cv_func_strerror_r" >&6
13383- if test $ac_cv_func_strerror_r = yes; then
13384- :
13385- else
13386- { { echo "$as_me:$LINENO: error: strerror_r not found, required on this platform for --enable-thread-safety" >&5
13387- echo "$as_me: error: strerror_r not found, required on this platform for --enable-thread-safety" >&2;}
13388- { (exit 1); exit 1; }; }
13389- fi
1339013321
13391- echo "$as_me:$LINENO: checking for getpwuid_r" >&5
13392- echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6
13393- if test "${ac_cv_func_getpwuid_r+set}" = set; then
13322+ for ac_func in strerror_r getpwuid_r gethostbyname_r
13323+ do
13324+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13325+ echo "$as_me:$LINENO: checking for $ac_func" >&5
13326+ echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13327+ if eval "test \"\${$as_ac_var+set}\" = set"; then
1339413328 echo $ECHO_N "(cached) $ECHO_C" >&6
1339513329else
1339613330 cat >conftest.$ac_ext <<_ACEOF
1339713331#line $LINENO "configure"
1339813332#include "confdefs.h"
1339913333/* System header to define __stub macros and hopefully few prototypes,
13400- which can conflict with chargetpwuid_r (); below. */
13334+ which can conflict with char$ac_func (); below. */
1340113335#include <assert.h>
1340213336/* Override any gcc2 internal prototype to avoid an error. */
1340313337#ifdef __cplusplus
1340413338extern "C"
1340513339#endif
1340613340/* We use char because int might match the return type of a gcc2
1340713341 builtin and then its argument prototype would still apply. */
13408- chargetpwuid_r ();
13342+ char$ac_func ();
1340913343char (*f) ();
1341013344
1341113345#ifdef F77_DUMMY_MAIN
@@ -13420,10 +13354,10 @@ main ()
1342013354/* The GNU C library defines this for functions which it implements
1342113355 to always fail with ENOSYS. Some functions are actually named
1342213356 something starting with __ and the normal name is an alias. */
13423- #if defined (__stub_getpwuid_r ) || defined (__stub___getpwuid_r )
13357+ #if defined (__stub_$ac_func ) || defined (__stub___$ac_func )
1342413358choke me
1342513359#else
13426- f =getpwuid_r ;
13360+ f =$ac_func ;
1342713361#endif
1342813362
1342913363 ;
@@ -13442,95 +13376,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1344213376 ac_status=$?
1344313377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1344413378 (exit $ac_status); }; }; then
13445- ac_cv_func_getpwuid_r =yes
13379+ eval "$as_ac_var =yes"
1344613380else
1344713381 echo "$as_me: failed program was:" >&5
1344813382cat conftest.$ac_ext >&5
13449- ac_cv_func_getpwuid_r =no
13383+ eval "$as_ac_var =no"
1345013384fi
1345113385rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1345213386fi
13453- echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5
13454- echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6
13455- if test $ac_cv_func_getpwuid_r = yes; then
13456- :
13457- else
13458- { { echo "$as_me:$LINENO: error: getpwuid_r not found, required on this platform for --enable-thread-safety" >&5
13459- echo "$as_me: error: getpwuid_r not found, required on this platform for --enable-thread-safety" >&2;}
13460- { (exit 1); exit 1; }; }
13461- fi
13462-
13463- echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13464- echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13465- if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13466- echo $ECHO_N "(cached) $ECHO_C" >&6
13467- else
13468- cat >conftest.$ac_ext <<_ACEOF
13469- #line $LINENO "configure"
13470- #include "confdefs.h"
13471- /* System header to define __stub macros and hopefully few prototypes,
13472- which can conflict with char gethostbyname_r (); below. */
13473- #include <assert.h>
13474- /* Override any gcc2 internal prototype to avoid an error. */
13475- #ifdef __cplusplus
13476- extern "C"
13477- #endif
13478- /* We use char because int might match the return type of a gcc2
13479- builtin and then its argument prototype would still apply. */
13480- char gethostbyname_r ();
13481- char (*f) ();
13482-
13483- #ifdef F77_DUMMY_MAIN
13484- # ifdef __cplusplus
13485- extern "C"
13486- # endif
13487- int F77_DUMMY_MAIN() { return 1; }
13488- #endif
13489- int
13490- main ()
13491- {
13492- /* The GNU C library defines this for functions which it implements
13493- to always fail with ENOSYS. Some functions are actually named
13494- something starting with __ and the normal name is an alias. */
13495- #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13496- choke me
13497- #else
13498- f = gethostbyname_r;
13499- #endif
13500-
13501- ;
13502- return 0;
13503- }
13387+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13388+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13389+ if test `eval echo '${'$as_ac_var'}'` = yes; then
13390+ cat >>confdefs.h <<_ACEOF
13391+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
1350413392_ACEOF
13505- rm -f conftest.$ac_objext conftest$ac_exeext
13506- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13507- (eval $ac_link) 2>&5
13508- ac_status=$?
13509- echo "$as_me:$LINENO: \$? = $ac_status" >&5
13510- (exit $ac_status); } &&
13511- { ac_try='test -s conftest$ac_exeext'
13512- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13513- (eval $ac_try) 2>&5
13514- ac_status=$?
13515- echo "$as_me:$LINENO: \$? = $ac_status" >&5
13516- (exit $ac_status); }; }; then
13517- ac_cv_func_gethostbyname_r=yes
13518- else
13519- echo "$as_me: failed program was:" >&5
13520- cat conftest.$ac_ext >&5
13521- ac_cv_func_gethostbyname_r=no
13522- fi
13523- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13524- fi
13525- echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13526- echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13527- if test $ac_cv_func_gethostbyname_r = yes; then
13528- :
13529- else
13530- { { echo "$as_me:$LINENO: error: gethostbyname_r not found, required on this platform for --enable-thread-safety" >&5
13531- echo "$as_me: error: gethostbyname_r not found, required on this platform for --enable-thread-safety" >&2;}
13532- { (exit 1); exit 1; }; }
13393+
1353313394fi
13395+ done
1353413396
1353513397CFLAGS="$_CFLAGS"
1353613398LIBS="$_LIBS"