From: H.Merijn Brand Date: Mon, 6 Nov 2006 13:58:56 +0000 (+0000) Subject: The non-unix parts for localtime_r_needs_tzset X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f025e94b3bdd286f2ee3dc88718b923af2a6e55d;p=p5sagit%2Fp5-mst-13.2.git The non-unix parts for localtime_r_needs_tzset Plus forced Glossary entry. That is a TODO for automation p4raw-id: //depot/perl@29213 --- diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index 9af4368..be17a38 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -281,6 +281,7 @@ d_ldbl_dig='define' d_libm_lib_version='define' d_link='define' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='define' d_longdbl='define' diff --git a/NetWare/config.wc b/NetWare/config.wc index 30c6e5d..675d934c 100644 --- a/NetWare/config.wc +++ b/NetWare/config.wc @@ -269,6 +269,7 @@ d_ldbl_dig='define' d_libm_lib_version='undef' d_link='define' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' diff --git a/Porting/Glossary b/Porting/Glossary index 9a40c55..0c6b247 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -1226,6 +1226,10 @@ d_localtime_r (d_localtime_r.U): which indicates to the C program that the localtime_r() routine is available. +d_localtime_r_needs_tzset (d_localtime_r.U): + This variable conditionally defines the LOCALTIME_R_NEEDS_TZSET + symbol, which makes us call tzset before localtime_r() + d_locconv (d_locconv.U): This variable conditionally defines HAS_LOCALECONV if localeconv() is available for numeric and monetary formatting conventions. diff --git a/Porting/config_H b/Porting/config_H index 51e86b1..920cd90 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -1889,6 +1889,12 @@ * This symbol, if defined, indicates that the localtime_r routine * is available to localtime re-entrantly. */ +/* LOCALTIME_R_NEEDS_TZSET: + * Many libc's localtime_r implementations do not call tzset, + * making them differ from localtime(), and making timezone + * changes using $ENV{TZ} without explicitly calling tzset + * impossible. This symbol makes us call tzset before localtime_r + */ /* LOCALTIME_R_PROTO: * This symbol encodes the prototype of localtime_r. * It is zero if d_localtime_r is undef, and one of the @@ -1896,6 +1902,7 @@ * is defined. */ /*#define HAS_LOCALTIME_R / **/ +/*#define LOCALTIME_R_NEEDS_TZSET / **/ #define LOCALTIME_R_PROTO 0 /**/ /* HAS_LONG_DOUBLE: diff --git a/config_h.SH b/config_h.SH index 4812284..957c05b 100644 --- a/config_h.SH +++ b/config_h.SH @@ -2287,6 +2287,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * This symbol, if defined, indicates that the localtime_r routine * is available to localtime re-entrantly. */ +/* LOCALTIME_R_NEEDS_TZSET: + * Many libc's localtime_r implementations do not call tzset, + * making them differ from localtime(), and making timezone + * changes using $ENV{TZ} without explicitly calling tzset + * impossible. This symbol makes us call tzset before localtime_r + */ #$d_localtime_r_needs_tzset LOCALTIME_R_NEEDS_TZSET /**/ #ifdef LOCALTIME_R_NEEDS_TZSET #define L_R_TZSET tzset(), diff --git a/configure.com b/configure.com index 2078547..47537f0 100644 --- a/configure.com +++ b/configure.com @@ -6440,6 +6440,7 @@ $ WC "d_getservent_r='undef'" $ WC "d_getspnam_r='undef'" $ WC "d_gmtime_r='undef'" ! leave undef'd; we use my_gmtime $ WC "d_localtime_r='undef'" ! leave undef'd; we use my_localtime +$ WC "d_localtime_r_needs_tzset='undef'" $ WC "d_random_r='undef'" $ WC "d_readdir_r='define'" ! always defined; we roll our own $ WC "d_readdir64_r='undef'" diff --git a/epoc/config.sh b/epoc/config.sh index cdddfac..03e4261 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -270,6 +270,7 @@ d_ldbl_dig='undef' d_link='undef' d_llseek='undef' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='undef' d_lockf='undef' d_longdbl='undef' diff --git a/handy.h b/handy.h index 8586a25..0aa2b78 100644 --- a/handy.h +++ b/handy.h @@ -175,7 +175,7 @@ typedef U64TYPE U64; #endif /* HMB H.Merijn Brand - a placeholder for preparing Configure patches */ -#if defined(HAS_MALLOC_SIZE) && defined(HAS_SNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) +#if defined(HAS_MALLOC_SIZE) && defined(LOCALTIME_R_NEEDS_TZSET) /* Not (yet) used at top level, but mention them for metaconfig */ #endif diff --git a/plan9/config.plan9 b/plan9/config.plan9 index 99b41e0..d194b8b 100644 --- a/plan9/config.plan9 +++ b/plan9/config.plan9 @@ -1961,6 +1961,12 @@ * This symbol, if defined, indicates that the localtime_r routine * is available to localtime re-entrantly. */ +/* LOCALTIME_R_NEEDS_TZSET: + * Many libc's localtime_r implementations do not call tzset, + * making them differ from localtime(), and making timezone + * changes using $ENV{TZ} without explicitly calling tzset + * impossible. This symbol makes us call tzset before localtime_r + */ /* LOCALTIME_R_PROTO: * This symbol encodes the prototype of localtime_r. * It is zero if d_localtime_r is undef, and one of the @@ -1968,6 +1974,7 @@ * is defined. */ /*#define HAS_LOCALTIME_R / **/ +/*#define LOCALTIME_R_NEEDS_TZSET / **/ #define LOCALTIME_R_PROTO 0 /**/ /* HAS_LONG_DOUBLE: diff --git a/plan9/config_h.sample b/plan9/config_h.sample index 5709812..0281671 100644 --- a/plan9/config_h.sample +++ b/plan9/config_h.sample @@ -1908,6 +1908,12 @@ * This symbol, if defined, indicates that the localtime_r routine * is available to localtime re-entrantly. */ +/* LOCALTIME_R_NEEDS_TZSET: + * Many libc's localtime_r implementations do not call tzset, + * making them differ from localtime(), and making timezone + * changes using $ENV{TZ} without explicitly calling tzset + * impossible. This symbol makes us call tzset before localtime_r + */ /* LOCALTIME_R_PROTO: * This symbol encodes the prototype of localtime_r. * It is zero if d_localtime_r is undef, and one of the @@ -1915,6 +1921,7 @@ * is defined. */ /*#define HAS_LOCALTIME_R / **/ +/*#define LOCALTIME_R_NEEDS_TZSET / **/ #define LOCALTIME_R_PROTO 0 /**/ /* HAS_LONG_DOUBLE: diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index 8697741..08d181b 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -277,6 +277,7 @@ d_lchown='undef' d_ldbl_dig='define' d_link='define' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' diff --git a/uconfig.sh b/uconfig.sh index 01c6ad2..b1d6c71 100755 --- a/uconfig.sh +++ b/uconfig.sh @@ -212,6 +212,7 @@ d_ldbl_dig='undef' d_libm_lib_version='undef' d_link='undef' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='undef' d_lockf='undef' d_longdbl='undef' diff --git a/win32/config.bc b/win32/config.bc index e2198d5..cd2dca4 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -270,6 +270,7 @@ d_ldbl_dig='define' d_libm_lib_version='undef' d_link='define' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' diff --git a/win32/config.ce b/win32/config.ce index 342dc48..32e4eea 100644 --- a/win32/config.ce +++ b/win32/config.ce @@ -269,6 +269,7 @@ d_ldbl_dig='define' d_libm_lib_version='undef' d_link='define' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='undef' d_longdbl='undef' diff --git a/win32/config.gc b/win32/config.gc index 90704f0..8f45dd0 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -270,6 +270,7 @@ d_ldbl_dig='define' d_libm_lib_version='undef' d_link='define' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' diff --git a/win32/config.vc b/win32/config.vc index 3b4f6d4..0fbc876 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -270,6 +270,7 @@ d_ldbl_dig='define' d_libm_lib_version='undef' d_link='define' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' diff --git a/win32/config.vc64 b/win32/config.vc64 index 74bdcfc..8549af7 100644 --- a/win32/config.vc64 +++ b/win32/config.vc64 @@ -270,6 +270,7 @@ d_ldbl_dig='define' d_libm_lib_version='undef' d_link='define' d_localtime_r='undef' +d_localtime_r_needs_tzset='undef' d_locconv='define' d_lockf='undef' d_longdbl='define' diff --git a/win32/config_H.bc b/win32/config_H.bc index fc0b415..9081c14 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -2251,6 +2251,12 @@ * This symbol, if defined, indicates that the localtime_r routine * is available to localtime re-entrantly. */ +/* LOCALTIME_R_NEEDS_TZSET: + * Many libc's localtime_r implementations do not call tzset, + * making them differ from localtime(), and making timezone + * changes using $ENV{TZ} without explicitly calling tzset + * impossible. This symbol makes us call tzset before localtime_r + */ /* LOCALTIME_R_PROTO: * This symbol encodes the prototype of localtime_r. * It is zero if d_localtime_r is undef, and one of the @@ -2258,6 +2264,7 @@ * is defined. */ /*#define HAS_LOCALTIME_R /**/ +/*#define LOCALTIME_R_NEEDS_TZSET /**/ #define LOCALTIME_R_PROTO 0 /**/ /* HAS_LONG_DOUBLE: diff --git a/win32/config_H.ce b/win32/config_H.ce index 3a38692..ab1bc33 100644 --- a/win32/config_H.ce +++ b/win32/config_H.ce @@ -1880,6 +1880,12 @@ * This symbol, if defined, indicates that the localtime_r routine * is available to localtime re-entrantly. */ +/* LOCALTIME_R_NEEDS_TZSET: + * Many libc's localtime_r implementations do not call tzset, + * making them differ from localtime(), and making timezone + * changes using $ENV{TZ} without explicitly calling tzset + * impossible. This symbol makes us call tzset before localtime_r + */ /* LOCALTIME_R_PROTO: * This symbol encodes the prototype of localtime_r. * It is zero if d_localtime_r is undef, and one of the @@ -1887,6 +1893,7 @@ * is defined. */ /*#define HAS_LOCALTIME_R /**/ +/*#define LOCALTIME_R_NEEDS_TZSET /**/ #define LOCALTIME_R_PROTO 0 /**/ /* HAS_LONG_DOUBLE: diff --git a/win32/config_H.gc b/win32/config_H.gc index d22a0b0..33e10cc 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -2263,6 +2263,12 @@ * This symbol, if defined, indicates that the localtime_r routine * is available to localtime re-entrantly. */ +/* LOCALTIME_R_NEEDS_TZSET: + * Many libc's localtime_r implementations do not call tzset, + * making them differ from localtime(), and making timezone + * changes using $ENV{TZ} without explicitly calling tzset + * impossible. This symbol makes us call tzset before localtime_r + */ /* LOCALTIME_R_PROTO: * This symbol encodes the prototype of localtime_r. * It is zero if d_localtime_r is undef, and one of the @@ -2270,6 +2276,7 @@ * is defined. */ /*#define HAS_LOCALTIME_R /**/ +/*#define LOCALTIME_R_NEEDS_TZSET /**/ #define LOCALTIME_R_PROTO 0 /**/ /* HAS_LONG_DOUBLE: diff --git a/win32/config_H.vc b/win32/config_H.vc index f1d234f..6e443d2 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -2259,6 +2259,12 @@ * This symbol, if defined, indicates that the localtime_r routine * is available to localtime re-entrantly. */ +/* LOCALTIME_R_NEEDS_TZSET: + * Many libc's localtime_r implementations do not call tzset, + * making them differ from localtime(), and making timezone + * changes using $ENV{TZ} without explicitly calling tzset + * impossible. This symbol makes us call tzset before localtime_r + */ /* LOCALTIME_R_PROTO: * This symbol encodes the prototype of localtime_r. * It is zero if d_localtime_r is undef, and one of the @@ -2266,6 +2272,7 @@ * is defined. */ /*#define HAS_LOCALTIME_R /**/ +/*#define LOCALTIME_R_NEEDS_TZSET /**/ #define LOCALTIME_R_PROTO 0 /**/ /* HAS_LONG_DOUBLE: diff --git a/win32/config_H.vc64 b/win32/config_H.vc64 index 298fe41..b3e391d 100644 --- a/win32/config_H.vc64 +++ b/win32/config_H.vc64 @@ -2251,6 +2251,12 @@ * This symbol, if defined, indicates that the localtime_r routine * is available to localtime re-entrantly. */ +/* LOCALTIME_R_NEEDS_TZSET: + * Many libc's localtime_r implementations do not call tzset, + * making them differ from localtime(), and making timezone + * changes using $ENV{TZ} without explicitly calling tzset + * impossible. This symbol makes us call tzset before localtime_r + */ /* LOCALTIME_R_PROTO: * This symbol encodes the prototype of localtime_r. * It is zero if d_localtime_r is undef, and one of the @@ -2258,6 +2264,7 @@ * is defined. */ /*#define HAS_LOCALTIME_R /**/ +/*#define LOCALTIME_R_NEEDS_TZSET /**/ #define LOCALTIME_R_PROTO 0 /**/ /* HAS_LONG_DOUBLE: