# $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
$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
*) 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
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 " "
# 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)
?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,