X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=reentr.pl;h=049b06eed1d0dd1a8c0f882e360287b18230a681;hb=b0d07b4e8d25114701bc6954107375b0bddf5764;hp=0a60a15ae3de394227e8b384309e0b05b1a48442;hpb=e3bb26e0aa4d50c1d18638138d04d2c37a88fadc;p=p5sagit%2Fp5-mst-13.2.git diff --git a/reentr.pl b/reentr.pl index 0a60a15..049b06e 100644 --- a/reentr.pl +++ b/reentr.pl @@ -49,7 +49,7 @@ print <. + */ + +#ifndef PERL_REENTR_API +# if defined(PERL_CORE) || defined(PERL_EXT) +# define PERL_REENTR_API 1 +# else +# define PERL_REENTR_API 0 +# endif +#endif + #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. */ + * If you know of more deprecations on some platforms, please add your own + * (by editing reentr.pl, mind!) */ #ifdef __hpux # undef HAS_CRYPT_R @@ -94,9 +110,9 @@ print <$sz = sysconf($sc); - if (PL_reentrant_buffer->$sz == -1) + if (PL_reentrant_buffer->$sz == (size_t) -1) PL_reentrant_buffer->$sz = REENTRANTUSUALSIZE; # else # if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) @@ -634,6 +650,7 @@ EOF push @wrap, $ifdef; push @wrap, <_' . $genfunc . '_data))'; + $memzero = 'REENTR_MEMZERO(&PL_reentrant_buffer->_' . $genfunc . '_data, sizeof(PL_reentrant_buffer->_' . $genfunc . '_data)),'; } push @wrap, <