summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixTime.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixTime.c')
-rw-r--r--unix/tclUnixTime.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index ba8d984..c94166d 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: @(#) tclUnixTime.c 1.13 97/10/31 15:04:58
+ * SCCS: @(#) tclUnixTime.c 1.14 98/02/19 11:52:08
*/
#include "tclInt.h"
@@ -165,12 +165,15 @@ TclpGetTimeZone (currentTime)
#if defined(HAVE_TIMEZONE_VAR) && !defined (TCL_GOT_TIMEZONE)
# define TCL_GOT_TIMEZONE
static int setTZ = 0;
+ static Tcl_Mutex tzMutex;
int timeZone;
+ Tcl_MutexLock(&tzMutex);
if (!setTZ) {
tzset();
setTZ = 1;
}
+ Tcl_MutexUnlock(&tzMutex);
/*
* Note: this is not a typo in "timezone" below! See tzset