From 832a833bda7470a7163fbdbf0c6029513869c248 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Thu, 28 Sep 2006 15:40:04 +0300 Subject: reentr reshuffle Message-ID: <451B9874.7060000@iki.fi> p4raw-id: //depot/perl@28896 --- reentr.pl | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'reentr.pl') diff --git a/reentr.pl b/reentr.pl index 13cf4d1087..9edc7ade26 100644 --- a/reentr.pl +++ b/reentr.pl @@ -61,13 +61,29 @@ 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 @@ -547,7 +563,7 @@ EOF push @size, <$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, <