X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=reentr.pl;h=339529fcdb1f083454e2b077129405bbc9624984;hb=b8e3af44af1f06db397d2edf1cfbc2035e8624c1;hp=6b23aa865d0165f40de26d2247feb89eca31d8d1;hpb=0de8cad8cba777e31f98ef8b8ac579070f7c78a6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/reentr.pl b/reentr.pl index 6b23aa8..339529f 100644 --- a/reentr.pl +++ b/reentr.pl @@ -41,7 +41,7 @@ print <) { # Read in the protypes. @@ -188,7 +189,7 @@ while () { # Read in the protypes. print <_${func}_struct.initialized = 0; - /* work around glibc-2.2.5 bug */ - PL_reentrant_buffer->_${func}_struct.current_saltbits = 0; +#if CRYPT_R_PROTO != REENTRANT_PROTO_B_CCD + PL_reentrant_buffer->_${func}_struct_buffer = 0; +#endif +EOF + push @free, <_${func}_struct_buffer); #endif EOF pushssif $endif; @@ -472,6 +478,18 @@ EOF push @struct, <_${genfunc}_data" : $_ eq 'S' ? - ($func =~ /^readdir/ ? + ($func =~ /^readdir\d*$/ ? "PL_reentrant_buffer->_${genfunc}_struct" : - "&PL_reentrant_buffer->_${genfunc}_struct" ) : + $func =~ /^crypt$/ ? + "PL_reentrant_buffer->_${genfunc}_struct_buffer" : + "&PL_reentrant_buffer->_${genfunc}_struct") : $_ eq 'T' && $func eq 'drand48' ? "&PL_reentrant_buffer->_${genfunc}_double" : + $_ =~ /^[ilt]$/ && $func eq 'random' ? + "&PL_reentrant_buffer->_random_retval" : $_ } split '', $b; $w = ", $w" if length $v; } my $call = "${func}_r($v$w)"; - $call = "((errno = $call))" if $r eq 'I'; + $call = "((PL_reentrant_retint = $call))" if $r eq 'I' && $func ne 'random'; push @wrap, < 0 && PL_reentrant_retint == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("$func"$rv) : 0)) +EOF + } else { + push @wrap, <