diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-01 16:36:52 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-01 16:36:52 +0000 |
commit | 05404ffef2713f4c61b42355c2a2ce1a95343c33 (patch) | |
tree | 0a0655bca7f94bda75941a7220ae39438233ae79 /reentr.pl | |
parent | 12724655a0993f91aa01e1070345dfd5a3d78ed1 (diff) | |
download | perl-05404ffef2713f4c61b42355c2a2ce1a95343c33.tar.gz |
Integrate:
[ 19119]
Address "5.8.1@19053: crypt_r() takes 128K per thread".
p4raw-link: @19119 on //depot/maint-5.8/perl: 5338c2bbd71426ba96ace22615fafeda3d05e36d
p4raw-link: @19053 on //depot/maint-5.8/perl: dab75801826d3b09804fff099d3631e91578dcd1
p4raw-id: //depot/perl@19122
p4raw-integrated: from //depot/maint-5.8/perl@19121 'copy in' reentr.c
reentr.h reentr.pl (@19106..) 'merge in' pp.c (@19045..)
Diffstat (limited to 'reentr.pl')
-rw-r--r-- | reentr.pl | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -453,14 +453,17 @@ EOF #if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD $seend{$func} _${func}_data; #else - $seent{$func} _${func}_struct; + $seent{$func} *_${func}_struct_buffer; #endif EOF push @init, <<EOF; -#if defined(__GLIBC__) || defined(__EMX__) - PL_reentrant_buffer->_${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, <<EOF; +#if CRYPT_R_PROTO != REENTRANT_PROTO_B_CCD + Safefree(PL_reentrant_buffer->_${func}_struct_buffer); #endif EOF pushssif $endif; @@ -661,9 +664,11 @@ EOF $_ eq 'D' ? "&PL_reentrant_buffer->_${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' ? |