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/tclIntDecls.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/tclIntDecls.h')
-rw-r--r-- | generic/tclIntDecls.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 09e193d..3b6fbfb 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.61 2004/03/19 18:43:15 dgp Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.62 2004/05/14 21:43:29 kennykb Exp $ */ #ifndef _TCLINTDECLS @@ -959,6 +959,16 @@ EXTERN Tcl_Obj * TclNewListObjDirect _ANSI_ARGS_((int objc, EXTERN Tcl_Obj * TclDbNewListObjDirect _ANSI_ARGS_((int objc, Tcl_Obj ** objv, CONST char * file, int line)); #endif +#ifndef TclpLocaltime_TCL_DECLARED +#define TclpLocaltime_TCL_DECLARED +/* 182 */ +EXTERN struct tm * TclpLocaltime _ANSI_ARGS_((CONST time_t * clock)); +#endif +#ifndef TclpGmtime_TCL_DECLARED +#define TclpGmtime_TCL_DECLARED +/* 183 */ +EXTERN struct tm * TclpGmtime _ANSI_ARGS_((CONST time_t * clock)); +#endif typedef struct TclIntStubs { int magic; @@ -1161,6 +1171,8 @@ typedef struct TclIntStubs { Tcl_Obj * (*tcl_GetStartupScript) _ANSI_ARGS_((CONST char ** encodingNamePtr)); /* 179 */ Tcl_Obj * (*tclNewListObjDirect) _ANSI_ARGS_((int objc, Tcl_Obj ** objv)); /* 180 */ Tcl_Obj * (*tclDbNewListObjDirect) _ANSI_ARGS_((int objc, Tcl_Obj ** objv, CONST char * file, int line)); /* 181 */ + struct tm * (*tclpLocaltime) _ANSI_ARGS_((CONST time_t * clock)); /* 182 */ + struct tm * (*tclpGmtime) _ANSI_ARGS_((CONST time_t * clock)); /* 183 */ } TclIntStubs; #ifdef __cplusplus @@ -1797,6 +1809,14 @@ extern TclIntStubs *tclIntStubsPtr; #define TclDbNewListObjDirect \ (tclIntStubsPtr->tclDbNewListObjDirect) /* 181 */ #endif +#ifndef TclpLocaltime +#define TclpLocaltime \ + (tclIntStubsPtr->tclpLocaltime) /* 182 */ +#endif +#ifndef TclpGmtime +#define TclpGmtime \ + (tclIntStubsPtr->tclpGmtime) /* 183 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ |