diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-28 06:32:47 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-28 06:32:47 +0000 |
commit | 0891a229ed34cb34ddb76f1813dcb76d39a174fb (patch) | |
tree | 20ad4c23e4db58d98bc0b4a4f3ff7bb7b94f520c | |
parent | 15f0f28a65432bb5e8f8e84f9d63806555182655 (diff) | |
download | perl-0891a229ed34cb34ddb76f1813dcb76d39a174fb.tar.gz |
Detecting errors of reentrant APIs: getgrgid_r and the like
when returning an int can either return the error in the return
value or in the errno. We need a new per-interp variable to store
the return value instead of clobbering the errno with it. The new
variable, PL_reentrant_retint, is only used within the reentrancy
framework, and immediately after it's set, so there should not be
similar visibility issues as for the errno. Spotted by Edward Moy.
p4raw-id: //depot/perl@19357
-rw-r--r-- | embedvar.h | 2 | ||||
-rw-r--r-- | intrpvar.h | 2 | ||||
-rw-r--r-- | perlapi.h | 2 | ||||
-rw-r--r-- | reentr.c | 2 | ||||
-rw-r--r-- | reentr.h | 243 | ||||
-rw-r--r-- | reentr.pl | 16 |
6 files changed, 141 insertions, 126 deletions
diff --git a/embedvar.h b/embedvar.h index b0b81b9a79..02016c1ad1 100644 --- a/embedvar.h +++ b/embedvar.h @@ -358,6 +358,7 @@ #define PL_psig_ptr (vTHX->Ipsig_ptr) #define PL_ptr_table (vTHX->Iptr_table) #define PL_reentrant_buffer (vTHX->Ireentrant_buffer) +#define PL_reentrant_retint (vTHX->Ireentrant_retint) #define PL_regex_pad (vTHX->Iregex_pad) #define PL_regex_padav (vTHX->Iregex_padav) #define PL_replgv (vTHX->Ireplgv) @@ -651,6 +652,7 @@ #define PL_Ipsig_ptr PL_psig_ptr #define PL_Iptr_table PL_ptr_table #define PL_Ireentrant_buffer PL_reentrant_buffer +#define PL_Ireentrant_retint PL_reentrant_retint #define PL_Iregex_pad PL_regex_pad #define PL_Iregex_padav PL_regex_padav #define PL_Ireplgv PL_replgv diff --git a/intrpvar.h b/intrpvar.h index 0c4b60f565..e0adc28c1f 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -504,6 +504,8 @@ PERLVAR(Iunicode, U32) /* Unicode features: $ENV{PERL_UNICODE} or -C */ PERLVAR(Isignals, U32) /* Using which pre-5.8 signals */ +PERLVAR(Ireentrant_retint, int) /* Integer return value from reentrant functions */ + PERLVAR(Istashcache, HV *) /* Cache to speed up S_method_common */ PERLVAR(IDBassertion, SV *) @@ -474,6 +474,8 @@ END_EXTERN_C #define PL_ptr_table (*Perl_Iptr_table_ptr(aTHX)) #undef PL_reentrant_buffer #define PL_reentrant_buffer (*Perl_Ireentrant_buffer_ptr(aTHX)) +#undef PL_reentrant_retint +#define PL_reentrant_retint (*Perl_Ireentrant_retint_ptr(aTHX)) #undef PL_regex_pad #define PL_regex_pad (*Perl_Iregex_pad_ptr(aTHX)) #undef PL_regex_padav @@ -301,7 +301,7 @@ Perl_reentrant_retry(const char *f, ...) dTHX; void *retptr = NULL; #ifdef USE_REENTRANT_API -# if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SRVENT_BUFFER) +# if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER) void *p0; # endif # if defined(USE_SERVENT_BUFFER) @@ -771,10 +771,10 @@ typedef struct { # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size) # endif # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SB -# define asctime(a) (((errno = asctime_r(a, PL_reentrant_buffer->_asctime_buffer))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0) +# define asctime(a) (((PL_reentrant_retint = asctime_r(a, PL_reentrant_buffer->_asctime_buffer))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0) # endif # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SBI -# define asctime(a) (((errno = asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0) +# define asctime(a) (((PL_reentrant_retint = asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0) # endif #endif /* HAS_ASCTIME_R */ @@ -804,24 +804,24 @@ typedef struct { # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size) # endif # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SB -# define ctime(a) (((errno = ctime_r(a, PL_reentrant_buffer->_ctime_buffer))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0) +# define ctime(a) (((PL_reentrant_retint = ctime_r(a, PL_reentrant_buffer->_ctime_buffer))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0) # endif # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SBI -# define ctime(a) (((errno = ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0) +# define ctime(a) (((PL_reentrant_retint = ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0) # endif #endif /* HAS_CTIME_R */ #ifdef HAS_DRAND48_R # undef drand48 # if !defined(drand48) && DRAND48_R_PROTO == REENTRANT_PROTO_I_ST -# define drand48() (((errno = drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double))) == 0 ? PL_reentrant_buffer->_drand48_double : 0) +# define drand48() (((PL_reentrant_retint = drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double))) == 0 ? PL_reentrant_buffer->_drand48_double : 0) # endif #endif /* HAS_DRAND48_R */ #ifdef HAS_ENDGRENT_R # undef endgrent # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H -# define endgrent() (((errno = endgrent_r(&PL_reentrant_buffer->_grent_fptr))) == 0 ? 1 : 0) +# define endgrent() (((PL_reentrant_retint = 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->_grent_fptr) @@ -831,7 +831,7 @@ typedef struct { #ifdef HAS_ENDHOSTENT_R # undef endhostent # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_I_D -# define endhostent() (((errno = endhostent_r(&PL_reentrant_buffer->_hostent_data))) == 0 ? 1 : 0) +# define endhostent() (((PL_reentrant_retint = 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->_hostent_data) @@ -841,7 +841,7 @@ typedef struct { #ifdef HAS_ENDNETENT_R # undef endnetent # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_I_D -# define endnetent() (((errno = endnetent_r(&PL_reentrant_buffer->_netent_data))) == 0 ? 1 : 0) +# define endnetent() (((PL_reentrant_retint = 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->_netent_data) @@ -851,7 +851,7 @@ typedef struct { #ifdef HAS_ENDPROTOENT_R # undef endprotoent # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_I_D -# define endprotoent() (((errno = endprotoent_r(&PL_reentrant_buffer->_protoent_data))) == 0 ? 1 : 0) +# define endprotoent() (((PL_reentrant_retint = 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->_protoent_data) @@ -861,7 +861,7 @@ typedef struct { #ifdef HAS_ENDPWENT_R # undef endpwent # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H -# define endpwent() (((errno = endpwent_r(&PL_reentrant_buffer->_pwent_fptr))) == 0 ? 1 : 0) +# define endpwent() (((PL_reentrant_retint = 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->_pwent_fptr) @@ -871,7 +871,7 @@ typedef struct { #ifdef HAS_ENDSERVENT_R # undef endservent # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_I_D -# define endservent() (((errno = endservent_r(&PL_reentrant_buffer->_servent_data))) == 0 ? 1 : 0) +# define endservent() (((PL_reentrant_retint = 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->_servent_data) @@ -881,139 +881,139 @@ typedef struct { #ifdef HAS_GETGRENT_R # undef getgrent # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR -# 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)) +# define getgrent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getgrent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_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->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_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->_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)) +# define getgrent() (((PL_reentrant_retint = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size))) == 0 ? &PL_reentrant_buffer->_grent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getgrent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getgrgid(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getgrgid(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getgrgid(a) (((PL_reentrant_retint = getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size))) == 0 ? &PL_reentrant_buffer->_grent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_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)) +# define getgrnam(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getgrnam(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_grent_buffer, PL_reentrant_buffer->_grent_size) ? PL_reentrant_buffer->_grent_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->_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)) +# define getgrnam(a) (((PL_reentrant_retint = getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size))) == 0 ? &PL_reentrant_buffer->_grent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_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)) +# define gethostbyaddr(a, b, c) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_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)) +# 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->_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)) +# 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->_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)) +# 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->_hostent_size, &PL_reentrant_buffer->_hostent_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->_hostent_size, &PL_reentrant_buffer->_hostent_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->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (((PL_reentrant_retint = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) +# define gethostbyaddr(a, b, c) (((PL_reentrant_retint = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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)) +# define gethostbyaddr(a, b, c) (((PL_reentrant_retint = gethostbyaddr_r(a, b, c))) == 0 ? 1 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE -# 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)) +# define gethostbyaddr(a, b, c) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) # endif #endif /* HAS_GETHOSTBYADDR_R */ #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->_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)) +# define gethostbyname(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) +# define gethostbyname(a) (((PL_reentrant_retint = gethostbyname_r(a, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define gethostent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define gethostent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size) ? &PL_reentrant_buffer->_hostent_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->_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)) +# define gethostent() (((PL_reentrant_retint = gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) +# define gethostent() (((PL_reentrant_retint = gethostent_r(&PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostent") : 0)) # endif #endif /* HAS_GETHOSTENT_R */ #ifdef HAS_GETLOGIN_R # undef getlogin # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BW -# define getlogin() (((errno = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : (errno == ERANGE ? Perl_reentrant_retry("getlogin") : 0)) +# define getlogin() (((PL_reentrant_retint = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("getlogin") : 0)) # endif # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BI -# define getlogin() (((errno = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : (errno == ERANGE ? Perl_reentrant_retry("getlogin") : 0)) +# define getlogin() (((PL_reentrant_retint = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("getlogin") : 0)) # endif # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BW # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size) @@ -1026,214 +1026,214 @@ 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->_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)) +# define getnetbyaddr(a, b) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getnetbyaddr(a, b) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_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)) +# 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->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (((PL_reentrant_retint = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (((PL_reentrant_retint = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) +# define getnetbyaddr(a, b) (((PL_reentrant_retint = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) # endif # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE -# 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)) +# define getnetbyaddr(a, b) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getnetbyname(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getnetbyname(a) (((PL_reentrant_retint = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size))) == 0 ? &PL_reentrant_buffer->_netent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) +# define getnetbyname(a) (((PL_reentrant_retint = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getnetent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getnetent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_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->_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)) +# define getnetent() (((PL_reentrant_retint = getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size))) == 0 ? &PL_reentrant_buffer->_netent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) +# define getnetent() (((PL_reentrant_retint = getnetent_r(&PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getprotobyname(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) +# define getprotobyname(a) (((PL_reentrant_retint = getprotobyname_r(a, &PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getprotobynumber(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) +# define getprotobynumber(a) (((PL_reentrant_retint = getprotobynumber_r(a, &PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getprotoent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getprotoent() (((PL_reentrant_retint = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_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->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) +# define getprotoent() (((PL_reentrant_retint = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getpwent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getpwent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_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->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_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->_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)) +# define getpwent() (((PL_reentrant_retint = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getpwent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getpwnam(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getpwnam(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_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)) +# define getpwnam(a) (((PL_reentrant_retint = getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getpwuid(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getpwuid(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getpwuid(a) (((PL_reentrant_retint = getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_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)) +# define getservbyname(a, b) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) +# define getservbyname(a, b) (((PL_reentrant_retint = getservbyname_r(a, b, &PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getservbyport(a, b) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) +# define getservbyport(a, b) (((PL_reentrant_retint = getservbyport_r(a, b, &PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getservent() (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getservent() (((PL_reentrant_retint = getservent_r(&PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size))) == 0 ? &PL_reentrant_buffer->_servent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_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->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) +# define getservent() (((PL_reentrant_retint = getservent_r(&PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# define getspnam(a) (((PL_reentrant_retint = 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 : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (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->_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)) +# 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,7 +1243,7 @@ typedef struct { # define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) ? &PL_reentrant_buffer->_gmtime_struct : 0) # endif # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_I_TS -# define gmtime(a) (((errno = gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct))) == 0 ? &PL_reentrant_buffer->_gmtime_struct : 0) +# define gmtime(a) (((PL_reentrant_retint = gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct))) == 0 ? &PL_reentrant_buffer->_gmtime_struct : 0) # endif #endif /* HAS_GMTIME_R */ @@ -1253,7 +1253,7 @@ typedef struct { # define localtime(a) (localtime_r(a, &PL_reentrant_buffer->_localtime_struct) ? &PL_reentrant_buffer->_localtime_struct : 0) # endif # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_I_TS -# define localtime(a) (((errno = localtime_r(a, &PL_reentrant_buffer->_localtime_struct))) == 0 ? &PL_reentrant_buffer->_localtime_struct : 0) +# define localtime(a) (((PL_reentrant_retint = localtime_r(a, &PL_reentrant_buffer->_localtime_struct))) == 0 ? &PL_reentrant_buffer->_localtime_struct : 0) # endif #endif /* HAS_LOCALTIME_R */ @@ -1273,27 +1273,27 @@ typedef struct { #ifdef HAS_READDIR_R # undef readdir # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TSR -# define readdir(a) (((errno = readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr))) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0) +# define readdir(a) (((PL_reentrant_retint = readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr))) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0) # endif # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TS -# define readdir(a) (((errno = readdir_r(a, PL_reentrant_buffer->_readdir_struct))) == 0 ? PL_reentrant_buffer->_readdir_struct : 0) +# define readdir(a) (((PL_reentrant_retint = readdir_r(a, PL_reentrant_buffer->_readdir_struct))) == 0 ? PL_reentrant_buffer->_readdir_struct : 0) # endif #endif /* HAS_READDIR_R */ #ifdef HAS_READDIR64_R # undef readdir64 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR -# define readdir64(a) (((errno = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr))) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0) +# define readdir64(a) (((PL_reentrant_retint = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr))) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0) # endif # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TS -# define readdir64(a) (((errno = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct))) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0) +# define readdir64(a) (((PL_reentrant_retint = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct))) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0) # endif #endif /* HAS_READDIR64_R */ #ifdef HAS_SETGRENT_R # undef setgrent # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_I_H -# define setgrent() (((errno = setgrent_r(&PL_reentrant_buffer->_grent_fptr))) == 0 ? 1 : 0) +# define setgrent() (((PL_reentrant_retint = 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->_grent_fptr) @@ -1303,7 +1303,7 @@ typedef struct { #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->_hostent_data))) == 0 ? 1 : 0) +# define sethostent(a) (((PL_reentrant_retint = 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->_hostent_data) @@ -1313,14 +1313,14 @@ typedef struct { #ifdef HAS_SETLOCALE_R # undef setlocale # if !defined(setlocale) && SETLOCALE_R_PROTO == REENTRANT_PROTO_I_ICBI -# define setlocale(a, b) (((errno = setlocale_r(a, b, PL_reentrant_buffer->_setlocale_buffer, PL_reentrant_buffer->_setlocale_size))) == 0 ? PL_reentrant_buffer->_setlocale_buffer : 0) +# define setlocale(a, b) (((PL_reentrant_retint = setlocale_r(a, b, PL_reentrant_buffer->_setlocale_buffer, PL_reentrant_buffer->_setlocale_size))) == 0 ? PL_reentrant_buffer->_setlocale_buffer : 0) # endif #endif /* HAS_SETLOCALE_R */ #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->_netent_data))) == 0 ? 1 : 0) +# define setnetent(a) (((PL_reentrant_retint = 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->_netent_data) @@ -1330,7 +1330,7 @@ typedef struct { #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->_protoent_data))) == 0 ? 1 : 0) +# define setprotoent(a) (((PL_reentrant_retint = 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->_protoent_data) @@ -1340,7 +1340,7 @@ typedef struct { #ifdef HAS_SETPWENT_R # undef setpwent # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_I_H -# define setpwent() (((errno = setpwent_r(&PL_reentrant_buffer->_pwent_fptr))) == 0 ? 1 : 0) +# define setpwent() (((PL_reentrant_retint = 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->_pwent_fptr) @@ -1350,7 +1350,7 @@ typedef struct { #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->_servent_data))) == 0 ? 1 : 0) +# define setservent(a) (((PL_reentrant_retint = 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->_servent_data) @@ -1360,24 +1360,24 @@ typedef struct { #ifdef HAS_SRAND48_R # undef srand48 # if !defined(srand48) && SRAND48_R_PROTO == REENTRANT_PROTO_I_LS -# define srand48(a) (((errno = srand48_r(a, &PL_reentrant_buffer->_drand48_struct))) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0) +# define srand48(a) (((PL_reentrant_retint = srand48_r(a, &PL_reentrant_buffer->_drand48_struct))) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0) # endif #endif /* HAS_SRAND48_R */ #ifdef HAS_SRANDOM_R # undef srandom # if !defined(srandom) && SRANDOM_R_PROTO == REENTRANT_PROTO_I_TS -# define srandom(a) (((errno = srandom_r(a, &PL_reentrant_buffer->_srandom_struct))) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0) +# define srandom(a) (((PL_reentrant_retint = srandom_r(a, &PL_reentrant_buffer->_srandom_struct))) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0) # endif #endif /* HAS_SRANDOM_R */ #ifdef HAS_STRERROR_R # undef strerror # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBW -# define strerror(a) (((errno = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0) +# define strerror(a) (((PL_reentrant_retint = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0) # endif # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBI -# define strerror(a) (((errno = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0) +# define strerror(a) (((PL_reentrant_retint = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0) # endif # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW # define strerror(a) strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) @@ -1394,10 +1394,10 @@ typedef struct { #ifdef HAS_TTYNAME_R # undef ttyname # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBW -# define ttyname(a) (((errno = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0) +# define ttyname(a) (((PL_reentrant_retint = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0) # endif # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBI -# define ttyname(a) (((errno = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0) +# define ttyname(a) (((PL_reentrant_retint = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0) # endif # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_B_IBI # define ttyname(a) ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) @@ -1405,6 +1405,7 @@ typedef struct { #endif /* HAS_TTYNAME_R */ + #endif /* USE_REENTRANT_API */ #endif @@ -365,6 +365,7 @@ EOF EOF } } + return if @F == 1; push @define, <<EOF; /* Any of the @F using \L$n? */ @@ -678,7 +679,7 @@ EOF $w = ", $w" if length $v; } my $call = "${func}_r($v$w)"; - $call = "((errno = $call))" if $r eq 'I' && $func ne 'random'; + $call = "((PL_reentrant_retint = $call))" if $r eq 'I' && $func ne 'random'; push @wrap, <<EOF; # if !defined($func) && ${FUNC}_R_PROTO == REENTRANT_PROTO_$p EOF @@ -689,9 +690,15 @@ EOF } else { if ($func =~ /^get/) { my $rv = $v ? ", $v" : ""; - push @wrap, <<EOF; -# define $func($v) ($call$test ? $true : (errno == ERANGE ? Perl_reentrant_retry("$func"$rv) : 0)) + if ($r eq 'I') { + push @wrap, <<EOF; +# define $func($v) ($call$test ? $true : (((PL_reentrant_retint > 0 && PL_reentrant_retint == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("$func"$rv) : 0)) +EOF + } else { + push @wrap, <<EOF; +# define $func($v) ($call$test ? $true : ((errno == ERANGE) ? Perl_reentrant_retry("$func"$rv) : 0)) EOF + } } else { push @wrap, <<EOF; # define $func($v) ($call$test ? $true : 0) @@ -722,6 +729,7 @@ typedef struct { /* The wrappers. */ @wrap + #endif /* USE_REENTRANT_API */ #endif @@ -788,7 +796,7 @@ Perl_reentrant_retry(const char *f, ...) dTHX; void *retptr = NULL; #ifdef USE_REENTRANT_API -# if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SRVENT_BUFFER) +# if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER) void *p0; # endif # if defined(USE_SERVENT_BUFFER) |