diff options
author | kennykb <kennykb@noemail.net> | 2004-05-14 21:43:28 (GMT) |
---|---|---|
committer | kennykb <kennykb@noemail.net> | 2004-05-14 21:43:28 (GMT) |
commit | 9fa9bb63650355f3db6a6173aa2594cd811d99ad (patch) | |
tree | 1bd25818dd481cc051c619d9993b650758201a89 /generic/tclIntPlatDecls.h | |
parent | 32f4b726efb5cd2646d52a3d4c3118c2a67d97b3 (diff) | |
download | tcl-9fa9bb63650355f3db6a6173aa2594cd811d99ad.zip tcl-9fa9bb63650355f3db6a6173aa2594cd811d99ad.tar.gz tcl-9fa9bb63650355f3db6a6173aa2594cd811d99ad.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.
FossilOrigin-Name: 44753d7a62927a3ae318a223fb94a8f35b69bf08
Diffstat (limited to 'generic/tclIntPlatDecls.h')
-rw-r--r-- | generic/tclIntPlatDecls.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 0d5bf30..3477646 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.22 2004/03/17 18:14:13 das Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.23 2004/05/14 21:43:29 kennykb Exp $ */ #ifndef _TCLINTPLATDECLS @@ -91,15 +91,15 @@ EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_(( /* 10 */ EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR * dir)); #endif -#ifndef TclpLocaltime_TCL_DECLARED -#define TclpLocaltime_TCL_DECLARED +#ifndef TclpLocaltime_unix_TCL_DECLARED +#define TclpLocaltime_unix_TCL_DECLARED /* 11 */ -EXTERN struct tm * TclpLocaltime _ANSI_ARGS_((time_t * clock)); +EXTERN struct tm * TclpLocaltime_unix _ANSI_ARGS_((CONST time_t * clock)); #endif -#ifndef TclpGmtime_TCL_DECLARED -#define TclpGmtime_TCL_DECLARED +#ifndef TclpGmtime_unix_TCL_DECLARED +#define TclpGmtime_unix_TCL_DECLARED /* 12 */ -EXTERN struct tm * TclpGmtime _ANSI_ARGS_((time_t * clock)); +EXTERN struct tm * TclpGmtime_unix _ANSI_ARGS_((CONST time_t * clock)); #endif #ifndef TclpInetNtoa_TCL_DECLARED #define TclpInetNtoa_TCL_DECLARED @@ -300,8 +300,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 */ int (*tclUnixCopyFile) _ANSI_ARGS_((CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts)); /* 14 */ #endif /* UNIX */ @@ -399,13 +399,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 \ |