summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure21
-rw-r--r--hints/hpux.sh2
-rw-r--r--reentr.pl2
3 files changed, 16 insertions, 9 deletions
diff --git a/Configure b/Configure
index 076f053fbf..6f24cd8149 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Fri Apr 5 20:56:35 EET DST 2002 [metaconfig 3.0 PL70]
+# Generated on Mon Apr 8 17:56:15 EET DST 2002 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -9111,6 +9111,14 @@ while test $# -ge 2; do
$define) echo "#include <$2>" >> try.c ;;
literal) echo "$2" >> try.c ;;
esac
+ # Extra magic for the benefit of systems that need pthread.h
+ # to be included early to correctly detect threadsafe functions.
+ # Such functions must guarantee themselves, though, that the usethreads
+ # and i_pthread have been defined, before calling protochk.
+ if test "$usethreads" = "$define" -a "$i_pthread" = "$define" -a "$pthread_h_first" = "$define" -a "$pthread_h_done" = ""; then
+ echo "#include <pthread.h>" >> try.c
+ pthread_h_done=yes
+ fi
shift 2
done
test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
@@ -9294,6 +9302,10 @@ case "$d_tm_tm_gmtoff" in
*) echo "No, it doesn't." ;;
esac
+: see if POSIX threads are available
+set pthread.h i_pthread
+eval $inhdr
+
: see if asctime_r exists
set asctime_r d_asctime_r
eval $inlibc
@@ -13815,13 +13827,6 @@ $rm -f try.* try
set d_off64_t
eval $setvar
-: see if POSIX threads are available
-set pthread.h i_pthread
-eval $inhdr
-
-
-
-
: how to create joinable pthreads
if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
echo " "
diff --git a/hints/hpux.sh b/hints/hpux.sh
index f354c0ffde..05f73d602e 100644
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -483,6 +483,8 @@ EOM
# tell perl.h to include <pthread.h> before other
# include files
ccflags="$ccflags -DPTHREAD_H_FIRST"
+# First column on purpose.
+pthread_h_first="$define"
# CMA redefines select to cma_select, and cma_select
# expects int * instead of fd_set * (just like 9.X)
diff --git a/reentr.pl b/reentr.pl
index 5c566f1ccf..8183ebcbe5 100644
--- a/reentr.pl
+++ b/reentr.pl
@@ -179,7 +179,7 @@ while (<DATA>) {
?RCS:
?RCS: Generated by the reentr.pl from the Perl 5.8 distribution.
?RCS:
-?MAKE:d_${f}_r ${f}_r_proto: Inlibc Protochk Hasproto i_systypes i_systime $prereqs usethreads
+?MAKE:d_${f}_r ${f}_r_proto: Inlibc Protochk Hasproto i_systypes i_systime $prereqs usethreads i_pthread
?MAKE: -pick add \$@ %<
?S:d_${f}_r:
?S: This variable conditionally defines the HAS_${F}_R symbol,