summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cross/config.sh-arm-linux1
-rw-r--r--NetWare/config.wc1
-rw-r--r--Porting/Glossary4
-rw-r--r--Porting/config_H7
-rw-r--r--config_h.SH6
-rw-r--r--configure.com1
-rw-r--r--epoc/config.sh1
-rw-r--r--handy.h2
-rw-r--r--plan9/config.plan97
-rw-r--r--plan9/config_h.sample7
-rw-r--r--plan9/config_sh.sample1
-rwxr-xr-xuconfig.sh1
-rw-r--r--win32/config.bc1
-rw-r--r--win32/config.ce1
-rw-r--r--win32/config.gc1
-rw-r--r--win32/config.vc1
-rw-r--r--win32/config.vc641
-rw-r--r--win32/config_H.bc7
-rw-r--r--win32/config_H.ce7
-rw-r--r--win32/config_H.gc7
-rw-r--r--win32/config_H.vc7
-rw-r--r--win32/config_H.vc647
22 files changed, 78 insertions, 1 deletions
diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux
index 9af43681f9..be17a386d2 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 30c6e5dd96..675d934cae 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 9a40c552cf..0c6b247be1 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 51e86b1a20..920cd90922 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 48122845f1..957c05b7f4 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -2287,6 +2287,12 @@ sed <<!GROK!THIS! >$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 20785472e5..47537f027a 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 cdddfacf4c..03e426133a 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 8586a25ee4..0aa2b78b0a 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 99b41e0405..d194b8bbe7 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 5709812049..02816711c4 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 8697741083..08d181bdf2 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 01c6ad2614..b1d6c71330 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 e2198d593d..cd2dca4ad5 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 342dc4859a..32e4eea685 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 90704f01d1..8f45dd01ee 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 3b4f6d46c5..0fbc87629b 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 74bdcfcb2d..8549af7b51 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 fc0b415018..9081c14bbc 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 3a38692344..ab1bc33365 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 d22a0b03ef..33e10cc427 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 f1d234f3fe..6e443d25d3 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 298fe418fb..b3e391d118 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: