X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=reentr.c;h=8d9ab2a2c10ba00e879a08b104d66a991679dcbc;hb=9e5bbba0de25c01ae9355c7a97e237602a37e9f3;hp=9447fc3f58098461614fe634a18ddcfe25fa9155;hpb=922adc668bd1a29348ad2aeea3363752c3bab137;p=p5sagit%2Fp5-mst-13.2.git diff --git a/reentr.c b/reentr.c index 9447fc3..8d9ab2a 100644 --- a/reentr.c +++ b/reentr.c @@ -115,10 +115,6 @@ Perl_reentrant_size(pTHX) { # endif # endif #endif /* HAS_GETSPNAM_R */ -#ifdef HAS_GMTIME_R -#endif /* HAS_GMTIME_R */ -#ifdef HAS_LOCALTIME_R -#endif /* HAS_LOCALTIME_R */ #ifdef HAS_RANDOM_R #endif /* HAS_RANDOM_R */ #ifdef HAS_READDIR_R @@ -205,10 +201,6 @@ Perl_reentrant_init(pTHX) { # endif Newx(PL_reentrant_buffer->_spent_buffer, PL_reentrant_buffer->_spent_size, char); #endif /* HAS_GETSPNAM_R */ -#ifdef HAS_GMTIME_R -#endif /* HAS_GMTIME_R */ -#ifdef HAS_LOCALTIME_R -#endif /* HAS_LOCALTIME_R */ #ifdef HAS_RANDOM_R #endif /* HAS_RANDOM_R */ #ifdef HAS_READDIR_R @@ -280,10 +272,6 @@ Perl_reentrant_free(pTHX) { #ifdef HAS_GETSPNAM_R Safefree(PL_reentrant_buffer->_spent_buffer); #endif /* HAS_GETSPNAM_R */ -#ifdef HAS_GMTIME_R -#endif /* HAS_GMTIME_R */ -#ifdef HAS_LOCALTIME_R -#endif /* HAS_LOCALTIME_R */ #ifdef HAS_RANDOM_R #endif /* HAS_RANDOM_R */ #ifdef HAS_READDIR_R @@ -313,6 +301,14 @@ Perl_reentrant_retry(const char *f, ...) { dTHX; void *retptr = NULL; + va_list ap; +#ifdef USE_REENTRANT_API + /* Easier to special case this here than in embed.pl. (Look at what it + generates for proto.h) */ + PERL_ARGS_ASSERT_REENTRANT_RETRY; +#endif + va_start(ap, f); + { #ifdef USE_REENTRANT_API # if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER) void *p0; @@ -326,9 +322,6 @@ Perl_reentrant_retry(const char *f, ...) # if defined(USE_HOSTENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER) int anint; # endif - va_list ap; - - va_start(ap, f); switch (PL_op->op_type) { #ifdef USE_HOSTENT_BUFFER @@ -531,11 +524,11 @@ Perl_reentrant_retry(const char *f, ...) /* Not known how to retry, so just fail. */ break; } - - va_end(ap); #else PERL_UNUSED_ARG(f); #endif + } + va_end(ap); return retptr; }