X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=reentr.pl;h=971fc58094b78a6e3c1d996d5b3268d5cf6f2a6e;hb=a48ec845cbd27881b821dcb9bb80e52ba093c5f2;hp=efa0724504fd55731743407945b8cea3d1305576;hpb=09310450a71918297b6820cce6ca272eb7dad21c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/reentr.pl b/reentr.pl index efa0724..971fc58 100644 --- a/reentr.pl +++ b/reentr.pl @@ -64,6 +64,8 @@ print <) { ?RCS: ?RCS: Generated by the reentr.pl from the Perl 5.8 distribution. ?RCS: -?MAKE:d_${f}_r ${f}_r_proto: Inlibc Protochk i_systypes $prereqh +?MAKE:d_${f}_r ${f}_r_proto: Inlibc Protochk Hasproto i_systypes $prereqh ?MAKE: -pick add \$@ %< ?S:d_${f}_r: ?S: This variable conditionally defines the HAS_${F}_R symbol, @@ -190,7 +192,7 @@ while () { ?H:#\$d_${f}_r HAS_${F}_R /**/ ?H:#define ${F}_R_PROTO \$${f}_r_proto /**/ ?H:. -?T:try hdrs +?T:try hdrs d_${f}_r_proto ?LINT:set d_${f}_r ?LINT:set ${f}_r_proto : see if ${f}_r exists @@ -199,6 +201,14 @@ eval \$inlibc case "\$d_${f}_r" in "\$define") hdrs="\$i_systypes sys/types.h define stdio.h \$i_${h} $h.h" + case "\$d_${f}_r_proto" in + '') d_${f}_r_proto=define + set d_${f}_r_proto ${f}_r \$hdrs + eval \$hasproto ;; + *) ;; + esac + case "\$d_${f}_r_proto" in + define) EOF for my $p (@p) { my ($r, $a) = ($p =~ /^(.)_(.+)/); @@ -223,7 +233,7 @@ EOF case "\$${f}_r_proto" in '') d_${f}_r=undef ${f}_r_proto=0 - echo "Disabling ${f}_r, cannot determine prototype." ;; + echo "Disabling ${f}_r, cannot determine prototype." >&4 ;; * ) case "\$${f}_r_proto" in REENTRANT_PROTO*) ;; *) ${f}_r_proto="REENTRANT_PROTO_\$${f}_r_proto" ;; @@ -231,6 +241,9 @@ EOF echo "Prototype: \$try" ;; esac ;; + *) echo "You have ${f}_r but no prototype, not using it." >&4 ;; + esac + ;; *) ${f}_r_proto=0 ;; esac