summaryrefslogtreecommitdiffstats
path: root/generic/tclIntPlatDecls.h
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-05-14 21:41:04 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-05-14 21:41:04 (GMT)
commit1f09368b39073bc30f3957f2f70911a722f5c781 (patch)
treec43bfd28868eb27530e825eb959a36371420aeb7 /generic/tclIntPlatDecls.h
parentb8fec065a49ccae81c772930a794083e9fb8fc10 (diff)
downloadtcl-1f09368b39073bc30f3957f2f70911a722f5c781.zip
tcl-1f09368b39073bc30f3957f2f70911a722f5c781.tar.gz
tcl-1f09368b39073bc30f3957f2f70911a722f5c781.tar.bz2
2004-05-14 Kevin B. Kenny <kennykb@acm.org>
* generic/tclInt.decls: Promoted TclpLocaltime and TclpGmtime * generic/tclIntDecls.h: from Unix-specific stubs to the generic * generic/tclIntPlatDecls.h: internal Stubs table. Reran 'genstubs' * generic/tclStubInit.c: * unix/tclUnixPort.h: * generic/tclClock.c: Changed a buggy 'GMT' timezone specification to the correct 'GMT0'. [Bug #922848] * unix/tclUnixThrd.c: Moved TclpGmtime and TclpLocaltime to unix/tclUnixTime.c where they belong. * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime, TclpGetTimeZone, ThreadSafeGMTime [removed], ThreadSafeLocalTime [removed], SetTZIfNecessary, CleanupMemory): Restructured to make sure that the same mutex protects all calls to localtime, gmtime, and tzset. Added a check in front of those calls to make sure that the TZ env var hasn't changed since the last call to tzset, and repeat tzset if necessary. [Bug #942078] Removed a buggy test of the Daylight Saving Time information in 'gettimeofday' in favor of applying 'localtime' to a known value. [Bug #922848] * tests/clock.test (clock-3.14): Added test to make sure that changes to $env(TZ) take effect immediately. * win/tclWinTime.c (TclpLocaltime, TclpGmtime): Added porting layer for 'localtime' and 'gmtime' calls.
Diffstat (limited to 'generic/tclIntPlatDecls.h')
-rw-r--r--generic/tclIntPlatDecls.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 09c1226..c349486 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.19 2002/12/06 23:22:59 hobbs Exp $
+ * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.19.2.1 2004/05/14 21:41:11 kennykb Exp $
*/
#ifndef _TCLINTPLATDECLS
@@ -62,9 +62,9 @@ EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((
/* 10 */
EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR * dir));
/* 11 */
-EXTERN struct tm * TclpLocaltime _ANSI_ARGS_((time_t * clock));
+EXTERN struct tm * TclpLocaltime_unix _ANSI_ARGS_((CONST time_t * clock));
/* 12 */
-EXTERN struct tm * TclpGmtime _ANSI_ARGS_((time_t * clock));
+EXTERN struct tm * TclpGmtime_unix _ANSI_ARGS_((CONST time_t * clock));
/* 13 */
EXTERN char * TclpInetNtoa _ANSI_ARGS_((struct in_addr addr));
#endif /* UNIX */
@@ -229,8 +229,8 @@ typedef struct TclIntPlatStubs {
int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 8 */
TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents)); /* 9 */
Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR * dir)); /* 10 */
- struct tm * (*tclpLocaltime) _ANSI_ARGS_((time_t * clock)); /* 11 */
- struct tm * (*tclpGmtime) _ANSI_ARGS_((time_t * clock)); /* 12 */
+ struct tm * (*tclpLocaltime_unix) _ANSI_ARGS_((CONST time_t * clock)); /* 11 */
+ struct tm * (*tclpGmtime_unix) _ANSI_ARGS_((CONST time_t * clock)); /* 12 */
char * (*tclpInetNtoa) _ANSI_ARGS_((struct in_addr addr)); /* 13 */
#endif /* UNIX */
#ifdef __WIN32__
@@ -351,13 +351,13 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr;
#define TclpReaddir \
(tclIntPlatStubsPtr->tclpReaddir) /* 10 */
#endif
-#ifndef TclpLocaltime
-#define TclpLocaltime \
- (tclIntPlatStubsPtr->tclpLocaltime) /* 11 */
+#ifndef TclpLocaltime_unix
+#define TclpLocaltime_unix \
+ (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */
#endif
-#ifndef TclpGmtime
-#define TclpGmtime \
- (tclIntPlatStubsPtr->tclpGmtime) /* 12 */
+#ifndef TclpGmtime_unix
+#define TclpGmtime_unix \
+ (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */
#endif
#ifndef TclpInetNtoa
#define TclpInetNtoa \