summaryrefslogtreecommitdiffstats
path: root/generic/tclIntDecls.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/tclIntDecls.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/tclIntDecls.h')
-rw-r--r--generic/tclIntDecls.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index e41dca6..d706a37 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.49 2003/02/18 02:25:45 hobbs Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.49.2.1 2004/05/14 21:41:11 kennykb Exp $
*/
#ifndef _TCLINTDECLS
@@ -503,6 +503,18 @@ EXTERN int TclUniCharMatch _ANSI_ARGS_((
CONST Tcl_UniChar * string, int strLen,
CONST Tcl_UniChar * pattern, int ptnLen,
int nocase));
+/* Slot 174 is reserved */
+/* Slot 175 is reserved */
+/* Slot 176 is reserved */
+/* Slot 177 is reserved */
+/* Slot 178 is reserved */
+/* Slot 179 is reserved */
+/* Slot 180 is reserved */
+/* Slot 181 is reserved */
+/* 182 */
+EXTERN struct tm * TclpLocaltime _ANSI_ARGS_((CONST time_t * clock));
+/* 183 */
+EXTERN struct tm * TclpGmtime _ANSI_ARGS_((CONST time_t * clock));
typedef struct TclIntStubs {
int magic;
@@ -706,6 +718,16 @@ typedef struct TclIntStubs {
int (*tclCheckExecutionTraces) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[])); /* 171 */
int (*tclInThreadExit) _ANSI_ARGS_((void)); /* 172 */
int (*tclUniCharMatch) _ANSI_ARGS_((CONST Tcl_UniChar * string, int strLen, CONST Tcl_UniChar * pattern, int ptnLen, int nocase)); /* 173 */
+ void *reserved174;
+ void *reserved175;
+ void *reserved176;
+ void *reserved177;
+ void *reserved178;
+ void *reserved179;
+ void *reserved180;
+ void *reserved181;
+ struct tm * (*tclpLocaltime) _ANSI_ARGS_((CONST time_t * clock)); /* 182 */
+ struct tm * (*tclpGmtime) _ANSI_ARGS_((CONST time_t * clock)); /* 183 */
} TclIntStubs;
#ifdef __cplusplus
@@ -1316,6 +1338,22 @@ extern TclIntStubs *tclIntStubsPtr;
#define TclUniCharMatch \
(tclIntStubsPtr->tclUniCharMatch) /* 173 */
#endif
+/* Slot 174 is reserved */
+/* Slot 175 is reserved */
+/* Slot 176 is reserved */
+/* Slot 177 is reserved */
+/* Slot 178 is reserved */
+/* Slot 179 is reserved */
+/* Slot 180 is reserved */
+/* Slot 181 is reserved */
+#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) */