X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=reentr.c;h=bae687679d991d6c8b51c8acd7b9dd1a8e15f48f;hb=756c5c2b691752248a1635194088c45476f496bb;hp=9be6f7fc709967a636d5a16e125e10be91247a21;hpb=6a1e1159a8a738e1607626a2dc2479f546ab4e49;p=p5sagit%2Fp5-mst-13.2.git diff --git a/reentr.c b/reentr.c index 9be6f7f..bae6876 100644 --- a/reentr.c +++ b/reentr.c @@ -2,7 +2,7 @@ * * reentr.c * - * Copyright (C) 2002, 2003, 2005, 2006 by Larry Wall and others + * Copyright (C) 2002, 2003, 2005, 2006, 2007 by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -44,7 +44,7 @@ Perl_reentrant_size(pTHX) { #ifdef HAS_GETGRNAM_R # if defined(HAS_SYSCONF) && defined(_SC_GETGR_R_SIZE_MAX) && !defined(__GLIBC__) PL_reentrant_buffer->_grent_size = sysconf(_SC_GETGR_R_SIZE_MAX); - if (PL_reentrant_buffer->_grent_size == -1) + if (PL_reentrant_buffer->_grent_size == (size_t) -1) PL_reentrant_buffer->_grent_size = REENTRANTUSUALSIZE; # else # if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) @@ -79,7 +79,7 @@ Perl_reentrant_size(pTHX) { #ifdef HAS_GETPWNAM_R # if defined(HAS_SYSCONF) && defined(_SC_GETPW_R_SIZE_MAX) && !defined(__GLIBC__) PL_reentrant_buffer->_pwent_size = sysconf(_SC_GETPW_R_SIZE_MAX); - if (PL_reentrant_buffer->_pwent_size == -1) + if (PL_reentrant_buffer->_pwent_size == (size_t) -1) PL_reentrant_buffer->_pwent_size = REENTRANTUSUALSIZE; # else # if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) @@ -101,7 +101,7 @@ Perl_reentrant_size(pTHX) { #ifdef HAS_GETSPNAM_R # if defined(HAS_SYSCONF) && defined(_SC_GETPW_R_SIZE_MAX) && !defined(__GLIBC__) PL_reentrant_buffer->_spent_size = sysconf(_SC_GETPW_R_SIZE_MAX); - if (PL_reentrant_buffer->_spent_size == -1) + if (PL_reentrant_buffer->_spent_size == (size_t) -1) PL_reentrant_buffer->_spent_size = REENTRANTUSUALSIZE; # else # if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) @@ -313,6 +313,9 @@ Perl_reentrant_retry(const char *f, ...) { dTHX; void *retptr = NULL; + va_list ap; + 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 +329,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 +531,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; }