From: Jarkko Hietaniemi Date: Tue, 9 Apr 2002 18:02:55 +0000 (+0000) Subject: Remove false dependency between getgrent and setpwent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f79371714633c61277d2d07323ae1ed6fb337938;p=p5sagit%2Fp5-mst-13.2.git Remove false dependency between getgrent and setpwent having/not having FILE**. Also make the names of the {set,get,end}* interface struct members a bit shorter. p4raw-id: //depot/perl@15831 --- diff --git a/reentr.c b/reentr.c index b0ebd92..310848e 100644 --- a/reentr.c +++ b/reentr.c @@ -35,25 +35,25 @@ Perl_reentrant_size(pTHX) { #ifdef HAS_DRAND48_R #endif /* HAS_DRAND48_R */ #ifdef HAS_GETGRNAM_R -# if defined(HAS_SYSCONF) && defined(_SC_GETGR_R_SIZE_MAX) && !defined(__GLIBC__) - PL_reentrant_buffer->_getgrent_size = sysconf(_SC_GETGR_R_SIZE_MAX); - if (PL_reentrant_buffer->_getgrent_size == -1) - PL_reentrant_buffer->_getgrent_size = REENTRANTUSUALSIZE; +# if defined(HAS_SYSCONF) && defined(_SC_GETPW_R_SIZE_MAX) && !defined(__GLIBC__) + PL_reentrant_buffer->_grent_size = sysconf(_SC_GETPW_R_SIZE_MAX); + if (PL_reentrant_buffer->_pwent_size == -1) + PL_reentrant_buffer->_pwent_size = REENTRANTUSUALSIZE; # else # if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) - PL_reentrant_buffer->_getgrent_size = SIABUFSIZ; + PL_reentrant_buffer->_grent_size = SIABUFSIZ; # else # ifdef __sgi - PL_reentrant_buffer->_getgrent_size = BUFSIZ; + PL_reentrant_buffer->_grent_size = BUFSIZ; # else - PL_reentrant_buffer->_getgrent_size = REENTRANTUSUALSIZE; + PL_reentrant_buffer->_grent_size = REENTRANTUSUALSIZE; # endif # endif # endif #endif /* HAS_GETGRNAM_R */ #ifdef HAS_GETHOSTBYNAME_R #if !(GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) - PL_reentrant_buffer->_gethostent_size = REENTRANTUSUALSIZE; + PL_reentrant_buffer->_hostent_size = REENTRANTUSUALSIZE; #endif #endif /* HAS_GETHOSTBYNAME_R */ #ifdef HAS_GETLOGIN_R @@ -61,38 +61,52 @@ Perl_reentrant_size(pTHX) { #endif /* HAS_GETLOGIN_R */ #ifdef HAS_GETNETBYNAME_R #if !(GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) - PL_reentrant_buffer->_getnetent_size = REENTRANTUSUALSIZE; + PL_reentrant_buffer->_netent_size = REENTRANTUSUALSIZE; #endif #endif /* HAS_GETNETBYNAME_R */ #ifdef HAS_GETPROTOBYNAME_R #if !(GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) - PL_reentrant_buffer->_getprotoent_size = REENTRANTUSUALSIZE; + PL_reentrant_buffer->_protoent_size = REENTRANTUSUALSIZE; #endif #endif /* HAS_GETPROTOBYNAME_R */ #ifdef HAS_GETPWNAM_R # if defined(HAS_SYSCONF) && defined(_SC_GETPW_R_SIZE_MAX) && !defined(__GLIBC__) - PL_reentrant_buffer->_getpwent_size = sysconf(_SC_GETPW_R_SIZE_MAX); - if (PL_reentrant_buffer->_getpwent_size == -1) - PL_reentrant_buffer->_getpwent_size = REENTRANTUSUALSIZE; + PL_reentrant_buffer->_pwent_size = sysconf(_SC_GETPW_R_SIZE_MAX); + if (PL_reentrant_buffer->_pwent_size == -1) + PL_reentrant_buffer->_pwent_size = REENTRANTUSUALSIZE; # else # if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) - PL_reentrant_buffer->_getpwent_size = SIABUFSIZ; + PL_reentrant_buffer->_pwent_size = SIABUFSIZ; # else # ifdef __sgi - PL_reentrant_buffer->_getpwent_size = BUFSIZ; + PL_reentrant_buffer->_pwent_size = BUFSIZ; # else - PL_reentrant_buffer->_getpwent_size = REENTRANTUSUALSIZE; + PL_reentrant_buffer->_pwent_size = REENTRANTUSUALSIZE; # endif # endif # endif #endif /* HAS_GETPWNAM_R */ #ifdef HAS_GETSERVBYNAME_R #if !(GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD) - PL_reentrant_buffer->_getservent_size = REENTRANTUSUALSIZE; + PL_reentrant_buffer->_servent_size = REENTRANTUSUALSIZE; #endif #endif /* HAS_GETSERVBYNAME_R */ #ifdef HAS_GETSPNAM_R - PL_reentrant_buffer->_getspent_size = 1024; +# 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->_pwent_size == -1) + PL_reentrant_buffer->_pwent_size = REENTRANTUSUALSIZE; +# else +# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ) + PL_reentrant_buffer->_spent_size = SIABUFSIZ; +# else +# ifdef __sgi + PL_reentrant_buffer->_spent_size = BUFSIZ; +# else + PL_reentrant_buffer->_spent_size = REENTRANTUSUALSIZE; +# endif +# endif +# endif #endif /* HAS_GETSPNAM_R */ #ifdef HAS_GMTIME_R #endif /* HAS_GMTIME_R */ @@ -142,14 +156,14 @@ Perl_reentrant_init(pTHX) { #ifdef HAS_DRAND48_R #endif /* HAS_DRAND48_R */ #ifdef HAS_GETGRNAM_R -# ifdef USE_GETGRENT_FPTR - PL_reentrant_buffer->_getgrent_fptr = NULL; +# ifdef USE_GRENT_FPTR + PL_reentrant_buffer->_grent_fptr = NULL; # endif - New(31338, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, char); + New(31338, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, char); #endif /* HAS_GETGRNAM_R */ #ifdef HAS_GETHOSTBYNAME_R #if !(GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) - New(31338, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, char); + New(31338, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, char); #endif #endif /* HAS_GETHOSTBYNAME_R */ #ifdef HAS_GETLOGIN_R @@ -157,27 +171,30 @@ Perl_reentrant_init(pTHX) { #endif /* HAS_GETLOGIN_R */ #ifdef HAS_GETNETBYNAME_R #if !(GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) - New(31338, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, char); + New(31338, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, char); #endif #endif /* HAS_GETNETBYNAME_R */ #ifdef HAS_GETPROTOBYNAME_R #if !(GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) - New(31338, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, char); + New(31338, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size, char); #endif #endif /* HAS_GETPROTOBYNAME_R */ #ifdef HAS_GETPWNAM_R -# ifdef USE_GETPWENT_FPTR - PL_reentrant_buffer->_getpwent_fptr = NULL; +# ifdef USE_PWENT_FPTR + PL_reentrant_buffer->_pwent_fptr = NULL; # endif - New(31338, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, char); + New(31338, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, char); #endif /* HAS_GETPWNAM_R */ #ifdef HAS_GETSERVBYNAME_R #if !(GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD) - New(31338, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, char); + New(31338, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size, char); #endif #endif /* HAS_GETSERVBYNAME_R */ #ifdef HAS_GETSPNAM_R - New(31338, PL_reentrant_buffer->_getspent_buffer, PL_reentrant_buffer->_getspent_size, char); +# ifdef USE_SPENT_FPTR + PL_reentrant_buffer->_spent_fptr = NULL; +# endif + New(31338, PL_reentrant_buffer->_spent_buffer, PL_reentrant_buffer->_spent_size, char); #endif /* HAS_GETSPNAM_R */ #ifdef HAS_GMTIME_R #endif /* HAS_GMTIME_R */ @@ -218,11 +235,11 @@ Perl_reentrant_free(pTHX) { #ifdef HAS_DRAND48_R #endif /* HAS_DRAND48_R */ #ifdef HAS_GETGRNAM_R - Safefree(PL_reentrant_buffer->_getgrent_buffer); + Safefree(PL_reentrant_buffer->_grent_buffer); #endif /* HAS_GETGRNAM_R */ #ifdef HAS_GETHOSTBYNAME_R #if !(GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) - Safefree(PL_reentrant_buffer->_gethostent_buffer); + Safefree(PL_reentrant_buffer->_hostent_buffer); #endif #endif /* HAS_GETHOSTBYNAME_R */ #ifdef HAS_GETLOGIN_R @@ -230,24 +247,24 @@ Perl_reentrant_free(pTHX) { #endif /* HAS_GETLOGIN_R */ #ifdef HAS_GETNETBYNAME_R #if !(GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) - Safefree(PL_reentrant_buffer->_getnetent_buffer); + Safefree(PL_reentrant_buffer->_netent_buffer); #endif #endif /* HAS_GETNETBYNAME_R */ #ifdef HAS_GETPROTOBYNAME_R #if !(GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD) - Safefree(PL_reentrant_buffer->_getprotoent_buffer); + Safefree(PL_reentrant_buffer->_protoent_buffer); #endif #endif /* HAS_GETPROTOBYNAME_R */ #ifdef HAS_GETPWNAM_R - Safefree(PL_reentrant_buffer->_getpwent_buffer); + Safefree(PL_reentrant_buffer->_pwent_buffer); #endif /* HAS_GETPWNAM_R */ #ifdef HAS_GETSERVBYNAME_R #if !(GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD) - Safefree(PL_reentrant_buffer->_getservent_buffer); + Safefree(PL_reentrant_buffer->_servent_buffer); #endif #endif /* HAS_GETSERVBYNAME_R */ #ifdef HAS_GETSPNAM_R - Safefree(PL_reentrant_buffer->_getspent_buffer); + Safefree(PL_reentrant_buffer->_spent_buffer); #endif /* HAS_GETSPNAM_R */ #ifdef HAS_GMTIME_R #endif /* HAS_GMTIME_R */ @@ -281,16 +298,16 @@ Perl_reentrant_retry(const char *f, ...) dTHX; void *retptr = NULL; #ifdef USE_REENTRANT_API -# if defined(USE_GETHOSTENT_BUFFER) || defined(USE_GETGRENT_BUFFER) || defined(USE_GETNETENT_BUFFER) || defined(USE_GETPWENT_BUFFER) || defined(USE_GETPROTOENT_BUFFER) || defined(USE_GETSERVENT_BUFFER) +# if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SRVENT_BUFFER) void *p0; # endif -# if defined(USE_GETSERVENT_BUFFER) +# if defined(USE_SERVENT_BUFFER) void *p1; # endif -# if defined(USE_GETHOSTENT_BUFFER) +# if defined(USE_HOSTENT_BUFFER) size_t asize; # endif -# if defined(USE_GETHOSTENT_BUFFER) || defined(USE_GETNETENT_BUFFER) || defined(USE_GETPROTOENT_BUFFER) || defined(USE_GETSERVENT_BUFFER) +# if defined(USE_HOSTENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER) int anint; # endif va_list ap; @@ -300,15 +317,15 @@ Perl_reentrant_retry(const char *f, ...) #define REENTRANTHALFMAXSIZE 32768 /* The maximum may end up twice this. */ switch (PL_op->op_type) { -#ifdef USE_GETHOSTENT_BUFFER +#ifdef USE_HOSTENT_BUFFER case OP_GHBYADDR: case OP_GHBYNAME: case OP_GHOSTENT: { - if (PL_reentrant_buffer->_gethostent_size <= REENTRANTHALFMAXSIZE) { - PL_reentrant_buffer->_gethostent_size *= 2; - Renew(PL_reentrant_buffer->_gethostent_buffer, - PL_reentrant_buffer->_gethostent_size, char); + if (PL_reentrant_buffer->_hostent_size <= REENTRANTHALFMAXSIZE) { + PL_reentrant_buffer->_hostent_size *= 2; + Renew(PL_reentrant_buffer->_hostent_buffer, + PL_reentrant_buffer->_hostent_size, char); switch (PL_op->op_type) { case OP_GHBYADDR: p0 = va_arg(ap, void *); @@ -327,16 +344,16 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETGRENT_BUFFER +#ifdef USE_GRENT_BUFFER case OP_GGRNAM: case OP_GGRGID: case OP_GGRENT: { - if (PL_reentrant_buffer->_getgrent_size <= REENTRANTHALFMAXSIZE) { + if (PL_reentrant_buffer->_grent_size <= REENTRANTHALFMAXSIZE) { Gid_t gid; - PL_reentrant_buffer->_getgrent_size *= 2; - Renew(PL_reentrant_buffer->_getgrent_buffer, - PL_reentrant_buffer->_getgrent_size, char); + PL_reentrant_buffer->_grent_size *= 2; + Renew(PL_reentrant_buffer->_grent_buffer, + PL_reentrant_buffer->_grent_size, char); switch (PL_op->op_type) { case OP_GGRNAM: p0 = va_arg(ap, void *); @@ -353,16 +370,16 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETNETENT_BUFFER +#ifdef USE_NETENT_BUFFER case OP_GNBYADDR: case OP_GNBYNAME: case OP_GNETENT: { - if (PL_reentrant_buffer->_getnetent_size <= REENTRANTHALFMAXSIZE) { + if (PL_reentrant_buffer->_netent_size <= REENTRANTHALFMAXSIZE) { Netdb_net_t net; - PL_reentrant_buffer->_getnetent_size *= 2; - Renew(PL_reentrant_buffer->_getnetent_buffer, - PL_reentrant_buffer->_getnetent_size, char); + PL_reentrant_buffer->_netent_size *= 2; + Renew(PL_reentrant_buffer->_netent_buffer, + PL_reentrant_buffer->_netent_size, char); switch (PL_op->op_type) { case OP_GNBYADDR: net = va_arg(ap, Netdb_net_t); @@ -380,16 +397,16 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETPWENT_BUFFER +#ifdef USE_PWENT_BUFFER case OP_GPWNAM: case OP_GPWUID: case OP_GPWENT: { - if (PL_reentrant_buffer->_getpwent_size <= REENTRANTHALFMAXSIZE) { + if (PL_reentrant_buffer->_pwent_size <= REENTRANTHALFMAXSIZE) { Uid_t uid; - PL_reentrant_buffer->_getpwent_size *= 2; - Renew(PL_reentrant_buffer->_getpwent_buffer, - PL_reentrant_buffer->_getpwent_size, char); + PL_reentrant_buffer->_pwent_size *= 2; + Renew(PL_reentrant_buffer->_pwent_buffer, + PL_reentrant_buffer->_pwent_size, char); switch (PL_op->op_type) { case OP_GPWNAM: p0 = va_arg(ap, void *); @@ -406,15 +423,15 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETPROTOENT_BUFFER +#ifdef USE_PROTOENT_BUFFER case OP_GPBYNAME: case OP_GPBYNUMBER: case OP_GPROTOENT: { - if (PL_reentrant_buffer->_getprotoent_size <= REENTRANTHALFMAXSIZE) { - PL_reentrant_buffer->_getprotoent_size *= 2; - Renew(PL_reentrant_buffer->_getprotoent_buffer, - PL_reentrant_buffer->_getprotoent_size, char); + if (PL_reentrant_buffer->_protoent_size <= REENTRANTHALFMAXSIZE) { + PL_reentrant_buffer->_protoent_size *= 2; + Renew(PL_reentrant_buffer->_protoent_buffer, + PL_reentrant_buffer->_protoent_size, char); switch (PL_op->op_type) { case OP_GPBYNAME: p0 = va_arg(ap, void *); @@ -431,15 +448,15 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETSERVENT_BUFFER +#ifdef USE_SERVENT_BUFFER case OP_GSBYNAME: case OP_GSBYPORT: case OP_GSERVENT: { - if (PL_reentrant_buffer->_getservent_size <= REENTRANTHALFMAXSIZE) { - PL_reentrant_buffer->_getservent_size *= 2; - Renew(PL_reentrant_buffer->_getservent_buffer, - PL_reentrant_buffer->_getservent_size, char); + if (PL_reentrant_buffer->_servent_size <= REENTRANTHALFMAXSIZE) { + PL_reentrant_buffer->_servent_size *= 2; + Renew(PL_reentrant_buffer->_servent_buffer, + PL_reentrant_buffer->_servent_size, char); switch (PL_op->op_type) { case OP_GSBYNAME: p0 = va_arg(ap, void *); diff --git a/reentr.h b/reentr.h index 9aa24e8..fa93b68 100644 --- a/reentr.h +++ b/reentr.h @@ -183,9 +183,9 @@ /* Any of the getgrent getgrgid getgrnam using buffer? */ #if (defined(GETGRENT_R_HAS_BUFFER) || defined(GETGRGID_R_HAS_BUFFER) || defined(GETGRNAM_R_HAS_BUFFER)) -# define USE_GETGRENT_BUFFER +# define USE_GRENT_BUFFER #else -# undef USE_GETGRENT_BUFFER +# undef USE_GRENT_BUFFER #endif /* The getgrent getgrgid getgrnam using ptr? */ @@ -209,9 +209,9 @@ /* Any of the getgrent getgrgid getgrnam using ptr? */ #if (defined(GETGRENT_R_HAS_PTR) || defined(GETGRGID_R_HAS_PTR) || defined(GETGRNAM_R_HAS_PTR)) -# define USE_GETGRENT_PTR +# define USE_GRENT_PTR #else -# undef USE_GETGRENT_PTR +# undef USE_GRENT_PTR #endif /* The getpwent getpwnam getpwuid using ptr? */ @@ -235,9 +235,9 @@ /* Any of the getpwent getpwnam getpwuid using ptr? */ #if (defined(GETPWENT_R_HAS_PTR) || defined(GETPWNAM_R_HAS_PTR) || defined(GETPWUID_R_HAS_PTR)) -# define USE_GETPWENT_PTR +# define USE_PWENT_PTR #else -# undef USE_GETPWENT_PTR +# undef USE_PWENT_PTR #endif /* The getspent getspnam using ptr? */ @@ -251,41 +251,61 @@ /* Any of the getspent getspnam using ptr? */ #if (defined(GETSPENT_R_HAS_PTR) || defined(GETSPNAM_R_HAS_PTR)) -# define USE_GETSPENT_PTR +# define USE_SPENT_PTR #else -# undef USE_GETSPENT_PTR +# undef USE_SPENT_PTR #endif -/* The getgrent getgrgid getgrnam using fptr? */ +/* The getgrent getgrgid getgrnam setgrent endgrent using fptr? */ #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH) # define GETGRENT_R_HAS_FPTR #else # undef GETGRENT_R_HAS_FPTR #endif +#if defined(HAS_SETGRENT_R) && (SETGRENT_R_PROTO == REENTRANT_PROTO_I_H || SETGRENT_R_PROTO == REENTRANT_PROTO_V_H) +# define SETGRENT_R_HAS_FPTR +#else +# undef SETGRENT_R_HAS_FPTR +#endif +#if defined(HAS_ENDGRENT_R) && (ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H || ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H) +# define ENDGRENT_R_HAS_FPTR +#else +# undef ENDGRENT_R_HAS_FPTR +#endif -/* Any of the getgrent getgrgid getgrnam using fptr? */ +/* Any of the getgrent getgrgid getgrnam setgrent endgrent using fptr? */ -#if (defined(GETGRENT_R_HAS_FPTR) || defined(GETGRGID_R_HAS_FPTR) || defined(GETGRNAM_R_HAS_FPTR)) -# define USE_GETGRENT_FPTR +#if (defined(GETGRENT_R_HAS_FPTR) || defined(GETGRGID_R_HAS_FPTR) || defined(GETGRNAM_R_HAS_FPTR) || defined(SETGRENT_R_HAS_FPTR) || defined(ENDGRENT_R_HAS_FPTR)) +# define USE_GRENT_FPTR #else -# undef USE_GETGRENT_FPTR +# undef USE_GRENT_FPTR #endif -/* The getpwent getpwnam getpwuid using fptr? */ +/* The getpwent getpwnam getpwuid setpwent endpwent using fptr? */ #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH) # define GETPWENT_R_HAS_FPTR #else # undef GETPWENT_R_HAS_FPTR #endif +#if defined(HAS_SETPWENT_R) && (SETPWENT_R_PROTO == REENTRANT_PROTO_I_H || SETPWENT_R_PROTO == REENTRANT_PROTO_V_H) +# define SETPWENT_R_HAS_FPTR +#else +# undef SETPWENT_R_HAS_FPTR +#endif +#if defined(HAS_ENDPWENT_R) && (ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H || ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H) +# define ENDPWENT_R_HAS_FPTR +#else +# undef ENDPWENT_R_HAS_FPTR +#endif -/* Any of the getpwent getpwnam getpwuid using fptr? */ +/* Any of the getpwent getpwnam getpwuid setpwent endpwent using fptr? */ -#if (defined(GETPWENT_R_HAS_FPTR) || defined(GETPWNAM_R_HAS_FPTR) || defined(GETPWUID_R_HAS_FPTR)) -# define USE_GETPWENT_FPTR +#if (defined(GETPWENT_R_HAS_FPTR) || defined(GETPWNAM_R_HAS_FPTR) || defined(GETPWUID_R_HAS_FPTR) || defined(SETPWENT_R_HAS_FPTR) || defined(ENDPWENT_R_HAS_FPTR)) +# define USE_PWENT_FPTR #else -# undef USE_GETPWENT_FPTR +# undef USE_PWENT_FPTR #endif /* The getpwent getpwgid getpwnam using buffer? */ @@ -304,9 +324,9 @@ /* Any of the getpwent getpwgid getpwnam using buffer? */ #if (defined(GETPWENT_R_HAS_BUFFER) || defined(GETPWGID_R_HAS_BUFFER) || defined(GETPWNAM_R_HAS_BUFFER)) -# define USE_GETPWENT_BUFFER +# define USE_PWENT_BUFFER #else -# undef USE_GETPWENT_BUFFER +# undef USE_PWENT_BUFFER #endif /* The gethostent gethostbyaddr gethostbyname using ptr? */ @@ -330,9 +350,9 @@ /* Any of the gethostent gethostbyaddr gethostbyname using ptr? */ #if (defined(GETHOSTENT_R_HAS_PTR) || defined(GETHOSTBYADDR_R_HAS_PTR) || defined(GETHOSTBYNAME_R_HAS_PTR)) -# define USE_GETHOSTENT_PTR +# define USE_HOSTENT_PTR #else -# undef USE_GETHOSTENT_PTR +# undef USE_HOSTENT_PTR #endif /* The getnetent getnetbyaddr getnetbyname using ptr? */ @@ -356,9 +376,9 @@ /* Any of the getnetent getnetbyaddr getnetbyname using ptr? */ #if (defined(GETNETENT_R_HAS_PTR) || defined(GETNETBYADDR_R_HAS_PTR) || defined(GETNETBYNAME_R_HAS_PTR)) -# define USE_GETNETENT_PTR +# define USE_NETENT_PTR #else -# undef USE_GETNETENT_PTR +# undef USE_NETENT_PTR #endif /* The getprotoent getprotobyname getprotobynumber using ptr? */ @@ -382,9 +402,9 @@ /* Any of the getprotoent getprotobyname getprotobynumber using ptr? */ #if (defined(GETPROTOENT_R_HAS_PTR) || defined(GETPROTOBYNAME_R_HAS_PTR) || defined(GETPROTOBYNUMBER_R_HAS_PTR)) -# define USE_GETPROTOENT_PTR +# define USE_PROTOENT_PTR #else -# undef USE_GETPROTOENT_PTR +# undef USE_PROTOENT_PTR #endif /* The getservent getservbyname getservbyport using ptr? */ @@ -408,9 +428,9 @@ /* Any of the getservent getservbyname getservbyport using ptr? */ #if (defined(GETSERVENT_R_HAS_PTR) || defined(GETSERVBYNAME_R_HAS_PTR) || defined(GETSERVBYPORT_R_HAS_PTR)) -# define USE_GETSERVENT_PTR +# define USE_SERVENT_PTR #else -# undef USE_GETSERVENT_PTR +# undef USE_SERVENT_PTR #endif /* The gethostent gethostbyaddr gethostbyname using buffer? */ @@ -434,9 +454,9 @@ /* Any of the gethostent gethostbyaddr gethostbyname using buffer? */ #if (defined(GETHOSTENT_R_HAS_BUFFER) || defined(GETHOSTBYADDR_R_HAS_BUFFER) || defined(GETHOSTBYNAME_R_HAS_BUFFER)) -# define USE_GETHOSTENT_BUFFER +# define USE_HOSTENT_BUFFER #else -# undef USE_GETHOSTENT_BUFFER +# undef USE_HOSTENT_BUFFER #endif /* The getnetent getnetbyaddr getnetbyname using buffer? */ @@ -460,9 +480,9 @@ /* Any of the getnetent getnetbyaddr getnetbyname using buffer? */ #if (defined(GETNETENT_R_HAS_BUFFER) || defined(GETNETBYADDR_R_HAS_BUFFER) || defined(GETNETBYNAME_R_HAS_BUFFER)) -# define USE_GETNETENT_BUFFER +# define USE_NETENT_BUFFER #else -# undef USE_GETNETENT_BUFFER +# undef USE_NETENT_BUFFER #endif /* The getprotoent getprotobyname getprotobynumber using buffer? */ @@ -486,9 +506,9 @@ /* Any of the getprotoent getprotobyname getprotobynumber using buffer? */ #if (defined(GETPROTOENT_R_HAS_BUFFER) || defined(GETPROTOBYNAME_R_HAS_BUFFER) || defined(GETPROTOBYNUMBER_R_HAS_BUFFER)) -# define USE_GETPROTOENT_BUFFER +# define USE_PROTOENT_BUFFER #else -# undef USE_GETPROTOENT_BUFFER +# undef USE_PROTOENT_BUFFER #endif /* The getservent getservbyname getservbyport using buffer? */ @@ -512,9 +532,9 @@ /* Any of the getservent getservbyname getservbyport using buffer? */ #if (defined(GETSERVENT_R_HAS_BUFFER) || defined(GETSERVBYNAME_R_HAS_BUFFER) || defined(GETSERVBYPORT_R_HAS_BUFFER)) -# define USE_GETSERVENT_BUFFER +# define USE_SERVENT_BUFFER #else -# undef USE_GETSERVENT_BUFFER +# undef USE_SERVENT_BUFFER #endif /* The gethostent gethostbyaddr gethostbyname using errno? */ @@ -538,9 +558,9 @@ /* Any of the gethostent gethostbyaddr gethostbyname using errno? */ #if (defined(GETHOSTENT_R_HAS_ERRNO) || defined(GETHOSTBYADDR_R_HAS_ERRNO) || defined(GETHOSTBYNAME_R_HAS_ERRNO)) -# define USE_GETHOSTENT_ERRNO +# define USE_HOSTENT_ERRNO #else -# undef USE_GETHOSTENT_ERRNO +# undef USE_HOSTENT_ERRNO #endif /* The getnetent getnetbyaddr getnetbyname using errno? */ @@ -564,9 +584,9 @@ /* Any of the getnetent getnetbyaddr getnetbyname using errno? */ #if (defined(GETNETENT_R_HAS_ERRNO) || defined(GETNETBYADDR_R_HAS_ERRNO) || defined(GETNETBYNAME_R_HAS_ERRNO)) -# define USE_GETNETENT_ERRNO +# define USE_NETENT_ERRNO #else -# undef USE_GETNETENT_ERRNO +# undef USE_NETENT_ERRNO #endif @@ -591,29 +611,29 @@ typedef struct { double _drand48_double; #endif /* HAS_DRAND48_R */ #ifdef HAS_GETGRNAM_R - struct group _getgrent_struct; - char* _getgrent_buffer; - size_t _getgrent_size; -# ifdef USE_GETGRENT_PTR - struct group* _getgrent_ptr; + struct group _grent_struct; + char* _grent_buffer; + size_t _grent_size; +# ifdef USE_GRENT_PTR + struct group* _grent_ptr; # endif -# ifdef USE_GETGRENT_FPTR - FILE* _getgrent_fptr; +# ifdef USE_GRENT_FPTR + FILE* _grent_fptr; # endif #endif /* HAS_GETGRNAM_R */ #ifdef HAS_GETHOSTBYNAME_R - struct hostent _gethostent_struct; + struct hostent _hostent_struct; # if GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD - struct hostent_data _gethostent_data; + struct hostent_data _hostent_data; # else - char* _gethostent_buffer; - size_t _gethostent_size; + char* _hostent_buffer; + size_t _hostent_size; # endif -# ifdef USE_GETHOSTENT_PTR - struct hostent* _gethostent_ptr; +# ifdef USE_HOSTENT_PTR + struct hostent* _hostent_ptr; # endif -# ifdef USE_GETHOSTENT_ERRNO - int _gethostent_errno; +# ifdef USE_HOSTENT_ERRNO + int _hostent_errno; # endif #endif /* HAS_GETHOSTBYNAME_R */ #ifdef HAS_GETLOGIN_R @@ -621,67 +641,70 @@ typedef struct { size_t _getlogin_size; #endif /* HAS_GETLOGIN_R */ #ifdef HAS_GETNETBYNAME_R - struct netent _getnetent_struct; + struct netent _netent_struct; # if GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD - struct netent_data _getnetent_data; + struct netent_data _netent_data; # else - char* _getnetent_buffer; - size_t _getnetent_size; + char* _netent_buffer; + size_t _netent_size; # endif -# ifdef USE_GETNETENT_PTR - struct netent* _getnetent_ptr; +# ifdef USE_NETENT_PTR + struct netent* _netent_ptr; # endif -# ifdef USE_GETNETENT_ERRNO - int _getnetent_errno; +# ifdef USE_NETENT_ERRNO + int _netent_errno; # endif #endif /* HAS_GETNETBYNAME_R */ #ifdef HAS_GETPROTOBYNAME_R - struct protoent _getprotoent_struct; + struct protoent _protoent_struct; # if GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD - struct protoent_data _getprotoent_data; + struct protoent_data _protoent_data; # else - char* _getprotoent_buffer; - size_t _getprotoent_size; + char* _protoent_buffer; + size_t _protoent_size; # endif -# ifdef USE_GETPROTOENT_PTR - struct protoent* _getprotoent_ptr; +# ifdef USE_PROTOENT_PTR + struct protoent* _protoent_ptr; # endif -# ifdef USE_GETPROTOENT_ERRNO - int _getprotoent_errno; +# ifdef USE_PROTOENT_ERRNO + int _protoent_errno; # endif #endif /* HAS_GETPROTOBYNAME_R */ #ifdef HAS_GETPWNAM_R - struct passwd _getpwent_struct; - char* _getpwent_buffer; - size_t _getpwent_size; -# ifdef USE_GETPWENT_PTR - struct passwd* _getpwent_ptr; + struct passwd _pwent_struct; + char* _pwent_buffer; + size_t _pwent_size; +# ifdef USE_PWENT_PTR + struct passwd* _pwent_ptr; # endif -# ifdef USE_GETPWENT_FPTR - FILE* _getpwent_fptr; +# ifdef USE_PWENT_FPTR + FILE* _pwent_fptr; # endif #endif /* HAS_GETPWNAM_R */ #ifdef HAS_GETSERVBYNAME_R - struct servent _getservent_struct; + struct servent _servent_struct; # if GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD - struct servent_data _getservent_data; + struct servent_data _servent_data; # else - char* _getservent_buffer; - size_t _getservent_size; + char* _servent_buffer; + size_t _servent_size; # endif -# ifdef USE_GETSERVENT_PTR - struct servent* _getservent_ptr; +# ifdef USE_SERVENT_PTR + struct servent* _servent_ptr; # endif -# ifdef USE_GETSERVENT_ERRNO - int _getservent_errno; +# ifdef USE_SERVENT_ERRNO + int _servent_errno; # endif #endif /* HAS_GETSERVBYNAME_R */ #ifdef HAS_GETSPNAM_R - struct spwd _getspent_struct; - char* _getspent_buffer; - size_t _getspent_size; -# ifdef USE_GETSPENT_PTR - struct spwd* _getspent_ptr; + struct spwd _spent_struct; + char* _spent_buffer; + size_t _spent_size; +# ifdef USE_SPENT_PTR + struct spwd* _spent_ptr; +# endif +# ifdef USE_SPENT_FPTR + FILE* _spent_fptr; # endif #endif /* HAS_GETSPNAM_R */ #ifdef HAS_GMTIME_R @@ -783,148 +806,148 @@ typedef struct { #ifdef HAS_ENDGRENT_R # undef endgrent # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H -# define endgrent() (((errno = endgrent_r(&PL_reentrant_buffer->_getgrent_fptr))) == 0 ? 1 : 0) +# define endgrent() (((errno = endgrent_r(&PL_reentrant_buffer->_grent_fptr))) == 0 ? 1 : 0) # endif # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H -# define endgrent() endgrent_r(&PL_reentrant_buffer->_getgrent_fptr) +# define endgrent() endgrent_r(&PL_reentrant_buffer->_grent_fptr) # endif #endif /* HAS_ENDGRENT_R */ #ifdef HAS_ENDHOSTENT_R # undef endhostent # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_I_D -# define endhostent() (((errno = endhostent_r(&PL_reentrant_buffer->_gethostent_data))) == 0 ? 1 : 0) +# define endhostent() (((errno = endhostent_r(&PL_reentrant_buffer->_hostent_data))) == 0 ? 1 : 0) # endif # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_V_D -# define endhostent() endhostent_r(&PL_reentrant_buffer->_gethostent_data) +# define endhostent() endhostent_r(&PL_reentrant_buffer->_hostent_data) # endif #endif /* HAS_ENDHOSTENT_R */ #ifdef HAS_ENDNETENT_R # undef endnetent # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_I_D -# define endnetent() (((errno = endnetent_r(&PL_reentrant_buffer->_getnetent_data))) == 0 ? 1 : 0) +# define endnetent() (((errno = endnetent_r(&PL_reentrant_buffer->_netent_data))) == 0 ? 1 : 0) # endif # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_V_D -# define endnetent() endnetent_r(&PL_reentrant_buffer->_getnetent_data) +# define endnetent() endnetent_r(&PL_reentrant_buffer->_netent_data) # endif #endif /* HAS_ENDNETENT_R */ #ifdef HAS_ENDPROTOENT_R # undef endprotoent # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_I_D -# define endprotoent() (((errno = endprotoent_r(&PL_reentrant_buffer->_getprotoent_data))) == 0 ? 1 : 0) +# define endprotoent() (((errno = endprotoent_r(&PL_reentrant_buffer->_protoent_data))) == 0 ? 1 : 0) # endif # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_V_D -# define endprotoent() endprotoent_r(&PL_reentrant_buffer->_getprotoent_data) +# define endprotoent() endprotoent_r(&PL_reentrant_buffer->_protoent_data) # endif #endif /* HAS_ENDPROTOENT_R */ #ifdef HAS_ENDPWENT_R # undef endpwent # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H -# define endpwent() (((errno = endpwent_r(&PL_reentrant_buffer->_getpwent_fptr))) == 0 ? 1 : 0) +# define endpwent() (((errno = endpwent_r(&PL_reentrant_buffer->_pwent_fptr))) == 0 ? 1 : 0) # endif # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H -# define endpwent() endpwent_r(&PL_reentrant_buffer->_getpwent_fptr) +# define endpwent() endpwent_r(&PL_reentrant_buffer->_pwent_fptr) # endif #endif /* HAS_ENDPWENT_R */ #ifdef HAS_ENDSERVENT_R # undef endservent # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_I_D -# define endservent() (((errno = endservent_r(&PL_reentrant_buffer->_getservent_data))) == 0 ? 1 : 0) +# define endservent() (((errno = endservent_r(&PL_reentrant_buffer->_servent_data))) == 0 ? 1 : 0) # endif # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_V_D -# define endservent() endservent_r(&PL_reentrant_buffer->_getservent_data) +# define endservent() endservent_r(&PL_reentrant_buffer->_servent_data) # endif #endif /* HAS_ENDSERVENT_R */ #ifdef HAS_GETGRENT_R # undef getgrent # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR -# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) +# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) # endif # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR -# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) +# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) # endif # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW -# define getgrent() (getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) +# define getgrent() (getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) # endif # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI -# define getgrent() (getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) +# define getgrent() (getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) # endif # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI -# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) +# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size))) == 0 ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) # endif # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH -# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_fptr))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) +# define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_fptr))) == 0 ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) # endif #endif /* HAS_GETGRENT_R */ #ifdef HAS_GETGRGID_R # undef getgrgid # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR -# define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) +# define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) # endif # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR -# define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) +# define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) # endif # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI -# define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) +# define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size))) == 0 ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) # endif # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI -# define getgrgid(a) (getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) +# define getgrgid(a) (getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) # endif #endif /* HAS_GETGRGID_R */ #ifdef HAS_GETGRNAM_R # undef getgrnam # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR -# define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) +# define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) # endif # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR -# define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) +# define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) # endif # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI -# define getgrnam(a) (getgrnam_r(a, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? PL_reentrant_buffer->_getgrent_buffer : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) +# define getgrnam(a) (getgrnam_r(a, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? PL_reentrant_buffer->_grent_buffer : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) # endif # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI -# define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) +# define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size))) == 0 ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) # endif # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI -# define getgrnam(a) (getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) +# define getgrnam(a) (getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) # endif #endif /* HAS_GETGRNAM_R */ #ifdef HAS_GETHOSTBYADDR_R # undef gethostbyaddr # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE -# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_ptr, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? PL_reentrant_buffer->_gethostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_ptr, &PL_reentrant_buffer->_hostent_errno))) == 0 ? PL_reentrant_buffer->_hostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE -# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE -# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE -# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE -# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE -# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE -# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISD -# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CIISD -# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CII # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c))) == 0 ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) @@ -934,35 +957,35 @@ typedef struct { #ifdef HAS_GETHOSTBYNAME_R # undef gethostbyname # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE -# define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_ptr, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? PL_reentrant_buffer->_gethostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) +# define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_ptr, &PL_reentrant_buffer->_hostent_errno))) == 0 ? PL_reentrant_buffer->_hostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) # endif # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE -# define gethostbyname(a) (gethostbyname_r(a, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) +# define gethostbyname(a) (gethostbyname_r(a, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) # endif # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD -# define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) +# define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) # endif #endif /* HAS_GETHOSTBYNAME_R */ #ifdef HAS_GETHOSTENT_R # undef gethostent # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE -# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_ptr, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? PL_reentrant_buffer->_gethostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) +# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_ptr, &PL_reentrant_buffer->_hostent_errno))) == 0 ? PL_reentrant_buffer->_hostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) # endif # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE -# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) +# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) # endif # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE -# define gethostent() (gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) +# define gethostent() (gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) # endif # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI -# define gethostent() (gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) +# define gethostent() (gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) # endif # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI -# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) +# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) # endif # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SD -# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) +# define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) # endif #endif /* HAS_GETHOSTENT_R */ @@ -985,211 +1008,211 @@ typedef struct { #ifdef HAS_GETNETBYADDR_R # undef getnetbyaddr # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE -# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_ptr, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? PL_reentrant_buffer->_getnetent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_ptr, &PL_reentrant_buffer->_netent_errno))) == 0 ? PL_reentrant_buffer->_netent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) # endif # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI -# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) # endif # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI -# define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) # endif # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI -# define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) # endif # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_TISD -# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) # endif # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISD -# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) # endif # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_IISD -# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) # endif #endif /* HAS_GETNETBYADDR_R */ #ifdef HAS_GETNETBYNAME_R # undef getnetbyname # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE -# define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_ptr, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? PL_reentrant_buffer->_getnetent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) +# define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_ptr, &PL_reentrant_buffer->_netent_errno))) == 0 ? PL_reentrant_buffer->_netent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) # endif # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI -# define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) +# define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) # endif # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI -# define getnetbyname(a) (getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) +# define getnetbyname(a) (getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) # endif # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD -# define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) +# define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) # endif #endif /* HAS_GETNETBYNAME_R */ #ifdef HAS_GETNETENT_R # undef getnetent # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE -# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_ptr, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? PL_reentrant_buffer->_getnetent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) +# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_ptr, &PL_reentrant_buffer->_netent_errno))) == 0 ? PL_reentrant_buffer->_netent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) # endif # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE -# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) +# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_errno))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) # endif # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE -# define getnetent() (getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_errno) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) +# define getnetent() (getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_errno) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) # endif # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI -# define getnetent() (getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) +# define getnetent() (getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) # endif # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI -# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) +# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) # endif # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SD -# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) +# define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) # endif #endif /* HAS_GETNETENT_R */ #ifdef HAS_GETPROTOBYNAME_R # undef getprotobyname # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR -# define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, &PL_reentrant_buffer->_getprotoent_ptr))) == 0 ? PL_reentrant_buffer->_getprotoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) +# define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size, &PL_reentrant_buffer->_protoent_ptr))) == 0 ? PL_reentrant_buffer->_protoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) # endif # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI -# define getprotobyname(a) (getprotobyname_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size) ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) +# define getprotobyname(a) (getprotobyname_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) # endif # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD -# define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_getprotoent_struct, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) +# define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) # endif #endif /* HAS_GETPROTOBYNAME_R */ #ifdef HAS_GETPROTOBYNUMBER_R # undef getprotobynumber # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR -# define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, &PL_reentrant_buffer->_getprotoent_ptr))) == 0 ? PL_reentrant_buffer->_getprotoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) +# define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size, &PL_reentrant_buffer->_protoent_ptr))) == 0 ? PL_reentrant_buffer->_protoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) # endif # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI -# define getprotobynumber(a) (getprotobynumber_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size) ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) +# define getprotobynumber(a) (getprotobynumber_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) # endif # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISD -# define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_getprotoent_struct, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) +# define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) # endif #endif /* HAS_GETPROTOBYNUMBER_R */ #ifdef HAS_GETPROTOENT_R # undef getprotoent # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR -# define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, &PL_reentrant_buffer->_getprotoent_ptr))) == 0 ? PL_reentrant_buffer->_getprotoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) +# define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size, &PL_reentrant_buffer->_protoent_ptr))) == 0 ? PL_reentrant_buffer->_protoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) # endif # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI -# define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) +# define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) # endif # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI -# define getprotoent() (getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size) ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) +# define getprotoent() (getprotoent_r(&PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) # endif # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SD -# define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) +# define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) # endif #endif /* HAS_GETPROTOENT_R */ #ifdef HAS_GETPWENT_R # undef getpwent # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR -# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) +# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) # endif # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR -# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) +# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) # endif # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW -# define getpwent() (getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) +# define getpwent() (getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) # endif # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI -# define getpwent() (getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) +# define getpwent() (getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) # endif # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI -# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) +# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) # endif # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH -# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_fptr))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) +# define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_fptr))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) # endif #endif /* HAS_GETPWENT_R */ #ifdef HAS_GETPWNAM_R # undef getpwnam # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR -# define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) +# define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) # endif # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR -# define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) +# define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) # endif # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI -# define getpwnam(a) (getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) +# define getpwnam(a) (getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) # endif # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI -# define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) +# define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) # endif #endif /* HAS_GETPWNAM_R */ #ifdef HAS_GETPWUID_R # undef getpwuid # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR -# define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) +# define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) # endif # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR -# define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) +# define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) # endif # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBI -# define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) +# define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) # endif # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_S_TSBI -# define getpwuid(a) (getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) +# define getpwuid(a) (getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) # endif #endif /* HAS_GETPWUID_R */ #ifdef HAS_GETSERVBYNAME_R # undef getservbyname # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR -# define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, &PL_reentrant_buffer->_getservent_ptr))) == 0 ? PL_reentrant_buffer->_getservent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) +# define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size, &PL_reentrant_buffer->_servent_ptr))) == 0 ? PL_reentrant_buffer->_servent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) # endif # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI -# define getservbyname(a, b) (getservbyname_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size) ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) +# define getservbyname(a, b) (getservbyname_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) # endif # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD -# define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_getservent_struct, &PL_reentrant_buffer->_getservent_data))) == 0 ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) +# define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) # endif #endif /* HAS_GETSERVBYNAME_R */ #ifdef HAS_GETSERVBYPORT_R # undef getservbyport # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR -# define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, &PL_reentrant_buffer->_getservent_ptr))) == 0 ? PL_reentrant_buffer->_getservent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) +# define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size, &PL_reentrant_buffer->_servent_ptr))) == 0 ? PL_reentrant_buffer->_servent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) # endif # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI -# define getservbyport(a, b) (getservbyport_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size) ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) +# define getservbyport(a, b) (getservbyport_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) # endif # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSD -# define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_getservent_struct, &PL_reentrant_buffer->_getservent_data))) == 0 ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) +# define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) # endif #endif /* HAS_GETSERVBYPORT_R */ #ifdef HAS_GETSERVENT_R # undef getservent # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR -# define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, &PL_reentrant_buffer->_getservent_ptr))) == 0 ? PL_reentrant_buffer->_getservent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) +# define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size, &PL_reentrant_buffer->_servent_ptr))) == 0 ? PL_reentrant_buffer->_servent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) # endif # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI -# define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size))) == 0 ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) +# define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) # endif # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI -# define getservent() (getservent_r(&PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size) ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) +# define getservent() (getservent_r(&PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) # endif # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SD -# define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_getservent_struct, &PL_reentrant_buffer->_getservent_data))) == 0 ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) +# define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) # endif #endif /* HAS_GETSERVENT_R */ #ifdef HAS_GETSPNAM_R # undef getspnam # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR -# define getspnam(a) (((errno = getspnam_r(a, &PL_reentrant_buffer->_getspent_struct, PL_reentrant_buffer->_getspent_buffer, PL_reentrant_buffer->_getspent_size, &PL_reentrant_buffer->_getspent_ptr))) == 0 ? PL_reentrant_buffer->_getspent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getspnam", a) : 0)) +# define getspnam(a) (((errno = getspnam_r(a, &PL_reentrant_buffer->_spent_struct, PL_reentrant_buffer->_spent_buffer, PL_reentrant_buffer->_spent_size, &PL_reentrant_buffer->_spent_ptr))) == 0 ? PL_reentrant_buffer->_spent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getspnam", a) : 0)) # endif # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_S_CSBI -# define getspnam(a) (getspnam_r(a, &PL_reentrant_buffer->_getspent_struct, PL_reentrant_buffer->_getspent_buffer, PL_reentrant_buffer->_getspent_size) ? &PL_reentrant_buffer->_getspent_struct : (errno == ERANGE ? Perl_reentrant_retry("getspnam", a) : 0)) +# define getspnam(a) (getspnam_r(a, &PL_reentrant_buffer->_spent_struct, PL_reentrant_buffer->_spent_buffer, PL_reentrant_buffer->_spent_size) ? &PL_reentrant_buffer->_spent_struct : (errno == ERANGE ? Perl_reentrant_retry("getspnam", a) : 0)) # endif #endif /* HAS_GETSPNAM_R */ @@ -1243,20 +1266,20 @@ typedef struct { #ifdef HAS_SETGRENT_R # undef setgrent # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_I_H -# define setgrent() (((errno = setgrent_r(&PL_reentrant_buffer->_getgrent_fptr))) == 0 ? 1 : 0) +# define setgrent() (((errno = setgrent_r(&PL_reentrant_buffer->_grent_fptr))) == 0 ? 1 : 0) # endif # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_V_H -# define setgrent() setgrent_r(&PL_reentrant_buffer->_getgrent_fptr) +# define setgrent() setgrent_r(&PL_reentrant_buffer->_grent_fptr) # endif #endif /* HAS_SETGRENT_R */ #ifdef HAS_SETHOSTENT_R # undef sethostent # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_I_ID -# define sethostent(a) (((errno = sethostent_r(a, &PL_reentrant_buffer->_gethostent_data))) == 0 ? 1 : 0) +# define sethostent(a) (((errno = sethostent_r(a, &PL_reentrant_buffer->_hostent_data))) == 0 ? 1 : 0) # endif # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_V_ID -# define sethostent(a) sethostent_r(a, &PL_reentrant_buffer->_gethostent_data) +# define sethostent(a) sethostent_r(a, &PL_reentrant_buffer->_hostent_data) # endif #endif /* HAS_SETHOSTENT_R */ @@ -1270,40 +1293,40 @@ typedef struct { #ifdef HAS_SETNETENT_R # undef setnetent # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_I_ID -# define setnetent(a) (((errno = setnetent_r(a, &PL_reentrant_buffer->_getnetent_data))) == 0 ? 1 : 0) +# define setnetent(a) (((errno = setnetent_r(a, &PL_reentrant_buffer->_netent_data))) == 0 ? 1 : 0) # endif # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_V_ID -# define setnetent(a) setnetent_r(a, &PL_reentrant_buffer->_getnetent_data) +# define setnetent(a) setnetent_r(a, &PL_reentrant_buffer->_netent_data) # endif #endif /* HAS_SETNETENT_R */ #ifdef HAS_SETPROTOENT_R # undef setprotoent # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_I_ID -# define setprotoent(a) (((errno = setprotoent_r(a, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? 1 : 0) +# define setprotoent(a) (((errno = setprotoent_r(a, &PL_reentrant_buffer->_protoent_data))) == 0 ? 1 : 0) # endif # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_V_ID -# define setprotoent(a) setprotoent_r(a, &PL_reentrant_buffer->_getprotoent_data) +# define setprotoent(a) setprotoent_r(a, &PL_reentrant_buffer->_protoent_data) # endif #endif /* HAS_SETPROTOENT_R */ #ifdef HAS_SETPWENT_R # undef setpwent # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_I_H -# define setpwent() (((errno = setpwent_r(&PL_reentrant_buffer->_getpwent_fptr))) == 0 ? 1 : 0) +# define setpwent() (((errno = setpwent_r(&PL_reentrant_buffer->_pwent_fptr))) == 0 ? 1 : 0) # endif # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_V_H -# define setpwent() setpwent_r(&PL_reentrant_buffer->_getpwent_fptr) +# define setpwent() setpwent_r(&PL_reentrant_buffer->_pwent_fptr) # endif #endif /* HAS_SETPWENT_R */ #ifdef HAS_SETSERVENT_R # undef setservent # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_I_ID -# define setservent(a) (((errno = setservent_r(a, &PL_reentrant_buffer->_getservent_data))) == 0 ? 1 : 0) +# define setservent(a) (((errno = setservent_r(a, &PL_reentrant_buffer->_servent_data))) == 0 ? 1 : 0) # endif # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_V_ID -# define setservent(a) setservent_r(a, &PL_reentrant_buffer->_getservent_data) +# define setservent(a) setservent_r(a, &PL_reentrant_buffer->_servent_data) # endif #endif /* HAS_SETSERVENT_R */ diff --git a/reentr.pl b/reentr.pl index 8183ebc..6b1f21c 100644 --- a/reentr.pl +++ b/reentr.pl @@ -319,11 +319,16 @@ sub define { /* The @F using \L$n? */ EOF + my $G; for my $f (@F) { my $F = uc $f; my $h = "${F}_R_HAS_$n"; push @H, $h; my @h = grep { /$p/ } @{$seena{$f}}; + unless (defined $G) { + $G = $F; + $G =~ s/^GET//; + } if (@h) { push @define, "#if defined(HAS_${F}_R) && (" . join(" || ", map { "${F}_R_PROTO == REENTRANT_PROTO_$_" } @h) . ")\n"; @@ -342,9 +347,9 @@ EOF EOF push @define, "#if (" . join(" || ", map { "defined($_)" } @H) . ")\n"; push @define, <_${g}_size = sysconf($sc); @@ -496,6 +502,7 @@ EOF pushssif $ifdef; my $g = $f; $g =~ s/byname/ent/; + $g =~ s/^get//; my $G = uc $g; my $D = ifprotomatch($F, grep {/D/} @p); my $d = $seend{$f}; @@ -571,7 +578,7 @@ EOF my $true = 1; my $g = $f; if ($g =~ /^(?:get|set|end)(pw|gr|host|net|proto|serv|sp)/) { - $g = "get$1ent"; + $g = "$1ent"; } elsif ($g eq 'srand48') { $g = "drand48"; } @@ -724,16 +731,16 @@ Perl_reentrant_retry(const char *f, ...) dTHX; void *retptr = NULL; #ifdef USE_REENTRANT_API -# if defined(USE_GETHOSTENT_BUFFER) || defined(USE_GETGRENT_BUFFER) || defined(USE_GETNETENT_BUFFER) || defined(USE_GETPWENT_BUFFER) || defined(USE_GETPROTOENT_BUFFER) || defined(USE_GETSERVENT_BUFFER) +# if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SRVENT_BUFFER) void *p0; # endif -# if defined(USE_GETSERVENT_BUFFER) +# if defined(USE_SERVENT_BUFFER) void *p1; # endif -# if defined(USE_GETHOSTENT_BUFFER) +# if defined(USE_HOSTENT_BUFFER) size_t asize; # endif -# if defined(USE_GETHOSTENT_BUFFER) || defined(USE_GETNETENT_BUFFER) || defined(USE_GETPROTOENT_BUFFER) || defined(USE_GETSERVENT_BUFFER) +# if defined(USE_HOSTENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER) int anint; # endif va_list ap; @@ -743,15 +750,15 @@ Perl_reentrant_retry(const char *f, ...) #define REENTRANTHALFMAXSIZE 32768 /* The maximum may end up twice this. */ switch (PL_op->op_type) { -#ifdef USE_GETHOSTENT_BUFFER +#ifdef USE_HOSTENT_BUFFER case OP_GHBYADDR: case OP_GHBYNAME: case OP_GHOSTENT: { - if (PL_reentrant_buffer->_gethostent_size <= REENTRANTHALFMAXSIZE) { - PL_reentrant_buffer->_gethostent_size *= 2; - Renew(PL_reentrant_buffer->_gethostent_buffer, - PL_reentrant_buffer->_gethostent_size, char); + if (PL_reentrant_buffer->_hostent_size <= REENTRANTHALFMAXSIZE) { + PL_reentrant_buffer->_hostent_size *= 2; + Renew(PL_reentrant_buffer->_hostent_buffer, + PL_reentrant_buffer->_hostent_size, char); switch (PL_op->op_type) { case OP_GHBYADDR: p0 = va_arg(ap, void *); @@ -770,16 +777,16 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETGRENT_BUFFER +#ifdef USE_GRENT_BUFFER case OP_GGRNAM: case OP_GGRGID: case OP_GGRENT: { - if (PL_reentrant_buffer->_getgrent_size <= REENTRANTHALFMAXSIZE) { + if (PL_reentrant_buffer->_grent_size <= REENTRANTHALFMAXSIZE) { Gid_t gid; - PL_reentrant_buffer->_getgrent_size *= 2; - Renew(PL_reentrant_buffer->_getgrent_buffer, - PL_reentrant_buffer->_getgrent_size, char); + PL_reentrant_buffer->_grent_size *= 2; + Renew(PL_reentrant_buffer->_grent_buffer, + PL_reentrant_buffer->_grent_size, char); switch (PL_op->op_type) { case OP_GGRNAM: p0 = va_arg(ap, void *); @@ -796,16 +803,16 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETNETENT_BUFFER +#ifdef USE_NETENT_BUFFER case OP_GNBYADDR: case OP_GNBYNAME: case OP_GNETENT: { - if (PL_reentrant_buffer->_getnetent_size <= REENTRANTHALFMAXSIZE) { + if (PL_reentrant_buffer->_netent_size <= REENTRANTHALFMAXSIZE) { Netdb_net_t net; - PL_reentrant_buffer->_getnetent_size *= 2; - Renew(PL_reentrant_buffer->_getnetent_buffer, - PL_reentrant_buffer->_getnetent_size, char); + PL_reentrant_buffer->_netent_size *= 2; + Renew(PL_reentrant_buffer->_netent_buffer, + PL_reentrant_buffer->_netent_size, char); switch (PL_op->op_type) { case OP_GNBYADDR: net = va_arg(ap, Netdb_net_t); @@ -823,16 +830,16 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETPWENT_BUFFER +#ifdef USE_PWENT_BUFFER case OP_GPWNAM: case OP_GPWUID: case OP_GPWENT: { - if (PL_reentrant_buffer->_getpwent_size <= REENTRANTHALFMAXSIZE) { + if (PL_reentrant_buffer->_pwent_size <= REENTRANTHALFMAXSIZE) { Uid_t uid; - PL_reentrant_buffer->_getpwent_size *= 2; - Renew(PL_reentrant_buffer->_getpwent_buffer, - PL_reentrant_buffer->_getpwent_size, char); + PL_reentrant_buffer->_pwent_size *= 2; + Renew(PL_reentrant_buffer->_pwent_buffer, + PL_reentrant_buffer->_pwent_size, char); switch (PL_op->op_type) { case OP_GPWNAM: p0 = va_arg(ap, void *); @@ -849,15 +856,15 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETPROTOENT_BUFFER +#ifdef USE_PROTOENT_BUFFER case OP_GPBYNAME: case OP_GPBYNUMBER: case OP_GPROTOENT: { - if (PL_reentrant_buffer->_getprotoent_size <= REENTRANTHALFMAXSIZE) { - PL_reentrant_buffer->_getprotoent_size *= 2; - Renew(PL_reentrant_buffer->_getprotoent_buffer, - PL_reentrant_buffer->_getprotoent_size, char); + if (PL_reentrant_buffer->_protoent_size <= REENTRANTHALFMAXSIZE) { + PL_reentrant_buffer->_protoent_size *= 2; + Renew(PL_reentrant_buffer->_protoent_buffer, + PL_reentrant_buffer->_protoent_size, char); switch (PL_op->op_type) { case OP_GPBYNAME: p0 = va_arg(ap, void *); @@ -874,15 +881,15 @@ Perl_reentrant_retry(const char *f, ...) } break; #endif -#ifdef USE_GETSERVENT_BUFFER +#ifdef USE_SERVENT_BUFFER case OP_GSBYNAME: case OP_GSBYPORT: case OP_GSERVENT: { - if (PL_reentrant_buffer->_getservent_size <= REENTRANTHALFMAXSIZE) { - PL_reentrant_buffer->_getservent_size *= 2; - Renew(PL_reentrant_buffer->_getservent_buffer, - PL_reentrant_buffer->_getservent_size, char); + if (PL_reentrant_buffer->_servent_size <= REENTRANTHALFMAXSIZE) { + PL_reentrant_buffer->_servent_size *= 2; + Renew(PL_reentrant_buffer->_servent_buffer, + PL_reentrant_buffer->_servent_size, char); switch (PL_op->op_type) { case OP_GSBYNAME: p0 = va_arg(ap, void *);