From: Jarkko Hietaniemi Date: Fri, 15 Mar 2002 16:07:58 +0000 (+0000) Subject: Monster _r patch: try to scan for all known _r variants, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10bc17b68c7666cd045658934ccb75dd788c8972;p=p5sagit%2Fp5-mst-13.2.git Monster _r patch: try to scan for all known _r variants, and then use them (under ithreads). May fail in HP-UX, and the op/groups is known to be fickle everywhere. Known to work in Solaris, Linux, Tru64, IRIX, AIX. (Some compiler warnings in AIX since the first arguments of getnetbyaddr and getnetbyadd_r are of different types. Thanks, IBM.) In non-Configure platforms deny the existence of any of the _r thingies. (Also add the recently introduced d_tm_* to places it wasn't already in.) TODO: the suggested glibc buffer growth retry loop in case some entries (at least for: gr*, host*) are big. Forgot win32/config.win64. p4raw-id: //depot/perl@15238 --- diff --git a/Configure b/Configure index 0f080a1..f88afcf 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 Mar 8 23:12:53 EET 2002 [metaconfig 3.0 PL70] +# Generated on Fri Mar 15 17:38:07 EET 2002 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ < protochk <> protochk <<'EOSH' + +$rm -f try.c +foo="$1" +shift +while test $# -ge 2; do + case "$1" in + $define) echo "#include <$2>" >> try.c ;; + literal) echo "$2" >> try.c ;; + esac + shift 2 +done +test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c +cat >> try.c <<'EOCP' +#ifdef CAN_PROTOTYPE +#define _(args) args +#else +#define _(args) () +#endif +EOCP +echo "$foo" >> try.c +echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c +$cc $optimize $ccflags -c try.c > /dev/null 2>&1 +status=$? +$rm -f try.[co] +exit $status +EOSH +chmod +x protochk +$eunicefix protochk + +: see if sys/types.h has to be included +set sys/types.h i_systypes +eval $inhdr + +: see if sys/select.h has to be included +set sys/select.h i_sysselct +eval $inhdr + +hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift; +while $test $# -ge 2; do + case "$1" in + $define) echo "#include <$2>";; + esac ; + shift 2; +done > try.c; +echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c; +set try; +if eval $compile; then + val="$define"; +else + val="$undef"; +fi; +set $varname; +eval $setvar; +$rm -f try.c try.o' + +: see if we should include time.h, sys/time.h, or both +echo " " +if test "X$timeincl" = X; then + echo "Testing to see if we should include , or both." >&4 + $echo $n "I'm now running the test program...$c" + $cat >try.c <<'EOCP' +#include +#ifdef I_TIME +#include +#endif +#ifdef I_SYSTIME +#ifdef SYSTIMEKERNEL +#define KERNEL +#endif +#include +#endif +#ifdef I_SYSSELECT +#include +#endif +int main() +{ + struct tm foo; +#ifdef S_TIMEVAL + struct timeval bar; +#endif +#ifdef S_TIMEZONE + struct timezone tzp; +#endif + if (foo.tm_sec == foo.tm_sec) + exit(0); +#ifdef S_TIMEVAL + if (bar.tv_sec == bar.tv_sec) + exit(0); +#endif + exit(1); +} +EOCP + flags='' + for s_timezone in '-DS_TIMEZONE' ''; do + sysselect='' + for s_timeval in '-DS_TIMEVAL' ''; do + for i_systimek in '' '-DSYSTIMEKERNEL'; do + for i_time in '' '-DI_TIME'; do + for i_systime in '-DI_SYSTIME' ''; do + case "$flags" in + '') $echo $n ".$c" + set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone + if eval $compile; then + set X $i_time $i_systime $i_systimek $sysselect $s_timeval + shift + flags="$*" + echo " " + $echo $n "Succeeded with $flags$c" + fi + ;; + esac + done + done + done + done + done + timeincl='' + echo " " + case "$flags" in + *SYSTIMEKERNEL*) i_systimek="$define" + timeincl=`./findhdr sys/time.h` + echo "We'll include with KERNEL defined." >&4;; + *) i_systimek="$undef";; + esac + case "$flags" in + *I_TIME*) i_time="$define" + timeincl=`./findhdr time.h`" $timeincl" + echo "We'll include ." >&4;; + *) i_time="$undef";; + esac + case "$flags" in + *I_SYSTIME*) i_systime="$define" + timeincl=`./findhdr sys/time.h`" $timeincl" + echo "We'll include ." >&4;; + *) i_systime="$undef";; + esac + $rm -f try.c try +fi +: see if struct tm knows about tm_zone +case "$i_systime$i_time" in +*$define*) + echo " " + echo "Checking to see if your struct tm has tm_zone field..." >&4 + set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h + eval $hasfield + ;; +*) val="$undef" + set d_tm_tm_zone + eval $setvar + ;; +esac +case "$d_tm_tm_zone" in +"$define") echo "Yes, it does." ;; +*) echo "No, it doesn't." ;; +esac +: see if struct tm knows about tm_gmtoff +case "$i_systime$i_time" in +*$define*) + echo " " + echo "Checking to see if your struct tm has tm_gmtoff field..." >&4 + set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h + eval $hasfield + ;; +*) val="$undef" + set d_tm_tm_gmtoff + eval $setvar + ;; +esac +case "$d_tm_tm_gmtoff" in +"$define") echo "Yes, it does." ;; +*) echo "No, it doesn't." ;; +esac + +: see if asctime_r exists +set asctime_r d_asctime_r +eval $inlibc +case "$d_asctime_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h" + case "$asctime_r_proto" in + ''|0) try='char* asctime_r(const struct tm*, char*);' + ./protochk "extern $try" $hdrs && asctime_r_proto=B_SB ;; + esac + case "$asctime_r_proto" in + ''|0) try='char* asctime_r(const struct tm*, char*, int);' + ./protochk "extern $try" $hdrs && asctime_r_proto=B_SBI ;; + esac + case "$asctime_r_proto" in + ''|0) try='int asctime_r(const struct tm*, char*);' + ./protochk "extern $try" $hdrs && asctime_r_proto=I_SB ;; + esac + case "$asctime_r_proto" in + ''|0) try='int asctime_r(const struct tm*, char*, int);' + ./protochk "extern $try" $hdrs && asctime_r_proto=I_SBI ;; + esac + case "$asctime_r_proto" in + '') d_asctime_r=undef + asctime_r_proto=0 + echo "Disabling asctime_r, cannot determine prototype." ;; + * ) case "$asctime_r_proto" in + REENTRANT_PROTO*) ;; + *) asctime_r_proto="REENTRANT_PROTO_$asctime_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) asctime_r_proto=0 + ;; +esac + : see if atolf exists set atolf d_atolf eval $inlibc @@ -9416,28 +9735,6 @@ set $varname; eval $setvar; $rm -f try.c try.o' -: see if sys/types.h has to be included -set sys/types.h i_systypes -eval $inhdr - -hasfield='varname=$1; struct=$2; field=$3; shift; shift; shift; -while $test $# -ge 2; do - case "$1" in - $define) echo "#include <$2>";; - esac ; - shift 2; -done > try.c; -echo "int main () { struct $struct foo; char* bar; bar = (char*)foo.$field; }" >> try.c; -set try; -if eval $compile; then - val="$define"; -else - val="$undef"; -fi; -set $varname; -eval $setvar; -$rm -f try.c try.o' - socketlib='' sockethdr='' : see whether socket exists @@ -9596,6 +9893,35 @@ $define) cryptlib='' ;; ;; esac +: see if this is a crypt.h system +set crypt.h i_crypt +eval $inhdr + +: see if crypt_r exists +set crypt_r d_crypt_r +eval $inlibc +case "$d_crypt_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_crypt crypt.h" + case "$crypt_r_proto" in + ''|0) try='char* crypt_r(const char*, const char*, struct crypt_data*);' + ./protochk "extern $try" $hdrs && crypt_r_proto=B_CCS ;; + esac + case "$crypt_r_proto" in + '') d_crypt_r=undef + crypt_r_proto=0 + echo "Disabling crypt_r, cannot determine prototype." ;; + * ) case "$crypt_r_proto" in + REENTRANT_PROTO*) ;; + *) crypt_r_proto="REENTRANT_PROTO_$crypt_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) crypt_r_proto=0 + ;; +esac + : get csh whereabouts case "$csh" in 'csh') val="$undef" ;; @@ -9608,6 +9934,68 @@ case "$full_csh" in '') full_csh=$csh ;; esac +: see if ctermid_r exists +set ctermid_r d_ctermid_r +eval $inlibc +case "$d_ctermid_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_stdio stdio.h" + case "$ctermid_r_proto" in + ''|0) try='char* ctermid_r(char*);' + ./protochk "extern $try" $hdrs && ctermid_r_proto=B_B ;; + esac + case "$ctermid_r_proto" in + '') d_ctermid_r=undef + ctermid_r_proto=0 + echo "Disabling ctermid_r, cannot determine prototype." ;; + * ) case "$ctermid_r_proto" in + REENTRANT_PROTO*) ;; + *) ctermid_r_proto="REENTRANT_PROTO_$ctermid_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) ctermid_r_proto=0 + ;; +esac + +: see if ctime_r exists +set ctime_r d_ctime_r +eval $inlibc +case "$d_ctime_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h" + case "$ctime_r_proto" in + ''|0) try='char* ctime_r(const time_t*, char*);' + ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;; + esac + case "$ctime_r_proto" in + ''|0) try='char* ctime_r(const time_t*, char*, int);' + ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;; + esac + case "$ctime_r_proto" in + ''|0) try='int ctime_r(const time_t*, char*);' + ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;; + esac + case "$ctime_r_proto" in + ''|0) try='int ctime_r(const time_t*, char*, int);' + ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;; + esac + case "$ctime_r_proto" in + '') d_ctime_r=undef + ctime_r_proto=0 + echo "Disabling ctime_r, cannot determine prototype." ;; + * ) case "$ctime_r_proto" in + REENTRANT_PROTO*) ;; + *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) ctime_r_proto=0 + ;; +esac + : see if cuserid exists set cuserid d_cuserid eval $inlibc @@ -9947,11 +10335,36 @@ $rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.* set d_dlsymun eval $setvar -: see if prototype for drand48 is available -echo " " -set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h -eval $hasproto - +: see if drand48_r exists +set drand48_r d_drand48_r +eval $inlibc +case "$d_drand48_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h" + case "$drand48_r_proto" in + ''|0) try='int drand48_r(struct drand48_data*, double*);' + ./protochk "extern $try" $hdrs && drand48_r_proto=I_ST ;; + esac + case "$drand48_r_proto" in + '') d_drand48_r=undef + drand48_r_proto=0 + echo "Disabling drand48_r, cannot determine prototype." ;; + * ) case "$drand48_r_proto" in + REENTRANT_PROTO*) ;; + *) drand48_r_proto="REENTRANT_PROTO_$drand48_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) drand48_r_proto=0 + ;; +esac + +: see if prototype for drand48 is available +echo " " +set d_drand48proto drand48 $i_stdlib stdlib.h $i_unistd unistd.h +eval $hasproto + : see if dup2 exists set dup2 d_dup2 eval $inlibc @@ -9964,26 +10377,317 @@ eval $inlibc set endgrent d_endgrent eval $inlibc +: see if this is an grp system +set grp.h i_grp +eval $inhdr + +case "$i_grp" in +$define) + xxx=`./findhdr grp.h` + $cppstdin $cppflags $cppminus < $xxx >$$.h + + if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then + val="$define" + else + val="$undef" + fi + set d_grpasswd + eval $setvar + + $rm -f $$.h + ;; +*) + val="$undef"; + set d_grpasswd; eval $setvar + ;; +esac + +: see if endgrent_r exists +set endgrent_r d_endgrent_r +eval $inlibc +case "$d_endgrent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h" + case "$endgrent_r_proto" in + ''|0) try='int endgrent_r(FILE**);' + ./protochk "extern $try" $hdrs && endgrent_r_proto=I_H ;; + esac + case "$endgrent_r_proto" in + ''|0) try='void endgrent_r(FILE**);' + ./protochk "extern $try" $hdrs && endgrent_r_proto=V_H ;; + esac + case "$endgrent_r_proto" in + '') d_endgrent_r=undef + endgrent_r_proto=0 + echo "Disabling endgrent_r, cannot determine prototype." ;; + * ) case "$endgrent_r_proto" in + REENTRANT_PROTO*) ;; + *) endgrent_r_proto="REENTRANT_PROTO_$endgrent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) endgrent_r_proto=0 + ;; +esac + : see if endhostent exists set endhostent d_endhent eval $inlibc +: see if this is a netdb.h system +set netdb.h i_netdb +eval $inhdr + +: see if endhostent_r exists +set endhostent_r d_endhostent_r +eval $inlibc +case "$d_endhostent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h" + case "$endhostent_r_proto" in + ''|0) try='int endhostent_r(struct hostent_data*);' + ./protochk "extern $try" $hdrs && endhostent_r_proto=I_S ;; + esac + case "$endhostent_r_proto" in + ''|0) try='void endhostent_r(struct hostent_data*);' + ./protochk "extern $try" $hdrs && endhostent_r_proto=V_S ;; + esac + case "$endhostent_r_proto" in + '') d_endhostent_r=undef + endhostent_r_proto=0 + echo "Disabling endhostent_r, cannot determine prototype." ;; + * ) case "$endhostent_r_proto" in + REENTRANT_PROTO*) ;; + *) endhostent_r_proto="REENTRANT_PROTO_$endhostent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) endhostent_r_proto=0 + ;; +esac + : see if endnetent exists set endnetent d_endnent eval $inlibc +: see if endnetent_r exists +set endnetent_r d_endnetent_r +eval $inlibc +case "$d_endnetent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h" + case "$endnetent_r_proto" in + ''|0) try='int endnetent_r(struct netent_data*);' + ./protochk "extern $try" $hdrs && endnetent_r_proto=I_S ;; + esac + case "$endnetent_r_proto" in + ''|0) try='void endnetent_r(struct netent_data*);' + ./protochk "extern $try" $hdrs && endnetent_r_proto=V_S ;; + esac + case "$endnetent_r_proto" in + '') d_endnetent_r=undef + endnetent_r_proto=0 + echo "Disabling endnetent_r, cannot determine prototype." ;; + * ) case "$endnetent_r_proto" in + REENTRANT_PROTO*) ;; + *) endnetent_r_proto="REENTRANT_PROTO_$endnetent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) endnetent_r_proto=0 + ;; +esac + : see if endprotoent exists set endprotoent d_endpent eval $inlibc +: see if endprotoent_r exists +set endprotoent_r d_endprotoent_r +eval $inlibc +case "$d_endprotoent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h" + case "$endprotoent_r_proto" in + ''|0) try='int endprotoent_r(struct protoent_data*);' + ./protochk "extern $try" $hdrs && endprotoent_r_proto=I_S ;; + esac + case "$endprotoent_r_proto" in + ''|0) try='void endprotoent_r(struct protoent_data*);' + ./protochk "extern $try" $hdrs && endprotoent_r_proto=V_S ;; + esac + case "$endprotoent_r_proto" in + '') d_endprotoent_r=undef + endprotoent_r_proto=0 + echo "Disabling endprotoent_r, cannot determine prototype." ;; + * ) case "$endprotoent_r_proto" in + REENTRANT_PROTO*) ;; + *) endprotoent_r_proto="REENTRANT_PROTO_$endprotoent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) endprotoent_r_proto=0 + ;; +esac + : see if endpwent exists set endpwent d_endpwent eval $inlibc +: see if this is a pwd.h system +set pwd.h i_pwd +eval $inhdr + +case "$i_pwd" in +$define) + xxx=`./findhdr pwd.h` + $cppstdin $cppflags $cppminus < $xxx >$$.h + + if $contains 'pw_quota' $$.h >/dev/null 2>&1; then + val="$define" + else + val="$undef" + fi + set d_pwquota + eval $setvar + + if $contains 'pw_age' $$.h >/dev/null 2>&1; then + val="$define" + else + val="$undef" + fi + set d_pwage + eval $setvar + + if $contains 'pw_change' $$.h >/dev/null 2>&1; then + val="$define" + else + val="$undef" + fi + set d_pwchange + eval $setvar + + if $contains 'pw_class' $$.h >/dev/null 2>&1; then + val="$define" + else + val="$undef" + fi + set d_pwclass + eval $setvar + + if $contains 'pw_expire' $$.h >/dev/null 2>&1; then + val="$define" + else + val="$undef" + fi + set d_pwexpire + eval $setvar + + if $contains 'pw_comment' $$.h >/dev/null 2>&1; then + val="$define" + else + val="$undef" + fi + set d_pwcomment + eval $setvar + + if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then + val="$define" + else + val="$undef" + fi + set d_pwgecos + eval $setvar + + if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then + val="$define" + else + val="$undef" + fi + set d_pwpasswd + eval $setvar + + $rm -f $$.h + ;; +*) + val="$undef"; + set d_pwquota; eval $setvar + set d_pwage; eval $setvar + set d_pwchange; eval $setvar + set d_pwclass; eval $setvar + set d_pwexpire; eval $setvar + set d_pwcomment; eval $setvar + set d_pwgecos; eval $setvar + set d_pwpasswd; eval $setvar + ;; +esac + +: see if endpwent_r exists +set endpwent_r d_endpwent_r +eval $inlibc +case "$d_endpwent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h" + case "$endpwent_r_proto" in + ''|0) try='int endpwent_r(FILE**);' + ./protochk "extern $try" $hdrs && endpwent_r_proto=I_H ;; + esac + case "$endpwent_r_proto" in + ''|0) try='void endpwent_r(FILE**);' + ./protochk "extern $try" $hdrs && endpwent_r_proto=V_H ;; + esac + case "$endpwent_r_proto" in + '') d_endpwent_r=undef + endpwent_r_proto=0 + echo "Disabling endpwent_r, cannot determine prototype." ;; + * ) case "$endpwent_r_proto" in + REENTRANT_PROTO*) ;; + *) endpwent_r_proto="REENTRANT_PROTO_$endpwent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) endpwent_r_proto=0 + ;; +esac + : see if endservent exists set endservent d_endsent eval $inlibc +: see if endservent_r exists +set endservent_r d_endservent_r +eval $inlibc +case "$d_endservent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h" + case "$endservent_r_proto" in + ''|0) try='int endservent_r(struct servent_data*);' + ./protochk "extern $try" $hdrs && endservent_r_proto=I_S ;; + esac + case "$endservent_r_proto" in + ''|0) try='void endservent_r(struct servent_data*);' + ./protochk "extern $try" $hdrs && endservent_r_proto=V_S ;; + esac + case "$endservent_r_proto" in + '') d_endservent_r=undef + endservent_r_proto=0 + echo "Disabling endservent_r, cannot determine prototype." ;; + * ) case "$endservent_r_proto" in + REENTRANT_PROTO*) ;; + *) endservent_r_proto="REENTRANT_PROTO_$endservent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) endservent_r_proto=0 + ;; +esac + : Locate the flags for 'open()' echo " " $cat >try.c <<'EOCP' @@ -10393,128 +11097,6 @@ eval $setvar $rm -f try* -: see if sys/select.h has to be included -set sys/select.h i_sysselct -eval $inhdr - -: see if we should include time.h, sys/time.h, or both -echo " " -if test "X$timeincl" = X; then - echo "Testing to see if we should include , or both." >&4 - $echo $n "I'm now running the test program...$c" - $cat >try.c <<'EOCP' -#include -#ifdef I_TIME -#include -#endif -#ifdef I_SYSTIME -#ifdef SYSTIMEKERNEL -#define KERNEL -#endif -#include -#endif -#ifdef I_SYSSELECT -#include -#endif -int main() -{ - struct tm foo; -#ifdef S_TIMEVAL - struct timeval bar; -#endif -#ifdef S_TIMEZONE - struct timezone tzp; -#endif - if (foo.tm_sec == foo.tm_sec) - exit(0); -#ifdef S_TIMEVAL - if (bar.tv_sec == bar.tv_sec) - exit(0); -#endif - exit(1); -} -EOCP - flags='' - for s_timezone in '-DS_TIMEZONE' ''; do - sysselect='' - for s_timeval in '-DS_TIMEVAL' ''; do - for i_systimek in '' '-DSYSTIMEKERNEL'; do - for i_time in '' '-DI_TIME'; do - for i_systime in '-DI_SYSTIME' ''; do - case "$flags" in - '') $echo $n ".$c" - set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone - if eval $compile; then - set X $i_time $i_systime $i_systimek $sysselect $s_timeval - shift - flags="$*" - echo " " - $echo $n "Succeeded with $flags$c" - fi - ;; - esac - done - done - done - done - done - timeincl='' - echo " " - case "$flags" in - *SYSTIMEKERNEL*) i_systimek="$define" - timeincl=`./findhdr sys/time.h` - echo "We'll include with KERNEL defined." >&4;; - *) i_systimek="$undef";; - esac - case "$flags" in - *I_TIME*) i_time="$define" - timeincl=`./findhdr time.h`" $timeincl" - echo "We'll include ." >&4;; - *) i_time="$undef";; - esac - case "$flags" in - *I_SYSTIME*) i_systime="$define" - timeincl=`./findhdr sys/time.h`" $timeincl" - echo "We'll include ." >&4;; - *) i_systime="$undef";; - esac - $rm -f try.c try -fi -: see if struct tm knows about tm_zone -case "$i_systime$i_time" in -*$define*) - echo " " - echo "Checking to see if your struct tm has tm_zone field..." >&4 - set d_tm_tm_zone tm tm_zone $i_systime sys/time.h $i_time time.h - eval $hasfield - ;; -*) val="$undef" - set d_tm_tm_zone - eval $setvar - ;; -esac -case "$d_tm_tm_zone" in -"$define") echo "Yes, it does." ;; -*) echo "No, it doesn't." ;; -esac -: see if struct tm knows about tm_gmtoff -case "$i_systime$i_time" in -*$define*) - echo " " - echo "Checking to see if your struct tm has tm_gmtoff field..." >&4 - set d_tm_tm_gmtoff tm tm_gmtoff $i_systime sys/time.h $i_time time.h - eval $hasfield - ;; -*) val="$undef" - set d_tm_tm_gmtoff - eval $setvar - ;; -esac -case "$d_tm_tm_gmtoff" in -"$define") echo "Yes, it does." ;; -*) echo "No, it doesn't." ;; -esac - : check for fd_set items $cat <$$.h - - if $contains 'gr_passwd' $$.h >/dev/null 2>&1; then - val="$define" - else - val="$undef" - fi - set d_grpasswd - eval $setvar - - $rm -f $$.h +: see if gmtime_r exists +set gmtime_r d_gmtime_r +eval $inlibc +case "$d_gmtime_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h" + case "$gmtime_r_proto" in + ''|0) try='struct tm* gmtime_r(const time_t*, struct tm*);' + ./protochk "extern $try" $hdrs && gmtime_r_proto=S_TS ;; + esac + case "$gmtime_r_proto" in + ''|0) try='int gmtime_r(const time_t*, struct tm*);' + ./protochk "extern $try" $hdrs && gmtime_r_proto=I_TS ;; + esac + case "$gmtime_r_proto" in + '') d_gmtime_r=undef + gmtime_r_proto=0 + echo "Disabling gmtime_r, cannot determine prototype." ;; + * ) case "$gmtime_r_proto" in + REENTRANT_PROTO*) ;; + *) gmtime_r_proto="REENTRANT_PROTO_$gmtime_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac ;; -*) - val="$undef"; - set d_grpasswd; eval $setvar +*) gmtime_r_proto=0 ;; esac @@ -11183,6 +12553,35 @@ eval $setvar set link d_link eval $inlibc +: see if localtime_r exists +set localtime_r d_localtime_r +eval $inlibc +case "$d_localtime_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h" + case "$localtime_r_proto" in + ''|0) try='struct tm* localtime_r(const time_t*, struct tm*);' + ./protochk "extern $try" $hdrs && localtime_r_proto=S_TS ;; + esac + case "$localtime_r_proto" in + ''|0) try='int localtime_r(const time_t*, struct tm*);' + ./protochk "extern $try" $hdrs && localtime_r_proto=I_TS ;; + esac + case "$localtime_r_proto" in + '') d_localtime_r=undef + localtime_r_proto=0 + echo "Disabling localtime_r, cannot determine prototype." ;; + * ) case "$localtime_r_proto" in + REENTRANT_PROTO*) ;; + *) localtime_r_proto="REENTRANT_PROTO_$localtime_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) localtime_r_proto=0 + ;; +esac + : see if localeconv exists set localeconv d_locconv eval $inlibc @@ -11867,129 +13266,66 @@ $define) *) echo 'sched_yield() NOT found.' >&4 ;; esac esac -set d_sched_yield -eval $setvar - -: see if pthread_yield exists -set try -DPTHREAD_YIELD -if eval $compile; then - val="$define" - case "$sched_yield" in - '') sched_yield='pthread_yield()' ;; - esac -else - set try -DPTHREAD_YIELD_NULL - if eval $compile; then - val="$define" - case "$sched_yield" in - '') sched_yield='pthread_yield(NULL)' ;; - esac - else - val="$undef" - fi -fi -case "$usethreads" in -$define) - case "$val" in - $define) echo 'pthread_yield() found.' >&4 ;; - *) echo 'pthread_yield() NOT found.' >&4 ;; - esac - ;; -esac -set d_pthread_yield -eval $setvar - -case "$sched_yield" in -'') sched_yield=undef ;; -esac - -$rm -f try try.* - -: see if this is a pwd.h system -set pwd.h i_pwd -eval $inhdr - -case "$i_pwd" in -$define) - xxx=`./findhdr pwd.h` - $cppstdin $cppflags $cppminus < $xxx >$$.h - - if $contains 'pw_quota' $$.h >/dev/null 2>&1; then - val="$define" - else - val="$undef" - fi - set d_pwquota - eval $setvar - - if $contains 'pw_age' $$.h >/dev/null 2>&1; then - val="$define" - else - val="$undef" - fi - set d_pwage - eval $setvar - - if $contains 'pw_change' $$.h >/dev/null 2>&1; then - val="$define" - else - val="$undef" - fi - set d_pwchange - eval $setvar - - if $contains 'pw_class' $$.h >/dev/null 2>&1; then - val="$define" - else - val="$undef" - fi - set d_pwclass - eval $setvar - - if $contains 'pw_expire' $$.h >/dev/null 2>&1; then - val="$define" - else - val="$undef" - fi - set d_pwexpire - eval $setvar - - if $contains 'pw_comment' $$.h >/dev/null 2>&1; then - val="$define" - else - val="$undef" - fi - set d_pwcomment - eval $setvar +set d_sched_yield +eval $setvar - if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then - val="$define" - else - val="$undef" - fi - set d_pwgecos - eval $setvar +: see if pthread_yield exists +set try -DPTHREAD_YIELD +if eval $compile; then + val="$define" + case "$sched_yield" in + '') sched_yield='pthread_yield()' ;; + esac +else + set try -DPTHREAD_YIELD_NULL + if eval $compile; then + val="$define" + case "$sched_yield" in + '') sched_yield='pthread_yield(NULL)' ;; + esac + else + val="$undef" + fi +fi +case "$usethreads" in +$define) + case "$val" in + $define) echo 'pthread_yield() found.' >&4 ;; + *) echo 'pthread_yield() NOT found.' >&4 ;; + esac + ;; +esac +set d_pthread_yield +eval $setvar - if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then - val="$define" - else - val="$undef" - fi - set d_pwpasswd - eval $setvar +case "$sched_yield" in +'') sched_yield=undef ;; +esac - $rm -f $$.h +$rm -f try try.* + +: see if random_r exists +set random_r d_random_r +eval $inlibc +case "$d_random_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h" + case "$random_r_proto" in + ''|0) try='int random_r(int*, struct random_data*);' + ./protochk "extern $try" $hdrs && random_r_proto=I_TS ;; + esac + case "$random_r_proto" in + '') d_random_r=undef + random_r_proto=0 + echo "Disabling random_r, cannot determine prototype." ;; + * ) case "$random_r_proto" in + REENTRANT_PROTO*) ;; + *) random_r_proto="REENTRANT_PROTO_$random_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac ;; -*) - val="$undef"; - set d_pwquota; eval $setvar - set d_pwage; eval $setvar - set d_pwchange; eval $setvar - set d_pwclass; eval $setvar - set d_pwexpire; eval $setvar - set d_pwcomment; eval $setvar - set d_pwgecos; eval $setvar - set d_pwpasswd; eval $setvar +*) random_r_proto=0 ;; esac @@ -12003,6 +13339,64 @@ eval $inlibc set rewinddir d_rewinddir eval $inlibc +: see if readdir64_r exists +set readdir64_r d_readdir64_r +eval $inlibc +case "$d_readdir64_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h" + case "$readdir64_r_proto" in + ''|0) try='int readdir64_r(DIR*, struct dirent64*, struct dirent64**);' + ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TSR ;; + esac + case "$readdir64_r_proto" in + ''|0) try='int readdir64_r(DIR*, struct dirent64*);' + ./protochk "extern $try" $hdrs && readdir64_r_proto=I_TS ;; + esac + case "$readdir64_r_proto" in + '') d_readdir64_r=undef + readdir64_r_proto=0 + echo "Disabling readdir64_r, cannot determine prototype." ;; + * ) case "$readdir64_r_proto" in + REENTRANT_PROTO*) ;; + *) readdir64_r_proto="REENTRANT_PROTO_$readdir64_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) readdir64_r_proto=0 + ;; +esac + +: see if readdir_r exists +set readdir_r d_readdir_r +eval $inlibc +case "$d_readdir_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_dirent dirent.h" + case "$readdir_r_proto" in + ''|0) try='int readdir_r(DIR*, struct dirent*, struct dirent**);' + ./protochk "extern $try" $hdrs && readdir_r_proto=I_TSR ;; + esac + case "$readdir_r_proto" in + ''|0) try='int readdir_r(DIR*, struct dirent*);' + ./protochk "extern $try" $hdrs && readdir_r_proto=I_TS ;; + esac + case "$readdir_r_proto" in + '') d_readdir_r=undef + readdir_r_proto=0 + echo "Disabling readdir_r, cannot determine prototype." ;; + * ) case "$readdir_r_proto" in + REENTRANT_PROTO*) ;; + *) readdir_r_proto="REENTRANT_PROTO_$readdir_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) readdir_r_proto=0 + ;; +esac + : see if readv exists set readv d_readv eval $inlibc @@ -12507,10 +13901,68 @@ eval $inlibc set setgrent d_setgrent eval $inlibc +: see if setgrent_r exists +set setgrent_r d_setgrent_r +eval $inlibc +case "$d_setgrent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_grp grp.h" + case "$setgrent_r_proto" in + ''|0) try='int setgrent_r(FILE**);' + ./protochk "extern $try" $hdrs && setgrent_r_proto=I_H ;; + esac + case "$setgrent_r_proto" in + ''|0) try='void setgrent_r(FILE**);' + ./protochk "extern $try" $hdrs && setgrent_r_proto=V_H ;; + esac + case "$setgrent_r_proto" in + '') d_setgrent_r=undef + setgrent_r_proto=0 + echo "Disabling setgrent_r, cannot determine prototype." ;; + * ) case "$setgrent_r_proto" in + REENTRANT_PROTO*) ;; + *) setgrent_r_proto="REENTRANT_PROTO_$setgrent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) setgrent_r_proto=0 + ;; +esac + : see if sethostent exists set sethostent d_sethent eval $inlibc +: see if sethostent_r exists +set sethostent_r d_sethostent_r +eval $inlibc +case "$d_sethostent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h" + case "$sethostent_r_proto" in + ''|0) try='int sethostent_r(int, struct hostent_data*);' + ./protochk "extern $try" $hdrs && sethostent_r_proto=I_ID ;; + esac + case "$sethostent_r_proto" in + ''|0) try='void sethostent_r(int, struct hostent_data*);' + ./protochk "extern $try" $hdrs && sethostent_r_proto=V_ID ;; + esac + case "$sethostent_r_proto" in + '') d_sethostent_r=undef + sethostent_r_proto=0 + echo "Disabling sethostent_r, cannot determine prototype." ;; + * ) case "$sethostent_r_proto" in + REENTRANT_PROTO*) ;; + *) sethostent_r_proto="REENTRANT_PROTO_$sethostent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) sethostent_r_proto=0 + ;; +esac + : see if setitimer exists set setitimer d_setitimer eval $inlibc @@ -12523,10 +13975,68 @@ eval $inlibc set setlocale d_setlocale eval $inlibc +: see if locale.h is available +set locale.h i_locale +eval $inhdr + +: see if setlocale_r exists +set setlocale_r d_setlocale_r +eval $inlibc +case "$d_setlocale_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_locale locale.h" + case "$setlocale_r_proto" in + ''|0) try='int setlocale_r(int, const char*, char*, int);' + ./protochk "extern $try" $hdrs && setlocale_r_proto=I_ICBI ;; + esac + case "$setlocale_r_proto" in + '') d_setlocale_r=undef + setlocale_r_proto=0 + echo "Disabling setlocale_r, cannot determine prototype." ;; + * ) case "$setlocale_r_proto" in + REENTRANT_PROTO*) ;; + *) setlocale_r_proto="REENTRANT_PROTO_$setlocale_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) setlocale_r_proto=0 + ;; +esac + : see if setnetent exists set setnetent d_setnent eval $inlibc +: see if setnetent_r exists +set setnetent_r d_setnetent_r +eval $inlibc +case "$d_setnetent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h" + case "$setnetent_r_proto" in + ''|0) try='int setnetent_r(int, struct netent_data*);' + ./protochk "extern $try" $hdrs && setnetent_r_proto=I_ID ;; + esac + case "$setnetent_r_proto" in + ''|0) try='void setnetent_r(int, struct netent_data*);' + ./protochk "extern $try" $hdrs && setnetent_r_proto=V_ID ;; + esac + case "$setnetent_r_proto" in + '') d_setnetent_r=undef + setnetent_r_proto=0 + echo "Disabling setnetent_r, cannot determine prototype." ;; + * ) case "$setnetent_r_proto" in + REENTRANT_PROTO*) ;; + *) setnetent_r_proto="REENTRANT_PROTO_$setnetent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) setnetent_r_proto=0 + ;; +esac + : see if setprotoent exists set setprotoent d_setpent eval $inlibc @@ -12547,10 +14057,68 @@ eval $inlibc set setproctitle d_setproctitle eval $inlibc +: see if setprotoent_r exists +set setprotoent_r d_setprotoent_r +eval $inlibc +case "$d_setprotoent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h" + case "$setprotoent_r_proto" in + ''|0) try='int setprotoent_r(int, struct protoent_data*);' + ./protochk "extern $try" $hdrs && setprotoent_r_proto=I_ID ;; + esac + case "$setprotoent_r_proto" in + ''|0) try='void setprotoent_r(int, struct protoent_data*);' + ./protochk "extern $try" $hdrs && setprotoent_r_proto=V_ID ;; + esac + case "$setprotoent_r_proto" in + '') d_setprotoent_r=undef + setprotoent_r_proto=0 + echo "Disabling setprotoent_r, cannot determine prototype." ;; + * ) case "$setprotoent_r_proto" in + REENTRANT_PROTO*) ;; + *) setprotoent_r_proto="REENTRANT_PROTO_$setprotoent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) setprotoent_r_proto=0 + ;; +esac + : see if setpwent exists set setpwent d_setpwent eval $inlibc +: see if setpwent_r exists +set setpwent_r d_setpwent_r +eval $inlibc +case "$d_setpwent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h" + case "$setpwent_r_proto" in + ''|0) try='int setpwent_r(FILE**);' + ./protochk "extern $try" $hdrs && setpwent_r_proto=I_H ;; + esac + case "$setpwent_r_proto" in + ''|0) try='void setpwent_r(FILE**);' + ./protochk "extern $try" $hdrs && setpwent_r_proto=V_H ;; + esac + case "$setpwent_r_proto" in + '') d_setpwent_r=undef + setpwent_r_proto=0 + echo "Disabling setpwent_r, cannot determine prototype." ;; + * ) case "$setpwent_r_proto" in + REENTRANT_PROTO*) ;; + *) setpwent_r_proto="REENTRANT_PROTO_$setpwent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) setpwent_r_proto=0 + ;; +esac + : see if setregid exists set setregid d_setregid eval $inlibc @@ -12575,6 +14143,35 @@ eval $inlibc set setservent d_setsent eval $inlibc +: see if setservent_r exists +set setservent_r d_setservent_r +eval $inlibc +case "$d_setservent_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_netdb netdb.h" + case "$setservent_r_proto" in + ''|0) try='int setservent_r(int, struct servent_data*);' + ./protochk "extern $try" $hdrs && setservent_r_proto=I_ID ;; + esac + case "$setservent_r_proto" in + ''|0) try='void setservent_r(int, struct servent_data*);' + ./protochk "extern $try" $hdrs && setservent_r_proto=V_ID ;; + esac + case "$setservent_r_proto" in + '') d_setservent_r=undef + setservent_r_proto=0 + echo "Disabling setservent_r, cannot determine prototype." ;; + * ) case "$setservent_r_proto" in + REENTRANT_PROTO*) ;; + *) setservent_r_proto="REENTRANT_PROTO_$setservent_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) setservent_r_proto=0 + ;; +esac + : see if setsid exists set setsid d_setsid eval $inlibc @@ -12830,6 +14427,56 @@ eval $hasproto set socks5_init d_socks5_init eval $inlibc +: see if srand48_r exists +set srand48_r d_srand48_r +eval $inlibc +case "$d_srand48_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h" + case "$srand48_r_proto" in + ''|0) try='int srand48_r(long, struct drand48_data*);' + ./protochk "extern $try" $hdrs && srand48_r_proto=I_LS ;; + esac + case "$srand48_r_proto" in + '') d_srand48_r=undef + srand48_r_proto=0 + echo "Disabling srand48_r, cannot determine prototype." ;; + * ) case "$srand48_r_proto" in + REENTRANT_PROTO*) ;; + *) srand48_r_proto="REENTRANT_PROTO_$srand48_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) srand48_r_proto=0 + ;; +esac + +: see if srandom_r exists +set srandom_r d_srandom_r +eval $inlibc +case "$d_srandom_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_stdlib stdlib.h" + case "$srandom_r_proto" in + ''|0) try='int srandom_r(unsigned int, struct random_data*);' + ./protochk "extern $try" $hdrs && srandom_r_proto=I_TS ;; + esac + case "$srandom_r_proto" in + '') d_srandom_r=undef + srandom_r_proto=0 + echo "Disabling srandom_r, cannot determine prototype." ;; + * ) case "$srandom_r_proto" in + REENTRANT_PROTO*) ;; + *) srandom_r_proto="REENTRANT_PROTO_$srandom_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) srandom_r_proto=0 + ;; +esac + : see if prototype for setresgid is available echo " " set d_sresgproto setresgid $i_unistd unistd.h @@ -13229,6 +14876,39 @@ if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then fi fi +: see if strerror_r exists +set strerror_r d_strerror_r +eval $inlibc +case "$d_strerror_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h" + case "$strerror_r_proto" in + ''|0) try='int strerror_r(int, char*, size_t);' + ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;; + esac + case "$strerror_r_proto" in + ''|0) try='int strerror_r(int, char*, int);' + ./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;; + esac + case "$strerror_r_proto" in + ''|0) try='char* strerror_r(int, char*, size_t);' + ./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;; + esac + case "$strerror_r_proto" in + '') d_strerror_r=undef + strerror_r_proto=0 + echo "Disabling strerror_r, cannot determine prototype." ;; + * ) case "$strerror_r_proto" in + REENTRANT_PROTO*) ;; + *) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) strerror_r_proto=0 + ;; +esac + : see if strftime exists set strftime d_strftime eval $inlibc @@ -13551,10 +15231,68 @@ else clocktype='int' fi +: see if tmpnam_r exists +set tmpnam_r d_tmpnam_r +eval $inlibc +case "$d_tmpnam_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_stdio stdio.h" + case "$tmpnam_r_proto" in + ''|0) try='char* tmpnam_r(char*);' + ./protochk "extern $try" $hdrs && tmpnam_r_proto=B_B ;; + esac + case "$tmpnam_r_proto" in + '') d_tmpnam_r=undef + tmpnam_r_proto=0 + echo "Disabling tmpnam_r, cannot determine prototype." ;; + * ) case "$tmpnam_r_proto" in + REENTRANT_PROTO*) ;; + *) tmpnam_r_proto="REENTRANT_PROTO_$tmpnam_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) tmpnam_r_proto=0 + ;; +esac + : see if truncate exists set truncate d_truncate eval $inlibc +: see if ttyname_r exists +set ttyname_r d_ttyname_r +eval $inlibc +case "$d_ttyname_r" in +"$define") + hdrs="$i_systypes sys/types.h define stdio.h $i_unistd unistd.h" + case "$ttyname_r_proto" in + ''|0) try='int ttyname_r(int, char*, size_t);' + ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBW ;; + esac + case "$ttyname_r_proto" in + ''|0) try='int ttyname_r(int, char*, int);' + ./protochk "extern $try" $hdrs && ttyname_r_proto=I_IBI ;; + esac + case "$ttyname_r_proto" in + ''|0) try='char* ttyname_r(int, char*, int);' + ./protochk "extern $try" $hdrs && ttyname_r_proto=B_IBI ;; + esac + case "$ttyname_r_proto" in + '') d_ttyname_r=undef + ttyname_r_proto=0 + echo "Disabling ttyname_r, cannot determine prototype." ;; + * ) case "$ttyname_r_proto" in + REENTRANT_PROTO*) ;; + *) ttyname_r_proto="REENTRANT_PROTO_$ttyname_r_proto" ;; + esac + echo "Prototype: $try" ;; + esac + ;; +*) ttyname_r_proto=0 + ;; +esac + : see if tzname[] exists echo " " if set tzname val -a d_tzname; eval $csym; $val; then @@ -15193,47 +16931,6 @@ EOCP ;; esac -: define a fucntion to check prototypes -$cat > protochk <> protochk <<'EOSH' - -$rm -f try.c -foo="$1" -shift -while test $# -ge 2; do - case "$1" in - $define) echo "#include <$2>" >> try.c ;; - literal) echo "$2" >> try.c ;; - esac - shift 2 -done -test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c -cat >> try.c <<'EOCP' -#ifdef CAN_PROTOTYPE -#define _(args) args -#else -#define _(args) () -#endif -EOCP -echo "$foo" >> try.c -echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c -$cc $optimize $ccflags -c try.c > /dev/null 2>&1 -status=$? -$rm -f try.[co] -exit $status -EOSH -chmod +x protochk -$eunicefix protochk - : see what type is used for size_t rp="What is the type used for the length parameter for string functions?" set size_t sizetype 'unsigned int' stdio.h sys/types.h @@ -16220,10 +17917,6 @@ esac set libutil.h i_libutil eval $inhdr -: see if locale.h is available -set locale.h i_locale -eval $inhdr - : see if mach cthreads are available if test "X$usethreads" = "X$define"; then set mach/cthreads.h i_machcthr @@ -16570,10 +18263,6 @@ set i_termio; eval $setvar val=$val2; set i_sgtty; eval $setvar val=$val3; set i_termios; eval $setvar -: see if this is a shadow.h system -set shadow.h i_shadow -eval $inhdr - : see if stddef is available set stddef.h i_stddef eval $inhdr @@ -17109,6 +18798,7 @@ archlibexp='$archlibexp' archname64='$archname64' archname='$archname' archobjs='$archobjs' +asctime_r_proto='$asctime_r_proto' awk='$awk' baserev='$baserev' bash='$bash' @@ -17151,8 +18841,11 @@ cppminus='$cppminus' cpprun='$cpprun' cppstdin='$cppstdin' cppsymbols='$cppsymbols' +crypt_r_proto='$crypt_r_proto' cryptlib='$cryptlib' csh='$csh' +ctermid_r_proto='$ctermid_r_proto' +ctime_r_proto='$ctime_r_proto' d_Gconvert='$d_Gconvert' d_PRIEUldbl='$d_PRIEUldbl' d_PRIFUldbl='$d_PRIFUldbl' @@ -17172,6 +18865,7 @@ d_access='$d_access' d_accessx='$d_accessx' d_alarm='$d_alarm' d_archlib='$d_archlib' +d_asctime_r='$d_asctime_r' d_atolf='$d_atolf' d_atoll='$d_atoll' d_attribut='$d_attribut' @@ -17193,7 +18887,10 @@ d_closedir='$d_closedir' d_cmsghdr_s='$d_cmsghdr_s' d_const='$d_const' d_crypt='$d_crypt' +d_crypt_r='$d_crypt_r' d_csh='$d_csh' +d_ctermid_r='$d_ctermid_r' +d_ctime_r='$d_ctime_r' d_cuserid='$d_cuserid' d_dbl_dig='$d_dbl_dig' d_dbminitproto='$d_dbminitproto' @@ -17204,15 +18901,22 @@ d_dlerror='$d_dlerror' d_dlopen='$d_dlopen' d_dlsymun='$d_dlsymun' d_dosuid='$d_dosuid' +d_drand48_r='$d_drand48_r' d_drand48proto='$d_drand48proto' d_dup2='$d_dup2' d_eaccess='$d_eaccess' d_endgrent='$d_endgrent' +d_endgrent_r='$d_endgrent_r' d_endhent='$d_endhent' +d_endhostent_r='$d_endhostent_r' d_endnent='$d_endnent' +d_endnetent_r='$d_endnetent_r' d_endpent='$d_endpent' +d_endprotoent_r='$d_endprotoent_r' d_endpwent='$d_endpwent' +d_endpwent_r='$d_endpwent_r' d_endsent='$d_endsent' +d_endservent_r='$d_endservent_r' d_eofnblk='$d_eofnblk' d_eunice='$d_eunice' d_fchdir='$d_fchdir' @@ -17249,19 +18953,29 @@ d_getcwd='$d_getcwd' d_getespwnam='$d_getespwnam' d_getfsstat='$d_getfsstat' d_getgrent='$d_getgrent' +d_getgrent_r='$d_getgrent_r' +d_getgrgid_r='$d_getgrgid_r' +d_getgrnam_r='$d_getgrnam_r' d_getgrps='$d_getgrps' d_gethbyaddr='$d_gethbyaddr' d_gethbyname='$d_gethbyname' d_gethent='$d_gethent' d_gethname='$d_gethname' +d_gethostbyaddr_r='$d_gethostbyaddr_r' +d_gethostbyname_r='$d_gethostbyname_r' +d_gethostent_r='$d_gethostent_r' d_gethostprotos='$d_gethostprotos' d_getitimer='$d_getitimer' d_getlogin='$d_getlogin' +d_getlogin_r='$d_getlogin_r' d_getmnt='$d_getmnt' d_getmntent='$d_getmntent' d_getnbyaddr='$d_getnbyaddr' d_getnbyname='$d_getnbyname' d_getnent='$d_getnent' +d_getnetbyaddr_r='$d_getnetbyaddr_r' +d_getnetbyname_r='$d_getnetbyname_r' +d_getnetent_r='$d_getnetent_r' d_getnetprotos='$d_getnetprotos' d_getpagsz='$d_getpagsz' d_getpbyname='$d_getpbyname' @@ -17272,15 +18986,26 @@ d_getpgrp2='$d_getpgrp2' d_getpgrp='$d_getpgrp' d_getppid='$d_getppid' d_getprior='$d_getprior' +d_getprotobyname_r='$d_getprotobyname_r' +d_getprotobynumber_r='$d_getprotobynumber_r' +d_getprotoent_r='$d_getprotoent_r' d_getprotoprotos='$d_getprotoprotos' d_getprpwnam='$d_getprpwnam' d_getpwent='$d_getpwent' +d_getpwent_r='$d_getpwent_r' +d_getpwnam_r='$d_getpwnam_r' +d_getpwuid_r='$d_getpwuid_r' d_getsbyname='$d_getsbyname' d_getsbyport='$d_getsbyport' d_getsent='$d_getsent' +d_getservbyname_r='$d_getservbyname_r' +d_getservbyport_r='$d_getservbyport_r' +d_getservent_r='$d_getservent_r' d_getservprotos='$d_getservprotos' d_getspnam='$d_getspnam' +d_getspnam_r='$d_getspnam_r' d_gettimeod='$d_gettimeod' +d_gmtime_r='$d_gmtime_r' d_gnulibc='$d_gnulibc' d_grpasswd='$d_grpasswd' d_hasmntopt='$d_hasmntopt' @@ -17297,6 +19022,7 @@ d_killpg='$d_killpg' d_lchown='$d_lchown' d_ldbl_dig='$d_ldbl_dig' d_link='$d_link' +d_localtime_r='$d_localtime_r' d_locconv='$d_locconv' d_lockf='$d_lockf' d_longdbl='$d_longdbl' @@ -17365,7 +19091,10 @@ d_pwpasswd='$d_pwpasswd' d_pwquota='$d_pwquota' d_qgcvt='$d_qgcvt' d_quad='$d_quad' +d_random_r='$d_random_r' +d_readdir64_r='$d_readdir64_r' d_readdir='$d_readdir' +d_readdir_r='$d_readdir_r' d_readlink='$d_readlink' d_readv='$d_readv' d_recvmsg='$d_recvmsg' @@ -17390,19 +19119,25 @@ d_sendmsg='$d_sendmsg' d_setegid='$d_setegid' d_seteuid='$d_seteuid' d_setgrent='$d_setgrent' +d_setgrent_r='$d_setgrent_r' d_setgrps='$d_setgrps' d_sethent='$d_sethent' +d_sethostent_r='$d_sethostent_r' d_setitimer='$d_setitimer' d_setlinebuf='$d_setlinebuf' d_setlocale='$d_setlocale' +d_setlocale_r='$d_setlocale_r' d_setnent='$d_setnent' +d_setnetent_r='$d_setnetent_r' d_setpent='$d_setpent' d_setpgid='$d_setpgid' d_setpgrp2='$d_setpgrp2' d_setpgrp='$d_setpgrp' d_setprior='$d_setprior' d_setproctitle='$d_setproctitle' +d_setprotoent_r='$d_setprotoent_r' d_setpwent='$d_setpwent' +d_setpwent_r='$d_setpwent_r' d_setregid='$d_setregid' d_setresgid='$d_setresgid' d_setresuid='$d_setresuid' @@ -17410,6 +19145,7 @@ d_setreuid='$d_setreuid' d_setrgid='$d_setrgid' d_setruid='$d_setruid' d_setsent='$d_setsent' +d_setservent_r='$d_setservent_r' d_setsid='$d_setsid' d_setvbuf='$d_setvbuf' d_sfio='$d_sfio' @@ -17429,6 +19165,8 @@ d_socklen_t='$d_socklen_t' d_sockpair='$d_sockpair' d_socks5_init='$d_socks5_init' d_sqrtl='$d_sqrtl' +d_srand48_r='$d_srand48_r' +d_srandom_r='$d_srandom_r' d_sresgproto='$d_sresgproto' d_sresuproto='$d_sresuproto' d_statblks='$d_statblks' @@ -17447,6 +19185,7 @@ d_strcoll='$d_strcoll' d_strctcpy='$d_strctcpy' d_strerrm='$d_strerrm' d_strerror='$d_strerror' +d_strerror_r='$d_strerror_r' d_strftime='$d_strftime' d_strtod='$d_strtod' d_strtol='$d_strtol' @@ -17473,7 +19212,9 @@ d_time='$d_time' d_times='$d_times' d_tm_tm_gmtoff='$d_tm_tm_gmtoff' d_tm_tm_zone='$d_tm_tm_zone' +d_tmpnam_r='$d_tmpnam_r' d_truncate='$d_truncate' +d_ttyname_r='$d_ttyname_r' d_tzname='$d_tzname' d_u32align='$d_u32align' d_ualarm='$d_ualarm' @@ -17511,12 +19252,19 @@ dlext='$dlext' dlsrc='$dlsrc' doublesize='$doublesize' drand01='$drand01' +drand48_r_proto='$drand48_r_proto' dynamic_ext='$dynamic_ext' eagain='$eagain' ebcdic='$ebcdic' echo='$echo' egrep='$egrep' emacs='$emacs' +endgrent_r_proto='$endgrent_r_proto' +endhostent_r_proto='$endhostent_r_proto' +endnetent_r_proto='$endnetent_r_proto' +endprotoent_r_proto='$endprotoent_r_proto' +endpwent_r_proto='$endpwent_r_proto' +endservent_r_proto='$endservent_r_proto' eunicefix='$eunicefix' exe_ext='$exe_ext' expr='$expr' @@ -17536,12 +19284,33 @@ full_csh='$full_csh' full_sed='$full_sed' gccosandvers='$gccosandvers' gccversion='$gccversion' +getgrent_r_proto='$getgrent_r_proto' +getgrgid_r_proto='$getgrgid_r_proto' +getgrnam_r_proto='$getgrnam_r_proto' +gethostbyaddr_r_proto='$gethostbyaddr_r_proto' +gethostbyname_r_proto='$gethostbyname_r_proto' +gethostent_r_proto='$gethostent_r_proto' +getlogin_r_proto='$getlogin_r_proto' +getnetbyaddr_r_proto='$getnetbyaddr_r_proto' +getnetbyname_r_proto='$getnetbyname_r_proto' +getnetent_r_proto='$getnetent_r_proto' +getprotobyname_r_proto='$getprotobyname_r_proto' +getprotobynumber_r_proto='$getprotobynumber_r_proto' +getprotoent_r_proto='$getprotoent_r_proto' +getpwent_r_proto='$getpwent_r_proto' +getpwnam_r_proto='$getpwnam_r_proto' +getpwuid_r_proto='$getpwuid_r_proto' +getservbyname_r_proto='$getservbyname_r_proto' +getservbyport_r_proto='$getservbyport_r_proto' +getservent_r_proto='$getservent_r_proto' +getspnam_r_proto='$getspnam_r_proto' gidformat='$gidformat' gidsign='$gidsign' gidsize='$gidsize' gidtype='$gidtype' glibpth='$glibpth' gmake='$gmake' +gmtime_r_proto='$gmtime_r_proto' grep='$grep' groupcat='$groupcat' groupstype='$groupstype' @@ -17560,6 +19329,7 @@ i8size='$i8size' i8type='$i8type' i_arpainet='$i_arpainet' i_bsdioctl='$i_bsdioctl' +i_crypt='$i_crypt' i_db='$i_db' i_dbm='$i_dbm' i_dirent='$i_dirent' @@ -17689,6 +19459,7 @@ lint='$lint' lkflags='$lkflags' ln='$ln' lns='$lns' +localtime_r_proto='$localtime_r_proto' locincpth='$locincpth' loclibpth='$loclibpth' longdblsize='$longdblsize' @@ -17779,9 +19550,12 @@ quadkind='$quadkind' quadtype='$quadtype' randbits='$randbits' randfunc='$randfunc' +random_r_proto='$random_r_proto' randseedtype='$randseedtype' ranlib='$ranlib' rd_nodata='$rd_nodata' +readdir64_r_proto='$readdir64_r_proto' +readdir_r_proto='$readdir_r_proto' revision='$revision' rm='$rm' rmail='$rmail' @@ -17808,6 +19582,13 @@ seedfunc='$seedfunc' selectminbits='$selectminbits' selecttype='$selecttype' sendmail='$sendmail' +setgrent_r_proto='$setgrent_r_proto' +sethostent_r_proto='$sethostent_r_proto' +setlocale_r_proto='$setlocale_r_proto' +setnetent_r_proto='$setnetent_r_proto' +setprotoent_r_proto='$setprotoent_r_proto' +setpwent_r_proto='$setpwent_r_proto' +setservent_r_proto='$setservent_r_proto' sh='$sh' shar='$shar' sharpbang='$sharpbang' @@ -17842,6 +19623,8 @@ socksizetype='$socksizetype' sort='$sort' spackage='$spackage' spitshell='$spitshell' +srand48_r_proto='$srand48_r_proto' +srandom_r_proto='$srandom_r_proto' src='$src' ssizetype='$ssizetype' startperl='$startperl' @@ -17854,6 +19637,7 @@ stdio_cnt='$stdio_cnt' stdio_filbuf='$stdio_filbuf' stdio_ptr='$stdio_ptr' stdio_stream_array='$stdio_stream_array' +strerror_r_proto='$strerror_r_proto' strings='$strings' submit='$submit' subversion='$subversion' @@ -17866,11 +19650,13 @@ tee='$tee' test='$test' timeincl='$timeincl' timetype='$timetype' +tmpnam_r_proto='$tmpnam_r_proto' to='$to' touch='$touch' tr='$tr' trnl='$trnl' troff='$troff' +ttyname_r_proto='$ttyname_r_proto' u16size='$u16size' u16type='$u16type' u32size='$u32size' diff --git a/MANIFEST b/MANIFEST index 383a1db..0969cbc 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2119,6 +2119,9 @@ README.vms Notes about installing the VMS port README.vos Notes about Stratus VOS port README.win32 Notes about Win32 port README.Y2K Notes about Year 2000 concerns +reentr.c Reentrant interfaces +reentr.h Reentrant interfaces +reentr.pl Reentrant interfaces regcomp.c Regular expression compiler regcomp.h Private declarations for above regcomp.pl Builder of regnodes.h diff --git a/Makefile.SH b/Makefile.SH index 0410bb6..21427ba 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -296,14 +296,14 @@ h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h h5 = utf8.h warnings.h h = $(h1) $(h2) $(h3) $(h4) $(h5) -c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c +c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c reentr.c c2 = perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c xsutils.c c4 = globals.c perlio.c perlapi.c numeric.c locale.c pp_pack.c pp_sort.c c = $(c1) $(c2) $(c3) $(c4) miniperlmain.c perlmain.c -obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) +obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT) obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) diff --git a/NetWare/Makefile b/NetWare/Makefile index 7aebdd4..18bd1d9 100644 --- a/NetWare/Makefile +++ b/NetWare/Makefile @@ -691,6 +691,7 @@ MICROCORE_SRC = \ ..\pp_pack.c \ ..\pp_sort.c \ ..\pp_sys.c \ + ..\reentr.c \ ..\regcomp.c \ ..\regexec.c \ ..\run.c \ @@ -1068,9 +1069,9 @@ Import @perl.imp !if "$(MAKE_TYPE)"=="Debug" !ifdef NLM_NAME8 - .\bat\cvpack $(BLDDIR)\$(NLM_NAME8).sym + .\bat\cvpack $(BLDDIR)\$(NLM_NAME8).sym !else - .\bat\cvpack $(BLDDIR)\$(NLM_NAME).sym + .\bat\cvpack $(BLDDIR)\$(NLM_NAME).sym !endif !endif diff --git a/NetWare/config.wc b/NetWare/config.wc index f08e003..e2c788f 100644 --- a/NetWare/config.wc +++ b/NetWare/config.wc @@ -31,6 +31,7 @@ archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~' archname64='' archname='NetWare' archobjs='' +asctime_r_proto='0' awk='awk' baserev='5' bash='' @@ -71,8 +72,11 @@ cpprun='cl -nologo -E' cppstdin='cl -nologo -E' cppsymbols='' crosscompile='undef' +crypt_r_proto='0' cryptlib='' csh='undef' +ctermid_r_proto='0' +ctime_r_proto='0' d_Gconvert='sprintf((b),"%.*g",(n),(x))' d_PRIEldbl='undef' d_PRIFldbl='undef' @@ -90,6 +94,7 @@ d_access='define' d_accessx='undef' d_alarm='undef' d_archlib='define' +d_asctime_r='undef' d_atolf='undef' d_atoll='undef' d_attribut='undef' @@ -110,7 +115,10 @@ d_class='undef' d_closedir='define' d_const='define' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' +d_ctermid_r='undef' +d_ctime_r='undef' d_cuserid='undef' d_dbl_dig='define' d_difftime='define' @@ -120,15 +128,22 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_drand48_r='undef' d_drand48proto='undef' d_dup2='define' d_eaccess='undef' d_endgrent='undef' +d_endgrent_r='undef' d_endhent='undef' +d_endhostent_r='undef' d_endnent='undef' +d_endnetent_r='undef' d_endpent='undef' +d_endprotoent_r='undef' d_endpwent='undef' +d_endpwent_r='undef' d_endsent='undef' +d_endservent_r='undef' d_endspent='undef' d_eofnblk='define' d_eunice='undef' @@ -161,18 +176,28 @@ d_ftime='define' d_getcwd='define' d_getfsstat='undef' d_getgrent='undef' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' d_getgrps='undef' d_gethbyaddr='define' d_gethbyname='define' d_gethent='undef' d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' d_gethostprotos='define' d_getlogin='define' +d_getlogin_r='undef' d_getmnt='undef' d_getmntent='undef' d_getnbyaddr='undef' d_getnbyname='undef' d_getnent='undef' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' d_getnetprotos='define' d_getpbyname='define' d_getpbynumber='define' @@ -182,15 +207,26 @@ d_getpgrp2='undef' d_getpgrp='undef' d_getppid='undef' d_getprior='undef' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' d_getprotoprotos='define' d_getpwent='undef' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' d_getsbyname='define' d_getsbyport='define' d_getsent='undef' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' d_getservprotos='define' d_getspent='undef' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='undef' +d_gmtime_r='undef' d_gnulibc='undef' d_grpasswd='undef' d_hasmntopt='undef' @@ -207,6 +243,7 @@ d_killpg='undef' d_lchown='undef' d_ldbl_dig='define' d_link='define' +d_localtime_r='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' @@ -270,7 +307,10 @@ d_pwpasswd='undef' d_pwquota='undef' d_qgcvt='undef' d_quad='undef' +d_random_r='undef' +d_readdir64_r='undef' d_readdir='define' +d_readdir_r='undef' d_readlink='undef' d_rename='define' d_rewinddir='define' @@ -291,17 +331,23 @@ d_semop='undef' d_setegid='undef' d_seteuid='undef' d_setgrent='undef' +d_setgrent_r='undef' d_setgrps='undef' d_sethent='undef' +d_sethostent_r='undef' d_setlinebuf='undef' d_setlocale='define' +d_setlocale_r='undef' d_setnent='undef' +d_setnetent_r='undef' d_setpent='undef' d_setpgid='undef' d_setpgrp2='undef' d_setpgrp='undef' d_setprior='undef' +d_setprotoent_r='undef' d_setpwent='undef' +d_setpwent_r='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' @@ -309,6 +355,7 @@ d_setreuid='undef' d_setrgid='undef' d_setruid='undef' d_setsent='undef' +d_setservent_r='undef' d_setsid='undef' d_setspent='undef' d_setvbuf='define' @@ -325,6 +372,8 @@ d_socket='define' d_socklen_t='undef' d_sockpair='undef' d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' d_statblks='undef' d_statfs_f_flags='undef' d_statfs_s='undef' @@ -339,6 +388,7 @@ d_strcoll='define' d_strctcpy='define' d_strerrm='strerror(e)' d_strerror='define' +d_strerror_r='undef' d_strftime='define' d_strtod='define' d_strtol='define' @@ -361,7 +411,11 @@ d_telldir='define' d_telldirproto='define' d_time='define' d_times='undef' +d_tm_tm_gmtoff='undef' +d_tm_tm_zone='undef' +d_tmpnam_r='undef' d_truncate='undef' +d_ttyname_r='undef' d_tzname='define' d_umask='define' d_uname='define' @@ -385,20 +439,27 @@ d_xenix='undef' date='date' db_hashtype='int' db_prefixtype='int' -defvoidused='15' def_perlroot='sys:\perl\scripts' def_temp='sys:\perl\temp' +defvoidused='15' direntrytype='DIR' dlext='nlp' dlsrc='dl_netware.xs' doublesize='8' drand01='(rand()/(double)((unsigned)1< supplies @@ -760,6 +857,11 @@ d_getlogin (d_getlogin.U): indicates to the C program that the getlogin() routine is available to get the login name. +d_getlogin_r (d_getlogin_r.U): + This variable conditionally defines the HAS_GETLOGIN_R symbol, + which indicates to the C program that the getlogin_r() + routine is available. + d_getmnt (d_getmnt.U): This variable conditionally defines the HAS_GETMNT symbol, which indicates to the C program that the getmnt() routine is available @@ -784,6 +886,21 @@ d_getnent (d_getnent.U): This variable conditionally defines HAS_GETNETENT if getnetent() is available to look up network names in some data base or another. +d_getnetbyaddr_r (d_getnetbyaddr_r.U): + This variable conditionally defines the HAS_GETNETBYADDR_R symbol, + which indicates to the C program that the getnetbyaddr_r() + routine is available. + +d_getnetbyname_r (d_getnetbyname_r.U): + This variable conditionally defines the HAS_GETNETBYNAME_R symbol, + which indicates to the C program that the getnetbyname_r() + routine is available. + +d_getnetent_r (d_getnetent_r.U): + This variable conditionally defines the HAS_GETNETENT_R symbol, + which indicates to the C program that the getnetent_r() + routine is available. + d_getnetprotos (d_getnetprotos.U): This variable conditionally defines the HAS_GETNET_PROTOS symbol, which indicates to the C program that supplies @@ -833,6 +950,21 @@ d_getprior (d_getprior.U): This variable conditionally defines HAS_GETPRIORITY if getpriority() is available to get a process's priority. +d_getprotobyname_r (d_getprotobyname_r.U): + This variable conditionally defines the HAS_GETPROTOBYNAME_R symbol, + which indicates to the C program that the getprotobyname_r() + routine is available. + +d_getprotobynumber_r (d_getprotobynumber_r.U): + This variable conditionally defines the HAS_GETPROTOBYNUMBER_R symbol, + which indicates to the C program that the getprotobynumber_r() + routine is available. + +d_getprotoent_r (d_getprotoent_r.U): + This variable conditionally defines the HAS_GETPROTOENT_R symbol, + which indicates to the C program that the getprotoent_r() + routine is available. + d_getprotoprotos (d_getprotoprotos.U): This variable conditionally defines the HAS_GETPROTO_PROTOS symbol, which indicates to the C program that supplies @@ -848,6 +980,21 @@ d_getpwent (d_getpwent.U): indicates to the C program that the getpwent() routine is available for sequential access of the passwd database. +d_getpwent_r (d_getpwent_r.U): + This variable conditionally defines the HAS_GETPWENT_R symbol, + which indicates to the C program that the getpwent_r() + routine is available. + +d_getpwnam_r (d_getpwnam_r.U): + This variable conditionally defines the HAS_GETPWNAM_R symbol, + which indicates to the C program that the getpwnam_r() + routine is available. + +d_getpwuid_r (d_getpwuid_r.U): + This variable conditionally defines the HAS_GETPWUID_R symbol, + which indicates to the C program that the getpwuid_r() + routine is available. + d_getsbyname (d_getsrvby.U): This variable conditionally defines the HAS_GETSERVBYNAME symbol, which indicates to the C program that the @@ -864,6 +1011,21 @@ d_getsent (d_getsent.U): This variable conditionally defines HAS_GETSERVENT if getservent() is available to look up network services in some data base or another. +d_getservbyname_r (d_getservbyname_r.U): + This variable conditionally defines the HAS_GETSERVBYNAME_R symbol, + which indicates to the C program that the getservbyname_r() + routine is available. + +d_getservbyport_r (d_getservbyport_r.U): + This variable conditionally defines the HAS_GETSERVBYPORT_R symbol, + which indicates to the C program that the getservbyport_r() + routine is available. + +d_getservent_r (d_getservent_r.U): + This variable conditionally defines the HAS_GETSERVENT_R symbol, + which indicates to the C program that the getservent_r() + routine is available. + d_getservprotos (d_getservprotos.U): This variable conditionally defines the HAS_GETSERV_PROTOS symbol, which indicates to the C program that supplies @@ -874,11 +1036,21 @@ d_getspnam (d_getspnam.U): This variable conditionally defines HAS_GETSPNAM if getspnam() is available to retrieve SysV shadow password entries by name. +d_getspnam_r (d_getspnam_r.U): + This variable conditionally defines the HAS_GETSPNAM_R symbol, + which indicates to the C program that the getspnam_r() + routine is available. + d_gettimeod (d_ftime.U): This variable conditionally defines the HAS_GETTIMEOFDAY symbol, which indicates that the gettimeofday() system call exists (to obtain a sub-second accuracy clock). You should probably include . +d_gmtime_r (d_gmtime_r.U): + This variable conditionally defines the HAS_GMTIME_R symbol, + which indicates to the C program that the gmtime_r() + routine is available. + d_gnulibc (d_gnulibc.U): Defined if we're dealing with the GNU C Library. @@ -946,6 +1118,11 @@ d_link (d_link.U): This variable conditionally defines HAS_LINK if link() is available to create hard links. +d_localtime_r (d_localtime_r.U): + This variable conditionally defines the HAS_LOCALTIME_R symbol, + which indicates to the C program that the localtime_r() + routine is available. + d_locconv (d_locconv.U): This variable conditionally defines HAS_LOCALECONV if localeconv() is available for numeric and monetary formatting conventions. @@ -1311,10 +1488,25 @@ d_quad (quadtype.U): This variable, if defined, tells that there's a 64-bit integer type, quadtype. +d_random_r (d_random_r.U): + This variable conditionally defines the HAS_RANDOM_R symbol, + which indicates to the C program that the random_r() + routine is available. + +d_readdir64_r (d_readdir64_r.U): + This variable conditionally defines the HAS_READDIR64_R symbol, + which indicates to the C program that the readdir64_r() + routine is available. + d_readdir (d_readdir.U): This variable conditionally defines HAS_READDIR if readdir() is available to read directory entries. +d_readdir_r (d_readdir_r.U): + This variable conditionally defines the HAS_READDIR_R symbol, + which indicates to the C program that the readdir_r() + routine is available. + d_readlink (d_readlink.U): This variable conditionally defines the HAS_READLINK symbol, which indicates to the C program that the readlink() routine is available @@ -1428,6 +1620,11 @@ d_setgrent (d_setgrent.U): indicates to the C program that the setgrent() routine is available for initializing sequential access to the group database. +d_setgrent_r (d_setgrent_r.U): + This variable conditionally defines the HAS_SETGRENT_R symbol, + which indicates to the C program that the setgrent_r() + routine is available. + d_setgrps (d_setgrps.U): This variable conditionally defines the HAS_SETGROUPS symbol, which indicates to the C program that the setgroups() routine is available @@ -1437,6 +1634,11 @@ d_sethent (d_sethent.U): This variable conditionally defines HAS_SETHOSTENT if sethostent() is available. +d_sethostent_r (d_sethostent_r.U): + This variable conditionally defines the HAS_SETHOSTENT_R symbol, + which indicates to the C program that the sethostent_r() + routine is available. + d_setitimer (d_setitimer.U): This variable conditionally defines the HAS_SETITIMER symbol, which indicates to the C program that the setitimer() routine is available. @@ -1451,10 +1653,20 @@ d_setlocale (d_setlocale.U): This variable conditionally defines HAS_SETLOCALE if setlocale() is available to handle locale-specific ctype implementations. +d_setlocale_r (d_setlocale_r.U): + This variable conditionally defines the HAS_SETLOCALE_R symbol, + which indicates to the C program that the setlocale_r() + routine is available. + d_setnent (d_setnent.U): This variable conditionally defines HAS_SETNETENT if setnetent() is available. +d_setnetent_r (d_setnetent_r.U): + This variable conditionally defines the HAS_SETNETENT_R symbol, + which indicates to the C program that the setnetent_r() + routine is available. + d_setpent (d_setpent.U): This variable conditionally defines HAS_SETPROTOENT if setprotoent() is available. @@ -1481,11 +1693,21 @@ d_setproctitle (d_setproctitle.U): which indicates to the C program that the setproctitle() routine is available. +d_setprotoent_r (d_setprotoent_r.U): + This variable conditionally defines the HAS_SETPROTOENT_R symbol, + which indicates to the C program that the setprotoent_r() + routine is available. + d_setpwent (d_setpwent.U): This variable conditionally defines the HAS_SETPWENT symbol, which indicates to the C program that the setpwent() routine is available for initializing sequential access to the passwd database. +d_setpwent_r (d_setpwent_r.U): + This variable conditionally defines the HAS_SETPWENT_R symbol, + which indicates to the C program that the setpwent_r() + routine is available. + d_setregid (d_setregid.U): This variable conditionally defines HAS_SETREGID if setregid() is available to change the real and effective gid of the current @@ -1520,6 +1742,11 @@ d_setsent (d_setsent.U): This variable conditionally defines HAS_SETSERVENT if setservent() is available. +d_setservent_r (d_setservent_r.U): + This variable conditionally defines the HAS_SETSERVENT_R symbol, + which indicates to the C program that the setservent_r() + routine is available. + d_setsid (d_setsid.U): This variable conditionally defines HAS_SETSID if setsid() is available to set the process group ID. @@ -1601,6 +1828,16 @@ d_sqrtl (d_sqrtl.U): This variable conditionally defines the HAS_SQRTL symbol, which indicates to the C program that the sqrtl() routine is available. +d_srand48_r (d_srand48_r.U): + This variable conditionally defines the HAS_SRAND48_R symbol, + which indicates to the C program that the srand48_r() + routine is available. + +d_srandom_r (d_srandom_r.U): + This variable conditionally defines the HAS_SRANDOM_R symbol, + which indicates to the C program that the srandom_r() + routine is available. + d_sresgproto (d_sresgproto.U): This variable conditionally defines the HAS_SETRESGID_PROTO symbol, which indicates to the C program that the system provides @@ -1686,6 +1923,11 @@ d_strerror (d_strerror.U): This variable conditionally defines HAS_STRERROR if strerror() is available to translate error numbers to strings. +d_strerror_r (d_strerror_r.U): + This variable conditionally defines the HAS_STRERROR_R symbol, + which indicates to the C program that the strerror_r() + routine is available. + d_strftime (d_strftime.U): This variable conditionally defines the HAS_STRFTIME symbol, which indicates to the C program that the strftime() routine is available. @@ -1803,10 +2045,20 @@ d_tm_tm_zone (i_time.U): This variable conditionally defines HAS_TM_TM_ZONE, which indicates indicates to the C program that the struct tm has the tm_zone field. +d_tmpnam_r (d_tmpnam_r.U): + This variable conditionally defines the HAS_TMPNAM_R symbol, + which indicates to the C program that the tmpnam_r() + routine is available. + d_truncate (d_truncate.U): This variable conditionally defines HAS_TRUNCATE if truncate() is available to truncate files. +d_ttyname_r (d_ttyname_r.U): + This variable conditionally defines the HAS_TTYNAME_R symbol, + which indicates to the C program that the ttyname_r() + routine is available. + d_tzname (d_tzname.U): This variable conditionally defines HAS_TZNAME if tzname[] is available to access timezone names. @@ -1971,6 +2223,9 @@ drand01 (randfunc.U): normalize the result. In C programs, the macro 'Drand01' is mapped to drand01. +drand48_r_proto (d_drand48_r.U): + This variable encodes the prototype of drand48_r. + dynamic_ext (Extensions.U): This variable holds a list of XS extension files we want to link dynamically into the package. It is used by Makefile. @@ -2000,6 +2255,24 @@ emacs (Loc.U): This variable is defined but not used by Configure. The value is a plain '' and is not useful. +endgrent_r_proto (d_endgrent_r.U): + This variable encodes the prototype of endgrent_r. + +endhostent_r_proto (d_endhostent_r.U): + This variable encodes the prototype of endhostent_r. + +endnetent_r_proto (d_endnetent_r.U): + This variable encodes the prototype of endnetent_r. + +endprotoent_r_proto (d_endprotoent_r.U): + This variable encodes the prototype of endprotoent_r. + +endpwent_r_proto (d_endpwent_r.U): + This variable encodes the prototype of endpwent_r. + +endservent_r_proto (d_endservent_r.U): + This variable encodes the prototype of endservent_r. + eunicefix (Init.U): When running under Eunice this variable contains a command which will convert a shell script to the proper form of text file for it to be @@ -2093,6 +2366,66 @@ gccversion (gccvers.U): indicate whether the compiler is version 1 or 2. This is used in setting some of the default cflags. It is set to '' if not gcc. +getgrent_r_proto (d_getgrent_r.U): + This variable encodes the prototype of getgrent_r. + +getgrgid_r_proto (d_getgrgid_r.U): + This variable encodes the prototype of getgrgid_r. + +getgrnam_r_proto (d_getgrnam_r.U): + This variable encodes the prototype of getgrnam_r. + +gethostbyaddr_r_proto (d_gethostbyaddr_r.U): + This variable encodes the prototype of gethostbyaddr_r. + +gethostbyname_r_proto (d_gethostbyname_r.U): + This variable encodes the prototype of gethostbyname_r. + +gethostent_r_proto (d_gethostent_r.U): + This variable encodes the prototype of gethostent_r. + +getlogin_r_proto (d_getlogin_r.U): + This variable encodes the prototype of getlogin_r. + +getnetbyaddr_r_proto (d_getnetbyaddr_r.U): + This variable encodes the prototype of getnetbyaddr_r. + +getnetbyname_r_proto (d_getnetbyname_r.U): + This variable encodes the prototype of getnetbyname_r. + +getnetent_r_proto (d_getnetent_r.U): + This variable encodes the prototype of getnetent_r. + +getprotobyname_r_proto (d_getprotobyname_r.U): + This variable encodes the prototype of getprotobyname_r. + +getprotobynumber_r_proto (d_getprotobynumber_r.U): + This variable encodes the prototype of getprotobynumber_r. + +getprotoent_r_proto (d_getprotoent_r.U): + This variable encodes the prototype of getprotoent_r. + +getpwent_r_proto (d_getpwent_r.U): + This variable encodes the prototype of getpwent_r. + +getpwnam_r_proto (d_getpwnam_r.U): + This variable encodes the prototype of getpwnam_r. + +getpwuid_r_proto (d_getpwuid_r.U): + This variable encodes the prototype of getpwuid_r. + +getservbyname_r_proto (d_getservbyname_r.U): + This variable encodes the prototype of getservbyname_r. + +getservbyport_r_proto (d_getservbyport_r.U): + This variable encodes the prototype of getservbyport_r. + +getservent_r_proto (d_getservent_r.U): + This variable encodes the prototype of getservent_r. + +getspnam_r_proto (d_getspnam_r.U): + This variable encodes the prototype of getspnam_r. + gidformat (gidf.U): This variable contains the format string used for printing a Gid_t. @@ -2118,6 +2451,9 @@ gmake (Loc.U): full pathname (if any) of the gmake program. After Configure runs, the value is reset to a plain "gmake" and is not useful. +gmtime_r_proto (d_gmtime_r.U): + This variable encodes the prototype of gmtime_r. + grep (Loc.U): This variable is used internally by Configure to determine the full pathname (if any) of the grep program. After Configure runs, @@ -2193,6 +2529,10 @@ i_bsdioctl (i_sysioctl.U): indicates to the C program that exists and should be included. +i_crypt (i_crypt.U): + This variable conditionally defines the I_CRYPT symbol, and indicates + whether a C program should include . + i_db (i_db.U): This variable conditionally defines the I_DB symbol, and indicates whether a C program may include Berkeley's DB include file . @@ -2786,6 +3126,9 @@ lns (lns.U): symbolic links (if they are supported). It can be used in the Makefile. It is either 'ln -s' or 'ln' +localtime_r_proto (d_localtime_r.U): + This variable encodes the prototype of localtime_r. + locincpth (ccflags.U): This variable contains a list of additional directories to be searched by the compiler. The appropriate '-I' directives will @@ -3267,6 +3610,9 @@ randfunc (randfunc.U): the 'Drand01' macro is defined to generate uniformly distributed random numbers over the range [0., 1.[ (see drand01 and nrand). +random_r_proto (d_random_r.U): + This variable encodes the prototype of random_r. + randseedtype (randfunc.U): Indicates the type of the argument of the seedfunc. @@ -3281,6 +3627,12 @@ rd_nodata (nblock_io.U): used, which is a shame because you cannot make the difference between no data and an EOF.. Sigh! +readdir64_r_proto (d_readdir64_r.U): + This variable encodes the prototype of readdir64_r. + +readdir_r_proto (d_readdir_r.U): + This variable encodes the prototype of readdir_r. + revision (patchlevel.U): The value of revision comes from the patchlevel.h file. In a version number such as 5.6.1, this is the "5". @@ -3347,6 +3699,27 @@ sendmail (Loc.U): This variable is defined but not used by Configure. The value is a plain '' and is not useful. +setgrent_r_proto (d_setgrent_r.U): + This variable encodes the prototype of setgrent_r. + +sethostent_r_proto (d_sethostent_r.U): + This variable encodes the prototype of sethostent_r. + +setlocale_r_proto (d_setlocale_r.U): + This variable encodes the prototype of setlocale_r. + +setnetent_r_proto (d_setnetent_r.U): + This variable encodes the prototype of setnetent_r. + +setprotoent_r_proto (d_setprotoent_r.U): + This variable encodes the prototype of setprotoent_r. + +setpwent_r_proto (d_setpwent_r.U): + This variable encodes the prototype of setpwent_r. + +setservent_r_proto (d_setservent_r.U): + This variable encodes the prototype of setservent_r. + sh (sh.U): This variable contains the full pathname of the shell used on this system to execute Bourne shell scripts. Usually, this will be @@ -3589,6 +3962,12 @@ sPRIXU64 (quadfio.U): The 'U' in the name is to separate this from sPRIx64 so that even case-blind systems can see the difference. +srand48_r_proto (d_srand48_r.U): + This variable encodes the prototype of srand48_r. + +srandom_r_proto (d_srandom_r.U): + This variable encodes the prototype of srandom_r. + src (src.U): This variable holds the path to the package source. It is up to the Makefile to use this variable and set VPATH accordingly to @@ -3657,6 +4036,9 @@ stdio_stream_array (stdio_streams.U): This variable tells the name of the array holding the stdio streams. Usual values include _iob, __iob, and __sF. +strerror_r_proto (d_strerror_r.U): + This variable encodes the prototype of strerror_r. + strings (i_string.U): This variable holds the full path of the string header that will be used. Typically /usr/include/string.h or /usr/include/strings.h. @@ -3711,6 +4093,9 @@ timetype (d_time.U): or time_t on BSD sites (in which case should be included). Anyway, the type Time_t should be used. +tmpnam_r_proto (d_tmpnam_r.U): + This variable encodes the prototype of tmpnam_r. + to (Cross.U): This variable contains the command used by Configure to copy to from the target host. Useful and available @@ -3737,6 +4122,9 @@ troff (Loc.U): This variable is defined but not used by Configure. The value is a plain '' and is not useful. +ttyname_r_proto (d_ttyname_r.U): + This variable encodes the prototype of ttyname_r. + u16size (perlxv.U): This variable is the size of an U16 in bytes. diff --git a/Porting/config.sh b/Porting/config.sh index a04fc26..a504dce 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Wed Mar 6 18:01:27 EET 2002 +# Configuration time: Fri Mar 15 17:39:35 EET 2002 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -41,6 +41,7 @@ archlibexp='/opt/perl/lib/5.7.3/alpha-dec_osf' archname64='' archname='alpha-dec_osf' archobjs='' +asctime_r_proto='REENTRANT_PROTO_B_SB' awk='awk' baserev='5.0' bash='' @@ -63,7 +64,7 @@ ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_ ccversion='V5.6-082' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Wed Mar 6 18:01:27 EET 2002' +cf_time='Fri Mar 15 17:39:35 EET 2002' charsize='1' chgrp='' chmod='chmod' @@ -83,8 +84,11 @@ cppminus='' cpprun='/usr/bin/cpp' cppstdin='cppstdin' cppsymbols='_AES_SOURCE=1 __alpha=1 __ALPHA=1 _ANSI_C_SOURCE=1 _INTRINSICS=1 __LANGUAGE_C__=1 _LONGLONG=1 __osf__=1 _OSF_SOURCE=1 _POSIX_C_SOURCE=199506 _POSIX_SOURCE=1 __STDC__=1 _SYSTYPE_BSD=1 __unix__=1 _XOPEN_SOURCE=1' +crypt_r_proto='0' cryptlib='' csh='csh' +ctermid_r_proto='0' +ctime_r_proto='REENTRANT_PROTO_B_SB' d_Gconvert='sprintf((b),"%.*g",(n),(x))' d_PRIEUldbl='define' d_PRIFUldbl='define' @@ -104,6 +108,7 @@ d_access='define' d_accessx='undef' d_alarm='define' d_archlib='define' +d_asctime_r='define' d_atolf='undef' d_atoll='undef' d_attribut='undef' @@ -125,7 +130,10 @@ d_closedir='define' d_cmsghdr_s='define' d_const='define' d_crypt='define' +d_crypt_r='undef' d_csh='define' +d_ctermid_r='undef' +d_ctime_r='define' d_cuserid='define' d_dbl_dig='define' d_dbminitproto='undef' @@ -136,15 +144,22 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_drand48_r='define' d_drand48proto='define' d_dup2='define' d_eaccess='undef' d_endgrent='define' +d_endgrent_r='define' d_endhent='define' +d_endhostent_r='define' d_endnent='define' +d_endnetent_r='define' d_endpent='define' +d_endprotoent_r='define' d_endpwent='define' +d_endpwent_r='define' d_endsent='define' +d_endservent_r='define' d_eofnblk='define' d_eunice='undef' d_fchdir='define' @@ -181,19 +196,29 @@ d_getcwd='define' d_getespwnam='undef' d_getfsstat='define' d_getgrent='define' +d_getgrent_r='define' +d_getgrgid_r='define' +d_getgrnam_r='define' d_getgrps='define' d_gethbyaddr='define' d_gethbyname='define' d_gethent='define' d_gethname='define' +d_gethostbyaddr_r='define' +d_gethostbyname_r='define' +d_gethostent_r='define' d_gethostprotos='define' d_getitimer='define' d_getlogin='define' +d_getlogin_r='define' d_getmnt='undef' d_getmntent='undef' d_getnbyaddr='define' d_getnbyname='define' d_getnent='define' +d_getnetbyaddr_r='define' +d_getnetbyname_r='define' +d_getnetent_r='define' d_getnetprotos='define' d_getpagsz='define' d_getpbyname='define' @@ -204,15 +229,26 @@ d_getpgrp2='undef' d_getpgrp='define' d_getppid='define' d_getprior='define' +d_getprotobyname_r='define' +d_getprotobynumber_r='define' +d_getprotoent_r='define' d_getprotoprotos='define' d_getprpwnam='undef' d_getpwent='define' +d_getpwent_r='define' +d_getpwnam_r='define' +d_getpwuid_r='define' d_getsbyname='define' d_getsbyport='define' d_getsent='define' +d_getservbyname_r='define' +d_getservbyport_r='define' +d_getservent_r='define' d_getservprotos='define' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='define' +d_gmtime_r='define' d_gnulibc='undef' d_grpasswd='define' d_hasmntopt='undef' @@ -229,6 +265,7 @@ d_killpg='define' d_lchown='define' d_ldbl_dig='define' d_link='define' +d_localtime_r='define' d_locconv='define' d_lockf='define' d_longdbl='define' @@ -297,7 +334,10 @@ d_pwpasswd='define' d_pwquota='define' d_qgcvt='undef' d_quad='define' +d_random_r='define' +d_readdir64_r='undef' d_readdir='define' +d_readdir_r='define' d_readlink='define' d_readv='define' d_recvmsg='define' @@ -322,19 +362,25 @@ d_sendmsg='define' d_setegid='define' d_seteuid='define' d_setgrent='define' +d_setgrent_r='define' d_setgrps='define' d_sethent='define' +d_sethostent_r='define' d_setitimer='define' d_setlinebuf='define' d_setlocale='define' +d_setlocale_r='undef' d_setnent='define' +d_setnetent_r='define' d_setpent='define' d_setpgid='define' d_setpgrp2='undef' d_setpgrp='define' d_setprior='define' d_setproctitle='undef' +d_setprotoent_r='define' d_setpwent='define' +d_setpwent_r='define' d_setregid='define' d_setresgid='undef' d_setresuid='undef' @@ -342,6 +388,7 @@ d_setreuid='define' d_setrgid='define' d_setruid='define' d_setsent='define' +d_setservent_r='define' d_setsid='define' d_setvbuf='define' d_sfio='undef' @@ -361,6 +408,8 @@ d_socklen_t='undef' d_sockpair='define' d_socks5_init='undef' d_sqrtl='define' +d_srand48_r='define' +d_srandom_r='define' d_sresgproto='undef' d_sresuproto='undef' d_statblks='define' @@ -379,6 +428,7 @@ d_strcoll='define' d_strctcpy='define' d_strerrm='strerror(e)' d_strerror='define' +d_strerror_r='define' d_strftime='define' d_strtod='define' d_strtol='define' @@ -405,7 +455,9 @@ d_time='define' d_times='define' d_tm_tm_gmtoff='define' d_tm_tm_zone='define' +d_tmpnam_r='undef' d_truncate='define' +d_ttyname_r='define' d_tzname='define' d_u32align='define' d_ualarm='define' @@ -443,12 +495,19 @@ dlext='so' dlsrc='dl_dlopen.xs' doublesize='8' drand01='drand48()' +drand48_r_proto='REENTRANT_PROTO_I_ST' dynamic_ext='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/Scalar PerlIO/Via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/Typemap attrs re Encode/CN Encode/JP Encode/KR Encode/TW' eagain='EAGAIN' ebcdic='undef' echo='echo' egrep='egrep' emacs='' +endgrent_r_proto='REENTRANT_PROTO_I_H' +endhostent_r_proto='REENTRANT_PROTO_I_S' +endnetent_r_proto='REENTRANT_PROTO_I_S' +endprotoent_r_proto='REENTRANT_PROTO_I_S' +endpwent_r_proto='REENTRANT_PROTO_I_H' +endservent_r_proto='REENTRANT_PROTO_I_S' eunicefix=':' exe_ext='' expr='expr' @@ -468,12 +527,33 @@ full_csh='/usr/bin/csh' full_sed='/usr/bin/sed' gccosandvers='' gccversion='' +getgrent_r_proto='REENTRANT_PROTO_I_SBWR' +getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR' +getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR' +gethostbyaddr_r_proto='REENTRANT_PROTO_I_CWISBWRE' +gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE' +gethostent_r_proto='REENTRANT_PROTO_I_SBWRE' +getlogin_r_proto='REENTRANT_PROTO_I_BW' +getnetbyaddr_r_proto='REENTRANT_PROTO_I_UISBWRE' +getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE' +getnetent_r_proto='REENTRANT_PROTO_I_SBWRE' +getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR' +getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR' +getprotoent_r_proto='REENTRANT_PROTO_I_SBWR' +getpwent_r_proto='REENTRANT_PROTO_I_SBWR' +getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR' +getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR' +getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR' +getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR' +getservent_r_proto='REENTRANT_PROTO_I_SBWR' +getspnam_r_proto='0' gidformat='"u"' gidsign='1' gidsize='4' gidtype='gid_t' glibpth='/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib' gmake='gmake' +gmtime_r_proto='REENTRANT_PROTO_S_TS' grep='grep' groupcat='cat /etc/group' groupstype='gid_t' @@ -492,6 +572,7 @@ i8size='1' i8type='char' i_arpainet='define' i_bsdioctl='' +i_crypt='define' i_db='define' i_dbm='define' i_dirent='define' @@ -621,6 +702,7 @@ lint='' lkflags='' ln='ln' lns='/usr/bin/ln -s' +localtime_r_proto='REENTRANT_PROTO_S_TS' locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include' loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib' longdblsize='8' @@ -689,7 +771,7 @@ patchlevel='7' path_sep=':' perl5='perl' perl='' -perl_patchlevel='15046' +perl_patchlevel='15172' perladmin='yourname@yourhost.yourplace.com' perllibs='-lm -lutil' perlpath='/opt/perl/bin/perl5.7.3' @@ -711,9 +793,12 @@ quadkind='2' quadtype='long' randbits='48' randfunc='drand48' +random_r_proto='REENTRANT_PROTO_I_TS' randseedtype='long' ranlib=':' rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='REENTRANT_PROTO_I_TSR' revision='5' rm='rm' rmail='' @@ -740,6 +825,13 @@ seedfunc='srand48' selectminbits='32' selecttype='fd_set *' sendmail='' +setgrent_r_proto='REENTRANT_PROTO_I_H' +sethostent_r_proto='REENTRANT_PROTO_I_ID' +setlocale_r_proto='0' +setnetent_r_proto='REENTRANT_PROTO_I_ID' +setprotoent_r_proto='REENTRANT_PROTO_I_ID' +setpwent_r_proto='REENTRANT_PROTO_I_H' +setservent_r_proto='REENTRANT_PROTO_I_ID' sh='/bin/sh' shar='' sharpbang='#!' @@ -774,6 +866,8 @@ socksizetype='int' sort='sort' spackage='Perl5' spitshell='cat' +srand48_r_proto='REENTRANT_PROTO_I_LS' +srandom_r_proto='REENTRANT_PROTO_I_TS' src='.' ssizetype='ssize_t' startperl='#!/opt/perl/bin/perl5.7.3' @@ -786,6 +880,7 @@ stdio_cnt='((fp)->_cnt)' stdio_filbuf='' stdio_ptr='((fp)->_ptr)' stdio_stream_array='_iob' +strerror_r_proto='REENTRANT_PROTO_I_IBW' strings='/usr/include/string.h' submit='' subversion='3' @@ -798,11 +893,13 @@ tee='' test='test' timeincl='/usr/include/sys/time.h ' timetype='time_t' +tmpnam_r_proto='0' to=':' touch='touch' tr='tr' trnl='\n' troff='' +ttyname_r_proto='REENTRANT_PROTO_I_IBW' u16size='2' u16type='unsigned short' u32size='4' @@ -858,7 +955,7 @@ vendorlibexp='' vendorprefix='' vendorprefixexp='' version='5.7.3' -version_patchlevel_string='version 7 subversion 3 patch 15046' +version_patchlevel_string='version 7 subversion 3 patch 15172' versiononly='define' vi='' voidflags='15' @@ -888,7 +985,7 @@ PERL_SUBVERSION=3 PERL_API_REVISION=5 PERL_API_VERSION=5 PERL_API_SUBVERSION=0 -PERL_PATCHLEVEL=15046 +PERL_PATCHLEVEL=15172 PERL_CONFIG_SH=true # Variables propagated from previous config.sh file. pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"' diff --git a/Porting/config_H b/Porting/config_H index 4ff3c48..21639fd 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Wed Mar 6 18:01:27 EET 2002 + * Configuration time: Fri Mar 15 17:39:35 EET 2002 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -1136,6 +1136,16 @@ */ #define HAS_ACCESS /**/ +/* HAS_ASCTIME_R: + * This symbol, if defined, indicates that the asctime_r routine + * is available to asctime re-entrantly. + */ +/* ASCTIME_R_PROTO: + * This symbol encodes the prototype of asctime_r. + */ +#define HAS_ASCTIME_R /**/ +#define ASCTIME_R_PROTO REENTRANT_PROTO_B_SB /**/ + /* CASTI32: * This symbol is defined if the C compiler can cast negative * or large floating point numbers to 32-bit ints. @@ -1187,6 +1197,16 @@ */ #define HAS_STRUCT_CMSGHDR /**/ +/* HAS_CRYPT_R: + * This symbol, if defined, indicates that the crypt_r routine + * is available to crypt re-entrantly. + */ +/* CRYPT_R_PROTO: + * This symbol encodes the prototype of crypt_r. + */ +/*#define HAS_CRYPT_R / **/ +#define CRYPT_R_PROTO 0 /**/ + /* HAS_CSH: * This symbol, if defined, indicates that the C-shell exists. */ @@ -1198,6 +1218,16 @@ #define CSH "/usr/bin/csh" /**/ #endif +/* HAS_CTIME_R: + * This symbol, if defined, indicates that the ctime_r routine + * is available to ctime re-entrantly. + */ +/* CTIME_R_PROTO: + * This symbol encodes the prototype of ctime_r. + */ +#define HAS_CTIME_R /**/ +#define CTIME_R_PROTO REENTRANT_PROTO_B_SB /**/ + /* DLSYM_NEEDS_UNDERSCORE: * This symbol, if defined, indicates that we need to prepend an * underscore to the symbol name before calling dlsym(). This only @@ -1206,6 +1236,16 @@ */ /*#define DLSYM_NEEDS_UNDERSCORE / **/ +/* HAS_DRAND48_R: + * This symbol, if defined, indicates that the drand48_r routine + * is available to drand48 re-entrantly. + */ +/* DRAND48_R_PROTO: + * This symbol encodes the prototype of drand48_r. + */ +#define HAS_DRAND48_R /**/ +#define DRAND48_R_PROTO REENTRANT_PROTO_I_ST /**/ + /* HAS_DRAND48_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the drand48() function. Otherwise, it is up @@ -1220,6 +1260,16 @@ */ #define HAS_ENDGRENT /**/ +/* HAS_ENDGRENT_R: + * This symbol, if defined, indicates that the endgrent_r routine + * is available to endgrent re-entrantly. + */ +/* ENDGRENT_R_PROTO: + * This symbol encodes the prototype of endgrent_r. + */ +#define HAS_ENDGRENT_R /**/ +#define ENDGRENT_R_PROTO REENTRANT_PROTO_I_H /**/ + /* HAS_ENDHOSTENT: * This symbol, if defined, indicates that the endhostent() routine is * available to close whatever was being used for host queries. @@ -1244,6 +1294,16 @@ */ #define HAS_ENDPWENT /**/ +/* HAS_ENDPWENT_R: + * This symbol, if defined, indicates that the endpwent_r routine + * is available to endpwent re-entrantly. + */ +/* ENDPWENT_R_PROTO: + * This symbol encodes the prototype of endpwent_r. + */ +#define HAS_ENDPWENT_R /**/ +#define ENDPWENT_R_PROTO REENTRANT_PROTO_I_H /**/ + /* HAS_ENDSERVENT: * This symbol, if defined, indicates that the endservent() routine is * available to close whatever was being used for service queries. @@ -1422,6 +1482,36 @@ */ #define HAS_GETGRENT /**/ +/* HAS_GETGRENT_R: + * This symbol, if defined, indicates that the getgrent_r routine + * is available to getgrent re-entrantly. + */ +/* GETGRENT_R_PROTO: + * This symbol encodes the prototype of getgrent_r. + */ +#define HAS_GETGRENT_R /**/ +#define GETGRENT_R_PROTO REENTRANT_PROTO_I_SBWR /**/ + +/* HAS_GETGRGID_R: + * This symbol, if defined, indicates that the getgrgid_r routine + * is available to getgrgid re-entrantly. + */ +/* GETGRGID_R_PROTO: + * This symbol encodes the prototype of getgrgid_r. + */ +#define HAS_GETGRGID_R /**/ +#define GETGRGID_R_PROTO REENTRANT_PROTO_I_TSBWR /**/ + +/* HAS_GETGRNAM_R: + * This symbol, if defined, indicates that the getgrnam_r routine + * is available to getgrnam re-entrantly. + */ +/* GETGRNAM_R_PROTO: + * This symbol encodes the prototype of getgrnam_r. + */ +#define HAS_GETGRNAM_R /**/ +#define GETGRNAM_R_PROTO REENTRANT_PROTO_I_CSBWR /**/ + /* HAS_GETHOSTBYADDR: * This symbol, if defined, indicates that the gethostbyaddr() routine is * available to look up hosts by their IP addresses. @@ -1483,6 +1573,16 @@ */ #define HAS_GETITIMER /**/ +/* HAS_GETLOGIN_R: + * This symbol, if defined, indicates that the getlogin_r routine + * is available to getlogin re-entrantly. + */ +/* GETLOGIN_R_PROTO: + * This symbol encodes the prototype of getlogin_r. + */ +#define HAS_GETLOGIN_R /**/ +#define GETLOGIN_R_PROTO REENTRANT_PROTO_I_BW /**/ + /* HAS_GETMNT: * This symbol, if defined, indicates that the getmnt routine is * available to get filesystem mount info by filename. @@ -1577,6 +1677,36 @@ */ #define HAS_GETPWENT /**/ +/* HAS_GETPWENT_R: + * This symbol, if defined, indicates that the getpwent_r routine + * is available to getpwent re-entrantly. + */ +/* GETPWENT_R_PROTO: + * This symbol encodes the prototype of getpwent_r. + */ +#define HAS_GETPWENT_R /**/ +#define GETPWENT_R_PROTO REENTRANT_PROTO_I_SBWR /**/ + +/* HAS_GETPWNAM_R: + * This symbol, if defined, indicates that the getpwnam_r routine + * is available to getpwnam re-entrantly. + */ +/* GETPWNAM_R_PROTO: + * This symbol encodes the prototype of getpwnam_r. + */ +#define HAS_GETPWNAM_R /**/ +#define GETPWNAM_R_PROTO REENTRANT_PROTO_I_CSBWR /**/ + +/* HAS_GETPWUID_R: + * This symbol, if defined, indicates that the getpwuid_r routine + * is available to getpwuid re-entrantly. + */ +/* GETPWUID_R_PROTO: + * This symbol encodes the prototype of getpwuid_r. + */ +#define HAS_GETPWUID_R /**/ +#define GETPWUID_R_PROTO REENTRANT_PROTO_I_TSBWR /**/ + /* HAS_GETSERVENT: * This symbol, if defined, indicates that the getservent() routine is * available to look up network services in some data base or another. @@ -1597,6 +1727,16 @@ */ /*#define HAS_GETSPNAM / **/ +/* HAS_GETSPNAM_R: + * This symbol, if defined, indicates that the getspnam_r routine + * is available to getspnam re-entrantly. + */ +/* GETSPNAM_R_PROTO: + * This symbol encodes the prototype of getspnam_r. + */ +/*#define HAS_GETSPNAM_R / **/ +#define GETSPNAM_R_PROTO 0 /**/ + /* HAS_GETSERVBYNAME: * This symbol, if defined, indicates that the getservbyname() * routine is available to look up services by their name. @@ -1608,6 +1748,16 @@ #define HAS_GETSERVBYNAME /**/ #define HAS_GETSERVBYPORT /**/ +/* HAS_GMTIME_R: + * This symbol, if defined, indicates that the gmtime_r routine + * is available to gmtime re-entrantly. + */ +/* GMTIME_R_PROTO: + * This symbol encodes the prototype of gmtime_r. + */ +#define HAS_GMTIME_R /**/ +#define GMTIME_R_PROTO REENTRANT_PROTO_S_TS /**/ + /* HAS_GNULIBC: * This symbol, if defined, indicates to the C program that * the GNU C library is being used. @@ -1699,6 +1849,16 @@ */ #define HAS_LDBL_DIG /* */ +/* HAS_LOCALTIME_R: + * This symbol, if defined, indicates that the localtime_r routine + * is available to localtime re-entrantly. + */ +/* LOCALTIME_R_PROTO: + * This symbol encodes the prototype of localtime_r. + */ +#define HAS_LOCALTIME_R /**/ +#define LOCALTIME_R_PROTO REENTRANT_PROTO_S_TS /**/ + /* HAS_LONG_DOUBLE: * This symbol will be defined if the C compiler supports long * doubles. @@ -1851,6 +2011,26 @@ #define SCHED_YIELD sched_yield() /**/ #define HAS_SCHED_YIELD /**/ +/* HAS_RANDOM_R: + * This symbol, if defined, indicates that the random_r routine + * is available to random re-entrantly. + */ +/* RANDOM_R_PROTO: + * This symbol encodes the prototype of random_r. + */ +#define HAS_RANDOM_R /**/ +#define RANDOM_R_PROTO REENTRANT_PROTO_I_TS /**/ + +/* HAS_READDIR_R: + * This symbol, if defined, indicates that the readdir_r routine + * is available to readdir re-entrantly. + */ +/* READDIR_R_PROTO: + * This symbol encodes the prototype of readdir_r. + */ +#define HAS_READDIR_R /**/ +#define READDIR_R_PROTO REENTRANT_PROTO_I_TSR /**/ + /* HAS_READV: * This symbol, if defined, indicates that the readv routine is * available to do gather reads. You will also need @@ -1914,6 +2094,16 @@ */ #define HAS_SETGRENT /**/ +/* HAS_SETGRENT_R: + * This symbol, if defined, indicates that the setgrent_r routine + * is available to setgrent re-entrantly. + */ +/* SETGRENT_R_PROTO: + * This symbol encodes the prototype of setgrent_r. + */ +#define HAS_SETGRENT_R /**/ +#define SETGRENT_R_PROTO REENTRANT_PROTO_I_H /**/ + /* HAS_SETGROUPS: * This symbol, if defined, indicates that the setgroups() routine is * available to set the list of process groups. If unavailable, multiple @@ -1969,6 +2159,16 @@ */ #define HAS_SETPWENT /**/ +/* HAS_SETPWENT_R: + * This symbol, if defined, indicates that the setpwent_r routine + * is available to setpwent re-entrantly. + */ +/* SETPWENT_R_PROTO: + * This symbol encodes the prototype of setpwent_r. + */ +#define HAS_SETPWENT_R /**/ +#define SETPWENT_R_PROTO REENTRANT_PROTO_I_H /**/ + /* HAS_SETSERVENT: * This symbol, if defined, indicates that the setservent() routine is * available. @@ -2090,6 +2290,26 @@ */ #define HAS_SQRTL /**/ +/* HAS_SRAND48_R: + * This symbol, if defined, indicates that the srand48_r routine + * is available to srand48 re-entrantly. + */ +/* SRAND48_R_PROTO: + * This symbol encodes the prototype of srand48_r. + */ +#define HAS_SRAND48_R /**/ +#define SRAND48_R_PROTO REENTRANT_PROTO_I_LS /**/ + +/* HAS_SRANDOM_R: + * This symbol, if defined, indicates that the srandom_r routine + * is available to srandom re-entrantly. + */ +/* SRANDOM_R_PROTO: + * This symbol encodes the prototype of srandom_r. + */ +#define HAS_SRANDOM_R /**/ +#define SRANDOM_R_PROTO REENTRANT_PROTO_I_TS /**/ + /* USE_STAT_BLOCKS: * This symbol is defined if this system has a stat structure declaring * st_blksize and st_blocks. @@ -2210,6 +2430,16 @@ #define HAS_SYS_ERRLIST /**/ #define Strerror(e) strerror(e) +/* HAS_STRERROR_R: + * This symbol, if defined, indicates that the strerror_r routine + * is available to strerror re-entrantly. + */ +/* STRERROR_R_PROTO: + * This symbol encodes the prototype of strerror_r. + */ +#define HAS_STRERROR_R /**/ +#define STRERROR_R_PROTO REENTRANT_PROTO_I_IBW /**/ + /* HAS_STRTOLD: * This symbol, if defined, indicates that the strtold routine is * available to convert strings to long doubles. @@ -2268,6 +2498,16 @@ */ #define HAS_TIMES /**/ +/* HAS_TMPNAM_R: + * This symbol, if defined, indicates that the tmpnam_r routine + * is available to tmpnam re-entrantly. + */ +/* TMPNAM_R_PROTO: + * This symbol encodes the prototype of tmpnam_r. + */ +/*#define HAS_TMPNAM_R / **/ +#define TMPNAM_R_PROTO 0 /**/ + /* HAS_UALARM: * This symbol, if defined, indicates that the ualarm routine is * available to do alarms with microsecond granularity. @@ -3588,6 +3828,12 @@ */ /*#define HAS_USLEEP_PROTO / **/ +/* I_CRYPT: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#define I_CRYPT /**/ + /* I_FP: * This symbol, if defined, indicates that exists and * should be included. @@ -3600,10 +3846,250 @@ */ #define I_LANGINFO /**/ +/* HAS_CTERMID_R: + * This symbol, if defined, indicates that the ctermid_r routine + * is available to ctermid re-entrantly. + */ +/* CTERMID_R_PROTO: + * This symbol encodes the prototype of ctermid_r. + */ +/*#define HAS_CTERMID_R / **/ +#define CTERMID_R_PROTO 0 /**/ + +/* HAS_ENDHOSTENT_R: + * This symbol, if defined, indicates that the endhostent_r routine + * is available to endhostent re-entrantly. + */ +/* ENDHOSTENT_R_PROTO: + * This symbol encodes the prototype of endhostent_r. + */ +#define HAS_ENDHOSTENT_R /**/ +#define ENDHOSTENT_R_PROTO REENTRANT_PROTO_I_S /**/ + +/* HAS_ENDNETENT_R: + * This symbol, if defined, indicates that the endnetent_r routine + * is available to endnetent re-entrantly. + */ +/* ENDNETENT_R_PROTO: + * This symbol encodes the prototype of endnetent_r. + */ +#define HAS_ENDNETENT_R /**/ +#define ENDNETENT_R_PROTO REENTRANT_PROTO_I_S /**/ + +/* HAS_ENDPROTOENT_R: + * This symbol, if defined, indicates that the endprotoent_r routine + * is available to endprotoent re-entrantly. + */ +/* ENDPROTOENT_R_PROTO: + * This symbol encodes the prototype of endprotoent_r. + */ +#define HAS_ENDPROTOENT_R /**/ +#define ENDPROTOENT_R_PROTO REENTRANT_PROTO_I_S /**/ + +/* HAS_ENDSERVENT_R: + * This symbol, if defined, indicates that the endservent_r routine + * is available to endservent re-entrantly. + */ +/* ENDSERVENT_R_PROTO: + * This symbol encodes the prototype of endservent_r. + */ +#define HAS_ENDSERVENT_R /**/ +#define ENDSERVENT_R_PROTO REENTRANT_PROTO_I_S /**/ + +/* HAS_GETHOSTBYADDR_R: + * This symbol, if defined, indicates that the gethostbyaddr_r routine + * is available to gethostbyaddr re-entrantly. + */ +/* GETHOSTBYADDR_R_PROTO: + * This symbol encodes the prototype of gethostbyaddr_r. + */ +#define HAS_GETHOSTBYADDR_R /**/ +#define GETHOSTBYADDR_R_PROTO REENTRANT_PROTO_I_CWISBWRE /**/ + +/* HAS_GETHOSTBYNAME_R: + * This symbol, if defined, indicates that the gethostbyname_r routine + * is available to gethostbyname re-entrantly. + */ +/* GETHOSTBYNAME_R_PROTO: + * This symbol encodes the prototype of gethostbyname_r. + */ +#define HAS_GETHOSTBYNAME_R /**/ +#define GETHOSTBYNAME_R_PROTO REENTRANT_PROTO_I_CSBWRE /**/ + +/* HAS_GETHOSTENT_R: + * This symbol, if defined, indicates that the gethostent_r routine + * is available to gethostent re-entrantly. + */ +/* GETHOSTENT_R_PROTO: + * This symbol encodes the prototype of gethostent_r. + */ +#define HAS_GETHOSTENT_R /**/ +#define GETHOSTENT_R_PROTO REENTRANT_PROTO_I_SBWRE /**/ + +/* HAS_GETNETBYADDR_R: + * This symbol, if defined, indicates that the getnetbyaddr_r routine + * is available to getnetbyaddr re-entrantly. + */ +/* GETNETBYADDR_R_PROTO: + * This symbol encodes the prototype of getnetbyaddr_r. + */ +#define HAS_GETNETBYADDR_R /**/ +#define GETNETBYADDR_R_PROTO REENTRANT_PROTO_I_UISBWRE /**/ + +/* HAS_GETNETBYNAME_R: + * This symbol, if defined, indicates that the getnetbyname_r routine + * is available to getnetbyname re-entrantly. + */ +/* GETNETBYNAME_R_PROTO: + * This symbol encodes the prototype of getnetbyname_r. + */ +#define HAS_GETNETBYNAME_R /**/ +#define GETNETBYNAME_R_PROTO REENTRANT_PROTO_I_CSBWRE /**/ + +/* HAS_GETNETENT_R: + * This symbol, if defined, indicates that the getnetent_r routine + * is available to getnetent re-entrantly. + */ +/* GETNETENT_R_PROTO: + * This symbol encodes the prototype of getnetent_r. + */ +#define HAS_GETNETENT_R /**/ +#define GETNETENT_R_PROTO REENTRANT_PROTO_I_SBWRE /**/ + +/* HAS_GETPROTOBYNAME_R: + * This symbol, if defined, indicates that the getprotobyname_r routine + * is available to getprotobyname re-entrantly. + */ +/* GETPROTOBYNAME_R_PROTO: + * This symbol encodes the prototype of getprotobyname_r. + */ +#define HAS_GETPROTOBYNAME_R /**/ +#define GETPROTOBYNAME_R_PROTO REENTRANT_PROTO_I_CSBWR /**/ + +/* HAS_GETPROTOBYNUMBER_R: + * This symbol, if defined, indicates that the getprotobynumber_r routine + * is available to getprotobynumber re-entrantly. + */ +/* GETPROTOBYNUMBER_R_PROTO: + * This symbol encodes the prototype of getprotobynumber_r. + */ +#define HAS_GETPROTOBYNUMBER_R /**/ +#define GETPROTOBYNUMBER_R_PROTO REENTRANT_PROTO_I_ISBWR /**/ + +/* HAS_GETPROTOENT_R: + * This symbol, if defined, indicates that the getprotoent_r routine + * is available to getprotoent re-entrantly. + */ +/* GETPROTOENT_R_PROTO: + * This symbol encodes the prototype of getprotoent_r. + */ +#define HAS_GETPROTOENT_R /**/ +#define GETPROTOENT_R_PROTO REENTRANT_PROTO_I_SBWR /**/ + +/* HAS_GETSERVBYNAME_R: + * This symbol, if defined, indicates that the getservbyname_r routine + * is available to getservbyname re-entrantly. + */ +/* GETSERVBYNAME_R_PROTO: + * This symbol encodes the prototype of getservbyname_r. + */ +#define HAS_GETSERVBYNAME_R /**/ +#define GETSERVBYNAME_R_PROTO REENTRANT_PROTO_I_CCSBWR /**/ + +/* HAS_GETSERVBYPORT_R: + * This symbol, if defined, indicates that the getservbyport_r routine + * is available to getservbyport re-entrantly. + */ +/* GETSERVBYPORT_R_PROTO: + * This symbol encodes the prototype of getservbyport_r. + */ +#define HAS_GETSERVBYPORT_R /**/ +#define GETSERVBYPORT_R_PROTO REENTRANT_PROTO_I_ICSBWR /**/ + +/* HAS_GETSERVENT_R: + * This symbol, if defined, indicates that the getservent_r routine + * is available to getservent re-entrantly. + */ +/* GETSERVENT_R_PROTO: + * This symbol encodes the prototype of getservent_r. + */ +#define HAS_GETSERVENT_R /**/ +#define GETSERVENT_R_PROTO REENTRANT_PROTO_I_SBWR /**/ + /* HAS_PTHREAD_ATFORK: * This symbol, if defined, indicates that the pthread_atfork routine * is available setup fork handlers. */ #define HAS_PTHREAD_ATFORK /**/ +/* HAS_READDIR64_R: + * This symbol, if defined, indicates that the readdir64_r routine + * is available to readdir64 re-entrantly. + */ +/* READDIR64_R_PROTO: + * This symbol encodes the prototype of readdir64_r. + */ +/*#define HAS_READDIR64_R / **/ +#define READDIR64_R_PROTO 0 /**/ + +/* HAS_SETHOSTENT_R: + * This symbol, if defined, indicates that the sethostent_r routine + * is available to sethostent re-entrantly. + */ +/* SETHOSTENT_R_PROTO: + * This symbol encodes the prototype of sethostent_r. + */ +#define HAS_SETHOSTENT_R /**/ +#define SETHOSTENT_R_PROTO REENTRANT_PROTO_I_ID /**/ + +/* HAS_SETLOCALE_R: + * This symbol, if defined, indicates that the setlocale_r routine + * is available to setlocale re-entrantly. + */ +/* SETLOCALE_R_PROTO: + * This symbol encodes the prototype of setlocale_r. + */ +/*#define HAS_SETLOCALE_R / **/ +#define SETLOCALE_R_PROTO 0 /**/ + +/* HAS_SETNETENT_R: + * This symbol, if defined, indicates that the setnetent_r routine + * is available to setnetent re-entrantly. + */ +/* SETNETENT_R_PROTO: + * This symbol encodes the prototype of setnetent_r. + */ +#define HAS_SETNETENT_R /**/ +#define SETNETENT_R_PROTO REENTRANT_PROTO_I_ID /**/ + +/* HAS_SETPROTOENT_R: + * This symbol, if defined, indicates that the setprotoent_r routine + * is available to setprotoent re-entrantly. + */ +/* SETPROTOENT_R_PROTO: + * This symbol encodes the prototype of setprotoent_r. + */ +#define HAS_SETPROTOENT_R /**/ +#define SETPROTOENT_R_PROTO REENTRANT_PROTO_I_ID /**/ + +/* HAS_SETSERVENT_R: + * This symbol, if defined, indicates that the setservent_r routine + * is available to setservent re-entrantly. + */ +/* SETSERVENT_R_PROTO: + * This symbol encodes the prototype of setservent_r. + */ +#define HAS_SETSERVENT_R /**/ +#define SETSERVENT_R_PROTO REENTRANT_PROTO_I_ID /**/ + +/* HAS_TTYNAME_R: + * This symbol, if defined, indicates that the ttyname_r routine + * is available to ttyname re-entrantly. + */ +/* TTYNAME_R_PROTO: + * This symbol encodes the prototype of ttyname_r. + */ +#define HAS_TTYNAME_R /**/ +#define TTYNAME_R_PROTO REENTRANT_PROTO_I_IBW /**/ + #endif diff --git a/Porting/findrfuncs b/Porting/findrfuncs index bef2759..029bdd0 100644 --- a/Porting/findrfuncs +++ b/Porting/findrfuncs @@ -65,7 +65,11 @@ delete $rfuncs{setlocale_r} if $^O eq 'linux'; my $netdb_r_obsolete; if ($^O eq 'hpux') { delete $rfuncs{crypt_r}; + delete $rfuncs{drand48_r}; + delete $rfuncs{getgrent_r}; + delete $rfuncs{getpwent_r}; delete $rfuncs{setlocale_r}; + delete $rfuncs{srand48_r}; delete $rfuncs{strerror_r}; $netdb_r_obsolete = 1; } elsif ($^O eq 'dec_osf') { @@ -84,8 +88,8 @@ if ($netdb_r_obsolete) { getnetbyaddr_r getnetbyname_r getnetent_r - getprotobynumber_r getprotobyname_r + getprotobynumber_r getprotoent_r getservbyname_r getservbyport_r diff --git a/config_h.SH b/config_h.SH index 2088967..a65ebb2 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1156,6 +1156,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_access HAS_ACCESS /**/ +/* HAS_ASCTIME_R: + * This symbol, if defined, indicates that the asctime_r routine + * is available to asctime re-entrantly. + */ +/* ASCTIME_R_PROTO: + * This symbol encodes the prototype of asctime_r. + */ +#$d_asctime_r HAS_ASCTIME_R /**/ +#define ASCTIME_R_PROTO $asctime_r_proto /**/ + /* CASTI32: * This symbol is defined if the C compiler can cast negative * or large floating point numbers to 32-bit ints. @@ -1207,6 +1217,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_cmsghdr_s HAS_STRUCT_CMSGHDR /**/ +/* HAS_CRYPT_R: + * This symbol, if defined, indicates that the crypt_r routine + * is available to crypt re-entrantly. + */ +/* CRYPT_R_PROTO: + * This symbol encodes the prototype of crypt_r. + */ +#$d_crypt_r HAS_CRYPT_R /**/ +#define CRYPT_R_PROTO $crypt_r_proto /**/ + /* HAS_CSH: * This symbol, if defined, indicates that the C-shell exists. */ @@ -1218,6 +1238,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define CSH "$full_csh" /**/ #endif +/* HAS_CTIME_R: + * This symbol, if defined, indicates that the ctime_r routine + * is available to ctime re-entrantly. + */ +/* CTIME_R_PROTO: + * This symbol encodes the prototype of ctime_r. + */ +#$d_ctime_r HAS_CTIME_R /**/ +#define CTIME_R_PROTO $ctime_r_proto /**/ + /* DLSYM_NEEDS_UNDERSCORE: * This symbol, if defined, indicates that we need to prepend an * underscore to the symbol name before calling dlsym(). This only @@ -1226,6 +1256,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_dlsymun DLSYM_NEEDS_UNDERSCORE /**/ +/* HAS_DRAND48_R: + * This symbol, if defined, indicates that the drand48_r routine + * is available to drand48 re-entrantly. + */ +/* DRAND48_R_PROTO: + * This symbol encodes the prototype of drand48_r. + */ +#$d_drand48_r HAS_DRAND48_R /**/ +#define DRAND48_R_PROTO $drand48_r_proto /**/ + /* HAS_DRAND48_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the drand48() function. Otherwise, it is up @@ -1240,6 +1280,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_endgrent HAS_ENDGRENT /**/ +/* HAS_ENDGRENT_R: + * This symbol, if defined, indicates that the endgrent_r routine + * is available to endgrent re-entrantly. + */ +/* ENDGRENT_R_PROTO: + * This symbol encodes the prototype of endgrent_r. + */ +#$d_endgrent_r HAS_ENDGRENT_R /**/ +#define ENDGRENT_R_PROTO $endgrent_r_proto /**/ + /* HAS_ENDHOSTENT: * This symbol, if defined, indicates that the endhostent() routine is * available to close whatever was being used for host queries. @@ -1264,6 +1314,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_endpwent HAS_ENDPWENT /**/ +/* HAS_ENDPWENT_R: + * This symbol, if defined, indicates that the endpwent_r routine + * is available to endpwent re-entrantly. + */ +/* ENDPWENT_R_PROTO: + * This symbol encodes the prototype of endpwent_r. + */ +#$d_endpwent_r HAS_ENDPWENT_R /**/ +#define ENDPWENT_R_PROTO $endpwent_r_proto /**/ + /* HAS_ENDSERVENT: * This symbol, if defined, indicates that the endservent() routine is * available to close whatever was being used for service queries. @@ -1442,6 +1502,36 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_getgrent HAS_GETGRENT /**/ +/* HAS_GETGRENT_R: + * This symbol, if defined, indicates that the getgrent_r routine + * is available to getgrent re-entrantly. + */ +/* GETGRENT_R_PROTO: + * This symbol encodes the prototype of getgrent_r. + */ +#$d_getgrent_r HAS_GETGRENT_R /**/ +#define GETGRENT_R_PROTO $getgrent_r_proto /**/ + +/* HAS_GETGRGID_R: + * This symbol, if defined, indicates that the getgrgid_r routine + * is available to getgrgid re-entrantly. + */ +/* GETGRGID_R_PROTO: + * This symbol encodes the prototype of getgrgid_r. + */ +#$d_getgrgid_r HAS_GETGRGID_R /**/ +#define GETGRGID_R_PROTO $getgrgid_r_proto /**/ + +/* HAS_GETGRNAM_R: + * This symbol, if defined, indicates that the getgrnam_r routine + * is available to getgrnam re-entrantly. + */ +/* GETGRNAM_R_PROTO: + * This symbol encodes the prototype of getgrnam_r. + */ +#$d_getgrnam_r HAS_GETGRNAM_R /**/ +#define GETGRNAM_R_PROTO $getgrnam_r_proto /**/ + /* HAS_GETHOSTBYADDR: * This symbol, if defined, indicates that the gethostbyaddr() routine is * available to look up hosts by their IP addresses. @@ -1503,6 +1593,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_getitimer HAS_GETITIMER /**/ +/* HAS_GETLOGIN_R: + * This symbol, if defined, indicates that the getlogin_r routine + * is available to getlogin re-entrantly. + */ +/* GETLOGIN_R_PROTO: + * This symbol encodes the prototype of getlogin_r. + */ +#$d_getlogin_r HAS_GETLOGIN_R /**/ +#define GETLOGIN_R_PROTO $getlogin_r_proto /**/ + /* HAS_GETMNT: * This symbol, if defined, indicates that the getmnt routine is * available to get filesystem mount info by filename. @@ -1597,6 +1697,36 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_getpwent HAS_GETPWENT /**/ +/* HAS_GETPWENT_R: + * This symbol, if defined, indicates that the getpwent_r routine + * is available to getpwent re-entrantly. + */ +/* GETPWENT_R_PROTO: + * This symbol encodes the prototype of getpwent_r. + */ +#$d_getpwent_r HAS_GETPWENT_R /**/ +#define GETPWENT_R_PROTO $getpwent_r_proto /**/ + +/* HAS_GETPWNAM_R: + * This symbol, if defined, indicates that the getpwnam_r routine + * is available to getpwnam re-entrantly. + */ +/* GETPWNAM_R_PROTO: + * This symbol encodes the prototype of getpwnam_r. + */ +#$d_getpwnam_r HAS_GETPWNAM_R /**/ +#define GETPWNAM_R_PROTO $getpwnam_r_proto /**/ + +/* HAS_GETPWUID_R: + * This symbol, if defined, indicates that the getpwuid_r routine + * is available to getpwuid re-entrantly. + */ +/* GETPWUID_R_PROTO: + * This symbol encodes the prototype of getpwuid_r. + */ +#$d_getpwuid_r HAS_GETPWUID_R /**/ +#define GETPWUID_R_PROTO $getpwuid_r_proto /**/ + /* HAS_GETSERVENT: * This symbol, if defined, indicates that the getservent() routine is * available to look up network services in some data base or another. @@ -1617,6 +1747,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_getspnam HAS_GETSPNAM /**/ +/* HAS_GETSPNAM_R: + * This symbol, if defined, indicates that the getspnam_r routine + * is available to getspnam re-entrantly. + */ +/* GETSPNAM_R_PROTO: + * This symbol encodes the prototype of getspnam_r. + */ +#$d_getspnam_r HAS_GETSPNAM_R /**/ +#define GETSPNAM_R_PROTO $getspnam_r_proto /**/ + /* HAS_GETSERVBYNAME: * This symbol, if defined, indicates that the getservbyname() * routine is available to look up services by their name. @@ -1628,6 +1768,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_getsbyname HAS_GETSERVBYNAME /**/ #$d_getsbyport HAS_GETSERVBYPORT /**/ +/* HAS_GMTIME_R: + * This symbol, if defined, indicates that the gmtime_r routine + * is available to gmtime re-entrantly. + */ +/* GMTIME_R_PROTO: + * This symbol encodes the prototype of gmtime_r. + */ +#$d_gmtime_r HAS_GMTIME_R /**/ +#define GMTIME_R_PROTO $gmtime_r_proto /**/ + /* HAS_GNULIBC: * This symbol, if defined, indicates to the C program that * the GNU C library is being used. @@ -1719,6 +1869,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_ldbl_dig HAS_LDBL_DIG /* */ +/* HAS_LOCALTIME_R: + * This symbol, if defined, indicates that the localtime_r routine + * is available to localtime re-entrantly. + */ +/* LOCALTIME_R_PROTO: + * This symbol encodes the prototype of localtime_r. + */ +#$d_localtime_r HAS_LOCALTIME_R /**/ +#define LOCALTIME_R_PROTO $localtime_r_proto /**/ + /* HAS_LONG_DOUBLE: * This symbol will be defined if the C compiler supports long * doubles. @@ -1871,6 +2031,26 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define SCHED_YIELD $sched_yield /**/ #$d_sched_yield HAS_SCHED_YIELD /**/ +/* HAS_RANDOM_R: + * This symbol, if defined, indicates that the random_r routine + * is available to random re-entrantly. + */ +/* RANDOM_R_PROTO: + * This symbol encodes the prototype of random_r. + */ +#$d_random_r HAS_RANDOM_R /**/ +#define RANDOM_R_PROTO $random_r_proto /**/ + +/* HAS_READDIR_R: + * This symbol, if defined, indicates that the readdir_r routine + * is available to readdir re-entrantly. + */ +/* READDIR_R_PROTO: + * This symbol encodes the prototype of readdir_r. + */ +#$d_readdir_r HAS_READDIR_R /**/ +#define READDIR_R_PROTO $readdir_r_proto /**/ + /* HAS_READV: * This symbol, if defined, indicates that the readv routine is * available to do gather reads. You will also need @@ -1934,6 +2114,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_setgrent HAS_SETGRENT /**/ +/* HAS_SETGRENT_R: + * This symbol, if defined, indicates that the setgrent_r routine + * is available to setgrent re-entrantly. + */ +/* SETGRENT_R_PROTO: + * This symbol encodes the prototype of setgrent_r. + */ +#$d_setgrent_r HAS_SETGRENT_R /**/ +#define SETGRENT_R_PROTO $setgrent_r_proto /**/ + /* HAS_SETGROUPS: * This symbol, if defined, indicates that the setgroups() routine is * available to set the list of process groups. If unavailable, multiple @@ -1989,6 +2179,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_setpwent HAS_SETPWENT /**/ +/* HAS_SETPWENT_R: + * This symbol, if defined, indicates that the setpwent_r routine + * is available to setpwent re-entrantly. + */ +/* SETPWENT_R_PROTO: + * This symbol encodes the prototype of setpwent_r. + */ +#$d_setpwent_r HAS_SETPWENT_R /**/ +#define SETPWENT_R_PROTO $setpwent_r_proto /**/ + /* HAS_SETSERVENT: * This symbol, if defined, indicates that the setservent() routine is * available. @@ -2110,6 +2310,26 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_sqrtl HAS_SQRTL /**/ +/* HAS_SRAND48_R: + * This symbol, if defined, indicates that the srand48_r routine + * is available to srand48 re-entrantly. + */ +/* SRAND48_R_PROTO: + * This symbol encodes the prototype of srand48_r. + */ +#$d_srand48_r HAS_SRAND48_R /**/ +#define SRAND48_R_PROTO $srand48_r_proto /**/ + +/* HAS_SRANDOM_R: + * This symbol, if defined, indicates that the srandom_r routine + * is available to srandom re-entrantly. + */ +/* SRANDOM_R_PROTO: + * This symbol encodes the prototype of srandom_r. + */ +#$d_srandom_r HAS_SRANDOM_R /**/ +#define SRANDOM_R_PROTO $srandom_r_proto /**/ + /* USE_STAT_BLOCKS: * This symbol is defined if this system has a stat structure declaring * st_blksize and st_blocks. @@ -2230,6 +2450,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_syserrlst HAS_SYS_ERRLIST /**/ #define Strerror(e) $d_strerrm +/* HAS_STRERROR_R: + * This symbol, if defined, indicates that the strerror_r routine + * is available to strerror re-entrantly. + */ +/* STRERROR_R_PROTO: + * This symbol encodes the prototype of strerror_r. + */ +#$d_strerror_r HAS_STRERROR_R /**/ +#define STRERROR_R_PROTO $strerror_r_proto /**/ + /* HAS_STRTOLD: * This symbol, if defined, indicates that the strtold routine is * available to convert strings to long doubles. @@ -2288,6 +2518,16 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_times HAS_TIMES /**/ +/* HAS_TMPNAM_R: + * This symbol, if defined, indicates that the tmpnam_r routine + * is available to tmpnam re-entrantly. + */ +/* TMPNAM_R_PROTO: + * This symbol encodes the prototype of tmpnam_r. + */ +#$d_tmpnam_r HAS_TMPNAM_R /**/ +#define TMPNAM_R_PROTO $tmpnam_r_proto /**/ + /* HAS_UALARM: * This symbol, if defined, indicates that the ualarm routine is * available to do alarms with microsecond granularity. @@ -3608,6 +3848,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_usleepproto HAS_USLEEP_PROTO /**/ +/* I_CRYPT: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_crypt I_CRYPT /**/ + /* I_FP: * This symbol, if defined, indicates that exists and * should be included. @@ -3620,11 +3866,251 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$i_langinfo I_LANGINFO /**/ +/* HAS_CTERMID_R: + * This symbol, if defined, indicates that the ctermid_r routine + * is available to ctermid re-entrantly. + */ +/* CTERMID_R_PROTO: + * This symbol encodes the prototype of ctermid_r. + */ +#$d_ctermid_r HAS_CTERMID_R /**/ +#define CTERMID_R_PROTO $ctermid_r_proto /**/ + +/* HAS_ENDHOSTENT_R: + * This symbol, if defined, indicates that the endhostent_r routine + * is available to endhostent re-entrantly. + */ +/* ENDHOSTENT_R_PROTO: + * This symbol encodes the prototype of endhostent_r. + */ +#$d_endhostent_r HAS_ENDHOSTENT_R /**/ +#define ENDHOSTENT_R_PROTO $endhostent_r_proto /**/ + +/* HAS_ENDNETENT_R: + * This symbol, if defined, indicates that the endnetent_r routine + * is available to endnetent re-entrantly. + */ +/* ENDNETENT_R_PROTO: + * This symbol encodes the prototype of endnetent_r. + */ +#$d_endnetent_r HAS_ENDNETENT_R /**/ +#define ENDNETENT_R_PROTO $endnetent_r_proto /**/ + +/* HAS_ENDPROTOENT_R: + * This symbol, if defined, indicates that the endprotoent_r routine + * is available to endprotoent re-entrantly. + */ +/* ENDPROTOENT_R_PROTO: + * This symbol encodes the prototype of endprotoent_r. + */ +#$d_endprotoent_r HAS_ENDPROTOENT_R /**/ +#define ENDPROTOENT_R_PROTO $endprotoent_r_proto /**/ + +/* HAS_ENDSERVENT_R: + * This symbol, if defined, indicates that the endservent_r routine + * is available to endservent re-entrantly. + */ +/* ENDSERVENT_R_PROTO: + * This symbol encodes the prototype of endservent_r. + */ +#$d_endservent_r HAS_ENDSERVENT_R /**/ +#define ENDSERVENT_R_PROTO $endservent_r_proto /**/ + +/* HAS_GETHOSTBYADDR_R: + * This symbol, if defined, indicates that the gethostbyaddr_r routine + * is available to gethostbyaddr re-entrantly. + */ +/* GETHOSTBYADDR_R_PROTO: + * This symbol encodes the prototype of gethostbyaddr_r. + */ +#$d_gethostbyaddr_r HAS_GETHOSTBYADDR_R /**/ +#define GETHOSTBYADDR_R_PROTO $gethostbyaddr_r_proto /**/ + +/* HAS_GETHOSTBYNAME_R: + * This symbol, if defined, indicates that the gethostbyname_r routine + * is available to gethostbyname re-entrantly. + */ +/* GETHOSTBYNAME_R_PROTO: + * This symbol encodes the prototype of gethostbyname_r. + */ +#$d_gethostbyname_r HAS_GETHOSTBYNAME_R /**/ +#define GETHOSTBYNAME_R_PROTO $gethostbyname_r_proto /**/ + +/* HAS_GETHOSTENT_R: + * This symbol, if defined, indicates that the gethostent_r routine + * is available to gethostent re-entrantly. + */ +/* GETHOSTENT_R_PROTO: + * This symbol encodes the prototype of gethostent_r. + */ +#$d_gethostent_r HAS_GETHOSTENT_R /**/ +#define GETHOSTENT_R_PROTO $gethostent_r_proto /**/ + +/* HAS_GETNETBYADDR_R: + * This symbol, if defined, indicates that the getnetbyaddr_r routine + * is available to getnetbyaddr re-entrantly. + */ +/* GETNETBYADDR_R_PROTO: + * This symbol encodes the prototype of getnetbyaddr_r. + */ +#$d_getnetbyaddr_r HAS_GETNETBYADDR_R /**/ +#define GETNETBYADDR_R_PROTO $getnetbyaddr_r_proto /**/ + +/* HAS_GETNETBYNAME_R: + * This symbol, if defined, indicates that the getnetbyname_r routine + * is available to getnetbyname re-entrantly. + */ +/* GETNETBYNAME_R_PROTO: + * This symbol encodes the prototype of getnetbyname_r. + */ +#$d_getnetbyname_r HAS_GETNETBYNAME_R /**/ +#define GETNETBYNAME_R_PROTO $getnetbyname_r_proto /**/ + +/* HAS_GETNETENT_R: + * This symbol, if defined, indicates that the getnetent_r routine + * is available to getnetent re-entrantly. + */ +/* GETNETENT_R_PROTO: + * This symbol encodes the prototype of getnetent_r. + */ +#$d_getnetent_r HAS_GETNETENT_R /**/ +#define GETNETENT_R_PROTO $getnetent_r_proto /**/ + +/* HAS_GETPROTOBYNAME_R: + * This symbol, if defined, indicates that the getprotobyname_r routine + * is available to getprotobyname re-entrantly. + */ +/* GETPROTOBYNAME_R_PROTO: + * This symbol encodes the prototype of getprotobyname_r. + */ +#$d_getprotobyname_r HAS_GETPROTOBYNAME_R /**/ +#define GETPROTOBYNAME_R_PROTO $getprotobyname_r_proto /**/ + +/* HAS_GETPROTOBYNUMBER_R: + * This symbol, if defined, indicates that the getprotobynumber_r routine + * is available to getprotobynumber re-entrantly. + */ +/* GETPROTOBYNUMBER_R_PROTO: + * This symbol encodes the prototype of getprotobynumber_r. + */ +#$d_getprotobynumber_r HAS_GETPROTOBYNUMBER_R /**/ +#define GETPROTOBYNUMBER_R_PROTO $getprotobynumber_r_proto /**/ + +/* HAS_GETPROTOENT_R: + * This symbol, if defined, indicates that the getprotoent_r routine + * is available to getprotoent re-entrantly. + */ +/* GETPROTOENT_R_PROTO: + * This symbol encodes the prototype of getprotoent_r. + */ +#$d_getprotoent_r HAS_GETPROTOENT_R /**/ +#define GETPROTOENT_R_PROTO $getprotoent_r_proto /**/ + +/* HAS_GETSERVBYNAME_R: + * This symbol, if defined, indicates that the getservbyname_r routine + * is available to getservbyname re-entrantly. + */ +/* GETSERVBYNAME_R_PROTO: + * This symbol encodes the prototype of getservbyname_r. + */ +#$d_getservbyname_r HAS_GETSERVBYNAME_R /**/ +#define GETSERVBYNAME_R_PROTO $getservbyname_r_proto /**/ + +/* HAS_GETSERVBYPORT_R: + * This symbol, if defined, indicates that the getservbyport_r routine + * is available to getservbyport re-entrantly. + */ +/* GETSERVBYPORT_R_PROTO: + * This symbol encodes the prototype of getservbyport_r. + */ +#$d_getservbyport_r HAS_GETSERVBYPORT_R /**/ +#define GETSERVBYPORT_R_PROTO $getservbyport_r_proto /**/ + +/* HAS_GETSERVENT_R: + * This symbol, if defined, indicates that the getservent_r routine + * is available to getservent re-entrantly. + */ +/* GETSERVENT_R_PROTO: + * This symbol encodes the prototype of getservent_r. + */ +#$d_getservent_r HAS_GETSERVENT_R /**/ +#define GETSERVENT_R_PROTO $getservent_r_proto /**/ + /* HAS_PTHREAD_ATFORK: * This symbol, if defined, indicates that the pthread_atfork routine * is available setup fork handlers. */ #$d_pthread_atfork HAS_PTHREAD_ATFORK /**/ +/* HAS_READDIR64_R: + * This symbol, if defined, indicates that the readdir64_r routine + * is available to readdir64 re-entrantly. + */ +/* READDIR64_R_PROTO: + * This symbol encodes the prototype of readdir64_r. + */ +#$d_readdir64_r HAS_READDIR64_R /**/ +#define READDIR64_R_PROTO $readdir64_r_proto /**/ + +/* HAS_SETHOSTENT_R: + * This symbol, if defined, indicates that the sethostent_r routine + * is available to sethostent re-entrantly. + */ +/* SETHOSTENT_R_PROTO: + * This symbol encodes the prototype of sethostent_r. + */ +#$d_sethostent_r HAS_SETHOSTENT_R /**/ +#define SETHOSTENT_R_PROTO $sethostent_r_proto /**/ + +/* HAS_SETLOCALE_R: + * This symbol, if defined, indicates that the setlocale_r routine + * is available to setlocale re-entrantly. + */ +/* SETLOCALE_R_PROTO: + * This symbol encodes the prototype of setlocale_r. + */ +#$d_setlocale_r HAS_SETLOCALE_R /**/ +#define SETLOCALE_R_PROTO $setlocale_r_proto /**/ + +/* HAS_SETNETENT_R: + * This symbol, if defined, indicates that the setnetent_r routine + * is available to setnetent re-entrantly. + */ +/* SETNETENT_R_PROTO: + * This symbol encodes the prototype of setnetent_r. + */ +#$d_setnetent_r HAS_SETNETENT_R /**/ +#define SETNETENT_R_PROTO $setnetent_r_proto /**/ + +/* HAS_SETPROTOENT_R: + * This symbol, if defined, indicates that the setprotoent_r routine + * is available to setprotoent re-entrantly. + */ +/* SETPROTOENT_R_PROTO: + * This symbol encodes the prototype of setprotoent_r. + */ +#$d_setprotoent_r HAS_SETPROTOENT_R /**/ +#define SETPROTOENT_R_PROTO $setprotoent_r_proto /**/ + +/* HAS_SETSERVENT_R: + * This symbol, if defined, indicates that the setservent_r routine + * is available to setservent re-entrantly. + */ +/* SETSERVENT_R_PROTO: + * This symbol encodes the prototype of setservent_r. + */ +#$d_setservent_r HAS_SETSERVENT_R /**/ +#define SETSERVENT_R_PROTO $setservent_r_proto /**/ + +/* HAS_TTYNAME_R: + * This symbol, if defined, indicates that the ttyname_r routine + * is available to ttyname re-entrantly. + */ +/* TTYNAME_R_PROTO: + * This symbol encodes the prototype of ttyname_r. + */ +#$d_ttyname_r HAS_TTYNAME_R /**/ +#define TTYNAME_R_PROTO $ttyname_r_proto /**/ + #endif !GROK!THIS! diff --git a/configure.com b/configure.com index fd262b1..553d79a 100644 --- a/configure.com +++ b/configure.com @@ -5755,6 +5755,109 @@ $ WC "vms_ver='" + vms_ver + "'" ! VMS specific $ WC "voidflags='15'" $ WC "xs_apiversion='" + version + "'" $ WC "PERL_CONFIG_SH='true'" + +$! +$! ## The UNIXy POSIXy reentrantey thingys ## +$! + +$ WC "asctime_r_proto='0'" +$ WC "crypt_r_proto='0'" +$ WC "ctermid_r_proto='0'" +$ WC "ctime_r_proto='0'" +$ WC "d_asctime_r='undef'" +$ WC "d_crypt_r='undef'" +$ WC "d_ctermid_r='undef'" +$ WC "d_ctime_r='undef'" +$ WC "d_drand48_r='undef'" +$ WC "d_endgrent_r='undef'" +$ WC "d_endhostent_r='undef'" +$ WC "d_endnetent_r='undef'" +$ WC "d_endprotoent_r='undef'" +$ WC "d_endpwent_r='undef'" +$ WC "d_endservent_r='undef'" +$ WC "d_getgrent_r='undef'" +$ WC "d_getgrgid_r='undef'" +$ WC "d_getgrnam_r='undef'" +$ WC "d_gethostbyaddr_r='undef'" +$ WC "d_gethostbyname_r='undef'" +$ WC "d_gethostent_r='undef'" +$ WC "d_getlogin_r='undef'" +$ WC "d_getnetbyaddr_r='undef'" +$ WC "d_getnetbyname_r='undef'" +$ WC "d_getnetent_r='undef'" +$ WC "d_getprotobyname_r='undef'" +$ WC "d_getprotobynumber_r='undef'" +$ WC "d_getprotoent_r='undef'" +$ WC "d_getpwent_r='undef'" +$ WC "d_getpwnam_r='undef'" +$ WC "d_getpwuid_r='undef'" +$ WC "d_getservbyname_r='undef'" +$ WC "d_getservbyport_r='undef'" +$ WC "d_getservent_r='undef'" +$ WC "d_getspnam_r='undef'" +$ WC "d_gmtime_r='undef'" +$ WC "d_localtime_r='undef'" +$ WC "d_random_r='undef'" +$ WC "d_readdir64_r='undef'" +$ WC "d_readdir_r='undef'" +$ WC "d_setgrent_r='undef'" +$ WC "d_sethostent_r='undef'" +$ WC "d_setlocale_r='undef'" +$ WC "d_setnetent_r='undef'" +$ WC "d_setprotoent_r='undef'" +$ WC "d_setpwent_r='undef'" +$ WC "d_setservent_r='undef'" +$ WC "d_srand48_r='undef'" +$ WC "d_srandom_r='undef'" +$ WC "d_strerror_r='undef'" +$ WC "d_tmpnam_r='undef'" +$ WC "d_ttyname_r='undef'" +$ WC "drand48_r_proto='0'" +$ WC "endgrent_r_proto='0'" +$ WC "endhostent_r_proto='0'" +$ WC "endnetent_r_proto='0'" +$ WC "endprotoent_r_proto='0'" +$ WC "endpwent_r_proto='0'" +$ WC "endservent_r_proto='0'" +$ WC "getgrent_r_proto='0'" +$ WC "getgrgid_r_proto='0'" +$ WC "getgrnam_r_proto='0'" +$ WC "gethostbyaddr_r_proto='0'" +$ WC "gethostbyname_r_proto='0'" +$ WC "gethostent_r_proto='0'" +$ WC "getlogin_r_proto='0'" +$ WC "getnetbyaddr_r_proto='0'" +$ WC "getnetbyname_r_proto='0'" +$ WC "getnetent_r_proto='0'" +$ WC "getprotobyname_r_proto='0'" +$ WC "getprotobynumber_r_proto='0'" +$ WC "getprotoent_r_proto='0'" +$ WC "getpwent_r_proto='0'" +$ WC "getpwnam_r_proto='0'" +$ WC "getpwuid_r_proto='0'" +$ WC "getservbyname_r_proto='0'" +$ WC "getservbyport_r_proto='0'" +$ WC "getservent_r_proto='0'" +$ WC "getspnam_r_proto='0'" +$ WC "gmtime_r_proto='0'" +$ WC "i_crypt='undef'" +$ WC "localtime_r_proto='0'" +$ WC "random_r_proto='0'" +$ WC "readdir64_r_proto='0'" +$ WC "readdir_r_proto='0'" +$ WC "setgrent_r_proto='0'" +$ WC "sethostent_r_proto='0'" +$ WC "setlocale_r_proto='0'" +$ WC "setnetent_r_proto='0'" +$ WC "setprotoent_r_proto='0'" +$ WC "setpwent_r_proto='0'" +$ WC "setservent_r_proto='0'" +$ WC "srand48_r_proto='0'" +$ WC "srandom_r_proto='0'" +$ WC "strerror_r_proto='0'" +$ WC "tmpnam_r_proto='0'" +$ WC "ttyname_r_proto='0' + $! $! ##END WRITE NEW CONSTANTS HERE## $! diff --git a/embed.fnc b/embed.fnc index 8a684c1..d58208d 100644 --- a/embed.fnc +++ b/embed.fnc @@ -555,7 +555,9 @@ dopM |PerlIO*|start_glob |SV* pattern|IO *io Ap |struct perl_thread* |new_struct_thread|struct perl_thread *t #endif #if defined(USE_REENTRANT_API) +Ap |void |reentrant_size Ap |void |reentrant_init +Ap |void |reentrant_free #endif Ap |void |call_atexit |ATEXIT_t fn|void *ptr Apd |I32 |call_argv |const char* sub_name|I32 flags|char** argv diff --git a/embed.h b/embed.h index 7ffb796..cda99dc 100644 --- a/embed.h +++ b/embed.h @@ -534,7 +534,9 @@ #define new_struct_thread Perl_new_struct_thread #endif #if defined(USE_REENTRANT_API) +#define reentrant_size Perl_reentrant_size #define reentrant_init Perl_reentrant_init +#define reentrant_free Perl_reentrant_free #endif #define call_atexit Perl_call_atexit #define call_argv Perl_call_argv @@ -2093,7 +2095,9 @@ #define new_struct_thread(a) Perl_new_struct_thread(aTHX_ a) #endif #if defined(USE_REENTRANT_API) +#define reentrant_size() Perl_reentrant_size(aTHX) #define reentrant_init() Perl_reentrant_init(aTHX) +#define reentrant_free() Perl_reentrant_free(aTHX) #endif #define call_atexit(a,b) Perl_call_atexit(aTHX_ a,b) #define call_argv(a,b,c) Perl_call_argv(aTHX_ a,b,c) diff --git a/epoc/config.sh b/epoc/config.sh index 266960f..ad19c35 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -38,6 +38,7 @@ archlibexp='?:/perl/lib/5.7.3/epoc' archname64='' archname='epoc' archobjs='epoc.o epocish.o epoc_stubs.o' +asctime_r_proto='0' awk='awk' baserev='5.0' bash='' @@ -76,8 +77,11 @@ cppminus='-' cpprun='arm-epoc-pe-gcc -E' cppstdin='arm-epoc-pe-gcc -E' cppsymbols='' +crypt_r_proto='0' cryptlib='' csh='csh' +ctermid_r_proto='0' +ctime_r_proto='0' d_Gconvert='epoc_gcvt((x),(n),(b))' d_PRIEUldbl='undef' d_PRIFUldbl='undef' @@ -96,6 +100,7 @@ d_access='undef' d_accessx='undef' d_alarm='undef' d_archlib='define' +d_asctime_r='undef' d_atolf='undef' d_atoll='undef' d_attribut='undef' @@ -118,7 +123,10 @@ d_cmsghdr_s='undef' d_cmsghdr_s='undef' d_const='define' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' +d_ctermid_r='undef' +d_ctime_r='undef' d_cuserid='undef' d_dbl_dig='undef' d_dbminitproto='undef' @@ -129,15 +137,22 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' +d_drand48_r='undef' d_drand48proto='define' d_dup2='undef' d_eaccess='undef' d_endgrent='undef' +d_endgrent_r='undef' d_endhent='undef' +d_endhostent_r='undef' d_endnent='undef' +d_endnetent_r='undef' d_endpent='undef' +d_endprotoent_r='undef' d_endpwent='undef' +d_endpwent_r='undef' d_endsent='undef' +d_endservent_r='undef' d_eofnblk='define' d_eunice='undef' d_fchdir='undef' @@ -172,18 +187,28 @@ d_ftime='undef' d_getespwnam='undef' d_getfsstat='undef' d_getgrent='undef' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' d_getgrps='undef' d_gethbyaddr='define' d_gethbyname='define' d_gethent='undef' d_gethname='undef' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' d_gethostprotos='define' d_getitimer='undef' d_getlogin='undef' +d_getlogin_r='undef' d_getmntent='undef' d_getnbyaddr='undef' d_getnbyname='undef' d_getnent='undef' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' d_getnetprotos='define' d_getpagsz='undef' d_getpbyname='define' @@ -194,15 +219,26 @@ d_getpgrp2='undef' d_getpgrp='undef' d_getppid='undef' d_getprior='undef' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' d_getprotoprotos='define' d_getprpwnam='undef' d_getpwent='undef' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' d_getsbyname='undef' d_getsbyport='undef' d_getsent='undef' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' d_getservprotos='define' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='define' +d_gmtime_r='undef' d_gnulibc='undef' d_grpasswd='undef' d_hasmntopt='undef' @@ -221,6 +257,7 @@ d_lchown='undef' d_ldbl_dig='undef' d_link='undef' d_llseek='undef' +d_localtime_r='undef' d_locconv='undef' d_lockf='undef' d_longdbl='undef' @@ -284,7 +321,10 @@ d_pwgecos='undef' d_pwpasswd='undef' d_pwquota='undef' d_qgcvt='undef' +d_random_r='undef' +d_readdir64_r='undef' d_readdir='define' +d_readdir_r='undef' d_readlink='undef' d_readv='undef' d_readv='undef' @@ -311,19 +351,25 @@ d_sendmsg='undef' d_setegid='undef' d_seteuid='undef' d_setgrent='undef' +d_setgrent_r='undef' d_setgrps='undef' d_sethent='undef' +d_sethostent_r='undef' d_setitimer='undef' d_setlinebuf='undef' d_setlocale='undef' +d_setlocale_r='undef' d_setnent='undef' +d_setnetent_r='undef' d_setpent='undef' d_setpgid='undef' d_setpgrp2='undef' d_setpgrp='undef' d_setprior='undef' d_setproctitle='undef' +d_setprotoent_r='undef' d_setpwent='undef' +d_setpwent_r='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' @@ -331,6 +377,7 @@ d_setreuid='undef' d_setrgid='undef' d_setruid='undef' d_setsent='undef' +d_setservent_r='undef' d_setsid='undef' d_setvbuf='undef' d_sfio='undef' @@ -348,6 +395,8 @@ d_sockatmarkproto='undef' d_socket='define' d_sockpair='undef' d_socks5_init='undef' +d_srand48_r='undef' +d_srandom_r='undef' d_sresgproto='undef' d_sresuproto='undef' d_statblks='define' @@ -366,6 +415,7 @@ d_strcoll='define' d_strctcpy='define' d_strerrm='strerror(e)' d_strerror='define' +d_strerror_r='undef' d_strftime='define' d_strtod='define' d_strtol='define' @@ -388,7 +438,11 @@ d_telldir='define' d_telldirproto='define' d_time='undef' d_times='undef' +d_tm_tm_gmtoff='undef' +d_tm_tm_zone='undef' +d_tmpnam_r='undef' d_truncate='undef' +d_ttyname_r='undef' d_tzname='undef' d_u32align='define' d_ualarm='undef' @@ -419,12 +473,19 @@ dlext='none' dlsrc='dl_none.xs' doublesize='8' drand01='(rand()/(double)(1U<tmbuf) ? PL_reentrant_buffer->tmbuf : NULL) -#define gmtime(a) (gmtime_r((a),PL_reentrant_buffer->tmbuf) ? PL_reentrant_buffer->tmbuf : NULL) - -#ifdef OLD_PTHREADS_API - -/* HP-UX 10.20 returns 0 on success, what it returns on failure is hidden - in the fog somewhere, possibly -1 which means the following should do - the right thing - 20010816 sky */ - -#undef localtime -#undef gmtime -#define localtime(a) ((localtime_r((a),PL_reentrant_buffer->tmbuf) == 0) ? PL_reentrant_buffer->tmbuf : NULL) -#define gmtime(a) ((gmtime_r((a),PL_reentrant_buffer->tmbuf) == 0) ? PL_reentrant_buffer->tmbuf : NULL) -#endif /* HP-UX 10.20 */ - +#include "reentr.h" #endif diff --git a/perl.c b/perl.c index c61a20a..13df3e4 100644 --- a/perl.c +++ b/perl.c @@ -835,8 +835,7 @@ perl_destruct(pTHXx) #endif /* USE_5005THREADS */ #ifdef USE_REENTRANT_API - Safefree(PL_reentrant_buffer->tmbuf); - Safefree(PL_reentrant_buffer); + Perl_reentrant_free(aTHX); #endif sv_free_arenas(); diff --git a/perl.h b/perl.h index fdb26ec..183870f 100644 --- a/perl.h +++ b/perl.h @@ -77,6 +77,12 @@ # endif #endif +/* Use the reentrant APIs like localtime_r and getpwent_r */ +/* Win32 has naturally threadsafe libraries, no need to use any _r variants. */ +#if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(WIN32) && !defined(__APPLE__) +# define USE_REENTRANT_API +#endif + /* <--- here ends the logic shared by perl.h and makedef.pl */ #ifdef PERL_IMPLICIT_CONTEXT @@ -338,12 +344,6 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # endif #endif -/* Use the reentrant APIs like localtime_r and getpwent_r */ -/* Win32 has naturally threadsafe libraries, no need to use any _r variants. */ -#if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(WIN32) && !defined(__APPLE__) -# define USE_REENTRANT_API -#endif - /* HP-UX 10.X CMA (Common Multithreaded Architecure) insists that pthread.h must be included before all other header files. */ @@ -2694,7 +2694,9 @@ END_EXTERN_C char *crypt (); /* Maybe more hosts will need the unprototyped version */ # else # if !defined(WIN32) && !defined(VMS) +#ifndef crypt char *crypt (const char*, const char*); +#endif # endif /* !WIN32 */ # endif /* !NeXT && !__NeXT__ */ # ifndef DONT_DECLARE_STD @@ -2709,7 +2711,9 @@ Off_t lseek (int,Off_t,int); # endif # endif # endif /* !DONT_DECLARE_STD */ +#ifndef getlogin char *getlogin (void); +#endif #endif /* !__cplusplus */ #ifdef UNLINK_ALL_VERSIONS /* Currently only makes sense for VMS */ diff --git a/plan9/mkfile b/plan9/mkfile index 40da527..89336a6 100644 --- a/plan9/mkfile +++ b/plan9/mkfile @@ -34,7 +34,7 @@ ext_xs = IO.xs Socket.xs Opcode.xs dl_none.xs Fcntl.xs POSIX.xs ext_c = ${ext_xs:%.xs=%.c} ext_obj = ${ext_xs:%.xs=%.$O} -obj = gv.$O toke.$O perly.$O op.$O regcomp.$O dump.$O util.$O mg.$O hv.$O av.$O run.$O pp_hot.$O sv.$O pp.$O scope.$O pp_ctl.$O pp_sys.$O doop.$O doio.$O regexec.$O taint.$O deb.$O globals.$O plan9.$O universal.$O perlio.$O +obj = gv.$O toke.$O perly.$O op.$O regcomp.$O dump.$O util.$O mg.$O hv.$O av.$O run.$O pp_hot.$O sv.$O pp.$O scope.$O pp_ctl.$O pp_sys.$O doop.$O doio.$O regexec.$O taint.$O deb.$O globals.$O plan9.$O universal.$O perlio.$O locale.$O numeric.$O pp_sort.$O pp_pack.$O reentr.$O OBJS = perl.$O $obj diff --git a/pp_sys.c b/pp_sys.c index 5955b14..b8d7328 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -80,7 +80,9 @@ extern int h_errno; # endif # endif # ifdef HAS_GETPWENT +#ifndef getpwent struct passwd *getpwent (void); +#endif # endif #endif @@ -92,7 +94,9 @@ extern int h_errno; struct group *getgrgid (Gid_t); # endif # ifdef HAS_GETGRENT +#ifndef getgrent struct group *getgrent (void); +#endif # endif #endif @@ -4653,8 +4657,14 @@ PP(pp_ghostent) #endif #ifdef HOST_NOT_FOUND - if (!hent) - STATUS_NATIVE_SET(h_errno); + if (!hent) { +#ifdef USE_REENTRANT_API +# ifdef USE_GETHOSTENT_ERRNO + h_errno = PL_reentrant_buffer->_gethostent_errno; +# endif +#endif + STATUS_NATIVE_SET(h_errno); + } #endif if (GIMME != G_ARRAY) { @@ -4756,6 +4766,17 @@ PP(pp_gnetent) DIE(aTHX_ PL_no_sock_func, "getnetent"); #endif +#ifdef HOST_NOT_FOUND + if (!nent) { +#ifdef USE_REENTRANT_API +# ifdef USE_GETNETENT_ERRNO + h_errno = PL_reentrant_buffer->_getnetent_errno; +# endif +#endif + STATUS_NATIVE_SET(h_errno); + } +#endif + EXTEND(SP, 4); if (GIMME != G_ARRAY) { PUSHs(sv = sv_newmortal()); diff --git a/proto.h b/proto.h index 2c2e93f..5bb5ddd 100644 --- a/proto.h +++ b/proto.h @@ -596,7 +596,9 @@ PERL_CALLCONV PerlIO* Perl_start_glob(pTHX_ SV* pattern, IO *io); PERL_CALLCONV struct perl_thread* Perl_new_struct_thread(pTHX_ struct perl_thread *t); #endif #if defined(USE_REENTRANT_API) +PERL_CALLCONV void Perl_reentrant_size(pTHX); PERL_CALLCONV void Perl_reentrant_init(pTHX); +PERL_CALLCONV void Perl_reentrant_free(pTHX); #endif PERL_CALLCONV void Perl_call_atexit(pTHX_ ATEXIT_t fn, void *ptr); PERL_CALLCONV I32 Perl_call_argv(pTHX_ const char* sub_name, I32 flags, char** argv); diff --git a/reentr.c b/reentr.c new file mode 100644 index 0000000..a054c06 --- /dev/null +++ b/reentr.c @@ -0,0 +1,271 @@ +/* + * reentr.c + * + * Copyright (c) 1997-2002, Larry Wall + * + * You may distribute under the terms of either the GNU General Public + * License or the Artistic License, as specified in the README file. + * + * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! + * This file is built by reentrl.pl from data in reentr.pl. + * + * "Saruman," I said, standing away from him, "only one hand at a time can + * wield the One, and you know that well, so do not trouble to say we!" + * + */ + +#include "EXTERN.h" +#define PERL_IN_REENTR_C +#include "perl.h" +#include "reentr.h" + +void +Perl_reentrant_size(pTHX) { +#ifdef USE_REENTRANT_API +#ifdef HAS_ASCTIME_R + PL_reentrant_buffer->_asctime_size = 256; /* Make something up. */ +#endif /* HAS_ASCTIME_R */ +#ifdef HAS_CRYPT_R +#endif /* HAS_CRYPT_R */ +#ifdef HAS_CTIME_R + PL_reentrant_buffer->_ctime_size = 256; /* Make something up. */ +#endif /* HAS_CTIME_R */ +#ifdef HAS_DRAND48_R +#endif /* HAS_DRAND48_R */ +#ifdef HAS_GETGRNAM_R +# if defined(HAS_SYSCONF) && defined(_SC_GETGR_R_SIZE_MAX) && !defined(__GLIBC__) + PL_reentrant_buffer->_getgrent_size = sysconf(_SC_GETGR_R_SIZE_MAX); +# else +# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) + PL_reentrant_buffer->_getgrent_size = SIABUFSIZ; +# else +# ifdef __sgi + PL_reentrant_buffer->_getgrent_size = BUFSIZ; +# else + PL_reentrant_buffer->_getgrent_size = 2048; +# endif +# endif +# endif +#endif /* HAS_GETGRNAM_R */ +#ifdef HAS_GETHOSTBYNAME_R +#if !(GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) + PL_reentrant_buffer->_gethostent_size = 2048; /* Any better ideas? */ +#endif +#endif /* HAS_GETHOSTBYNAME_R */ +#ifdef HAS_GETLOGIN_R + PL_reentrant_buffer->_getlogin_size = 256; /* Make something up. */ +#endif /* HAS_GETLOGIN_R */ +#ifdef HAS_GETNETBYNAME_R +#if !(GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) + PL_reentrant_buffer->_getnetent_size = 2048; /* Any better ideas? */ +#endif +#endif /* HAS_GETNETBYNAME_R */ +#ifdef HAS_GETPROTOBYNAME_R +#if !(GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) + PL_reentrant_buffer->_getprotoent_size = 2048; /* Any better ideas? */ +#endif +#endif /* HAS_GETPROTOBYNAME_R */ +#ifdef HAS_GETPWNAM_R +# if defined(HAS_SYSCONF) && defined(_SC_GETPW_R_SIZE_MAX) && !defined(__GLIBC__) + PL_reentrant_buffer->_getpwent_size = sysconf(_SC_GETPW_R_SIZE_MAX); +# else +# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) + PL_reentrant_buffer->_getpwent_size = SIABUFSIZ; +# else +# ifdef __sgi + PL_reentrant_buffer->_getpwent_size = BUFSIZ; +# else + PL_reentrant_buffer->_getpwent_size = 2048; +# endif +# endif +# endif +#endif /* HAS_GETPWNAM_R */ +#ifdef HAS_GETSERVBYNAME_R +#if !(GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD) + PL_reentrant_buffer->_getservent_size = 2048; /* Any better ideas? */ +#endif +#endif /* HAS_GETSERVBYNAME_R */ +#ifdef HAS_GETSPNAM_R + PL_reentrant_buffer->_getspent_size = 1024; +#endif /* HAS_GETSPNAM_R */ +#ifdef HAS_GMTIME_R +#endif /* HAS_GMTIME_R */ +#ifdef HAS_LOCALTIME_R +#endif /* HAS_LOCALTIME_R */ +#ifdef HAS_RANDOM_R +#endif /* HAS_RANDOM_R */ +#ifdef HAS_READDIR_R + /* This is the size Solaris recommends. + * (though we go static, should use pathconf() instead) */ + PL_reentrant_buffer->_readdir_size = sizeof(struct dirent) + MAXPATHLEN + 1; +#endif /* HAS_READDIR_R */ +#ifdef HAS_READDIR64_R + /* This is the size Solaris recommends. + * (though we go static, should use pathconf() instead) */ + PL_reentrant_buffer->_readdir64_size = sizeof(struct dirent64) + MAXPATHLEN + 1; +#endif /* HAS_READDIR64_R */ +#ifdef HAS_SETLOCALE_R + PL_reentrant_buffer->_setlocale_size = 256; /* Make something up. */ +#endif /* HAS_SETLOCALE_R */ +#ifdef HAS_STRERROR_R + PL_reentrant_buffer->_strerror_size = 256; /* Make something up. */ +#endif /* HAS_STRERROR_R */ +#ifdef HAS_TTYNAME_R + PL_reentrant_buffer->_ttyname_size = 256; /* Make something up. */ +#endif /* HAS_TTYNAME_R */ + +#endif /* USE_REENTRANT_API */ +} + +void +Perl_reentrant_init(pTHX) { +#ifdef USE_REENTRANT_API + New(31337, PL_reentrant_buffer, 1, REENTR); + Perl_reentrant_size(aTHX); +#ifdef HAS_ASCTIME_R + New(31338, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size, char); +#endif /* HAS_ASCTIME_R */ +#ifdef HAS_CRYPT_R +#ifdef __GLIBC__ + PL_reentrant_buffer->_crypt_struct.initialized = 0; +#endif +#endif /* HAS_CRYPT_R */ +#ifdef HAS_CTIME_R + New(31338, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size, char); +#endif /* HAS_CTIME_R */ +#ifdef HAS_DRAND48_R +#endif /* HAS_DRAND48_R */ +#ifdef HAS_GETGRNAM_R +# ifdef USE_GETGRENT_FPTR + PL_reentrant_buffer->_getgrent_fptr = NULL; +# endif + New(31338, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, char); +#endif /* HAS_GETGRNAM_R */ +#ifdef HAS_GETHOSTBYNAME_R +#if !(GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) + New(31338, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, char); +#endif +#endif /* HAS_GETHOSTBYNAME_R */ +#ifdef HAS_GETLOGIN_R + New(31338, PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size, char); +#endif /* HAS_GETLOGIN_R */ +#ifdef HAS_GETNETBYNAME_R +#if !(GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) + New(31338, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, char); +#endif +#endif /* HAS_GETNETBYNAME_R */ +#ifdef HAS_GETPROTOBYNAME_R +#if !(GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) + New(31338, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, char); +#endif +#endif /* HAS_GETPROTOBYNAME_R */ +#ifdef HAS_GETPWNAM_R +# ifdef USE_GETPWENT_FPTR + PL_reentrant_buffer->_getpwent_fptr = NULL; +# endif + New(31338, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, char); +#endif /* HAS_GETPWNAM_R */ +#ifdef HAS_GETSERVBYNAME_R +#if !(GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD) + New(31338, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, char); +#endif +#endif /* HAS_GETSERVBYNAME_R */ +#ifdef HAS_GETSPNAM_R + New(31338, PL_reentrant_buffer->_getspent_buffer, PL_reentrant_buffer->_getspent_size, char); +#endif /* HAS_GETSPNAM_R */ +#ifdef HAS_GMTIME_R +#endif /* HAS_GMTIME_R */ +#ifdef HAS_LOCALTIME_R +#endif /* HAS_LOCALTIME_R */ +#ifdef HAS_RANDOM_R +#endif /* HAS_RANDOM_R */ +#ifdef HAS_READDIR_R + PL_reentrant_buffer->_readdir_struct = (struct dirent*)safemalloc(PL_reentrant_buffer->_readdir_size); +#endif /* HAS_READDIR_R */ +#ifdef HAS_READDIR64_R + PL_reentrant_buffer->_readdir64_struct = (struct dirent64*)safemalloc(PL_reentrant_buffer->_readdir64_size); +#endif /* HAS_READDIR64_R */ +#ifdef HAS_SETLOCALE_R + New(31338, PL_reentrant_buffer->_setlocale_buffer, PL_reentrant_buffer->_setlocale_size, char); +#endif /* HAS_SETLOCALE_R */ +#ifdef HAS_STRERROR_R + New(31338, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size, char); +#endif /* HAS_STRERROR_R */ +#ifdef HAS_TTYNAME_R + New(31338, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size, char); +#endif /* HAS_TTYNAME_R */ + +#endif /* USE_REENTRANT_API */ +} + +void +Perl_reentrant_free(pTHX) { +#ifdef USE_REENTRANT_API +#ifdef HAS_ASCTIME_R + Safefree(PL_reentrant_buffer->_asctime_buffer); +#endif /* HAS_ASCTIME_R */ +#ifdef HAS_CRYPT_R +#endif /* HAS_CRYPT_R */ +#ifdef HAS_CTIME_R + Safefree(PL_reentrant_buffer->_ctime_buffer); +#endif /* HAS_CTIME_R */ +#ifdef HAS_DRAND48_R +#endif /* HAS_DRAND48_R */ +#ifdef HAS_GETGRNAM_R + Safefree(PL_reentrant_buffer->_getgrent_buffer); +#endif /* HAS_GETGRNAM_R */ +#ifdef HAS_GETHOSTBYNAME_R +#if !(GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) + Safefree(PL_reentrant_buffer->_gethostent_buffer); +#endif +#endif /* HAS_GETHOSTBYNAME_R */ +#ifdef HAS_GETLOGIN_R + Safefree(PL_reentrant_buffer->_getlogin_buffer); +#endif /* HAS_GETLOGIN_R */ +#ifdef HAS_GETNETBYNAME_R +#if !(GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) + Safefree(PL_reentrant_buffer->_getnetent_buffer); +#endif +#endif /* HAS_GETNETBYNAME_R */ +#ifdef HAS_GETPROTOBYNAME_R +#if !(GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) + Safefree(PL_reentrant_buffer->_getprotoent_buffer); +#endif +#endif /* HAS_GETPROTOBYNAME_R */ +#ifdef HAS_GETPWNAM_R + Safefree(PL_reentrant_buffer->_getpwent_buffer); +#endif /* HAS_GETPWNAM_R */ +#ifdef HAS_GETSERVBYNAME_R +#if !(GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD) + Safefree(PL_reentrant_buffer->_getservent_buffer); +#endif +#endif /* HAS_GETSERVBYNAME_R */ +#ifdef HAS_GETSPNAM_R + Safefree(PL_reentrant_buffer->_getspent_buffer); +#endif /* HAS_GETSPNAM_R */ +#ifdef HAS_GMTIME_R +#endif /* HAS_GMTIME_R */ +#ifdef HAS_LOCALTIME_R +#endif /* HAS_LOCALTIME_R */ +#ifdef HAS_RANDOM_R +#endif /* HAS_RANDOM_R */ +#ifdef HAS_READDIR_R + Safefree(PL_reentrant_buffer->_readdir_struct); +#endif /* HAS_READDIR_R */ +#ifdef HAS_READDIR64_R + Safefree(PL_reentrant_buffer->_readdir64_struct); +#endif /* HAS_READDIR64_R */ +#ifdef HAS_SETLOCALE_R + Safefree(PL_reentrant_buffer->_setlocale_buffer); +#endif /* HAS_SETLOCALE_R */ +#ifdef HAS_STRERROR_R + Safefree(PL_reentrant_buffer->_strerror_buffer); +#endif /* HAS_STRERROR_R */ +#ifdef HAS_TTYNAME_R + Safefree(PL_reentrant_buffer->_ttyname_buffer); +#endif /* HAS_TTYNAME_R */ + + Safefree(PL_reentrant_buffer); +#endif /* USE_REENTRANT_API */ +} + diff --git a/reentr.h b/reentr.h new file mode 100644 index 0000000..c4622da --- /dev/null +++ b/reentr.h @@ -0,0 +1,1200 @@ +/* + * reentr.h + * + * Copyright (c) 1997-2002, Larry Wall + * + * You may distribute under the terms of either the GNU General Public + * License or the Artistic License, as specified in the README file. + * + * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! + * This file is built by reentrl.pl from data in reentr.pl. + */ + +#ifndef REENTR_H +#define REENTR_H + +#ifdef USE_REENTRANT_API + +/* Deprecations: some platforms have the said reentrant interfaces + * but they are declared obsolete and are not to be used. Often this + * means that the platform has threadsafed the interfaces (hopefully). + * All this is OS version dependent, so we are of course fooling ourselves. + * If you know of more deprecations on some platforms, please add your own. */ + +#ifdef __hpux +# undef HAS_CRYPT_R +# undef HAS_DRAND48_R +# undef HAS_GETGRENT_R +# undef HAS_GETPWENT_R +# undef HAS_SETLOCALE_R +# undef HAS_SRAND48_R +# undef HAS_STRERROR_R +# define NETDB_R_OBSOLETE +#endif + +#if defined(__osf__) && defined(__alpha) /* Tru64 aka Digital UNIX */ +# undef HAS_CRYPT_R +# undef HAS_STRERROR_R +# define NETDB_R_OBSOLETE +#endif + +#ifdef NETDB_R_OBSOLETE +# undef HAS_ENDHOSTENT_R +# undef HAS_ENDNETENT_R +# undef HAS_ENDPROTOENT_R +# undef HAS_ENDSERVENT_R +# undef HAS_GETHOSTBYADDR_R +# undef HAS_GETHOSTBYNAME_R +# undef HAS_GETHOSTENT_R +# undef HAS_GETNETBYADDR_R +# undef HAS_GETNETBYNAME_R +# undef HAS_GETNETENT_R +# undef HAS_GETPROTOBYNAME_R +# undef HAS_GETPROTOBYNUMBER_R +# undef HAS_GETPROTOENT_R +# undef HAS_GETSERVBYNAME_R +# undef HAS_GETSERVBYPORT_R +# undef HAS_GETSERVENT_R +# undef HAS_SETHOSTENT_R +# undef HAS_SETNETENT_R +# undef HAS_SETPROTOENT_R +# undef HAS_SETSERVENT_R +#endif + +#ifdef I_PWD +# include +#endif +#ifdef I_GRP +# include +#endif +#ifdef I_NETDB +# include +#endif +#ifdef I_STDLIB +# include /* drand48_data */ +#endif +#ifdef I_CRYPT +# ifdef I_CRYPT +# include +# endif +#endif +#ifdef HAS_GETSPNAM_R +# ifdef I_SHADOW +# include +# endif +#endif + +#define REENTRANT_PROTO_B_B 1 +#define REENTRANT_PROTO_B_BI 2 +#define REENTRANT_PROTO_B_BW 3 +#define REENTRANT_PROTO_B_CCS 4 +#define REENTRANT_PROTO_B_IBI 5 +#define REENTRANT_PROTO_B_IBW 6 +#define REENTRANT_PROTO_B_SB 7 +#define REENTRANT_PROTO_B_SBI 8 +#define REENTRANT_PROTO_I_BI 9 +#define REENTRANT_PROTO_I_BW 10 +#define REENTRANT_PROTO_I_CCSBWR 11 +#define REENTRANT_PROTO_I_CCSD 12 +#define REENTRANT_PROTO_I_CII 13 +#define REENTRANT_PROTO_I_CIISD 14 +#define REENTRANT_PROTO_I_CSBI 15 +#define REENTRANT_PROTO_I_CSBIR 16 +#define REENTRANT_PROTO_I_CSBWR 17 +#define REENTRANT_PROTO_I_CSBWRE 18 +#define REENTRANT_PROTO_I_CSD 19 +#define REENTRANT_PROTO_I_CWISBWRE 20 +#define REENTRANT_PROTO_I_CWISD 21 +#define REENTRANT_PROTO_I_H 22 +#define REENTRANT_PROTO_I_IBI 23 +#define REENTRANT_PROTO_I_IBW 24 +#define REENTRANT_PROTO_I_ICBI 25 +#define REENTRANT_PROTO_I_ICSBWR 26 +#define REENTRANT_PROTO_I_ICSD 27 +#define REENTRANT_PROTO_I_ID 28 +#define REENTRANT_PROTO_I_IISD 29 +#define REENTRANT_PROTO_I_ISBWR 30 +#define REENTRANT_PROTO_I_ISD 31 +#define REENTRANT_PROTO_I_LISBI 32 +#define REENTRANT_PROTO_I_LISD 33 +#define REENTRANT_PROTO_I_LS 34 +#define REENTRANT_PROTO_I_S 35 +#define REENTRANT_PROTO_I_SB 36 +#define REENTRANT_PROTO_I_SBI 37 +#define REENTRANT_PROTO_I_SBIE 38 +#define REENTRANT_PROTO_I_SBIH 39 +#define REENTRANT_PROTO_I_SBIR 40 +#define REENTRANT_PROTO_I_SBWR 41 +#define REENTRANT_PROTO_I_SBWRE 42 +#define REENTRANT_PROTO_I_SD 43 +#define REENTRANT_PROTO_I_ST 44 +#define REENTRANT_PROTO_I_TISD 45 +#define REENTRANT_PROTO_I_TS 46 +#define REENTRANT_PROTO_I_TSBI 47 +#define REENTRANT_PROTO_I_TSBIR 48 +#define REENTRANT_PROTO_I_TSBWR 49 +#define REENTRANT_PROTO_I_TSR 50 +#define REENTRANT_PROTO_I_UISBWRE 51 +#define REENTRANT_PROTO_S_CBI 52 +#define REENTRANT_PROTO_S_CCSBI 53 +#define REENTRANT_PROTO_S_CIISBIE 54 +#define REENTRANT_PROTO_S_CSBI 55 +#define REENTRANT_PROTO_S_CSBIE 56 +#define REENTRANT_PROTO_S_CWISBIE 57 +#define REENTRANT_PROTO_S_CWISBWIE 58 +#define REENTRANT_PROTO_S_ICSBI 59 +#define REENTRANT_PROTO_S_ISBI 60 +#define REENTRANT_PROTO_S_LISBI 61 +#define REENTRANT_PROTO_S_SBI 62 +#define REENTRANT_PROTO_S_SBIE 63 +#define REENTRANT_PROTO_S_SBW 64 +#define REENTRANT_PROTO_S_TISBI 65 +#define REENTRANT_PROTO_S_TS 66 +#define REENTRANT_PROTO_S_TSBI 67 +#define REENTRANT_PROTO_S_TSBIE 68 +#define REENTRANT_PROTO_S_TWISBIE 69 +#define REENTRANT_PROTO_V_H 70 +#define REENTRANT_PROTO_V_ID 71 +#define REENTRANT_PROTO_V_S 72 + +/* Defines for indicating which special features are supported. */ + +/* The getgrent getgrgid getgrnam using ptr? */ + +#if (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR) +# define GETGRENT_R_HAS_PTR +#else +# undef GETGRENT_R_HAS_PTR +#endif +#if (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR) +# define GETGRGID_R_HAS_PTR +#else +# undef GETGRGID_R_HAS_PTR +#endif +#if (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR) +# define GETGRNAM_R_HAS_PTR +#else +# undef GETGRNAM_R_HAS_PTR +#endif + +/* Any of the getgrent getgrgid getgrnam using ptr? */ + +#if (defined(GETGRENT_R_HAS_PTR) || defined(GETGRGID_R_HAS_PTR) || defined(GETGRNAM_R_HAS_PTR)) +# define USE_GETGRENT_PTR +#else +# undef USE_GETGRENT_PTR +#endif + +/* The getpwent getpwnam getpwuid using ptr? */ + +#if (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR) +# define GETPWENT_R_HAS_PTR +#else +# undef GETPWENT_R_HAS_PTR +#endif +#if (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR) +# define GETPWNAM_R_HAS_PTR +#else +# undef GETPWNAM_R_HAS_PTR +#endif +#if (GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR) +# define GETPWUID_R_HAS_PTR +#else +# undef GETPWUID_R_HAS_PTR +#endif + +/* Any of the getpwent getpwnam getpwuid using ptr? */ + +#if (defined(GETPWENT_R_HAS_PTR) || defined(GETPWNAM_R_HAS_PTR) || defined(GETPWUID_R_HAS_PTR)) +# define USE_GETPWENT_PTR +#else +# undef USE_GETPWENT_PTR +#endif + +/* The getspent getspnam using ptr? */ + +#if (GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR) +# define GETSPNAM_R_HAS_PTR +#else +# undef GETSPNAM_R_HAS_PTR +#endif + +/* Any of the getspent getspnam using ptr? */ + +#if (defined(GETSPENT_R_HAS_PTR) || defined(GETSPNAM_R_HAS_PTR)) +# define USE_GETSPENT_PTR +#else +# undef USE_GETSPENT_PTR +#endif + +/* The getgrent getgrgid getgrnam using fptr? */ + +#if (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH) +# define GETGRENT_R_HAS_FPTR +#else +# undef GETGRENT_R_HAS_FPTR +#endif + +/* Any of the getgrent getgrgid getgrnam using fptr? */ + +#if (defined(GETGRENT_R_HAS_FPTR) || defined(GETGRGID_R_HAS_FPTR) || defined(GETGRNAM_R_HAS_FPTR)) +# define USE_GETGRENT_FPTR +#else +# undef USE_GETGRENT_FPTR +#endif + +/* The getpwent getpwnam getpwuid using fptr? */ + +#if (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH) +# define GETPWENT_R_HAS_FPTR +#else +# undef GETPWENT_R_HAS_FPTR +#endif + +/* Any of the getpwent getpwnam getpwuid using fptr? */ + +#if (defined(GETPWENT_R_HAS_FPTR) || defined(GETPWNAM_R_HAS_FPTR) || defined(GETPWUID_R_HAS_FPTR)) +# define USE_GETPWENT_FPTR +#else +# undef USE_GETPWENT_FPTR +#endif + +/* The gethostent gethostbyaddr gethostbyname using ptr? */ + +#if (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE) +# define GETHOSTENT_R_HAS_PTR +#else +# undef GETHOSTENT_R_HAS_PTR +#endif +#if (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE) +# define GETHOSTBYADDR_R_HAS_PTR +#else +# undef GETHOSTBYADDR_R_HAS_PTR +#endif +#if (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE) +# define GETHOSTBYNAME_R_HAS_PTR +#else +# undef GETHOSTBYNAME_R_HAS_PTR +#endif + +/* Any of the gethostent gethostbyaddr gethostbyname using ptr? */ + +#if (defined(GETHOSTENT_R_HAS_PTR) || defined(GETHOSTBYADDR_R_HAS_PTR) || defined(GETHOSTBYNAME_R_HAS_PTR)) +# define USE_GETHOSTENT_PTR +#else +# undef USE_GETHOSTENT_PTR +#endif + +/* The getnetent getnetbyaddr getnetbyname using ptr? */ + +#if (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE) +# define GETNETENT_R_HAS_PTR +#else +# undef GETNETENT_R_HAS_PTR +#endif +#if (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE) +# define GETNETBYADDR_R_HAS_PTR +#else +# undef GETNETBYADDR_R_HAS_PTR +#endif +#if (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE) +# define GETNETBYNAME_R_HAS_PTR +#else +# undef GETNETBYNAME_R_HAS_PTR +#endif + +/* Any of the getnetent getnetbyaddr getnetbyname using ptr? */ + +#if (defined(GETNETENT_R_HAS_PTR) || defined(GETNETBYADDR_R_HAS_PTR) || defined(GETNETBYNAME_R_HAS_PTR)) +# define USE_GETNETENT_PTR +#else +# undef USE_GETNETENT_PTR +#endif + +/* The getprotoent getprotobyname getprotobynumber using ptr? */ + +#if (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR) +# define GETPROTOENT_R_HAS_PTR +#else +# undef GETPROTOENT_R_HAS_PTR +#endif +#if (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR) +# define GETPROTOBYNAME_R_HAS_PTR +#else +# undef GETPROTOBYNAME_R_HAS_PTR +#endif +#if (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR) +# define GETPROTOBYNUMBER_R_HAS_PTR +#else +# undef GETPROTOBYNUMBER_R_HAS_PTR +#endif + +/* Any of the getprotoent getprotobyname getprotobynumber using ptr? */ + +#if (defined(GETPROTOENT_R_HAS_PTR) || defined(GETPROTOBYNAME_R_HAS_PTR) || defined(GETPROTOBYNUMBER_R_HAS_PTR)) +# define USE_GETPROTOENT_PTR +#else +# undef USE_GETPROTOENT_PTR +#endif + +/* The getservent getservbyname getservbyport using ptr? */ + +#if (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR) +# define GETSERVENT_R_HAS_PTR +#else +# undef GETSERVENT_R_HAS_PTR +#endif +#if (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR) +# define GETSERVBYNAME_R_HAS_PTR +#else +# undef GETSERVBYNAME_R_HAS_PTR +#endif +#if (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR) +# define GETSERVBYPORT_R_HAS_PTR +#else +# undef GETSERVBYPORT_R_HAS_PTR +#endif + +/* Any of the getservent getservbyname getservbyport using ptr? */ + +#if (defined(GETSERVENT_R_HAS_PTR) || defined(GETSERVBYNAME_R_HAS_PTR) || defined(GETSERVBYPORT_R_HAS_PTR)) +# define USE_GETSERVENT_PTR +#else +# undef USE_GETSERVENT_PTR +#endif + +/* The gethostent gethostbyaddr gethostbyname using errno? */ + +#if (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE) +# define GETHOSTENT_R_HAS_ERRNO +#else +# undef GETHOSTENT_R_HAS_ERRNO +#endif +#if (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE) +# define GETHOSTBYADDR_R_HAS_ERRNO +#else +# undef GETHOSTBYADDR_R_HAS_ERRNO +#endif +#if (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE) +# define GETHOSTBYNAME_R_HAS_ERRNO +#else +# undef GETHOSTBYNAME_R_HAS_ERRNO +#endif + +/* Any of the gethostent gethostbyaddr gethostbyname using errno? */ + +#if (defined(GETHOSTENT_R_HAS_ERRNO) || defined(GETHOSTBYADDR_R_HAS_ERRNO) || defined(GETHOSTBYNAME_R_HAS_ERRNO)) +# define USE_GETHOSTENT_ERRNO +#else +# undef USE_GETHOSTENT_ERRNO +#endif + +/* The getnetent getnetbyaddr getnetbyname using errno? */ + +#if (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE) +# define GETNETENT_R_HAS_ERRNO +#else +# undef GETNETENT_R_HAS_ERRNO +#endif +#if (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE) +# define GETNETBYADDR_R_HAS_ERRNO +#else +# undef GETNETBYADDR_R_HAS_ERRNO +#endif +#if (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE) +# define GETNETBYNAME_R_HAS_ERRNO +#else +# undef GETNETBYNAME_R_HAS_ERRNO +#endif + +/* Any of the getnetent getnetbyaddr getnetbyname using errno? */ + +#if (defined(GETNETENT_R_HAS_ERRNO) || defined(GETNETBYADDR_R_HAS_ERRNO) || defined(GETNETBYNAME_R_HAS_ERRNO)) +# define USE_GETNETENT_ERRNO +#else +# undef USE_GETNETENT_ERRNO +#endif + + +typedef struct { +#ifdef HAS_ASCTIME_R + char* _asctime_buffer; + size_t _asctime_size; +#endif /* HAS_ASCTIME_R */ +#ifdef HAS_CRYPT_R + struct crypt_data _crypt_struct; +#endif /* HAS_CRYPT_R */ +#ifdef HAS_CTIME_R + char* _ctime_buffer; + size_t _ctime_size; +#endif /* HAS_CTIME_R */ +#ifdef HAS_DRAND48_R + struct drand48_data _drand48_struct; + double _drand48_double; +#endif /* HAS_DRAND48_R */ +#ifdef HAS_GETGRNAM_R + struct group _getgrent_struct; + char* _getgrent_buffer; + size_t _getgrent_size; +# ifdef USE_GETGRENT_PTR + struct group* _getgrent_ptr; +# endif +# ifdef USE_GETGRENT_FPTR + FILE* _getgrent_fptr; +# endif +#endif /* HAS_GETGRNAM_R */ +#ifdef HAS_GETHOSTBYNAME_R + struct hostent _gethostent_struct; +# if GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD + struct hostent_data* _gethostent_data; +# else + char* _gethostent_buffer; + size_t _gethostent_size; +# endif +# ifdef USE_GETHOSTENT_PTR + struct hostent* _gethostent_ptr; +# endif +# ifdef USE_GETHOSTENT_ERRNO + int _gethostent_errno; +# endif +#endif /* HAS_GETHOSTBYNAME_R */ +#ifdef HAS_GETLOGIN_R + char* _getlogin_buffer; + size_t _getlogin_size; +#endif /* HAS_GETLOGIN_R */ +#ifdef HAS_GETNETBYNAME_R + struct netent _getnetent_struct; +# if GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD + struct netent_data* _getnetent_data; +# else + char* _getnetent_buffer; + size_t _getnetent_size; +# endif +# ifdef USE_GETNETENT_PTR + struct netent* _getnetent_ptr; +# endif +# ifdef USE_GETNETENT_ERRNO + int _getnetent_errno; +# endif +#endif /* HAS_GETNETBYNAME_R */ +#ifdef HAS_GETPROTOBYNAME_R + struct protoent _getprotoent_struct; +# if GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD + struct protoent_data* _getprotoent_data; +# else + char* _getprotoent_buffer; + size_t _getprotoent_size; +# endif +# ifdef USE_GETPROTOENT_PTR + struct protoent* _getprotoent_ptr; +# endif +# ifdef USE_GETPROTOENT_ERRNO + int _getprotoent_errno; +# endif +#endif /* HAS_GETPROTOBYNAME_R */ +#ifdef HAS_GETPWNAM_R + struct passwd _getpwent_struct; + char* _getpwent_buffer; + size_t _getpwent_size; +# ifdef USE_GETPWENT_PTR + struct passwd* _getpwent_ptr; +# endif +# ifdef USE_GETPWENT_FPTR + FILE* _getpwent_fptr; +# endif +#endif /* HAS_GETPWNAM_R */ +#ifdef HAS_GETSERVBYNAME_R + struct servent _getservent_struct; +# if GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD + struct servent_data* _getservent_data; +# else + char* _getservent_buffer; + size_t _getservent_size; +# endif +# ifdef USE_GETSERVENT_PTR + struct servent* _getservent_ptr; +# endif +# ifdef USE_GETSERVENT_ERRNO + int _getservent_errno; +# endif +#endif /* HAS_GETSERVBYNAME_R */ +#ifdef HAS_GETSPNAM_R + struct spwd _getspent_struct; + char* _getspent_buffer; + size_t _getspent_size; +# ifdef USE_GETSPENT_PTR + struct spwd* _getspent_ptr; +# endif +#endif /* HAS_GETSPNAM_R */ +#ifdef HAS_GMTIME_R + struct tm _gmtime_struct; +#endif /* HAS_GMTIME_R */ +#ifdef HAS_LOCALTIME_R + struct tm _localtime_struct; +#endif /* HAS_LOCALTIME_R */ +#ifdef HAS_RANDOM_R + struct random_data _random_struct; +#endif /* HAS_RANDOM_R */ +#ifdef HAS_READDIR_R + struct dirent* _readdir_struct; + size_t _readdir_size; +# if READDIR_R_PROTO == REENTRANT_PROTO_I_TSR + struct dirent* _readdir_ptr; +# endif +#endif /* HAS_READDIR_R */ +#ifdef HAS_READDIR64_R + struct dirent64* _readdir64_struct; + size_t _readdir64_size; +# if READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR + struct dirent64* _readdir64_ptr; +# endif +#endif /* HAS_READDIR64_R */ +#ifdef HAS_SETLOCALE_R + char* _setlocale_buffer; + size_t _setlocale_size; +#endif /* HAS_SETLOCALE_R */ +#ifdef HAS_STRERROR_R + char* _strerror_buffer; + size_t _strerror_size; +#endif /* HAS_STRERROR_R */ +#ifdef HAS_TTYNAME_R + char* _ttyname_buffer; + size_t _ttyname_size; +#endif /* HAS_TTYNAME_R */ + +} REENTR; + +/* The wrappers. */ + +#ifdef HAS_ASCTIME_R +# undef asctime +# if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SB +# define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer) +# endif +# if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SBI +# define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size) +# endif +# if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SB +# define asctime(a) (((errno = asctime_r(a, PL_reentrant_buffer->_asctime_buffer))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0) +# endif +# if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SBI +# define asctime(a) (((errno = asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0) +# endif +#endif /* HAS_ASCTIME_R */ + +#ifdef HAS_CRYPT_R +# undef crypt +# if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCS +# define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_struct) +# endif +#endif /* HAS_CRYPT_R */ + +#ifdef HAS_CTERMID_R +# undef ctermid +# if !defined(ctermid) && CTERMID_R_PROTO == REENTRANT_PROTO_B_B +# define ctermid(a) ctermid_r(a) +# endif +#endif /* HAS_CTERMID_R */ + +#ifdef HAS_CTIME_R +# undef ctime +# if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SB +# define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer) +# endif +# if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SBI +# define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size) +# endif +# if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SB +# define ctime(a) (((errno = ctime_r(a, PL_reentrant_buffer->_ctime_buffer))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0) +# endif +# if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SBI +# define ctime(a) (((errno = ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0) +# endif +#endif /* HAS_CTIME_R */ + +#ifdef HAS_DRAND48_R +# undef drand48 +# if !defined(drand48) && DRAND48_R_PROTO == REENTRANT_PROTO_I_ST +# define drand48() (((errno = drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double))) == 0 ? PL_reentrant_buffer->_drand48_double : 0) +# endif +#endif /* HAS_DRAND48_R */ + +#ifdef HAS_ENDGRENT_R +# undef endgrent +# if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H +# define endgrent() (((errno = endgrent_r(&PL_reentrant_buffer->_getgrent_fptr))) == 0 ? 1 : 0) +# endif +# if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H +# define endgrent() endgrent_r(&PL_reentrant_buffer->_getgrent_fptr) +# endif +#endif /* HAS_ENDGRENT_R */ + +#ifdef HAS_ENDHOSTENT_R +# undef endhostent +# if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_I_S +# define endhostent() (((errno = endhostent_r(&PL_reentrant_buffer->_gethostent_struct))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_V_S +# define endhostent() endhostent_r(&PL_reentrant_buffer->_gethostent_struct) +# endif +#endif /* HAS_ENDHOSTENT_R */ + +#ifdef HAS_ENDNETENT_R +# undef endnetent +# if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_I_S +# define endnetent() (((errno = endnetent_r(&PL_reentrant_buffer->_getnetent_struct))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_V_S +# define endnetent() endnetent_r(&PL_reentrant_buffer->_getnetent_struct) +# endif +#endif /* HAS_ENDNETENT_R */ + +#ifdef HAS_ENDPROTOENT_R +# undef endprotoent +# if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_I_S +# define endprotoent() (((errno = endprotoent_r(&PL_reentrant_buffer->_getprotoent_struct))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : 0) +# endif +# if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_V_S +# define endprotoent() endprotoent_r(&PL_reentrant_buffer->_getprotoent_struct) +# endif +#endif /* HAS_ENDPROTOENT_R */ + +#ifdef HAS_ENDPWENT_R +# undef endpwent +# if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H +# define endpwent() (((errno = endpwent_r(&PL_reentrant_buffer->_getpwent_fptr))) == 0 ? 1 : 0) +# endif +# if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H +# define endpwent() endpwent_r(&PL_reentrant_buffer->_getpwent_fptr) +# endif +#endif /* HAS_ENDPWENT_R */ + +#ifdef HAS_ENDSERVENT_R +# undef endservent +# if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_I_S +# define endservent() (((errno = endservent_r(&PL_reentrant_buffer->_getservent_struct))) == 0 ? &PL_reentrant_buffer->_getservent_struct : 0) +# endif +# if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_V_S +# define endservent() endservent_r(&PL_reentrant_buffer->_getservent_struct) +# endif +#endif /* HAS_ENDSERVENT_R */ + +#ifdef HAS_GETGRENT_R +# undef getgrent +# if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR +# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : 0) +# endif +# if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR +# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : 0) +# endif +# if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW +# define getgrent() (getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : 0) +# endif +# if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI +# define getgrent() (getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : 0) +# endif +# if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI +# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : 0) +# endif +# if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH +# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_fptr))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : 0) +# endif +#endif /* HAS_GETGRENT_R */ + +#ifdef HAS_GETGRGID_R +# undef getgrgid +# if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR +# define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : 0) +# endif +# if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR +# define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : 0) +# endif +# if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI +# define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : 0) +# endif +# if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI +# define getgrgid(a) (getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : 0) +# endif +#endif /* HAS_GETGRGID_R */ + +#ifdef HAS_GETGRNAM_R +# undef getgrnam +# if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR +# define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : 0) +# endif +# if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR +# define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : 0) +# endif +# if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI +# define getgrnam(a) (getgrnam_r(a, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? PL_reentrant_buffer->_getgrent_buffer : 0) +# endif +# if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI +# define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : 0) +# endif +# if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI +# define getgrnam(a) (getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : 0) +# endif +#endif /* HAS_GETGRNAM_R */ + +#ifdef HAS_GETHOSTBYADDR_R +# undef gethostbyaddr +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE +# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_ptr, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? PL_reentrant_buffer->_gethostent_ptr : 0) +# endif +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? 1 : 0) +# endif +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? 1 : 0) +# endif +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISD +# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CIISD +# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CII +# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c))) == 0 ? 1 : 0) +# endif +#endif /* HAS_GETHOSTBYADDR_R */ + +#ifdef HAS_GETHOSTBYNAME_R +# undef gethostbyname +# if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE +# define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_ptr, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? PL_reentrant_buffer->_gethostent_ptr : 0) +# endif +# if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE +# define gethostbyname(a) (gethostbyname_r(a, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD +# define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +#endif /* HAS_GETHOSTBYNAME_R */ + +#ifdef HAS_GETHOSTENT_R +# undef gethostent +# if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE +# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_ptr, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? PL_reentrant_buffer->_gethostent_ptr : 0) +# endif +# if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE +# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE +# define gethostent() (gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI +# define gethostent() (gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size) ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI +# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +# if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SD +# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : 0) +# endif +#endif /* HAS_GETHOSTENT_R */ + +#ifdef HAS_GETLOGIN_R +# undef getlogin +# if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BW +# define getlogin() (((errno = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : 0) +# endif +# if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BI +# define getlogin() (((errno = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : 0) +# endif +# if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BW +# define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size) +# endif +# if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BI +# define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size) +# endif +#endif /* HAS_GETLOGIN_R */ + +#ifdef HAS_GETNETBYADDR_R +# undef getnetbyaddr +# if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_ptr, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? PL_reentrant_buffer->_getnetent_ptr : 0) +# endif +# if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI +# define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI +# define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_TISD +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISD +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_IISD +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +#endif /* HAS_GETNETBYADDR_R */ + +#ifdef HAS_GETNETBYNAME_R +# undef getnetbyname +# if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE +# define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_ptr, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? PL_reentrant_buffer->_getnetent_ptr : 0) +# endif +# if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI +# define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI +# define getnetbyname(a) (getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD +# define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +#endif /* HAS_GETNETBYNAME_R */ + +#ifdef HAS_GETNETENT_R +# undef getnetent +# if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE +# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_ptr, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? PL_reentrant_buffer->_getnetent_ptr : 0) +# endif +# if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE +# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE +# define getnetent() (getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_errno) ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI +# define getnetent() (getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI +# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +# if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SD +# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0) +# endif +#endif /* HAS_GETNETENT_R */ + +#ifdef HAS_GETPROTOBYNAME_R +# undef getprotobyname +# if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR +# define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, &PL_reentrant_buffer->_getprotoent_ptr))) == 0 ? PL_reentrant_buffer->_getprotoent_ptr : 0) +# endif +# if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI +# define getprotobyname(a) (getprotobyname_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size) ? &PL_reentrant_buffer->_getprotoent_struct : 0) +# endif +# if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD +# define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_getprotoent_struct, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : 0) +# endif +#endif /* HAS_GETPROTOBYNAME_R */ + +#ifdef HAS_GETPROTOBYNUMBER_R +# undef getprotobynumber +# if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR +# define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, &PL_reentrant_buffer->_getprotoent_ptr))) == 0 ? PL_reentrant_buffer->_getprotoent_ptr : 0) +# endif +# if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI +# define getprotobynumber(a) (getprotobynumber_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size) ? &PL_reentrant_buffer->_getprotoent_struct : 0) +# endif +# if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISD +# define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_getprotoent_struct, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : 0) +# endif +#endif /* HAS_GETPROTOBYNUMBER_R */ + +#ifdef HAS_GETPROTOENT_R +# undef getprotoent +# if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR +# define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, &PL_reentrant_buffer->_getprotoent_ptr))) == 0 ? PL_reentrant_buffer->_getprotoent_ptr : 0) +# endif +# if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI +# define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : 0) +# endif +# if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI +# define getprotoent() (getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size) ? &PL_reentrant_buffer->_getprotoent_struct : 0) +# endif +# if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SD +# define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : 0) +# endif +#endif /* HAS_GETPROTOENT_R */ + +#ifdef HAS_GETPWENT_R +# undef getpwent +# if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR +# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : 0) +# endif +# if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR +# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : 0) +# endif +# if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW +# define getpwent() (getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : 0) +# endif +# if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI +# define getpwent() (getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : 0) +# endif +# if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI +# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : 0) +# endif +# if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH +# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_fptr))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : 0) +# endif +#endif /* HAS_GETPWENT_R */ + +#ifdef HAS_GETPWNAM_R +# undef getpwnam +# if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR +# define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : 0) +# endif +# if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR +# define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : 0) +# endif +# if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI +# define getpwnam(a) (getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : 0) +# endif +# if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI +# define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : 0) +# endif +#endif /* HAS_GETPWNAM_R */ + +#ifdef HAS_GETPWUID_R +# undef getpwuid +# if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR +# define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : 0) +# endif +# if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR +# define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : 0) +# endif +# if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBI +# define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : 0) +# endif +# if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_S_TSBI +# define getpwuid(a) (getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : 0) +# endif +#endif /* HAS_GETPWUID_R */ + +#ifdef HAS_GETSERVBYNAME_R +# undef getservbyname +# if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR +# define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, &PL_reentrant_buffer->_getservent_ptr))) == 0 ? PL_reentrant_buffer->_getservent_ptr : 0) +# endif +# if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI +# define getservbyname(a, b) (getservbyname_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size) ? &PL_reentrant_buffer->_getservent_struct : 0) +# endif +# if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD +# define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_getservent_struct, &PL_reentrant_buffer->_getservent_data))) == 0 ? &PL_reentrant_buffer->_getservent_struct : 0) +# endif +#endif /* HAS_GETSERVBYNAME_R */ + +#ifdef HAS_GETSERVBYPORT_R +# undef getservbyport +# if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR +# define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, &PL_reentrant_buffer->_getservent_ptr))) == 0 ? PL_reentrant_buffer->_getservent_ptr : 0) +# endif +# if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI +# define getservbyport(a, b) (getservbyport_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size) ? &PL_reentrant_buffer->_getservent_struct : 0) +# endif +# if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSD +# define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_getservent_struct, &PL_reentrant_buffer->_getservent_data))) == 0 ? &PL_reentrant_buffer->_getservent_struct : 0) +# endif +#endif /* HAS_GETSERVBYPORT_R */ + +#ifdef HAS_GETSERVENT_R +# undef getservent +# if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR +# define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, &PL_reentrant_buffer->_getservent_ptr))) == 0 ? PL_reentrant_buffer->_getservent_ptr : 0) +# endif +# if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI +# define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size))) == 0 ? &PL_reentrant_buffer->_getservent_struct : 0) +# endif +# if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI +# define getservent() (getservent_r(&PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size) ? &PL_reentrant_buffer->_getservent_struct : 0) +# endif +# if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SD +# define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_getservent_struct, &PL_reentrant_buffer->_getservent_data))) == 0 ? &PL_reentrant_buffer->_getservent_struct : 0) +# endif +#endif /* HAS_GETSERVENT_R */ + +#ifdef HAS_GETSPNAM_R +# undef getspnam +# if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR +# define getspnam(a) (((errno = getspnam_r(a, &PL_reentrant_buffer->_getspent_struct, PL_reentrant_buffer->_getspent_buffer, PL_reentrant_buffer->_getspent_size, &PL_reentrant_buffer->_getspent_ptr))) == 0 ? PL_reentrant_buffer->_getspent_ptr : 0) +# endif +# if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_S_CSBI +# define getspnam(a) (getspnam_r(a, &PL_reentrant_buffer->_getspent_struct, PL_reentrant_buffer->_getspent_buffer, PL_reentrant_buffer->_getspent_size) ? &PL_reentrant_buffer->_getspent_struct : 0) +# endif +#endif /* HAS_GETSPNAM_R */ + +#ifdef HAS_GMTIME_R +# undef gmtime +# if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_S_TS +# define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) ? &PL_reentrant_buffer->_gmtime_struct : 0) +# endif +# if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_I_TS +# define gmtime(a) (((errno = gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct))) == 0 ? &PL_reentrant_buffer->_gmtime_struct : 0) +# endif +#endif /* HAS_GMTIME_R */ + +#ifdef HAS_LOCALTIME_R +# undef localtime +# if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_S_TS +# define localtime(a) (localtime_r(a, &PL_reentrant_buffer->_localtime_struct) ? &PL_reentrant_buffer->_localtime_struct : 0) +# endif +# if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_I_TS +# define localtime(a) (((errno = localtime_r(a, &PL_reentrant_buffer->_localtime_struct))) == 0 ? &PL_reentrant_buffer->_localtime_struct : 0) +# endif +#endif /* HAS_LOCALTIME_R */ + +#ifdef HAS_RANDOM_R +# undef random +# if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_TS +# define random() (((errno = random_r(T, &PL_reentrant_buffer->_random_struct))) == 0 ? &PL_reentrant_buffer->_random_struct : 0) +# endif +#endif /* HAS_RANDOM_R */ + +#ifdef HAS_READDIR_R +# undef readdir +# if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TSR +# define readdir(a) (((errno = readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr))) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0) +# endif +# if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TS +# define readdir(a) (((errno = readdir_r(a, PL_reentrant_buffer->_readdir_struct))) == 0 ? PL_reentrant_buffer->_readdir_struct : 0) +# endif +#endif /* HAS_READDIR_R */ + +#ifdef HAS_READDIR64_R +# undef readdir64 +# if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR +# define readdir64(a) (((errno = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr))) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0) +# endif +# if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TS +# define readdir64(a) (((errno = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct))) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0) +# endif +#endif /* HAS_READDIR64_R */ + +#ifdef HAS_SETGRENT_R +# undef setgrent +# if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_I_H +# define setgrent() (((errno = setgrent_r(&PL_reentrant_buffer->_getgrent_fptr))) == 0 ? 1 : 0) +# endif +# if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_V_H +# define setgrent() setgrent_r(&PL_reentrant_buffer->_getgrent_fptr) +# endif +#endif /* HAS_SETGRENT_R */ + +#ifdef HAS_SETHOSTENT_R +# undef sethostent +# if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_I_ID +# define sethostent(a) (((errno = sethostent_r(a, &PL_reentrant_buffer->_gethostent_data))) == 0 ? 1 : 0) +# endif +# if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_V_ID +# define sethostent(a) sethostent_r(a, &PL_reentrant_buffer->_gethostent_data) +# endif +#endif /* HAS_SETHOSTENT_R */ + +#ifdef HAS_SETLOCALE_R +# undef setlocale +# if !defined(setlocale) && SETLOCALE_R_PROTO == REENTRANT_PROTO_I_ICBI +# define setlocale(a, b) (((errno = setlocale_r(a, b, PL_reentrant_buffer->_setlocale_buffer, PL_reentrant_buffer->_setlocale_size))) == 0 ? PL_reentrant_buffer->_setlocale_buffer : 0) +# endif +#endif /* HAS_SETLOCALE_R */ + +#ifdef HAS_SETNETENT_R +# undef setnetent +# if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_I_ID +# define setnetent(a) (((errno = setnetent_r(a, &PL_reentrant_buffer->_getnetent_data))) == 0 ? 1 : 0) +# endif +# if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_V_ID +# define setnetent(a) setnetent_r(a, &PL_reentrant_buffer->_getnetent_data) +# endif +#endif /* HAS_SETNETENT_R */ + +#ifdef HAS_SETPROTOENT_R +# undef setprotoent +# if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_I_ID +# define setprotoent(a) (((errno = setprotoent_r(a, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? 1 : 0) +# endif +# if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_V_ID +# define setprotoent(a) setprotoent_r(a, &PL_reentrant_buffer->_getprotoent_data) +# endif +#endif /* HAS_SETPROTOENT_R */ + +#ifdef HAS_SETPWENT_R +# undef setpwent +# if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_I_H +# define setpwent() (((errno = setpwent_r(&PL_reentrant_buffer->_getpwent_fptr))) == 0 ? 1 : 0) +# endif +# if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_V_H +# define setpwent() setpwent_r(&PL_reentrant_buffer->_getpwent_fptr) +# endif +#endif /* HAS_SETPWENT_R */ + +#ifdef HAS_SETSERVENT_R +# undef setservent +# if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_I_ID +# define setservent(a) (((errno = setservent_r(a, &PL_reentrant_buffer->_getservent_data))) == 0 ? 1 : 0) +# endif +# if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_V_ID +# define setservent(a) setservent_r(a, &PL_reentrant_buffer->_getservent_data) +# endif +#endif /* HAS_SETSERVENT_R */ + +#ifdef HAS_SRAND48_R +# undef srand48 +# if !defined(srand48) && SRAND48_R_PROTO == REENTRANT_PROTO_I_LS +# define srand48(a) (((errno = srand48_r(a, &PL_reentrant_buffer->_drand48_struct))) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0) +# endif +#endif /* HAS_SRAND48_R */ + +#ifdef HAS_SRANDOM_R +# undef srandom +# if !defined(srandom) && SRANDOM_R_PROTO == REENTRANT_PROTO_I_TS +# define srandom(a) (((errno = srandom_r(a, &PL_reentrant_buffer->_srandom_struct))) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0) +# endif +#endif /* HAS_SRANDOM_R */ + +#ifdef HAS_STRERROR_R +# undef strerror +# if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBW +# define strerror(a) (((errno = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0) +# endif +# if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBI +# define strerror(a) (((errno = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0) +# endif +# if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW +# define strerror(a) strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) +# endif +#endif /* HAS_STRERROR_R */ + +#ifdef HAS_TMPNAM_R +# undef tmpnam +# if !defined(tmpnam) && TMPNAM_R_PROTO == REENTRANT_PROTO_B_B +# define tmpnam(a) tmpnam_r(a) +# endif +#endif /* HAS_TMPNAM_R */ + +#ifdef HAS_TTYNAME_R +# undef ttyname +# if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBW +# define ttyname(a) (((errno = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0) +# endif +# if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBI +# define ttyname(a) (((errno = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0) +# endif +# if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_B_IBI +# define ttyname(a) ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) +# endif +#endif /* HAS_TTYNAME_R */ + + +#endif /* USE_REENTRANT_API */ + +#endif + diff --git a/reentr.pl b/reentr.pl new file mode 100644 index 0000000..f9e2d3c --- /dev/null +++ b/reentr.pl @@ -0,0 +1,705 @@ +#!/usr/bin/perl -w + +# +# Generate the reentr.c and reentr.h, +# and optionally also the relevant metaconfig units (-U option). +# + +use strict; +use Getopt::Std; +my %opts; +getopts('U', \%opts); + +my %map = ( + V => "void", + A => "char*", # as an input argument + B => "char*", # as an output argument + C => "const char*", # as a read-only input argument + I => "int", + L => "long", + W => "size_t", + H => "FILE**", + E => "int*", + ); + +# (See the definitions after __DATA__.) +# In func|inc|type|... a "S" means "type*", and a "R" means "type**". +# (The "types" are often structs, such as "struct passwd".) +# +# After the prototypes one can have |X=...|Y=... to define more types. +# A commonly used extra type is to define D to be equal to "type_data", +# for example "struct_hostent_data to" go with "struct hostent". +# +# Example #1: I_XSBWR means int func_r(X, type, char*, size_t, type**) +# Example #2: S_SBIE means type func_r(type, char*, int, int*) +# Example #3: S_CBI means type func_r(const char*, char*, int) + + +die "reentr.h: $!" unless open(H, ">reentr.h"); +select H; +print < +#endif +#ifdef I_GRP +# include +#endif +#ifdef I_NETDB +# include +#endif +#ifdef I_STDLIB +# include /* drand48_data */ +#endif +#ifdef I_CRYPT +# ifdef I_CRYPT +# include +# endif +#endif +#ifdef HAS_GETSPNAM_R +# ifdef I_SHADOW +# include +# endif +#endif + +EOF + +my %seenh; +my %seena; +my @seenf; +my %seenp; +my %seent; +my %seens; +my %seend; +my %seenu; + +while () { + next if /^\s+$/; + chomp; + my ($f, $h, $t, @p) = split(/\s*\|\s*/, $_, -1); + my $u; + ($f, $u) = split(' ', $f); + $seenu{$f} = defined $u ? length $u : 0; + my $F = uc $f; + push @seenf, $f; + my %m = %map; + if ($t) { + $m{S} = "$t*"; + $m{R} = "$t**"; + } + if (@p) { + while ($p[-1] =~ /=/) { + my ($k, $v) = ($p[-1] =~ /^([A-Za-z])\s*=\s*(.*)/); + $m{$k} = $v; + pop @p; + } + } + if ($opts{U} && open(U, ">d_${f}_r.U")) { + select U; + } + my $prereqh = $h eq 'stdio' ? '' : "i_$h"; # There's no i_stdio. + print <{$p}++; + push @{$seena{$f}}, $p; + $seenp{$p}++; + $seent{$f} = $t; + $seens{$f} = $m{S}; + $seend{$f} = $m{D}; + } + if ($opts{U}) { + print <_${f}_buffer, PL_reentrant_buffer->_${f}_size, char); +EOF + push @free, <_${f}_buffer); +EOF +} + +sub define { + my ($n, $p, @F) = @_; + my @H; + my $H = uc $F[0]; + push @define, <_${f}_size = 256; /* Make something up. */ +EOF + pushinitfree $f; + pushssif $endif; + } + elsif ($f =~ /^(crypt|drand48|gmtime|localtime|random)$/) { + pushssif $ifdef; + push @struct, <_${f}_struct.initialized = 0; +#endif +EOF + } + if ($1 eq 'drand48') { + push @struct, <_${g}_size = 1024; +EOF + } else { + push @struct, <_${g}_fptr = NULL; +# endif +EOF + my $sc = $g eq 'getgrent' ? + '_SC_GETGR_R_SIZE_MAX' : '_SC_GETPW_R_SIZE_MAX'; + push @size, <_${g}_size = sysconf($sc); +# else +# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) + PL_reentrant_buffer->_${g}_size = SIABUFSIZ; +# else +# ifdef __sgi + PL_reentrant_buffer->_${g}_size = BUFSIZ; +# else + PL_reentrant_buffer->_${g}_size = 2048; +# endif +# endif +# endif +EOF + } + pushinitfree $g; + pushssif $endif; + } + elsif ($f =~ /^(gethostbyname|getnetbyname|getservbyname|getprotobyname)$/) { + pushssif $ifdef; + my $g = $f; + $g =~ s/byname/ent/; + my $G = uc $g; + my $D = ifprotomatch($F, grep {/D/} @p); + my $d = $seend{$f}; + push @struct, <_${g}_size = 2048; /* Any better ideas? */ +#endif +EOF + push @init, <_${g}_buffer, PL_reentrant_buffer->_${g}_size, char); +#endif +EOF + push @free, <_${g}_buffer); +#endif +EOF + pushssif $endif; + } + elsif ($f =~ /^(readdir|readdir64)$/) { + pushssif $ifdef; + my $R = ifprotomatch($F, grep {/R/} @p); + push @struct, <_${f}_size = sizeof($seent{$f}) + MAXPATHLEN + 1; +EOF + push @init, <_${f}_struct = ($seent{$f}*)safemalloc(PL_reentrant_buffer->_${f}_size); +EOF + push @free, <_${f}_struct); +EOF + pushssif $endif; + } + + push @wrap, $ifdef; + +# Doesn't implement the buffer growth loop for glibc gethostby*(). + push @wrap, <_${g}_ptr" : + $_ eq 'E' ? + "&PL_reentrant_buffer->_${g}_errno" : + $_ eq 'B' ? + "PL_reentrant_buffer->_${g}_buffer" : + $_ =~ /^[WI]$/ ? + "PL_reentrant_buffer->_${g}_size" : + $_ eq 'H' ? + "&PL_reentrant_buffer->_${g}_fptr" : + $_ eq 'D' ? + "&PL_reentrant_buffer->_${g}_data" : + $_ eq 'S' ? + ($f =~ /^readdir/ ? + "PL_reentrant_buffer->_${g}_struct" : + "&PL_reentrant_buffer->_${g}_struct" ) : + $_ eq 'T' && $f eq 'drand48' ? + "&PL_reentrant_buffer->_${g}_double" : + $_ + } split '', $b; + $w = ", $w" if length $v; + } + my $call = "${f}_r($v$w)"; + $call = "((errno = $call))" if $r eq 'I'; + push @wrap, <reentr.c"); +select C; +print < @@ -1910,6 +2090,16 @@ */ /*#define HAS_SETGRENT / **/ +/* HAS_SETGRENT_R: + * This symbol, if defined, indicates that the setgrent_r routine + * is available to setgrent re-entrantly. + */ +/* SETGRENT_R_PROTO: + * This symbol encodes the prototype of setgrent_r. + */ +/*#define HAS_SETGRENT_R / **/ +#define SETGRENT_R_PROTO 0 /**/ + /* HAS_SETGROUPS: * This symbol, if defined, indicates that the setgroups() routine is * available to set the list of process groups. If unavailable, multiple @@ -1965,6 +2155,16 @@ */ /*#define HAS_SETPWENT / **/ +/* HAS_SETPWENT_R: + * This symbol, if defined, indicates that the setpwent_r routine + * is available to setpwent re-entrantly. + */ +/* SETPWENT_R_PROTO: + * This symbol encodes the prototype of setpwent_r. + */ +/*#define HAS_SETPWENT_R / **/ +#define SETPWENT_R_PROTO 0 /**/ + /* HAS_SETSERVENT: * This symbol, if defined, indicates that the setservent() routine is * available. @@ -2086,6 +2286,26 @@ */ /*#define HAS_SQRTL / **/ +/* HAS_SRAND48_R: + * This symbol, if defined, indicates that the srand48_r routine + * is available to srand48 re-entrantly. + */ +/* SRAND48_R_PROTO: + * This symbol encodes the prototype of srand48_r. + */ +/*#define HAS_SRAND48_R / **/ +#define SRAND48_R_PROTO 0 /**/ + +/* HAS_SRANDOM_R: + * This symbol, if defined, indicates that the srandom_r routine + * is available to srandom re-entrantly. + */ +/* SRANDOM_R_PROTO: + * This symbol encodes the prototype of srandom_r. + */ +/*#define HAS_SRANDOM_R / **/ +#define SRANDOM_R_PROTO 0 /**/ + /* USE_STAT_BLOCKS: * This symbol is defined if this system has a stat structure declaring * st_blksize and st_blocks. @@ -2206,6 +2426,16 @@ /*#define HAS_SYS_ERRLIST / **/ #define Strerror(e) strerror(e) +/* HAS_STRERROR_R: + * This symbol, if defined, indicates that the strerror_r routine + * is available to strerror re-entrantly. + */ +/* STRERROR_R_PROTO: + * This symbol encodes the prototype of strerror_r. + */ +/*#define HAS_STRERROR_R / **/ +#define STRERROR_R_PROTO 0 /**/ + /* HAS_STRTOLD: * This symbol, if defined, indicates that the strtold routine is * available to convert strings to long doubles. @@ -2264,6 +2494,16 @@ */ /*#define HAS_TIMES / **/ +/* HAS_TMPNAM_R: + * This symbol, if defined, indicates that the tmpnam_r routine + * is available to tmpnam re-entrantly. + */ +/* TMPNAM_R_PROTO: + * This symbol encodes the prototype of tmpnam_r. + */ +/*#define HAS_TMPNAM_R / **/ +#define TMPNAM_R_PROTO 0 /**/ + /* HAS_UALARM: * This symbol, if defined, indicates that the ualarm routine is * available to do alarms with microsecond granularity. @@ -2645,9 +2885,14 @@ * This symbol, if defined, indicates to the C program that it should * include with KERNEL defined. */ +/* HAS_TM_TM_ZONE: + * This symbol, if defined, indicates to the C program that + * the struct tm has a tm_zone field. + */ #define I_TIME /**/ /*#define I_SYS_TIME / **/ /*#define I_SYS_TIME_KERNEL / **/ +/*#define HAS_TM_TM_ZONE / **/ /* I_USTAT: * This symbol, if defined, indicates that exists and @@ -3579,6 +3824,12 @@ */ /*#define HAS_USLEEP_PROTO / **/ +/* I_CRYPT: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_CRYPT / **/ + /* I_FP: * This symbol, if defined, indicates that exists and * should be included. @@ -3591,10 +3842,250 @@ */ /*#define I_LANGINFO / **/ +/* HAS_CTERMID_R: + * This symbol, if defined, indicates that the ctermid_r routine + * is available to ctermid re-entrantly. + */ +/* CTERMID_R_PROTO: + * This symbol encodes the prototype of ctermid_r. + */ +/*#define HAS_CTERMID_R / **/ +#define CTERMID_R_PROTO 0 /**/ + +/* HAS_ENDHOSTENT_R: + * This symbol, if defined, indicates that the endhostent_r routine + * is available to endhostent re-entrantly. + */ +/* ENDHOSTENT_R_PROTO: + * This symbol encodes the prototype of endhostent_r. + */ +/*#define HAS_ENDHOSTENT_R / **/ +#define ENDHOSTENT_R_PROTO 0 /**/ + +/* HAS_ENDNETENT_R: + * This symbol, if defined, indicates that the endnetent_r routine + * is available to endnetent re-entrantly. + */ +/* ENDNETENT_R_PROTO: + * This symbol encodes the prototype of endnetent_r. + */ +/*#define HAS_ENDNETENT_R / **/ +#define ENDNETENT_R_PROTO 0 /**/ + +/* HAS_ENDPROTOENT_R: + * This symbol, if defined, indicates that the endprotoent_r routine + * is available to endprotoent re-entrantly. + */ +/* ENDPROTOENT_R_PROTO: + * This symbol encodes the prototype of endprotoent_r. + */ +/*#define HAS_ENDPROTOENT_R / **/ +#define ENDPROTOENT_R_PROTO 0 /**/ + +/* HAS_ENDSERVENT_R: + * This symbol, if defined, indicates that the endservent_r routine + * is available to endservent re-entrantly. + */ +/* ENDSERVENT_R_PROTO: + * This symbol encodes the prototype of endservent_r. + */ +/*#define HAS_ENDSERVENT_R / **/ +#define ENDSERVENT_R_PROTO 0 /**/ + +/* HAS_GETHOSTBYADDR_R: + * This symbol, if defined, indicates that the gethostbyaddr_r routine + * is available to gethostbyaddr re-entrantly. + */ +/* GETHOSTBYADDR_R_PROTO: + * This symbol encodes the prototype of gethostbyaddr_r. + */ +/*#define HAS_GETHOSTBYADDR_R / **/ +#define GETHOSTBYADDR_R_PROTO 0 /**/ + +/* HAS_GETHOSTBYNAME_R: + * This symbol, if defined, indicates that the gethostbyname_r routine + * is available to gethostbyname re-entrantly. + */ +/* GETHOSTBYNAME_R_PROTO: + * This symbol encodes the prototype of gethostbyname_r. + */ +/*#define HAS_GETHOSTBYNAME_R / **/ +#define GETHOSTBYNAME_R_PROTO 0 /**/ + +/* HAS_GETHOSTENT_R: + * This symbol, if defined, indicates that the gethostent_r routine + * is available to gethostent re-entrantly. + */ +/* GETHOSTENT_R_PROTO: + * This symbol encodes the prototype of gethostent_r. + */ +/*#define HAS_GETHOSTENT_R / **/ +#define GETHOSTENT_R_PROTO 0 /**/ + +/* HAS_GETNETBYADDR_R: + * This symbol, if defined, indicates that the getnetbyaddr_r routine + * is available to getnetbyaddr re-entrantly. + */ +/* GETNETBYADDR_R_PROTO: + * This symbol encodes the prototype of getnetbyaddr_r. + */ +/*#define HAS_GETNETBYADDR_R / **/ +#define GETNETBYADDR_R_PROTO 0 /**/ + +/* HAS_GETNETBYNAME_R: + * This symbol, if defined, indicates that the getnetbyname_r routine + * is available to getnetbyname re-entrantly. + */ +/* GETNETBYNAME_R_PROTO: + * This symbol encodes the prototype of getnetbyname_r. + */ +/*#define HAS_GETNETBYNAME_R / **/ +#define GETNETBYNAME_R_PROTO 0 /**/ + +/* HAS_GETNETENT_R: + * This symbol, if defined, indicates that the getnetent_r routine + * is available to getnetent re-entrantly. + */ +/* GETNETENT_R_PROTO: + * This symbol encodes the prototype of getnetent_r. + */ +/*#define HAS_GETNETENT_R / **/ +#define GETNETENT_R_PROTO 0 /**/ + +/* HAS_GETPROTOBYNAME_R: + * This symbol, if defined, indicates that the getprotobyname_r routine + * is available to getprotobyname re-entrantly. + */ +/* GETPROTOBYNAME_R_PROTO: + * This symbol encodes the prototype of getprotobyname_r. + */ +/*#define HAS_GETPROTOBYNAME_R / **/ +#define GETPROTOBYNAME_R_PROTO 0 /**/ + +/* HAS_GETPROTOBYNUMBER_R: + * This symbol, if defined, indicates that the getprotobynumber_r routine + * is available to getprotobynumber re-entrantly. + */ +/* GETPROTOBYNUMBER_R_PROTO: + * This symbol encodes the prototype of getprotobynumber_r. + */ +/*#define HAS_GETPROTOBYNUMBER_R / **/ +#define GETPROTOBYNUMBER_R_PROTO 0 /**/ + +/* HAS_GETPROTOENT_R: + * This symbol, if defined, indicates that the getprotoent_r routine + * is available to getprotoent re-entrantly. + */ +/* GETPROTOENT_R_PROTO: + * This symbol encodes the prototype of getprotoent_r. + */ +/*#define HAS_GETPROTOENT_R / **/ +#define GETPROTOENT_R_PROTO 0 /**/ + +/* HAS_GETSERVBYNAME_R: + * This symbol, if defined, indicates that the getservbyname_r routine + * is available to getservbyname re-entrantly. + */ +/* GETSERVBYNAME_R_PROTO: + * This symbol encodes the prototype of getservbyname_r. + */ +/*#define HAS_GETSERVBYNAME_R / **/ +#define GETSERVBYNAME_R_PROTO 0 /**/ + +/* HAS_GETSERVBYPORT_R: + * This symbol, if defined, indicates that the getservbyport_r routine + * is available to getservbyport re-entrantly. + */ +/* GETSERVBYPORT_R_PROTO: + * This symbol encodes the prototype of getservbyport_r. + */ +/*#define HAS_GETSERVBYPORT_R / **/ +#define GETSERVBYPORT_R_PROTO 0 /**/ + +/* HAS_GETSERVENT_R: + * This symbol, if defined, indicates that the getservent_r routine + * is available to getservent re-entrantly. + */ +/* GETSERVENT_R_PROTO: + * This symbol encodes the prototype of getservent_r. + */ +/*#define HAS_GETSERVENT_R / **/ +#define GETSERVENT_R_PROTO 0 /**/ + /* HAS_PTHREAD_ATFORK: * This symbol, if defined, indicates that the pthread_atfork routine * is available setup fork handlers. */ /*#define HAS_PTHREAD_ATFORK / **/ +/* HAS_READDIR64_R: + * This symbol, if defined, indicates that the readdir64_r routine + * is available to readdir64 re-entrantly. + */ +/* READDIR64_R_PROTO: + * This symbol encodes the prototype of readdir64_r. + */ +/*#define HAS_READDIR64_R / **/ +#define READDIR64_R_PROTO 0 /**/ + +/* HAS_SETHOSTENT_R: + * This symbol, if defined, indicates that the sethostent_r routine + * is available to sethostent re-entrantly. + */ +/* SETHOSTENT_R_PROTO: + * This symbol encodes the prototype of sethostent_r. + */ +/*#define HAS_SETHOSTENT_R / **/ +#define SETHOSTENT_R_PROTO 0 /**/ + +/* HAS_SETLOCALE_R: + * This symbol, if defined, indicates that the setlocale_r routine + * is available to setlocale re-entrantly. + */ +/* SETLOCALE_R_PROTO: + * This symbol encodes the prototype of setlocale_r. + */ +/*#define HAS_SETLOCALE_R / **/ +#define SETLOCALE_R_PROTO 0 /**/ + +/* HAS_SETNETENT_R: + * This symbol, if defined, indicates that the setnetent_r routine + * is available to setnetent re-entrantly. + */ +/* SETNETENT_R_PROTO: + * This symbol encodes the prototype of setnetent_r. + */ +/*#define HAS_SETNETENT_R / **/ +#define SETNETENT_R_PROTO 0 /**/ + +/* HAS_SETPROTOENT_R: + * This symbol, if defined, indicates that the setprotoent_r routine + * is available to setprotoent re-entrantly. + */ +/* SETPROTOENT_R_PROTO: + * This symbol encodes the prototype of setprotoent_r. + */ +/*#define HAS_SETPROTOENT_R / **/ +#define SETPROTOENT_R_PROTO 0 /**/ + +/* HAS_SETSERVENT_R: + * This symbol, if defined, indicates that the setservent_r routine + * is available to setservent re-entrantly. + */ +/* SETSERVENT_R_PROTO: + * This symbol encodes the prototype of setservent_r. + */ +/*#define HAS_SETSERVENT_R / **/ +#define SETSERVENT_R_PROTO 0 /**/ + +/* HAS_TTYNAME_R: + * This symbol, if defined, indicates that the ttyname_r routine + * is available to ttyname re-entrantly. + */ +/* TTYNAME_R_PROTO: + * This symbol encodes the prototype of ttyname_r. + */ +/*#define HAS_TTYNAME_R / **/ +#define TTYNAME_R_PROTO 0 /**/ + #endif diff --git a/uconfig.sh b/uconfig.sh index aff94f7..78e405c 100755 --- a/uconfig.sh +++ b/uconfig.sh @@ -8,6 +8,7 @@ apiversion='5.005' archlib='/usr/local/lib/perl5/5.7/unknown' archlibexp='/usr/local/lib/perl5/5.7/unknown' archname='unknown' +asctime_r_proto='0' bin='/usr/local/bin' bincompat5005='define' byteorder='1234' @@ -15,6 +16,9 @@ castflags='0' charsize='1' clocktype='clock_t' cpp_stuff='42' +crypt_r_proto='0' +ctermid_r_proto='0' +ctime_r_proto='0' d_Gconvert='sprintf((b),"%.*g",(n),(x))' d_PRIEUldbl='undef' d_PRIFUldbl='undef' @@ -34,6 +38,7 @@ d_access='undef' d_accessx='undef' d_alarm='undef' d_archlib='undef' +d_asctime_r='undef' d_atolf='undef' d_atoll='undef' d_attribut='undef' @@ -55,7 +60,10 @@ d_closedir='undef' d_cmsghdr_s='undef' d_const='undef' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' +d_ctermid_r='undef' +d_ctime_r='undef' d_cuserid='undef' d_dbl_dig='undef' d_dbminitproto='undef' @@ -66,15 +74,22 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' +d_drand48_r='undef' d_drand48proto='undef' d_dup2='undef' d_eaccess='undef' d_endgrent='undef' +d_endgrent_r='undef' d_endhent='undef' +d_endhostent_r='undef' d_endnent='undef' +d_endnetent_r='undef' d_endpent='undef' +d_endprotoent_r='undef' d_endpwent='undef' +d_endpwent_r='undef' d_endsent='undef' +d_endservent_r='undef' d_eofnblk='undef' d_eunice='undef' d_fchdir='undef' @@ -111,19 +126,29 @@ d_getcwd='undef' d_getespwnam='undef' d_getfsstat='undef' d_getgrent='undef' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' d_getgrps='undef' d_gethbyaddr='undef' d_gethbyname='undef' d_gethent='undef' d_gethname='undef' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' d_gethostprotos='undef' d_getitimer='undef' d_getlogin='undef' +d_getlogin_r='undef' d_getmnt='undef' d_getmntent='undef' d_getnbyaddr='undef' d_getnbyname='undef' d_getnent='undef' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' d_getnetprotos='undef' d_getpagsz='undef' d_getpbyname='undef' @@ -134,16 +159,27 @@ d_getpgrp2='undef' d_getpgrp='undef' d_getppid='undef' d_getprior='undef' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' d_getprotoprotos='undef' d_getprpwnam='undef' d_getpwent='undef' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' d_getsbyname='undef' d_getsbyport='undef' d_getsent='undef' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' d_getservprotos='undef' d_getspent='undef' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='undef' +d_gmtime_r='undef' d_gnulibc='undef' d_grpasswd='undef' d_hasmntopt='undef' @@ -160,6 +196,7 @@ d_killpg='undef' d_lchown='undef' d_ldbl_dig='undef' d_link='undef' +d_localtime_r='undef' d_locconv='undef' d_lockf='undef' d_longdbl='undef' @@ -228,7 +265,10 @@ d_pwpasswd='undef' d_pwquota='undef' d_qgcvt='undef' d_quad='undef' +d_random_r='undef' +d_readdir64_r='undef' d_readdir='undef' +d_readdir_r='undef' d_readlink='undef' d_readv='undef' d_recvmsg='undef' @@ -253,19 +293,25 @@ d_sendmsg='undef' d_setegid='undef' d_seteuid='undef' d_setgrent='undef' +d_setgrent_r='undef' d_setgrps='undef' d_sethent='undef' +d_sethostent_r='undef' d_setitimer='undef' d_setlinebuf='undef' d_setlocale='undef' +d_setlocale_r='undef' d_setnent='undef' +d_setnetent_r='undef' d_setpent='undef' d_setpgid='undef' d_setpgrp2='undef' d_setpgrp='undef' d_setprior='undef' d_setproctitle='undef' +d_setprotoent_r='undef' d_setpwent='undef' +d_setpwent_r='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' @@ -273,6 +319,7 @@ d_setreuid='undef' d_setrgid='undef' d_setruid='undef' d_setsent='undef' +d_setservent_r='undef' d_setsid='undef' d_setvbuf='undef' d_sfio='undef' @@ -292,6 +339,8 @@ d_socklen_t='undef' d_sockpair='undef' d_socks5_init='undef' d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' d_sresgproto='undef' d_sresuproto='undef' d_statblks='undef' @@ -310,6 +359,7 @@ d_strcoll='undef' d_strctcpy='undef' d_strerrm='strerror(e)' d_strerror='undef' +d_strerror_r='undef' d_strftime='undef' d_strtod='undef' d_strtol='undef' @@ -334,7 +384,11 @@ d_telldir='undef' d_telldirproto='undef' d_time='undef' d_times='undef' +d_tm_tm_gmtoff='undef' +d_tm_tm_zone='undef' +d_tmpnam_r='undef' d_truncate='undef' +d_ttyname_r='undef' d_tzname='undef' d_u32align='define' d_ualarm='undef' @@ -366,18 +420,46 @@ defvoidused=1 direntrytype='struct dirent' doublesize='8' drand01="((rand() & 0x7FFF) / (double) ((unsigned long)1 << 15))" +drand48_r_proto='0' eagain='EAGAIN' ebcdic='undef' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' fflushNULL='undef' fflushall='undef' firstmakefile='makefile' fpossize='4' fpostype=int freetype=int +getgrent_r_proto='0' +getgrgid_r_proto='0' +getgrnam_r_proto='0' +gethostbyaddr_r_proto='0' +gethostbyname_r_proto='0' +gethostent_r_proto='0' +getlogin_r_proto='0' +getnetbyaddr_r_proto='0' +getnetbyname_r_proto='0' +getnetent_r_proto='0' +getprotobyname_r_proto='0' +getprotobynumber_r_proto='0' +getprotoent_r_proto='0' +getpwent_r_proto='0' +getpwnam_r_proto='0' +getpwuid_r_proto='0' +getservbyname_r_proto='0' +getservbyport_r_proto='0' +getservent_r_proto='0' +getspnam_r_proto='0' gidformat='"lu"' gidsign='1' gidsize='4' gidtype=int +gmtime_r_proto='0' groupstype=int h_fcntl='false' h_sysfile='true' @@ -391,6 +473,7 @@ i8size='1' i8type='char' i_arpainet='undef' i_bsdioctl='' +i_crypt='undef' i_db='undef' i_dbm='undef' i_dirent='undef' @@ -479,6 +562,7 @@ ivdformat='"ld"' ivsize='4' ivtype='long' lib_ext='.a' +localtime_r_proto='0' longdblsize=8 longlongsize=8 longsize='4' @@ -519,8 +603,11 @@ quadkind='4' quadtype='int64_t' randbits='48' randfunc='drand48' +random_r_proto='0' randseedtype='int' rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='0' sPRIEUldbl='"llE"' sPRIFUldbl='"llF"' sPRIGUldbl='"llG"' @@ -540,6 +627,13 @@ scriptdirexp='/usr/local/bin' seedfunc='srand' selectminbits='32' selecttype=int +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' shmattype='void *' shortsize=2 sig_name_init='0' @@ -549,6 +643,8 @@ signal_t=int sizesize=4 sizetype=int socksizetype='int' +srand48_r_proto='0' +srandom_r_proto='0' ssizetype=int stdchar=char stdio_base='((fp)->_IO_read_base)' @@ -557,8 +653,11 @@ stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)' stdio_filbuf='' stdio_ptr='((fp)->_IO_read_ptr)' stdio_stream_array='' +strerror_r_proto='0' timetype=int +tmpnam_r_proto='0' touch='touch' +ttyname_r_proto='0' u16size='2' u16type='unsigned short' u32size='4' diff --git a/util.c b/util.c index 9109f8c..94626bc 100644 --- a/util.c +++ b/util.c @@ -4348,14 +4348,3 @@ Perl_sv_nounlocking(pTHX_ SV *sv) { } -void -Perl_reentrant_init(pTHX) -{ -#ifdef USE_REENTRANT_API - New(31337, PL_reentrant_buffer, 1, REENTBUF); - New(31337, PL_reentrant_buffer->tmbuf, 1, struct tm); -#endif -} - - - diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index 50f6861..81a4d72 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -261,13 +261,13 @@ FULLLIBS2 = $(LIBS2)|$(THRLIBS1)|$(THRLIBS2) c0 = $(MALLOC_C) $(SOCKC) av.c deb.c doio.c doop.c dump.c globals.c gv.c hv.c c1 = mg.c locale.c miniperlmain.c numeric.c op.c perl.c perlapi.c perlio.c -c2 = perly.c pp.c pp_ctl.c pp_hot.c pp_pack.c pp_sort.c pp_sys.c regcomp.c regexec.c +c2 = perly.c pp.c pp_ctl.c pp_hot.c pp_pack.c pp_sort.c pp_sys.c regcomp.c regexec.c reentr.c c3 = run.c scope.c sv.c taint.c toke.c universal.c utf8.c util.c vms.c xsutils.c c = $(c0) $(c1) $(c2) $(c3) obj0 = $(MALLOC_O) $(SOCKO) av$(O) deb$(O) doio$(O) doop$(O) dump$(O) obj1 = globals$(O) gv$(O) hv$(O) locale$(O) mg$(O) miniperlmain$(O) numeric$(O) -obj2 = op$(O) perl$(O) perlapi$(O) perlio$(O) perly$(O) pp$(O) pp_ctl$(O) pp_hot$(O) +obj2 = op$(O) perl$(O) perlapi$(O) perlio$(O) perly$(O) pp$(O) pp_ctl$(O) pp_hot$(O) reentr$(O) obj3 = pp_pack$(O) pp_sort$(O) pp_sys$(O) regcomp$(O) regexec$(O) run$(O) scope$(O) sv$(O) taint$(O) toke$(O) obj4 = universal$(O) utf8$(O) util$(O) vms$(O) xsutils$(O) obj = $(obj0) $(obj1) $(obj2) $(obj3) $(obj4) @@ -1159,8 +1159,9 @@ pp_hot$(O) : pp_hot.c extern.h perl.h config.h embed.h handy.h vmsish.h $(SOCKH) $(CC) $(CORECFLAGS) $(MMS$SOURCE) pp_pack$(O) : pp_pack.c extern.h perl.h config.h embed.h handy.h vmsish.h $(SOCKH) iperlsys.h perlsdio.h perl.h regexp.h sv.h util.h form.h gv.h cv.h opnames.h op.h cop.h av.h hv.h mg.h scope.h warnings.h utf8.h perly.h thread.h pp.h proto.h pp_proto.h opcode.h embedvar.h intrpvar.h thrdvar.h perlvars.h patchlevel.h pp_sort$(O) : pp_sort.c extern.h perl.h config.h embed.h handy.h vmsish.h $(SOCKH) iperlsys.h perlsdio.h perl.h regexp.h sv.h util.h form.h gv.h cv.h opnames.h op.h cop.h av.h hv.h mg.h scope.h warnings.h utf8.h perly.h thread.h pp.h proto.h pp_proto.h opcode.h embedvar.h intrpvar.h thrdvar.h perlvars.h patchlevel.h -pp_sys$(O) : pp_sys.c extern.h perl.h config.h embed.h handy.h vmsish.h $(SOCKH) iperlsys.h perlsdio.h perl.h regexp.h sv.h util.h form.h gv.h cv.h opnames.h op.h cop.h av.h hv.h mg.h scope.h warnings.h utf8.h perly.h thread.h pp.h proto.h pp_proto.h opcode.h embedvar.h intrpvar.h thrdvar.h perlvars.h patchlevel.h +pp_sys$(O) : pp_sys.c extern.h perl.h config.h embed.h handy.h vmsish.h $(SOCKH) iperlsys.h perlsdio.h perl.h regexp.h sv.h util.h form.h gv.h cv.h opnames.h op.h cop.h av.h hv.h mg.h scope.h warnings.h utf8.h perly.h thread.h pp.h proto.h pp_proto.h opcode.h embedvar.h intrpvar.h thrdvar.h perlvars.h patchlevel.h reentr.h $(CC) $(CORECFLAGS) $(MMS$SOURCE) +reentr(O) : reentr.c extern.h perl.h config.h embed.h handy.h vmsish.h $(SOCKH) iperlsys.h perlsdio.h perl.h regexp.h sv.h util.h form.h gv.h cv.h opnames.h op.h cop.h av.h hv.h mg.h scope.h warnings.h utf8.h perly.h thread.h pp.h proto.h pp_proto.h opcode.h embedvar.h intrpvar.h thrdvar.h perlvars.h patchlevel.h intern.h reentr.h regcomp$(O) : regcomp.c extern.h perl.h config.h embed.h handy.h vmsish.h $(SOCKH) iperlsys.h perlsdio.h perl.h regexp.h sv.h util.h form.h gv.h cv.h opnames.h op.h cop.h av.h hv.h mg.h scope.h warnings.h utf8.h perly.h thread.h pp.h proto.h pp_proto.h opcode.h embedvar.h intrpvar.h thrdvar.h perlvars.h patchlevel.h intern.h regcomp.h regnodes.h $(CC) $(CORECFLAGS) $(MMS$SOURCE) regexec$(O) : regexec.c extern.h perl.h config.h embed.h handy.h vmsish.h $(SOCKH) iperlsys.h perlsdio.h perl.h regexp.h sv.h util.h form.h gv.h cv.h opnames.h op.h cop.h av.h hv.h mg.h scope.h warnings.h utf8.h perly.h thread.h pp.h proto.h pp_proto.h opcode.h embedvar.h intrpvar.h thrdvar.h perlvars.h patchlevel.h regcomp.h regnodes.h diff --git a/vos/build.cm b/vos/build.cm index 5eb56a2..991530f 100644 --- a/vos/build.cm +++ b/vos/build.cm @@ -182,6 +182,8 @@ &if (command_status) ^= 0 &then &return !&compiler& < @@ -1910,6 +2090,16 @@ */ /*#define HAS_SETGRENT /**/ +/* HAS_SETGRENT_R: + * This symbol, if defined, indicates that the setgrent_r routine + * is available to setgrent re-entrantly. + */ +/* SETGRENT_R_PROTO: + * This symbol encodes the prototype of setgrent_r. + */ +/*#define HAS_SETGRENT_R /**/ +#define SETGRENT_R_PROTO 0 /**/ + /* HAS_SETGROUPS: * This symbol, if defined, indicates that the setgroups() routine is * available to set the list of process groups. If unavailable, multiple @@ -1965,6 +2155,16 @@ */ /*#define HAS_SETPWENT /**/ +/* HAS_SETPWENT_R: + * This symbol, if defined, indicates that the setpwent_r routine + * is available to setpwent re-entrantly. + */ +/* SETPWENT_R_PROTO: + * This symbol encodes the prototype of setpwent_r. + */ +/*#define HAS_SETPWENT_R /**/ +#define SETPWENT_R_PROTO 0 /**/ + /* HAS_SETSERVENT: * This symbol, if defined, indicates that the setservent() routine is * available. @@ -2086,6 +2286,26 @@ */ /*#define HAS_SQRTL /**/ +/* HAS_SRAND48_R: + * This symbol, if defined, indicates that the srand48_r routine + * is available to srand48 re-entrantly. + */ +/* SRAND48_R_PROTO: + * This symbol encodes the prototype of srand48_r. + */ +/*#define HAS_SRAND48_R /**/ +#define SRAND48_R_PROTO 0 /**/ + +/* HAS_SRANDOM_R: + * This symbol, if defined, indicates that the srandom_r routine + * is available to srandom re-entrantly. + */ +/* SRANDOM_R_PROTO: + * This symbol encodes the prototype of srandom_r. + */ +/*#define HAS_SRANDOM_R /**/ +#define SRANDOM_R_PROTO 0 /**/ + /* USE_STAT_BLOCKS: * This symbol is defined if this system has a stat structure declaring * st_blksize and st_blocks. @@ -2206,6 +2426,16 @@ #define HAS_SYS_ERRLIST /**/ #define Strerror(e) strerror(e) +/* HAS_STRERROR_R: + * This symbol, if defined, indicates that the strerror_r routine + * is available to strerror re-entrantly. + */ +/* STRERROR_R_PROTO: + * This symbol encodes the prototype of strerror_r. + */ +/*#define HAS_STRERROR_R /**/ +#define STRERROR_R_PROTO 0 /**/ + /* HAS_STRTOLD: * This symbol, if defined, indicates that the strtold routine is * available to convert strings to long doubles. @@ -2264,6 +2494,16 @@ */ #define HAS_TIMES /**/ +/* HAS_TMPNAM_R: + * This symbol, if defined, indicates that the tmpnam_r routine + * is available to tmpnam re-entrantly. + */ +/* TMPNAM_R_PROTO: + * This symbol encodes the prototype of tmpnam_r. + */ +/*#define HAS_TMPNAM_R /**/ +#define TMPNAM_R_PROTO 0 /**/ + /* HAS_UALARM: * This symbol, if defined, indicates that the ualarm routine is * available to do alarms with microsecond granularity. @@ -2645,9 +2885,14 @@ * This symbol, if defined, indicates to the C program that it should * include with KERNEL defined. */ +/* HAS_TM_TM_ZONE: + * This symbol, if defined, indicates to the C program that + * the struct tm has a tm_zone field. + */ /*#define I_TIME /**/ #define I_SYS_TIME /**/ /*#define I_SYS_TIME_KERNEL /**/ +/*#define HAS_TM_TM_ZONE /**/ /* I_USTAT: * This symbol, if defined, indicates that exists and @@ -3579,6 +3824,12 @@ */ /*#define HAS_USLEEP_PROTO /**/ +/* I_CRYPT: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_CRYPT /**/ + /* I_FP: * This symbol, if defined, indicates that exists and * should be included. @@ -3591,10 +3842,250 @@ */ /*#define I_LANGINFO /**/ +/* HAS_CTERMID_R: + * This symbol, if defined, indicates that the ctermid_r routine + * is available to ctermid re-entrantly. + */ +/* CTERMID_R_PROTO: + * This symbol encodes the prototype of ctermid_r. + */ +/*#define HAS_CTERMID_R /**/ +#define CTERMID_R_PROTO 0 /**/ + +/* HAS_ENDHOSTENT_R: + * This symbol, if defined, indicates that the endhostent_r routine + * is available to endhostent re-entrantly. + */ +/* ENDHOSTENT_R_PROTO: + * This symbol encodes the prototype of endhostent_r. + */ +/*#define HAS_ENDHOSTENT_R /**/ +#define ENDHOSTENT_R_PROTO 0 /**/ + +/* HAS_ENDNETENT_R: + * This symbol, if defined, indicates that the endnetent_r routine + * is available to endnetent re-entrantly. + */ +/* ENDNETENT_R_PROTO: + * This symbol encodes the prototype of endnetent_r. + */ +/*#define HAS_ENDNETENT_R /**/ +#define ENDNETENT_R_PROTO 0 /**/ + +/* HAS_ENDPROTOENT_R: + * This symbol, if defined, indicates that the endprotoent_r routine + * is available to endprotoent re-entrantly. + */ +/* ENDPROTOENT_R_PROTO: + * This symbol encodes the prototype of endprotoent_r. + */ +/*#define HAS_ENDPROTOENT_R /**/ +#define ENDPROTOENT_R_PROTO 0 /**/ + +/* HAS_ENDSERVENT_R: + * This symbol, if defined, indicates that the endservent_r routine + * is available to endservent re-entrantly. + */ +/* ENDSERVENT_R_PROTO: + * This symbol encodes the prototype of endservent_r. + */ +/*#define HAS_ENDSERVENT_R /**/ +#define ENDSERVENT_R_PROTO 0 /**/ + +/* HAS_GETHOSTBYADDR_R: + * This symbol, if defined, indicates that the gethostbyaddr_r routine + * is available to gethostbyaddr re-entrantly. + */ +/* GETHOSTBYADDR_R_PROTO: + * This symbol encodes the prototype of gethostbyaddr_r. + */ +/*#define HAS_GETHOSTBYADDR_R /**/ +#define GETHOSTBYADDR_R_PROTO 0 /**/ + +/* HAS_GETHOSTBYNAME_R: + * This symbol, if defined, indicates that the gethostbyname_r routine + * is available to gethostbyname re-entrantly. + */ +/* GETHOSTBYNAME_R_PROTO: + * This symbol encodes the prototype of gethostbyname_r. + */ +/*#define HAS_GETHOSTBYNAME_R /**/ +#define GETHOSTBYNAME_R_PROTO 0 /**/ + +/* HAS_GETHOSTENT_R: + * This symbol, if defined, indicates that the gethostent_r routine + * is available to gethostent re-entrantly. + */ +/* GETHOSTENT_R_PROTO: + * This symbol encodes the prototype of gethostent_r. + */ +/*#define HAS_GETHOSTENT_R /**/ +#define GETHOSTENT_R_PROTO 0 /**/ + +/* HAS_GETNETBYADDR_R: + * This symbol, if defined, indicates that the getnetbyaddr_r routine + * is available to getnetbyaddr re-entrantly. + */ +/* GETNETBYADDR_R_PROTO: + * This symbol encodes the prototype of getnetbyaddr_r. + */ +/*#define HAS_GETNETBYADDR_R /**/ +#define GETNETBYADDR_R_PROTO 0 /**/ + +/* HAS_GETNETBYNAME_R: + * This symbol, if defined, indicates that the getnetbyname_r routine + * is available to getnetbyname re-entrantly. + */ +/* GETNETBYNAME_R_PROTO: + * This symbol encodes the prototype of getnetbyname_r. + */ +/*#define HAS_GETNETBYNAME_R /**/ +#define GETNETBYNAME_R_PROTO 0 /**/ + +/* HAS_GETNETENT_R: + * This symbol, if defined, indicates that the getnetent_r routine + * is available to getnetent re-entrantly. + */ +/* GETNETENT_R_PROTO: + * This symbol encodes the prototype of getnetent_r. + */ +/*#define HAS_GETNETENT_R /**/ +#define GETNETENT_R_PROTO 0 /**/ + +/* HAS_GETPROTOBYNAME_R: + * This symbol, if defined, indicates that the getprotobyname_r routine + * is available to getprotobyname re-entrantly. + */ +/* GETPROTOBYNAME_R_PROTO: + * This symbol encodes the prototype of getprotobyname_r. + */ +/*#define HAS_GETPROTOBYNAME_R /**/ +#define GETPROTOBYNAME_R_PROTO 0 /**/ + +/* HAS_GETPROTOBYNUMBER_R: + * This symbol, if defined, indicates that the getprotobynumber_r routine + * is available to getprotobynumber re-entrantly. + */ +/* GETPROTOBYNUMBER_R_PROTO: + * This symbol encodes the prototype of getprotobynumber_r. + */ +/*#define HAS_GETPROTOBYNUMBER_R /**/ +#define GETPROTOBYNUMBER_R_PROTO 0 /**/ + +/* HAS_GETPROTOENT_R: + * This symbol, if defined, indicates that the getprotoent_r routine + * is available to getprotoent re-entrantly. + */ +/* GETPROTOENT_R_PROTO: + * This symbol encodes the prototype of getprotoent_r. + */ +/*#define HAS_GETPROTOENT_R /**/ +#define GETPROTOENT_R_PROTO 0 /**/ + +/* HAS_GETSERVBYNAME_R: + * This symbol, if defined, indicates that the getservbyname_r routine + * is available to getservbyname re-entrantly. + */ +/* GETSERVBYNAME_R_PROTO: + * This symbol encodes the prototype of getservbyname_r. + */ +/*#define HAS_GETSERVBYNAME_R /**/ +#define GETSERVBYNAME_R_PROTO 0 /**/ + +/* HAS_GETSERVBYPORT_R: + * This symbol, if defined, indicates that the getservbyport_r routine + * is available to getservbyport re-entrantly. + */ +/* GETSERVBYPORT_R_PROTO: + * This symbol encodes the prototype of getservbyport_r. + */ +/*#define HAS_GETSERVBYPORT_R /**/ +#define GETSERVBYPORT_R_PROTO 0 /**/ + +/* HAS_GETSERVENT_R: + * This symbol, if defined, indicates that the getservent_r routine + * is available to getservent re-entrantly. + */ +/* GETSERVENT_R_PROTO: + * This symbol encodes the prototype of getservent_r. + */ +/*#define HAS_GETSERVENT_R /**/ +#define GETSERVENT_R_PROTO 0 /**/ + /* HAS_PTHREAD_ATFORK: * This symbol, if defined, indicates that the pthread_atfork routine * is available setup fork handlers. */ /*#define HAS_PTHREAD_ATFORK /**/ +/* HAS_READDIR64_R: + * This symbol, if defined, indicates that the readdir64_r routine + * is available to readdir64 re-entrantly. + */ +/* READDIR64_R_PROTO: + * This symbol encodes the prototype of readdir64_r. + */ +/*#define HAS_READDIR64_R /**/ +#define READDIR64_R_PROTO 0 /**/ + +/* HAS_SETHOSTENT_R: + * This symbol, if defined, indicates that the sethostent_r routine + * is available to sethostent re-entrantly. + */ +/* SETHOSTENT_R_PROTO: + * This symbol encodes the prototype of sethostent_r. + */ +/*#define HAS_SETHOSTENT_R /**/ +#define SETHOSTENT_R_PROTO 0 /**/ + +/* HAS_SETLOCALE_R: + * This symbol, if defined, indicates that the setlocale_r routine + * is available to setlocale re-entrantly. + */ +/* SETLOCALE_R_PROTO: + * This symbol encodes the prototype of setlocale_r. + */ +/*#define HAS_SETLOCALE_R /**/ +#define SETLOCALE_R_PROTO 0 /**/ + +/* HAS_SETNETENT_R: + * This symbol, if defined, indicates that the setnetent_r routine + * is available to setnetent re-entrantly. + */ +/* SETNETENT_R_PROTO: + * This symbol encodes the prototype of setnetent_r. + */ +/*#define HAS_SETNETENT_R /**/ +#define SETNETENT_R_PROTO 0 /**/ + +/* HAS_SETPROTOENT_R: + * This symbol, if defined, indicates that the setprotoent_r routine + * is available to setprotoent re-entrantly. + */ +/* SETPROTOENT_R_PROTO: + * This symbol encodes the prototype of setprotoent_r. + */ +/*#define HAS_SETPROTOENT_R /**/ +#define SETPROTOENT_R_PROTO 0 /**/ + +/* HAS_SETSERVENT_R: + * This symbol, if defined, indicates that the setservent_r routine + * is available to setservent re-entrantly. + */ +/* SETSERVENT_R_PROTO: + * This symbol encodes the prototype of setservent_r. + */ +/*#define HAS_SETSERVENT_R /**/ +#define SETSERVENT_R_PROTO 0 /**/ + +/* HAS_TTYNAME_R: + * This symbol, if defined, indicates that the ttyname_r routine + * is available to ttyname re-entrantly. + */ +/* TTYNAME_R_PROTO: + * This symbol encodes the prototype of ttyname_r. + */ +/*#define HAS_TTYNAME_R /**/ +#define TTYNAME_R_PROTO 0 /**/ + #endif diff --git a/vos/config.ga.def b/vos/config.ga.def index 7bef8fb..eb1c703 100644 --- a/vos/config.ga.def +++ b/vos/config.ga.def @@ -1,20 +1,25 @@ +$CONFIG_SH='config.sh' +$Id='$Id' $alignbytes='8' $aphostname='' $archlib='' $archlibexp='' $archname='' +$asctime_r_proto='0' $bin='/system/gnu_library/bin' $binexp='/system/gnu_library/bin' $byteorder='4321' $castflags='0' $cf_by='Paul.Green@stratus.com' $cf_time='2002-02-15 20:16 UCT' -$CONFIG_SH='config.sh' $cpp_stuff='42' $cpplast='-' $cppminus='-' $cpprun='cc -E -' $cppstdin='cc -E' +$crypt_r_proto='0' +$ctermid_r_proto='0' +$ctime_r_proto='0' $d_Gconvert='sprintf((b),"%.*g",(n),(x))' $d_PRIeldbl='define' $d_PRIfldbl='define' @@ -25,6 +30,7 @@ $d_access='define' $d_accessx='undef' $d_alarm='define' $d_archlib='undef' +$d_asctime_r='undef' $d_atolf='undef' $d_atoll='undef' $d_attribut='undef' @@ -44,7 +50,10 @@ $d_class='undef' $d_cmsghdr_s='undef' $d_const='define' $d_crypt='undef' +$d_crypt_r='undef' $d_csh='define' +$d_ctermid_r='undef' +$d_ctime_r='undef' $d_cuserid='undef' $d_dbl_dig='define' $d_dbminitproto='undef' @@ -54,15 +63,22 @@ $d_dirnamlen='undef' $d_dlerror='undef' $d_dlsymun='undef' $d_dosuid='undef' +$d_drand48_r='undef' $d_drand48proto='undef' $d_dup2='define' $d_eaccess='undef' $d_endgrent='undef' +$d_endgrent_r='undef' $d_endhent='define' +$d_endhostent_r='undef' $d_endnent='define' +$d_endnetent_r='undef' $d_endpent='define' +$d_endprotoent_r='undef' $d_endpwent='undef' +$d_endpwent_r='undef' $d_endsent='define' +$d_endservent_r='undef' $d_eofnblk='define' $d_fchdir='undef' $d_fchmod='define' @@ -95,19 +111,29 @@ $d_getcwd='define' $d_getespwnam='undef' $d_getfsstat='undef' $d_getgrent='undef' +$d_getgrent_r='undef' +$d_getgrgid_r='undef' +$d_getgrnam_r='undef' $d_getgrps='undef' $d_gethbyaddr='define' $d_gethbyname='define' $d_gethent='define' $d_gethname='define' +$d_gethostbyaddr_r='undef' +$d_gethostbyname_r='undef' +$d_gethostent_r='undef' $d_gethostprotos='define' $d_getitimer='undef' $d_getlogin='define' +$d_getlogin_r='undef' $d_getmnt='undef' $d_getmntent='undef' $d_getnbyaddr='define' $d_getnbyname='define' $d_getnent='define' +$d_getnetbyaddr_r='undef' +$d_getnetbyname_r='undef' +$d_getnetent_r='undef' $d_getnetprotos='define' $d_getpagsz='undef' $d_getpbyname='define' @@ -118,15 +144,26 @@ $d_getpgrp2='undef' $d_getpgrp='define' $d_getppid='define' $d_getprior='undef' +$d_getprotobyname_r='undef' +$d_getprotobynumber_r='undef' +$d_getprotoent_r='undef' $d_getprotoprotos='define' $d_getprpwnam='undef' $d_getpwent='undef' +$d_getpwent_r='undef' +$d_getpwnam_r='undef' +$d_getpwuid_r='undef' $d_getsbyname='define' $d_getsbyport='define' $d_getsent='define' +$d_getservbyname_r='undef' +$d_getservbyport_r='undef' +$d_getservent_r='undef' $d_getservprotos='define' $d_getspnam='undef' +$d_getspnam_r='undef' $d_gettimeod='undef' +$d_gmtime_r='undef' $d_gnulibc='undef' $d_grpasswd='undef' $d_hasmntopt='undef' @@ -143,6 +180,7 @@ $d_killpg='undef' $d_lchown='undef' $d_ldbl_dig='define' $d_link='undef' +$d_localtime_r='undef' $d_locconv='define' $d_lockf='define' $d_longdbl='define' @@ -204,7 +242,10 @@ $d_pwgecos='undef' $d_pwpasswd='undef' $d_pwquota='undef' $d_quad='undef' +$d_random_r='undef' +$d_readdir64_r='undef' $d_readdir='define' +$d_readdir_r='undef' $d_readlink='define' $d_readv='undef' $d_recvmsg='undef' @@ -226,19 +267,25 @@ $d_sendmsg='undef' $d_setegid='define' $d_seteuid='define' $d_setgrent='undef' +$d_setgrent_r='undef' $d_setgrps='undef' $d_sethent='define' +$d_sethostent_r='undef' $d_setitimer='undef' $d_setlinebuf='define' $d_setlocale='define' +$d_setlocale_r='undef' $d_setnent='define' +$d_setnetent_r='undef' $d_setpent='define' $d_setpgid='define' $d_setpgrp2='undef' $d_setpgrp='undef' $d_setprior='undef' $d_setproctitle='undef' +$d_setprotoent_r='undef' $d_setpwent='undef' +$d_setpwent_r='undef' $d_setregid='undef' $d_setresgid='undef' $d_setresuid='undef' @@ -246,6 +293,7 @@ $d_setreuid='undef' $d_setrgid='undef' $d_setruid='undef' $d_setsent='define' +$d_setservent_r='undef' $d_setsid='define' $d_setvbuf='define' $d_sfio='undef' @@ -260,6 +308,8 @@ $d_socket='define' $d_sockpair='undef' $d_socks5_init='undef' $d_sqrtl='undef' +$d_srand48_r='undef' +$d_srandom_r='undef' $d_sresgproto='undef' $d_sresuproto='undef' $d_statblks='undef' @@ -277,6 +327,7 @@ $d_strcoll='define' $d_strctcpy='define' $d_strerrm='strerror(e)' $d_strerror='define' +$d_strerror_r='undef' $d_strftime='define' $d_strtod='define' $d_strtol='define' @@ -299,7 +350,11 @@ $d_tcsetpgrp='define' $d_telldir='undef' $d_telldirproto='undef' $d_times='define' +$d_tm_tm_gmtoff='undef' +$d_tm_tm_zone='undef' +$d_tmpnam_r='undef' $d_truncate='undef' +$d_ttyname_r='undef' $d_tzname='define' $d_u32align='define' $d_ualarm='undef' @@ -330,18 +385,46 @@ $defvoidused='15' $direntrytype='struct dirent' $doublesize='8' $drand01='rand()/(RAND_MAX+1)' +$drand48_r_proto='0' $eagain='EAGAIN' $ebcdic='undef' -$fflushall='undef' +$endgrent_r_proto='0' +$endhostent_r_proto='0' +$endnetent_r_proto='0' +$endprotoent_r_proto='0' +$endpwent_r_proto='0' +$endservent_r_proto='0' $fflushNULL='define' +$fflushall='undef' $fpostype='fpos_t' $freetype='void' $full_csh='/system/gnu_library/bin/bash.pm' $full_sed='/system/gnu_library/bin/sed.pm' +$getgrent_r_proto='0' +$getgrgid_r_proto='0' +$getgrnam_r_proto='0' +$gethostbyaddr_r_proto='0' +$gethostbyname_r_proto='0' +$gethostent_r_proto='0' +$getlogin_r_proto='0' +$getnetbyaddr_r_proto='0' +$getnetbyname_r_proto='0' +$getnetent_r_proto='0' +$getprotobyname_r_proto='0' +$getprotobynumber_r_proto='0' +$getprotoent_r_proto='0' +$getpwent_r_proto='0' +$getpwnam_r_proto='0' +$getpwuid_r_proto='0' +$getservbyname_r_proto='0' +$getservbyport_r_proto='0' +$getservent_r_proto='0' +$getspnam_r_proto='0' $gidformat='"d"' -$gidsize='4' $gidsign='-1' +$gidsize='4' $gidtype='gid_t' +$gmtime_r_proto='0' $groupstype='gid_t' $i16size='2' $i16type='short' @@ -352,6 +435,7 @@ $i64type='_error_' $i8size='1' $i8type='char' $i_arpainet='define' +$i_crypt='undef' $i_dbm='undef' $i_dirent='define' $i_dlfcn='undef' @@ -423,13 +507,13 @@ $i_utime='define' $i_values='define' $i_varargs='undef' $i_vfork='undef' -$Id='$Id' $inc_version_list_init='0' $installusrbinperl='undef' $intsize='4' $ivdformat='"d"' $ivsize='4' $ivtype='int' +$localtime_r_proto='0' $longdblsize='8' $longlongsize='_error_' $longsize='4' @@ -466,12 +550,26 @@ $ptrsize='4' $quadkind='_error_' $quadtype='_error_' $randbits='15' +$random_r_proto='0' $randseedtype='unsigned int' $rd_nodata='-1' +$readdir64_r_proto='0' +$readdir_r_proto='0' +$sPRIeldbl='"Le"' +$sPRIfldbl='"Lf"' +$sPRIgldbl='"Lg"' +$sSCNfldbl='"Lf"' $sched_yield='' $seedfunc='srand' $selectminbits='1' $selecttype='fd_set *' +$setgrent_r_proto='0' +$sethostent_r_proto='0' +$setlocale_r_proto='0' +$setnetent_r_proto='0' +$setprotoent_r_proto='0' +$setpwent_r_proto='0' +$setservent_r_proto='0' $sh='/system/gnu_library/bin/bash.pm' $shmattype='void *' $shortsize='2' @@ -482,16 +580,14 @@ $signal_t='void' $sitearch='/system/ported/lib/perl5/site_perl/5.8.0/hppa1.1' $sitearchexp='/system/ported/lib/perl5/site_perl/5.8.0/hppa1.1' $sitelib='/system/ported/lib/perl5/site_perl/5.8.0' -$sitelibexp='/system/ported/lib/perl5/site_perl/5.8.0' $sitelib_stem='/system/ported/lib/perl5/site_perl' +$sitelibexp='/system/ported/lib/perl5/site_perl/5.8.0' $sizesize='4' $sizetype='size_t' $socksizetype='int' -$sPRIeldbl='"Le"' -$sPRIfldbl='"Lf"' -$sPRIgldbl='"Lg"' +$srand48_r_proto='0' +$srandom_r_proto='0' $src='/vos_ftp_site/pub/vos/posix/(alpha|ga)/perl' -$sSCNfldbl='"Lf"' $ssizetype='ssize_t' $startperl='!perl.pm' $stdchar='unsigned char' @@ -500,8 +596,11 @@ $stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' $stdio_cnt='((fp)->_cnt)' $stdio_ptr='((fp)->_ptr)' $stdio_stream_array='_iob' +$strerror_r_proto='0' $targetarch='undef' $timetype='time_t' +$tmpnam_r_proto='0' +$ttyname_r_proto='0' $u16size='2' $u16type='unsigned short' $u32size='4' @@ -511,8 +610,8 @@ $u64type='_error_' $u8size='1' $u8type='unsigned char' $uidformat='"d"' -$uidsize='4' $uidsign='-1' +$uidsize='4' $uidtype='uid_t' $undef='$undef' $uquadtype='_error_' @@ -529,12 +628,12 @@ $usemultiplicity='undef' $useperlio='undef' $usereentrant='undef' $usesocks='undef' +$uvXUformat='"X"' $uvoformat='"o"' $uvsize='4' $uvtype='unsigned int' $uvuformat='"u"' $uvxformat='"x"' -$uvXUformat='"X"' $vendorarch='' $vendorarchexp='' $vendorlib_stem='' diff --git a/vos/config.ga.h b/vos/config.ga.h index 876d5eb..a333651 100644 --- a/vos/config.ga.h +++ b/vos/config.ga.h @@ -1132,6 +1132,16 @@ */ #define HAS_ACCESS /**/ +/* HAS_ASCTIME_R: + * This symbol, if defined, indicates that the asctime_r routine + * is available to asctime re-entrantly. + */ +/* ASCTIME_R_PROTO: + * This symbol encodes the prototype of asctime_r. + */ +/*#define HAS_ASCTIME_R /**/ +#define ASCTIME_R_PROTO 0 /**/ + /* CASTI32: * This symbol is defined if the C compiler can cast negative * or large floating point numbers to 32-bit ints. @@ -1183,6 +1193,16 @@ */ /*#define HAS_STRUCT_CMSGHDR /**/ +/* HAS_CRYPT_R: + * This symbol, if defined, indicates that the crypt_r routine + * is available to crypt re-entrantly. + */ +/* CRYPT_R_PROTO: + * This symbol encodes the prototype of crypt_r. + */ +/*#define HAS_CRYPT_R /**/ +#define CRYPT_R_PROTO 0 /**/ + /* HAS_CSH: * This symbol, if defined, indicates that the C-shell exists. */ @@ -1194,6 +1214,16 @@ #define CSH "/system/gnu_library/bin/bash.pm" /**/ #endif +/* HAS_CTIME_R: + * This symbol, if defined, indicates that the ctime_r routine + * is available to ctime re-entrantly. + */ +/* CTIME_R_PROTO: + * This symbol encodes the prototype of ctime_r. + */ +/*#define HAS_CTIME_R /**/ +#define CTIME_R_PROTO 0 /**/ + /* DLSYM_NEEDS_UNDERSCORE: * This symbol, if defined, indicates that we need to prepend an * underscore to the symbol name before calling dlsym(). This only @@ -1202,6 +1232,16 @@ */ /*#define DLSYM_NEEDS_UNDERSCORE /**/ +/* HAS_DRAND48_R: + * This symbol, if defined, indicates that the drand48_r routine + * is available to drand48 re-entrantly. + */ +/* DRAND48_R_PROTO: + * This symbol encodes the prototype of drand48_r. + */ +/*#define HAS_DRAND48_R /**/ +#define DRAND48_R_PROTO 0 /**/ + /* HAS_DRAND48_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the drand48() function. Otherwise, it is up @@ -1216,6 +1256,16 @@ */ /*#define HAS_ENDGRENT /**/ +/* HAS_ENDGRENT_R: + * This symbol, if defined, indicates that the endgrent_r routine + * is available to endgrent re-entrantly. + */ +/* ENDGRENT_R_PROTO: + * This symbol encodes the prototype of endgrent_r. + */ +/*#define HAS_ENDGRENT_R /**/ +#define ENDGRENT_R_PROTO 0 /**/ + /* HAS_ENDHOSTENT: * This symbol, if defined, indicates that the endhostent() routine is * available to close whatever was being used for host queries. @@ -1240,6 +1290,16 @@ */ /*#define HAS_ENDPWENT /**/ +/* HAS_ENDPWENT_R: + * This symbol, if defined, indicates that the endpwent_r routine + * is available to endpwent re-entrantly. + */ +/* ENDPWENT_R_PROTO: + * This symbol encodes the prototype of endpwent_r. + */ +/*#define HAS_ENDPWENT_R /**/ +#define ENDPWENT_R_PROTO 0 /**/ + /* HAS_ENDSERVENT: * This symbol, if defined, indicates that the endservent() routine is * available to close whatever was being used for service queries. @@ -1386,7 +1446,7 @@ * a macro using sprintf("%g") is used. Arguments for the Gconvert * macro are: value, number of digits, whether trailing zeros should * be retained, and the output buffer. - * Possible values are: + * The usual values are: * d_Gconvert='gconvert((x),(n),(t),(b))' * d_Gconvert='gcvt((x),(n),(b))' * d_Gconvert='sprintf((b),"%.*g",(n),(x))' @@ -1418,6 +1478,36 @@ */ /*#define HAS_GETGRENT /**/ +/* HAS_GETGRENT_R: + * This symbol, if defined, indicates that the getgrent_r routine + * is available to getgrent re-entrantly. + */ +/* GETGRENT_R_PROTO: + * This symbol encodes the prototype of getgrent_r. + */ +/*#define HAS_GETGRENT_R /**/ +#define GETGRENT_R_PROTO 0 /**/ + +/* HAS_GETGRGID_R: + * This symbol, if defined, indicates that the getgrgid_r routine + * is available to getgrgid re-entrantly. + */ +/* GETGRGID_R_PROTO: + * This symbol encodes the prototype of getgrgid_r. + */ +/*#define HAS_GETGRGID_R /**/ +#define GETGRGID_R_PROTO 0 /**/ + +/* HAS_GETGRNAM_R: + * This symbol, if defined, indicates that the getgrnam_r routine + * is available to getgrnam re-entrantly. + */ +/* GETGRNAM_R_PROTO: + * This symbol encodes the prototype of getgrnam_r. + */ +/*#define HAS_GETGRNAM_R /**/ +#define GETGRNAM_R_PROTO 0 /**/ + /* HAS_GETHOSTBYADDR: * This symbol, if defined, indicates that the gethostbyaddr() routine is * available to look up hosts by their IP addresses. @@ -1479,6 +1569,16 @@ */ /*#define HAS_GETITIMER /**/ +/* HAS_GETLOGIN_R: + * This symbol, if defined, indicates that the getlogin_r routine + * is available to getlogin re-entrantly. + */ +/* GETLOGIN_R_PROTO: + * This symbol encodes the prototype of getlogin_r. + */ +/*#define HAS_GETLOGIN_R /**/ +#define GETLOGIN_R_PROTO 0 /**/ + /* HAS_GETMNT: * This symbol, if defined, indicates that the getmnt routine is * available to get filesystem mount info by filename. @@ -1573,6 +1673,36 @@ */ /*#define HAS_GETPWENT /**/ +/* HAS_GETPWENT_R: + * This symbol, if defined, indicates that the getpwent_r routine + * is available to getpwent re-entrantly. + */ +/* GETPWENT_R_PROTO: + * This symbol encodes the prototype of getpwent_r. + */ +/*#define HAS_GETPWENT_R /**/ +#define GETPWENT_R_PROTO 0 /**/ + +/* HAS_GETPWNAM_R: + * This symbol, if defined, indicates that the getpwnam_r routine + * is available to getpwnam re-entrantly. + */ +/* GETPWNAM_R_PROTO: + * This symbol encodes the prototype of getpwnam_r. + */ +/*#define HAS_GETPWNAM_R /**/ +#define GETPWNAM_R_PROTO 0 /**/ + +/* HAS_GETPWUID_R: + * This symbol, if defined, indicates that the getpwuid_r routine + * is available to getpwuid re-entrantly. + */ +/* GETPWUID_R_PROTO: + * This symbol encodes the prototype of getpwuid_r. + */ +/*#define HAS_GETPWUID_R /**/ +#define GETPWUID_R_PROTO 0 /**/ + /* HAS_GETSERVENT: * This symbol, if defined, indicates that the getservent() routine is * available to look up network services in some data base or another. @@ -1593,6 +1723,16 @@ */ /*#define HAS_GETSPNAM /**/ +/* HAS_GETSPNAM_R: + * This symbol, if defined, indicates that the getspnam_r routine + * is available to getspnam re-entrantly. + */ +/* GETSPNAM_R_PROTO: + * This symbol encodes the prototype of getspnam_r. + */ +/*#define HAS_GETSPNAM_R /**/ +#define GETSPNAM_R_PROTO 0 /**/ + /* HAS_GETSERVBYNAME: * This symbol, if defined, indicates that the getservbyname() * routine is available to look up services by their name. @@ -1604,6 +1744,16 @@ #define HAS_GETSERVBYNAME /**/ #define HAS_GETSERVBYPORT /**/ +/* HAS_GMTIME_R: + * This symbol, if defined, indicates that the gmtime_r routine + * is available to gmtime re-entrantly. + */ +/* GMTIME_R_PROTO: + * This symbol encodes the prototype of gmtime_r. + */ +/*#define HAS_GMTIME_R /**/ +#define GMTIME_R_PROTO 0 /**/ + /* HAS_GNULIBC: * This symbol, if defined, indicates to the C program that * the GNU C library is being used. @@ -1695,6 +1845,16 @@ */ #define HAS_LDBL_DIG /* */ +/* HAS_LOCALTIME_R: + * This symbol, if defined, indicates that the localtime_r routine + * is available to localtime re-entrantly. + */ +/* LOCALTIME_R_PROTO: + * This symbol encodes the prototype of localtime_r. + */ +/*#define HAS_LOCALTIME_R /**/ +#define LOCALTIME_R_PROTO 0 /**/ + /* HAS_LONG_DOUBLE: * This symbol will be defined if the C compiler supports long * doubles. @@ -1847,6 +2007,26 @@ #define SCHED_YIELD /**/ /*#define HAS_SCHED_YIELD /**/ +/* HAS_RANDOM_R: + * This symbol, if defined, indicates that the random_r routine + * is available to random re-entrantly. + */ +/* RANDOM_R_PROTO: + * This symbol encodes the prototype of random_r. + */ +/*#define HAS_RANDOM_R /**/ +#define RANDOM_R_PROTO 0 /**/ + +/* HAS_READDIR_R: + * This symbol, if defined, indicates that the readdir_r routine + * is available to readdir re-entrantly. + */ +/* READDIR_R_PROTO: + * This symbol encodes the prototype of readdir_r. + */ +/*#define HAS_READDIR_R /**/ +#define READDIR_R_PROTO 0 /**/ + /* HAS_READV: * This symbol, if defined, indicates that the readv routine is * available to do gather reads. You will also need @@ -1910,6 +2090,16 @@ */ /*#define HAS_SETGRENT /**/ +/* HAS_SETGRENT_R: + * This symbol, if defined, indicates that the setgrent_r routine + * is available to setgrent re-entrantly. + */ +/* SETGRENT_R_PROTO: + * This symbol encodes the prototype of setgrent_r. + */ +/*#define HAS_SETGRENT_R /**/ +#define SETGRENT_R_PROTO 0 /**/ + /* HAS_SETGROUPS: * This symbol, if defined, indicates that the setgroups() routine is * available to set the list of process groups. If unavailable, multiple @@ -1965,6 +2155,16 @@ */ /*#define HAS_SETPWENT /**/ +/* HAS_SETPWENT_R: + * This symbol, if defined, indicates that the setpwent_r routine + * is available to setpwent re-entrantly. + */ +/* SETPWENT_R_PROTO: + * This symbol encodes the prototype of setpwent_r. + */ +/*#define HAS_SETPWENT_R /**/ +#define SETPWENT_R_PROTO 0 /**/ + /* HAS_SETSERVENT: * This symbol, if defined, indicates that the setservent() routine is * available. @@ -2086,6 +2286,26 @@ */ /*#define HAS_SQRTL /**/ +/* HAS_SRAND48_R: + * This symbol, if defined, indicates that the srand48_r routine + * is available to srand48 re-entrantly. + */ +/* SRAND48_R_PROTO: + * This symbol encodes the prototype of srand48_r. + */ +/*#define HAS_SRAND48_R /**/ +#define SRAND48_R_PROTO 0 /**/ + +/* HAS_SRANDOM_R: + * This symbol, if defined, indicates that the srandom_r routine + * is available to srandom re-entrantly. + */ +/* SRANDOM_R_PROTO: + * This symbol encodes the prototype of srandom_r. + */ +/*#define HAS_SRANDOM_R /**/ +#define SRANDOM_R_PROTO 0 /**/ + /* USE_STAT_BLOCKS: * This symbol is defined if this system has a stat structure declaring * st_blksize and st_blocks. @@ -2206,6 +2426,16 @@ #define HAS_SYS_ERRLIST /**/ #define Strerror(e) strerror(e) +/* HAS_STRERROR_R: + * This symbol, if defined, indicates that the strerror_r routine + * is available to strerror re-entrantly. + */ +/* STRERROR_R_PROTO: + * This symbol encodes the prototype of strerror_r. + */ +/*#define HAS_STRERROR_R /**/ +#define STRERROR_R_PROTO 0 /**/ + /* HAS_STRTOLD: * This symbol, if defined, indicates that the strtold routine is * available to convert strings to long doubles. @@ -2264,6 +2494,16 @@ */ #define HAS_TIMES /**/ +/* HAS_TMPNAM_R: + * This symbol, if defined, indicates that the tmpnam_r routine + * is available to tmpnam re-entrantly. + */ +/* TMPNAM_R_PROTO: + * This symbol encodes the prototype of tmpnam_r. + */ +/*#define HAS_TMPNAM_R /**/ +#define TMPNAM_R_PROTO 0 /**/ + /* HAS_UALARM: * This symbol, if defined, indicates that the ualarm routine is * available to do alarms with microsecond granularity. @@ -2645,9 +2885,14 @@ * This symbol, if defined, indicates to the C program that it should * include with KERNEL defined. */ +/* HAS_TM_TM_ZONE: + * This symbol, if defined, indicates to the C program that + * the struct tm has a tm_zone field. + */ /*#define I_TIME /**/ #define I_SYS_TIME /**/ /*#define I_SYS_TIME_KERNEL /**/ +/*#define HAS_TM_TM_ZONE /**/ /* I_USTAT: * This symbol, if defined, indicates that exists and @@ -3579,6 +3824,12 @@ */ /*#define HAS_USLEEP_PROTO /**/ +/* I_CRYPT: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_CRYPT /**/ + /* I_FP: * This symbol, if defined, indicates that exists and * should be included. @@ -3591,10 +3842,250 @@ */ /*#define I_LANGINFO /**/ +/* HAS_CTERMID_R: + * This symbol, if defined, indicates that the ctermid_r routine + * is available to ctermid re-entrantly. + */ +/* CTERMID_R_PROTO: + * This symbol encodes the prototype of ctermid_r. + */ +/*#define HAS_CTERMID_R /**/ +#define CTERMID_R_PROTO 0 /**/ + +/* HAS_ENDHOSTENT_R: + * This symbol, if defined, indicates that the endhostent_r routine + * is available to endhostent re-entrantly. + */ +/* ENDHOSTENT_R_PROTO: + * This symbol encodes the prototype of endhostent_r. + */ +/*#define HAS_ENDHOSTENT_R /**/ +#define ENDHOSTENT_R_PROTO 0 /**/ + +/* HAS_ENDNETENT_R: + * This symbol, if defined, indicates that the endnetent_r routine + * is available to endnetent re-entrantly. + */ +/* ENDNETENT_R_PROTO: + * This symbol encodes the prototype of endnetent_r. + */ +/*#define HAS_ENDNETENT_R /**/ +#define ENDNETENT_R_PROTO 0 /**/ + +/* HAS_ENDPROTOENT_R: + * This symbol, if defined, indicates that the endprotoent_r routine + * is available to endprotoent re-entrantly. + */ +/* ENDPROTOENT_R_PROTO: + * This symbol encodes the prototype of endprotoent_r. + */ +/*#define HAS_ENDPROTOENT_R /**/ +#define ENDPROTOENT_R_PROTO 0 /**/ + +/* HAS_ENDSERVENT_R: + * This symbol, if defined, indicates that the endservent_r routine + * is available to endservent re-entrantly. + */ +/* ENDSERVENT_R_PROTO: + * This symbol encodes the prototype of endservent_r. + */ +/*#define HAS_ENDSERVENT_R /**/ +#define ENDSERVENT_R_PROTO 0 /**/ + +/* HAS_GETHOSTBYADDR_R: + * This symbol, if defined, indicates that the gethostbyaddr_r routine + * is available to gethostbyaddr re-entrantly. + */ +/* GETHOSTBYADDR_R_PROTO: + * This symbol encodes the prototype of gethostbyaddr_r. + */ +/*#define HAS_GETHOSTBYADDR_R /**/ +#define GETHOSTBYADDR_R_PROTO 0 /**/ + +/* HAS_GETHOSTBYNAME_R: + * This symbol, if defined, indicates that the gethostbyname_r routine + * is available to gethostbyname re-entrantly. + */ +/* GETHOSTBYNAME_R_PROTO: + * This symbol encodes the prototype of gethostbyname_r. + */ +/*#define HAS_GETHOSTBYNAME_R /**/ +#define GETHOSTBYNAME_R_PROTO 0 /**/ + +/* HAS_GETHOSTENT_R: + * This symbol, if defined, indicates that the gethostent_r routine + * is available to gethostent re-entrantly. + */ +/* GETHOSTENT_R_PROTO: + * This symbol encodes the prototype of gethostent_r. + */ +/*#define HAS_GETHOSTENT_R /**/ +#define GETHOSTENT_R_PROTO 0 /**/ + +/* HAS_GETNETBYADDR_R: + * This symbol, if defined, indicates that the getnetbyaddr_r routine + * is available to getnetbyaddr re-entrantly. + */ +/* GETNETBYADDR_R_PROTO: + * This symbol encodes the prototype of getnetbyaddr_r. + */ +/*#define HAS_GETNETBYADDR_R /**/ +#define GETNETBYADDR_R_PROTO 0 /**/ + +/* HAS_GETNETBYNAME_R: + * This symbol, if defined, indicates that the getnetbyname_r routine + * is available to getnetbyname re-entrantly. + */ +/* GETNETBYNAME_R_PROTO: + * This symbol encodes the prototype of getnetbyname_r. + */ +/*#define HAS_GETNETBYNAME_R /**/ +#define GETNETBYNAME_R_PROTO 0 /**/ + +/* HAS_GETNETENT_R: + * This symbol, if defined, indicates that the getnetent_r routine + * is available to getnetent re-entrantly. + */ +/* GETNETENT_R_PROTO: + * This symbol encodes the prototype of getnetent_r. + */ +/*#define HAS_GETNETENT_R /**/ +#define GETNETENT_R_PROTO 0 /**/ + +/* HAS_GETPROTOBYNAME_R: + * This symbol, if defined, indicates that the getprotobyname_r routine + * is available to getprotobyname re-entrantly. + */ +/* GETPROTOBYNAME_R_PROTO: + * This symbol encodes the prototype of getprotobyname_r. + */ +/*#define HAS_GETPROTOBYNAME_R /**/ +#define GETPROTOBYNAME_R_PROTO 0 /**/ + +/* HAS_GETPROTOBYNUMBER_R: + * This symbol, if defined, indicates that the getprotobynumber_r routine + * is available to getprotobynumber re-entrantly. + */ +/* GETPROTOBYNUMBER_R_PROTO: + * This symbol encodes the prototype of getprotobynumber_r. + */ +/*#define HAS_GETPROTOBYNUMBER_R /**/ +#define GETPROTOBYNUMBER_R_PROTO 0 /**/ + +/* HAS_GETPROTOENT_R: + * This symbol, if defined, indicates that the getprotoent_r routine + * is available to getprotoent re-entrantly. + */ +/* GETPROTOENT_R_PROTO: + * This symbol encodes the prototype of getprotoent_r. + */ +/*#define HAS_GETPROTOENT_R /**/ +#define GETPROTOENT_R_PROTO 0 /**/ + +/* HAS_GETSERVBYNAME_R: + * This symbol, if defined, indicates that the getservbyname_r routine + * is available to getservbyname re-entrantly. + */ +/* GETSERVBYNAME_R_PROTO: + * This symbol encodes the prototype of getservbyname_r. + */ +/*#define HAS_GETSERVBYNAME_R /**/ +#define GETSERVBYNAME_R_PROTO 0 /**/ + +/* HAS_GETSERVBYPORT_R: + * This symbol, if defined, indicates that the getservbyport_r routine + * is available to getservbyport re-entrantly. + */ +/* GETSERVBYPORT_R_PROTO: + * This symbol encodes the prototype of getservbyport_r. + */ +/*#define HAS_GETSERVBYPORT_R /**/ +#define GETSERVBYPORT_R_PROTO 0 /**/ + +/* HAS_GETSERVENT_R: + * This symbol, if defined, indicates that the getservent_r routine + * is available to getservent re-entrantly. + */ +/* GETSERVENT_R_PROTO: + * This symbol encodes the prototype of getservent_r. + */ +/*#define HAS_GETSERVENT_R /**/ +#define GETSERVENT_R_PROTO 0 /**/ + /* HAS_PTHREAD_ATFORK: * This symbol, if defined, indicates that the pthread_atfork routine * is available setup fork handlers. */ /*#define HAS_PTHREAD_ATFORK /**/ +/* HAS_READDIR64_R: + * This symbol, if defined, indicates that the readdir64_r routine + * is available to readdir64 re-entrantly. + */ +/* READDIR64_R_PROTO: + * This symbol encodes the prototype of readdir64_r. + */ +/*#define HAS_READDIR64_R /**/ +#define READDIR64_R_PROTO 0 /**/ + +/* HAS_SETHOSTENT_R: + * This symbol, if defined, indicates that the sethostent_r routine + * is available to sethostent re-entrantly. + */ +/* SETHOSTENT_R_PROTO: + * This symbol encodes the prototype of sethostent_r. + */ +/*#define HAS_SETHOSTENT_R /**/ +#define SETHOSTENT_R_PROTO 0 /**/ + +/* HAS_SETLOCALE_R: + * This symbol, if defined, indicates that the setlocale_r routine + * is available to setlocale re-entrantly. + */ +/* SETLOCALE_R_PROTO: + * This symbol encodes the prototype of setlocale_r. + */ +/*#define HAS_SETLOCALE_R /**/ +#define SETLOCALE_R_PROTO 0 /**/ + +/* HAS_SETNETENT_R: + * This symbol, if defined, indicates that the setnetent_r routine + * is available to setnetent re-entrantly. + */ +/* SETNETENT_R_PROTO: + * This symbol encodes the prototype of setnetent_r. + */ +/*#define HAS_SETNETENT_R /**/ +#define SETNETENT_R_PROTO 0 /**/ + +/* HAS_SETPROTOENT_R: + * This symbol, if defined, indicates that the setprotoent_r routine + * is available to setprotoent re-entrantly. + */ +/* SETPROTOENT_R_PROTO: + * This symbol encodes the prototype of setprotoent_r. + */ +/*#define HAS_SETPROTOENT_R /**/ +#define SETPROTOENT_R_PROTO 0 /**/ + +/* HAS_SETSERVENT_R: + * This symbol, if defined, indicates that the setservent_r routine + * is available to setservent re-entrantly. + */ +/* SETSERVENT_R_PROTO: + * This symbol encodes the prototype of setservent_r. + */ +/*#define HAS_SETSERVENT_R /**/ +#define SETSERVENT_R_PROTO 0 /**/ + +/* HAS_TTYNAME_R: + * This symbol, if defined, indicates that the ttyname_r routine + * is available to ttyname re-entrantly. + */ +/* TTYNAME_R_PROTO: + * This symbol encodes the prototype of ttyname_r. + */ +/*#define HAS_TTYNAME_R /**/ +#define TTYNAME_R_PROTO 0 /**/ + #endif diff --git a/vos/perl.bind b/vos/perl.bind index d74965e..6531c05 100644 --- a/vos/perl.bind +++ b/vos/perl.bind @@ -25,7 +25,7 @@ modules: miniperlmain, pp_pack, pp_sort, pp_sys, - regcomp, + reentr, regexec, run, scope, diff --git a/win32/Makefile b/win32/Makefile index b1c7bee..2734229 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -486,6 +486,7 @@ MICROCORE_SRC = \ ..\pp_pack.c \ ..\pp_sort.c \ ..\pp_sys.c \ + ..\reentr.c \ ..\regcomp.c \ ..\regexec.c \ ..\run.c \ diff --git a/win32/config.bc b/win32/config.bc index 4c9bcc7..81dddda 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -29,6 +29,7 @@ archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~' archname64='' archname='MSWin32' archobjs='' +asctime_r_proto='0' awk='awk' baserev='5' bash='' @@ -68,8 +69,11 @@ cppminus='' cpprun='cpp32 -oCON' cppstdin='cppstdin' cppsymbols='' +crypt_r_proto='0' cryptlib='' csh='undef' +ctermid_r_proto='0' +ctime_r_proto='0' d_Gconvert='gcvt((x),(n),(b))' d_PRIEUldbl='undef' d_PRIFUldbl='undef' @@ -88,6 +92,7 @@ d_access='define' d_accessx='undef' d_alarm='define' d_archlib='define' +d_asctime_r='undef' d_atolf='undef' d_atoll='undef' d_attribut='undef' @@ -109,26 +114,36 @@ d_closedir='define' d_cmsghdr_s='undef' d_const='define' d_crypt='undef' +d_crypt_r='undef' d_csh='undef' +d_ctermid_r='undef' +d_ctime_r='undef' d_cuserid='undef' d_dbl_dig='define' d_dbminitproto='undef' d_difftime='define' -d_dirnamlen='define' d_dirfd='undef' +d_dirnamlen='define' d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_drand48_r='undef' d_drand48proto='undef' d_dup2='define' d_eaccess='undef' d_endgrent='undef' +d_endgrent_r='undef' d_endhent='undef' +d_endhostent_r='undef' d_endnent='undef' +d_endnetent_r='undef' d_endpent='undef' +d_endprotoent_r='undef' d_endpwent='undef' +d_endpwent_r='undef' d_endsent='undef' +d_endservent_r='undef' d_eofnblk='define' d_eunice='undef' d_fchdir='undef' @@ -165,19 +180,29 @@ d_getcwd='define' d_getespwnam='undef' d_getfsstat='undef' d_getgrent='undef' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' d_getgrps='undef' d_gethbyaddr='define' d_gethbyname='define' d_gethent='undef' d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' d_gethostprotos='define' d_getitimer='undef' d_getlogin='define' +d_getlogin_r='undef' d_getmnt='undef' d_getmntent='undef' d_getnbyaddr='undef' d_getnbyname='undef' d_getnent='undef' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' d_getnetprotos='undef' d_getpagsz='undef' d_getpbyname='define' @@ -188,15 +213,26 @@ d_getpgrp2='undef' d_getpgrp='undef' d_getppid='undef' d_getprior='undef' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' d_getprotoprotos='define' d_getprpwnam='undef' d_getpwent='undef' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' d_getsbyname='define' d_getsbyport='define' d_getsent='undef' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' d_getservprotos='define' d_getspnam='undef' +d_getspnam_r='undef' d_gettimeod='undef' +d_gmtime_r='undef' d_gnulibc='undef' d_grpasswd='undef' d_hasmntopt='undef' @@ -213,6 +249,7 @@ d_killpg='undef' d_lchown='undef' d_ldbl_dig='define' d_link='define' +d_localtime_r='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' @@ -281,7 +318,10 @@ d_pwpasswd='undef' d_pwquota='undef' d_qgcvt='undef' d_quad='undef' +d_random_r='undef' +d_readdir64_r='undef' d_readdir='define' +d_readdir_r='undef' d_readlink='undef' d_readv='undef' d_recvmsg='undef' @@ -306,18 +346,24 @@ d_sendmsg='undef' d_setegid='undef' d_seteuid='undef' d_setgrent='undef' +d_setgrent_r='undef' d_setgrps='undef' d_sethent='undef' +d_sethostent_r='undef' d_setitimer='undef' d_setlinebuf='undef' d_setlocale='define' +d_setlocale_r='undef' d_setnent='undef' +d_setnetent_r='undef' d_setpent='undef' d_setpgid='undef' d_setpgrp2='undef' d_setpgrp='undef' d_setprior='undef' +d_setprotoent_r='undef' d_setpwent='undef' +d_setpwent_r='undef' d_setregid='undef' d_setresgid='undef' d_setresuid='undef' @@ -325,6 +371,7 @@ d_setreuid='undef' d_setrgid='undef' d_setruid='undef' d_setsent='undef' +d_setservent_r='undef' d_setsid='undef' d_setvbuf='define' d_sfio='undef' @@ -344,6 +391,8 @@ d_socklen_t='undef' d_sockpair='undef' d_socks5_init='undef' d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' d_sresgproto='undef' d_sresuproto='undef' d_statblks='undef' @@ -362,6 +411,7 @@ d_strcoll='define' d_strctcpy='define' d_strerrm='strerror(e)' d_strerror='define' +d_strerror_r='undef' d_strftime='define' d_strtod='define' d_strtol='define' @@ -386,7 +436,11 @@ d_telldir='define' d_telldirproto='define' d_time='define' d_times='define' +d_tm_tm_gmtoff='undef' +d_tm_tm_zone='undef' +d_tmpnam_r='undef' d_truncate='undef' +d_ttyname_r='undef' d_tzname='define' d_u32align='define' d_ualarm='undef' @@ -421,12 +475,19 @@ dlext='dll' dlsrc='dl_win32.xs' doublesize='8' drand01='(rand()/(double)((unsigned)1<