diff options
author | Kevin B Kenny <kennykb@acm.org> | 2004-05-14 21:43:28 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2004-05-14 21:43:28 (GMT) |
commit | d3dd7920cd97f2c402d6fdc5c4acdb3e60c8f9cb (patch) | |
tree | 1bd25818dd481cc051c619d9993b650758201a89 /generic/tclIntPlatDecls.h | |
parent | a87aa8a1be2c89d9174660ca97ea533474e73901 (diff) | |
download | tcl-d3dd7920cd97f2c402d6fdc5c4acdb3e60c8f9cb.zip tcl-d3dd7920cd97f2c402d6fdc5c4acdb3e60c8f9cb.tar.gz tcl-d3dd7920cd97f2c402d6fdc5c4acdb3e60c8f9cb.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.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 \ |