From: Jan Dubois Date: Fri, 13 May 2005 12:21:40 +0000 (-0700) Subject: Integrate: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3fb2f3ac5c8ed8e4fdad7a9dbbce30a09d4f93f7;p=p5sagit%2Fp5-mst-13.2.git Integrate: [ 24458] Fix from Steve Peters [ 24464] Subject: RE: 5.8.7-tobe fails to compile on AIX 4.3.3 From: "Jan Dubois" Message-Id: <200505131921.j4DJLgG5007986@smtp3.ActiveState.com> and then regenerate reentr.h, with the , no longer inside REENTR_MEMZERO(). This keeps macros looking like functions. p4raw-link: @24464 on //depot/maint-5.8/perl: 65af2a75d112159ec53912329b2e01abfb9a3fb4 p4raw-link: @24458 on //depot/maint-5.8/perl: ef0ef25c116d419e8978d636281fda0a90743c2a p4raw-id: //depot/perl@30235 p4raw-integrated: from //depot/maint-5.8/perl@24464 'edit in' reentr.pl (@24458..) --- diff --git a/reentr.h b/reentr.h index 15dda1e..05b06f8 100644 --- a/reentr.h +++ b/reentr.h @@ -63,9 +63,9 @@ * memzero out certain structures before calling the functions. */ #if defined(__OpenBSD__) -# define REENTR_MEMZERO(a,b) memzero(a,b), +# define REENTR_MEMZERO(a,b) memzero(a,b) #else -# define REENTR_MEMZERO(a,b) +# define REENTR_MEMZERO(a,b) 0 #endif #ifdef NETDB_R_OBSOLETE @@ -1172,7 +1172,7 @@ typedef struct { # 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) ? (struct protoent *) Perl_reentrant_retry("getprotobyname", a) : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD -# define getprotobyname(a) (REENTR_MEMZERO(&PL_reentrant_buffer->_protoent_data, sizeof(PL_reentrant_buffer->_protoent_data))(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 == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotobyname", a) : 0)) +# define getprotobyname(a) (REENTR_MEMZERO(&PL_reentrant_buffer->_protoent_data, sizeof(PL_reentrant_buffer->_protoent_data)),(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 == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotobyname", a) : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # endif /* HAS_GETPROTOBYNAME */ #endif /* HAS_GETPROTOBYNAME_R */ @@ -1187,7 +1187,7 @@ typedef struct { # 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) ? (struct protoent *) Perl_reentrant_retry("getprotobynumber", a) : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISD -# define getprotobynumber(a) (REENTR_MEMZERO(&PL_reentrant_buffer->_protoent_data, sizeof(PL_reentrant_buffer->_protoent_data))(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 == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotobynumber", a) : 0)) +# define getprotobynumber(a) (REENTR_MEMZERO(&PL_reentrant_buffer->_protoent_data, sizeof(PL_reentrant_buffer->_protoent_data)),(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 == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotobynumber", a) : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # endif /* HAS_GETPROTOBYNUMBER */ #endif /* HAS_GETPROTOBYNUMBER_R */ @@ -1205,7 +1205,7 @@ typedef struct { # 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) ? (struct protoent *) Perl_reentrant_retry("getprotoent") : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SD -# define getprotoent() (REENTR_MEMZERO(&PL_reentrant_buffer->_protoent_data, sizeof(PL_reentrant_buffer->_protoent_data))(PL_reentrant_retint = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data)) == 0 ? &PL_reentrant_buffer->_protoent_struct : ((PL_reentrant_retint == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotoent") : 0)) +# define getprotoent() (REENTR_MEMZERO(&PL_reentrant_buffer->_protoent_data, sizeof(PL_reentrant_buffer->_protoent_data)),(PL_reentrant_retint = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data)) == 0 ? &PL_reentrant_buffer->_protoent_struct : ((PL_reentrant_retint == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotoent") : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # endif /* HAS_GETPROTOENT */ #endif /* HAS_GETPROTOENT_R */ @@ -1280,7 +1280,7 @@ typedef struct { # 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) ? (struct servent *) Perl_reentrant_retry("getservbyname", a, b) : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD -# define getservbyname(a, b) (REENTR_MEMZERO(&PL_reentrant_buffer->_servent_data, sizeof(PL_reentrant_buffer->_servent_data))(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 == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservbyname", a, b) : 0)) +# define getservbyname(a, b) (REENTR_MEMZERO(&PL_reentrant_buffer->_servent_data, sizeof(PL_reentrant_buffer->_servent_data)),(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 == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservbyname", a, b) : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # endif /* HAS_GETSERVBYNAME */ #endif /* HAS_GETSERVBYNAME_R */ @@ -1295,7 +1295,7 @@ typedef struct { # 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) ? (struct servent *) Perl_reentrant_retry("getservbyport", a, b) : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSD -# define getservbyport(a, b) (REENTR_MEMZERO(&PL_reentrant_buffer->_servent_data, sizeof(PL_reentrant_buffer->_servent_data))(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 == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservbyport", a, b) : 0)) +# define getservbyport(a, b) (REENTR_MEMZERO(&PL_reentrant_buffer->_servent_data, sizeof(PL_reentrant_buffer->_servent_data)),(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 == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservbyport", a, b) : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # endif /* HAS_GETSERVBYPORT */ #endif /* HAS_GETSERVBYPORT_R */ @@ -1313,7 +1313,7 @@ typedef struct { # 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) ? (struct servent *) Perl_reentrant_retry("getservent") : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SD -# define getservent() (REENTR_MEMZERO(&PL_reentrant_buffer->_servent_data, sizeof(PL_reentrant_buffer->_servent_data))(PL_reentrant_retint = getservent_r(&PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data)) == 0 ? &PL_reentrant_buffer->_servent_struct : ((PL_reentrant_retint == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservent") : 0)) +# define getservent() (REENTR_MEMZERO(&PL_reentrant_buffer->_servent_data, sizeof(PL_reentrant_buffer->_servent_data)),(PL_reentrant_retint = getservent_r(&PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data)) == 0 ? &PL_reentrant_buffer->_servent_struct : ((PL_reentrant_retint == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservent") : 0)) # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ # endif /* HAS_GETSERVENT */ #endif /* HAS_GETSERVENT_R */ diff --git a/reentr.pl b/reentr.pl index 580b029..049b06e 100644 --- a/reentr.pl +++ b/reentr.pl @@ -110,9 +110,9 @@ print <_' . $genfunc . '_data))'; + $memzero = 'REENTR_MEMZERO(&PL_reentrant_buffer->_' . $genfunc . '_data, sizeof(PL_reentrant_buffer->_' . $genfunc . '_data)),'; } push @wrap, <