aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-12-11 15:01:38 +0000
committerCorinna Vinschen <corinna@vinschen.de>2007-12-11 15:01:38 +0000
commit2537b7980dcaaaad61f62411fb4323b92a94a92f (patch)
tree33aa6d4ff85c6d420b9049808f668eab603b8604
parenta8c4a5e0ff6ecd6f36ed684b7cdbadfd417be1b7 (diff)
downloadnewlib-2537b7980dcaaaad61f62411fb4323b92a94a92f.zip
newlib-2537b7980dcaaaad61f62411fb4323b92a94a92f.tar.gz
newlib-2537b7980dcaaaad61f62411fb4323b92a94a92f.tar.bz2
* localtime.cc (tzset): Call tzsetwall only if it hasn't been
called before.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/localtime.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ff78bf8..90ff469 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * localtime.cc (tzset): Call tzsetwall only if it hasn't been
+ called before.
+
2007-12-01 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/time.h (daylight): Declare as extern symbol referring
diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc
index 1dab627..a2f415f 100644
--- a/winsup/cygwin/localtime.cc
+++ b/winsup/cygwin/localtime.cc
@@ -1476,7 +1476,8 @@ tzset P((void))
const char * name = getenv("TZ");
if (name == NULL) {
- tzsetwall();
+ if (!lcl_is_set)
+ tzsetwall();
return;
}