diff options
author | Kevin B Kenny <kennykb@acm.org> | 2004-05-14 21:41:04 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2004-05-14 21:41:04 (GMT) |
commit | 1f09368b39073bc30f3957f2f70911a722f5c781 (patch) | |
tree | c43bfd28868eb27530e825eb959a36371420aeb7 /unix/tclUnixPort.h | |
parent | b8fec065a49ccae81c772930a794083e9fb8fc10 (diff) | |
download | tcl-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 'unix/tclUnixPort.h')
-rw-r--r-- | unix/tclUnixPort.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index d694488..c183985 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.27.2.2 2003/12/09 15:32:21 dkf Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.27.2.3 2004/05/14 21:41:12 kennykb Exp $ */ #ifndef _TCLUNIXPORT @@ -564,12 +564,14 @@ EXTERN void TclpMutexInit _ANSI_ARGS_((TclpMutex *mPtr)); EXTERN void TclpMutexLock _ANSI_ARGS_((TclpMutex *mPtr)); EXTERN void TclpMutexUnlock _ANSI_ARGS_((TclpMutex *mPtr)); EXTERN Tcl_DirEntry * TclpReaddir(DIR *); -EXTERN struct tm * TclpLocaltime(time_t *); -EXTERN struct tm * TclpGmtime(time_t *); +#ifndef TclpLocaltime +EXTERN struct tm * TclpLocaltime(CONST time_t *); +#endif +#ifndef TclpGmtime +EXTERN struct tm * TclpGmtime(CONST time_t *); +#endif EXTERN char * TclpInetNtoa(struct in_addr); #define readdir(x) TclpReaddir(x) -#define localtime(x) TclpLocaltime(x) -#define gmtime(x) TclpGmtime(x) #define inet_ntoa(x) TclpInetNtoa(x) #undef TclOSreaddir #define TclOSreaddir(x) TclpReaddir(x) |