@@ -13102,6 +13102,7 @@ fi
1310213102#
1310313103# For each platform, we need to know about any special compile and link
1310413104# libraries, and whether the normal C function names are thread-safe.
13105+ # See the comment at the top of src/port/thread.c for more information.
1310513106#
1310613107if test "$enable_thread_safety" = yes; then
1310713108if test "${ac_cv_header_pthread_h+set}" = set; then
@@ -13208,8 +13209,8 @@ fi
1320813209if test $ac_cv_header_pthread_h = yes; then
1320913210 :
1321013211else
13211- { { echo "$as_me:$LINENO: error: pthread.h not found, required for --with-threads " >&5
13212- echo "$as_me: error: pthread.h not found, required for --with-threads " >&2;}
13212+ { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safetys " >&5
13213+ echo "$as_me: error: pthread.h not found, required for --enable-thread-safetys " >&2;}
1321313214 { (exit 1); exit 1; }; }
1321413215fi
1321513216
@@ -13221,12 +13222,14 @@ Cannot enable threads on your platform.
1322113222Please report your platform threading info to the PostgreSQL mailing lists
1322213223so it can be added to the next release. Report all compile flags, link flags,
1322313224functions, or libraries required for threading support.
13225+ See the comment at the top of src/port/thread.c for more information.
1322413226" >&5
1322513227echo "$as_me: error:
1322613228Cannot enable threads on your platform.
1322713229Please report your platform threading info to the PostgreSQL mailing lists
1322813230so it can be added to the next release. Report all compile flags, link flags,
1322913231functions, or libraries required for threading support.
13232+ See the comment at the top of src/port/thread.c for more information.
1323013233" >&2;}
1323113234 { (exit 1); exit 1; }; }
1323213235fi
@@ -13254,30 +13257,96 @@ _CFLAGS="$CFLAGS"
1325413257_LIBS="$LIBS"
1325513258CFLAGS="$CFLAGS $THREAD_CFLAGS"
1325613259LIBS="$LIBS $THREAD_LIBS"
13260+ echo "$as_me:$LINENO: checking for strerror_r" >&5
13261+ echo $ECHO_N "checking for strerror_r... $ECHO_C" >&6
13262+ if test "${ac_cv_func_strerror_r+set}" = set; then
13263+ echo $ECHO_N "(cached) $ECHO_C" >&6
13264+ else
13265+ cat >conftest.$ac_ext <<_ACEOF
13266+ #line $LINENO "configure"
13267+ #include "confdefs.h"
13268+ /* System header to define __stub macros and hopefully few prototypes,
13269+ which can conflict with char strerror_r (); below. */
13270+ #include <assert.h>
13271+ /* Override any gcc2 internal prototype to avoid an error. */
13272+ #ifdef __cplusplus
13273+ extern "C"
13274+ #endif
13275+ /* We use char because int might match the return type of a gcc2
13276+ builtin and then its argument prototype would still apply. */
13277+ char strerror_r ();
13278+ char (*f) ();
1325713279
13280+ #ifdef F77_DUMMY_MAIN
13281+ # ifdef __cplusplus
13282+ extern "C"
13283+ # endif
13284+ int F77_DUMMY_MAIN() { return 1; }
13285+ #endif
13286+ int
13287+ main ()
13288+ {
13289+ /* The GNU C library defines this for functions which it implements
13290+ to always fail with ENOSYS. Some functions are actually named
13291+ something starting with __ and the normal name is an alias. */
13292+ #if defined (__stub_strerror_r) || defined (__stub___strerror_r)
13293+ choke me
13294+ #else
13295+ f = strerror_r;
13296+ #endif
1325813297
13298+ ;
13299+ return 0;
13300+ }
13301+ _ACEOF
13302+ rm -f conftest.$ac_objext conftest$ac_exeext
13303+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13304+ (eval $ac_link) 2>&5
13305+ ac_status=$?
13306+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13307+ (exit $ac_status); } &&
13308+ { ac_try='test -s conftest$ac_exeext'
13309+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13310+ (eval $ac_try) 2>&5
13311+ ac_status=$?
13312+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313+ (exit $ac_status); }; }; then
13314+ ac_cv_func_strerror_r=yes
13315+ else
13316+ echo "$as_me: failed program was:" >&5
13317+ cat conftest.$ac_ext >&5
13318+ ac_cv_func_strerror_r=no
13319+ fi
13320+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13321+ fi
13322+ echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r" >&5
13323+ echo "${ECHO_T}$ac_cv_func_strerror_r" >&6
13324+ if test $ac_cv_func_strerror_r = yes; then
13325+ :
13326+ else
13327+ { { echo "$as_me:$LINENO: error: strerror_r not found, required on this platform for --enable-thread-safety" >&5
13328+ echo "$as_me: error: strerror_r not found, required on this platform for --enable-thread-safety" >&2;}
13329+ { (exit 1); exit 1; }; }
13330+ fi
1325913331
13260- for ac_func in strerror_r getpwuid_r gethostbyname_r
13261- do
13262- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13263- echo "$as_me:$LINENO: checking for $ac_func" >&5
13264- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13265- if eval "test \"\${$as_ac_var+set}\" = set"; then
13332+ echo "$as_me:$LINENO: checking for getpwuid_r" >&5
13333+ echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6
13334+ if test "${ac_cv_func_getpwuid_r+set}" = set; then
1326613335 echo $ECHO_N "(cached) $ECHO_C" >&6
1326713336else
1326813337 cat >conftest.$ac_ext <<_ACEOF
1326913338#line $LINENO "configure"
1327013339#include "confdefs.h"
1327113340/* System header to define __stub macros and hopefully few prototypes,
13272- which can conflict with char$ac_func (); below. */
13341+ which can conflict with chargetpwuid_r (); below. */
1327313342#include <assert.h>
1327413343/* Override any gcc2 internal prototype to avoid an error. */
1327513344#ifdef __cplusplus
1327613345extern "C"
1327713346#endif
1327813347/* We use char because int might match the return type of a gcc2
1327913348 builtin and then its argument prototype would still apply. */
13280- char$ac_func ();
13349+ chargetpwuid_r ();
1328113350char (*f) ();
1328213351
1328313352#ifdef F77_DUMMY_MAIN
@@ -13292,10 +13361,10 @@ main ()
1329213361/* The GNU C library defines this for functions which it implements
1329313362 to always fail with ENOSYS. Some functions are actually named
1329413363 something starting with __ and the normal name is an alias. */
13295- #if defined (__stub_$ac_func ) || defined (__stub___$ac_func )
13364+ #if defined (__stub_getpwuid_r ) || defined (__stub___getpwuid_r )
1329613365choke me
1329713366#else
13298- f =$ac_func ;
13367+ f =getpwuid_r ;
1329913368#endif
1330013369
1330113370 ;
@@ -13314,23 +13383,95 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1331413383 ac_status=$?
1331513384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1331613385 (exit $ac_status); }; }; then
13317- eval "$as_ac_var =yes"
13386+ ac_cv_func_getpwuid_r =yes
1331813387else
1331913388 echo "$as_me: failed program was:" >&5
1332013389cat conftest.$ac_ext >&5
13321- eval "$as_ac_var =no"
13390+ ac_cv_func_getpwuid_r =no
1332213391fi
1332313392rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1332413393fi
13325- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13326- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13327- if test `eval echo '${'$as_ac_var'}'` = yes; then
13328- cat >>confdefs.h <<_ACEOF
13329- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13330- _ACEOF
13394+ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5
13395+ echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6
13396+ if test $ac_cv_func_getpwuid_r = yes; then
13397+ :
13398+ else
13399+ { { echo "$as_me:$LINENO: error: getpwuid_r not found, required on this platform for --enable-thread-safety" >&5
13400+ echo "$as_me: error: getpwuid_r not found, required on this platform for --enable-thread-safety" >&2;}
13401+ { (exit 1); exit 1; }; }
13402+ fi
13403+
13404+ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13405+ echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13406+ if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13407+ echo $ECHO_N "(cached) $ECHO_C" >&6
13408+ else
13409+ cat >conftest.$ac_ext <<_ACEOF
13410+ #line $LINENO "configure"
13411+ #include "confdefs.h"
13412+ /* System header to define __stub macros and hopefully few prototypes,
13413+ which can conflict with char gethostbyname_r (); below. */
13414+ #include <assert.h>
13415+ /* Override any gcc2 internal prototype to avoid an error. */
13416+ #ifdef __cplusplus
13417+ extern "C"
13418+ #endif
13419+ /* We use char because int might match the return type of a gcc2
13420+ builtin and then its argument prototype would still apply. */
13421+ char gethostbyname_r ();
13422+ char (*f) ();
13423+
13424+ #ifdef F77_DUMMY_MAIN
13425+ # ifdef __cplusplus
13426+ extern "C"
13427+ # endif
13428+ int F77_DUMMY_MAIN() { return 1; }
13429+ #endif
13430+ int
13431+ main ()
13432+ {
13433+ /* The GNU C library defines this for functions which it implements
13434+ to always fail with ENOSYS. Some functions are actually named
13435+ something starting with __ and the normal name is an alias. */
13436+ #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13437+ choke me
13438+ #else
13439+ f = gethostbyname_r;
13440+ #endif
1333113441
13442+ ;
13443+ return 0;
13444+ }
13445+ _ACEOF
13446+ rm -f conftest.$ac_objext conftest$ac_exeext
13447+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13448+ (eval $ac_link) 2>&5
13449+ ac_status=$?
13450+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13451+ (exit $ac_status); } &&
13452+ { ac_try='test -s conftest$ac_exeext'
13453+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13454+ (eval $ac_try) 2>&5
13455+ ac_status=$?
13456+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13457+ (exit $ac_status); }; }; then
13458+ ac_cv_func_gethostbyname_r=yes
13459+ else
13460+ echo "$as_me: failed program was:" >&5
13461+ cat conftest.$ac_ext >&5
13462+ ac_cv_func_gethostbyname_r=no
13463+ fi
13464+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13465+ fi
13466+ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13467+ echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13468+ if test $ac_cv_func_gethostbyname_r = yes; then
13469+ :
13470+ else
13471+ { { echo "$as_me:$LINENO: error: gethostbyname_r not found, required on this platform for --enable-thread-safety" >&5
13472+ echo "$as_me: error: gethostbyname_r not found, required on this platform for --enable-thread-safety" >&2;}
13473+ { (exit 1); exit 1; }; }
1333213474fi
13333- done
1333413475
1333513476CFLAGS="$_CFLAGS"
1333613477LIBS="$_LIBS"