@@ -13102,6 +13102,7 @@ fi
13102
13102
#
13103
13103
# For each platform, we need to know about any special compile and link
13104
13104
# 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.
13105
13106
#
13106
13107
if test "$enable_thread_safety" = yes; then
13107
13108
if test "${ac_cv_header_pthread_h+set}" = set; then
@@ -13208,8 +13209,8 @@ fi
13208
13209
if test $ac_cv_header_pthread_h = yes; then
13209
13210
:
13210
13211
else
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;}
13213
13214
{ (exit 1); exit 1; }; }
13214
13215
fi
13215
13216
@@ -13221,12 +13222,14 @@ Cannot enable threads on your platform.
13221
13222
Please report your platform threading info to the PostgreSQL mailing lists
13222
13223
so it can be added to the next release. Report all compile flags, link flags,
13223
13224
functions, or libraries required for threading support.
13225
+ See the comment at the top of src/port/thread.c for more information.
13224
13226
" >&5
13225
13227
echo "$as_me: error:
13226
13228
Cannot enable threads on your platform.
13227
13229
Please report your platform threading info to the PostgreSQL mailing lists
13228
13230
so it can be added to the next release. Report all compile flags, link flags,
13229
13231
functions, or libraries required for threading support.
13232
+ See the comment at the top of src/port/thread.c for more information.
13230
13233
" >&2;}
13231
13234
{ (exit 1); exit 1; }; }
13232
13235
fi
@@ -13254,30 +13257,96 @@ _CFLAGS="$CFLAGS"
13254
13257
_LIBS="$LIBS"
13255
13258
CFLAGS="$CFLAGS $THREAD_CFLAGS"
13256
13259
LIBS="$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) ();
13257
13279
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
13258
13297
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
13259
13331
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
13266
13335
echo $ECHO_N "(cached) $ECHO_C" >&6
13267
13336
else
13268
13337
cat >conftest.$ac_ext <<_ACEOF
13269
13338
#line $LINENO "configure"
13270
13339
#include "confdefs.h"
13271
13340
/* System header to define __stub macros and hopefully few prototypes,
13272
- which can conflict with char $ac_func (); below. */
13341
+ which can conflict with char getpwuid_r (); below. */
13273
13342
#include <assert.h>
13274
13343
/* Override any gcc2 internal prototype to avoid an error. */
13275
13344
#ifdef __cplusplus
13276
13345
extern "C"
13277
13346
#endif
13278
13347
/* We use char because int might match the return type of a gcc2
13279
13348
builtin and then its argument prototype would still apply. */
13280
- char $ac_func ();
13349
+ char getpwuid_r ();
13281
13350
char (*f) ();
13282
13351
13283
13352
#ifdef F77_DUMMY_MAIN
@@ -13292,10 +13361,10 @@ main ()
13292
13361
/* The GNU C library defines this for functions which it implements
13293
13362
to always fail with ENOSYS. Some functions are actually named
13294
13363
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 )
13296
13365
choke me
13297
13366
#else
13298
- f = $ac_func ;
13367
+ f = getpwuid_r ;
13299
13368
#endif
13300
13369
13301
13370
;
@@ -13314,23 +13383,95 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13314
13383
ac_status=$?
13315
13384
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13316
13385
(exit $ac_status); }; }; then
13317
- eval "$as_ac_var =yes"
13386
+ ac_cv_func_getpwuid_r =yes
13318
13387
else
13319
13388
echo "$as_me: failed program was:" >&5
13320
13389
cat conftest.$ac_ext >&5
13321
- eval "$as_ac_var =no"
13390
+ ac_cv_func_getpwuid_r =no
13322
13391
fi
13323
13392
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13324
13393
fi
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
13331
13441
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; }; }
13332
13474
fi
13333
- done
13334
13475
13335
13476
CFLAGS="$_CFLAGS"
13336
13477
LIBS="$_LIBS"
0 commit comments