X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/0891a229ed34cb34ddb76f1813dcb76d39a174fb..4d56230864c7d2d21814f925d64f6987011e1924:/reentr.c diff --git a/reentr.c b/reentr.c index 881bd87..9aa62bf 100644 --- a/reentr.c +++ b/reentr.c @@ -1,17 +1,24 @@ -/* +/* -*- buffer-read-only: t -*- + * * reentr.c * - * Copyright (C) 2002, 2003, by Larry Wall and others + * Copyright (C) 2002, 2003, 2005 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. * * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! - * This file is built by reentrl.pl from data in reentr.pl. + * This file is built by reentr.pl from data in reentr.pl. * * "Saruman," I said, standing away from him, "only one hand at a time can * wield the One, and you know that well, so do not trouble to say we!" * + * This file contains a collection of automatically created wrappers + * (created by running reentr.pl) for reentrant (thread-safe) versions of + * various library calls, such as getpwent_r. The wrapping is done so + * that other files like pp_sys.c calling those library functions need not + * care about the differences between various platforms' idiosyncrasies + * regarding these reentrant interfaces. */ #include "EXTERN.h" @@ -127,6 +134,8 @@ Perl_reentrant_size(pTHX) { #ifdef HAS_SETLOCALE_R PL_reentrant_buffer->_setlocale_size = REENTRANTSMALLSIZE; #endif /* HAS_SETLOCALE_R */ +#ifdef HAS_SRANDOM_R +#endif /* HAS_SRANDOM_R */ #ifdef HAS_STRERROR_R PL_reentrant_buffer->_strerror_size = REENTRANTSMALLSIZE; #endif /* HAS_STRERROR_R */ @@ -211,6 +220,8 @@ Perl_reentrant_init(pTHX) { #ifdef HAS_SETLOCALE_R New(31338, PL_reentrant_buffer->_setlocale_buffer, PL_reentrant_buffer->_setlocale_size, char); #endif /* HAS_SETLOCALE_R */ +#ifdef HAS_SRANDOM_R +#endif /* HAS_SRANDOM_R */ #ifdef HAS_STRERROR_R New(31338, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size, char); #endif /* HAS_STRERROR_R */ @@ -284,6 +295,8 @@ Perl_reentrant_free(pTHX) { #ifdef HAS_SETLOCALE_R Safefree(PL_reentrant_buffer->_setlocale_buffer); #endif /* HAS_SETLOCALE_R */ +#ifdef HAS_SRANDOM_R +#endif /* HAS_SRANDOM_R */ #ifdef HAS_STRERROR_R Safefree(PL_reentrant_buffer->_strerror_buffer); #endif /* HAS_STRERROR_R */ @@ -339,7 +352,7 @@ Perl_reentrant_retry(const char *f, ...) retptr = gethostbyaddr(p0, asize, anint); break; case OP_GHBYNAME: p0 = va_arg(ap, void *); - retptr = gethostbyname(p0); break; + retptr = gethostbyname((char *)p0); break; case OP_GHOSTENT: retptr = gethostent(); break; default: @@ -367,7 +380,7 @@ Perl_reentrant_retry(const char *f, ...) switch (PL_op->op_type) { case OP_GGRNAM: p0 = va_arg(ap, void *); - retptr = getgrnam(p0); break; + retptr = getgrnam((char *)p0); break; case OP_GGRGID: #if Gid_t_size < INTSIZE gid = (Gid_t)va_arg(ap, int); @@ -406,7 +419,7 @@ Perl_reentrant_retry(const char *f, ...) retptr = getnetbyaddr(net, anint); break; case OP_GNBYNAME: p0 = va_arg(ap, void *); - retptr = getnetbyname(p0); break; + retptr = getnetbyname((char *)p0); break; case OP_GNETENT: retptr = getnetent(); break; default: @@ -434,7 +447,7 @@ Perl_reentrant_retry(const char *f, ...) switch (PL_op->op_type) { case OP_GPWNAM: p0 = va_arg(ap, void *); - retptr = getpwnam(p0); break; + retptr = getpwnam((char *)p0); break; case OP_GPWUID: #if Uid_t_size < INTSIZE uid = (Uid_t)va_arg(ap, int); @@ -468,7 +481,7 @@ Perl_reentrant_retry(const char *f, ...) switch (PL_op->op_type) { case OP_GPBYNAME: p0 = va_arg(ap, void *); - retptr = getprotobyname(p0); break; + retptr = getprotobyname((char *)p0); break; case OP_GPBYNUMBER: anint = va_arg(ap, int); retptr = getprotobynumber(anint); break; @@ -499,11 +512,11 @@ Perl_reentrant_retry(const char *f, ...) case OP_GSBYNAME: p0 = va_arg(ap, void *); p1 = va_arg(ap, void *); - retptr = getservbyname(p0, p1); break; + retptr = getservbyname((char *)p0, (char *)p1); break; case OP_GSBYPORT: anint = va_arg(ap, int); p0 = va_arg(ap, void *); - retptr = getservbyport(anint, p0); break; + retptr = getservbyport(anint, (char *)p0); break; case OP_GSERVENT: retptr = getservent(); break; default: @@ -524,3 +537,4 @@ Perl_reentrant_retry(const char *f, ...) return retptr; } +/* ex: set ro: */