diff options
author | Michael G. Schwern <schwern@pobox.com> | 2008-09-29 11:05:17 -0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-01-03 18:38:42 +0100 |
commit | 948ea7a98bccf1ca837e75b5ea71b67365367ec4 (patch) | |
tree | e0fb84b317ba39c0f2a5c67b6acbb027075eeaac /reentr.h | |
parent | 750c447b413e71e62138b603e69a4ffe7ba754b2 (diff) | |
download | perl-948ea7a98bccf1ca837e75b5ea71b67365367ec4.tar.gz |
Update from y2038
Work around a system that doesn't have gm/localtime_r(). This replaces Perl's
own gm/localtime() wrapper which couldn't be called outside a PP anyway
because it needs my_perl.
Diffstat (limited to 'reentr.h')
-rw-r--r-- | reentr.h | 43 |
1 files changed, 6 insertions, 37 deletions
@@ -185,13 +185,12 @@ #define REENTRANT_PROTO_S_SBIE 69 #define REENTRANT_PROTO_S_SBW 70 #define REENTRANT_PROTO_S_TISBI 71 -#define REENTRANT_PROTO_S_TS 72 -#define REENTRANT_PROTO_S_TSBI 73 -#define REENTRANT_PROTO_S_TSBIE 74 -#define REENTRANT_PROTO_S_TWISBIE 75 -#define REENTRANT_PROTO_V_D 76 -#define REENTRANT_PROTO_V_H 77 -#define REENTRANT_PROTO_V_ID 78 +#define REENTRANT_PROTO_S_TSBI 72 +#define REENTRANT_PROTO_S_TSBIE 73 +#define REENTRANT_PROTO_S_TWISBIE 74 +#define REENTRANT_PROTO_V_D 75 +#define REENTRANT_PROTO_V_H 76 +#define REENTRANT_PROTO_V_ID 77 /* Defines for indicating which special features are supported. */ @@ -740,12 +739,6 @@ typedef struct { FILE* _spent_fptr; # endif #endif /* HAS_GETSPNAM_R */ -#ifdef HAS_GMTIME_R - struct tm _gmtime_struct; -#endif /* HAS_GMTIME_R */ -#ifdef HAS_LOCALTIME_R - struct tm _localtime_struct; -#endif /* HAS_LOCALTIME_R */ #ifdef HAS_RANDOM_R struct random_data _random_struct; # if RANDOM_R_PROTO == REENTRANT_PROTO_I_iS @@ -1330,30 +1323,6 @@ typedef struct { # endif /* HAS_GETSPNAM */ #endif /* HAS_GETSPNAM_R */ -#ifdef HAS_GMTIME_R -# if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) -# undef gmtime -# if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_S_TS -# define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) ? &PL_reentrant_buffer->_gmtime_struct : 0) -# endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ -# if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_I_TS -# define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) == 0 ? &PL_reentrant_buffer->_gmtime_struct : 0) -# endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ -# endif /* HAS_GMTIME */ -#endif /* HAS_GMTIME_R */ - -#ifdef HAS_LOCALTIME_R -# if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) -# undef localtime -# if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_S_TS -# define localtime(a) (L_R_TZSET localtime_r(a, &PL_reentrant_buffer->_localtime_struct) ? &PL_reentrant_buffer->_localtime_struct : 0) -# endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ -# if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_I_TS -# define localtime(a) (L_R_TZSET localtime_r(a, &PL_reentrant_buffer->_localtime_struct) == 0 ? &PL_reentrant_buffer->_localtime_struct : 0) -# endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */ -# endif /* HAS_LOCALTIME */ -#endif /* HAS_LOCALTIME_R */ - #ifdef HAS_RANDOM_R # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) # undef random |