diff options
author | rmax <rmax> | 2004-03-18 18:55:55 (GMT) |
---|---|---|
committer | rmax <rmax> | 2004-03-18 18:55:55 (GMT) |
commit | eb482d45256bc2cbd79a7a1b72c2b5395d638818 (patch) | |
tree | 2538fb9cac9a8d49dbf80b9e182104ec533d86e8 /win/tclWinTime.c | |
parent | 395490646bbfb29fcab6b1b1b8a5e07a4df44a61 (diff) | |
download | tcl-eb482d45256bc2cbd79a7a1b72c2b5395d638818.zip tcl-eb482d45256bc2cbd79a7a1b72c2b5395d638818.tar.gz tcl-eb482d45256bc2cbd79a7a1b72c2b5395d638818.tar.bz2 |
* generic/tclIntDecls.h: Removed TclpTime_t. It wasn't really needed,
* generic/tclInt.h: but caused warnings related to
* generic/tclInt.decls: strict aliasing with GCC 3.3.
* generic/tclClock.c:
* generic/tclDate.c:
* generic/tclGetDate.y:
* win/tclWinTime.c:
* unix/tclUnixTime.c:
Diffstat (limited to 'win/tclWinTime.c')
-rw-r--r-- | win/tclWinTime.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 396adfa..1ab09a8 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTime.c,v 1.21 2003/12/16 02:55:38 davygrvy Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.22 2004/03/18 18:56:04 rmax Exp $ */ #include "tclWinInt.h" @@ -545,10 +545,9 @@ TclpGetTZName(int dst) struct tm * TclpGetDate(t, useGMT) - TclpTime_t t; + CONST time_t t; int useGMT; { - const time_t *tp = (const time_t *) t; struct tm *tmPtr; time_t time; @@ -571,14 +570,14 @@ TclpGetDate(t, useGMT) H. Giese, June 2003 */ #ifdef __BORLANDC__ - if (*tp >= SECSPERDAY) { + if (t >= SECSPERDAY) { #else - if (*tp >= 0) { + if (t >= 0) { #endif return localtime(tp); } - time = *tp - timezone; + time = t - timezone; /* * If we aren't near to overflowing the long, just add the bias and @@ -586,11 +585,11 @@ TclpGetDate(t, useGMT) * the result at the end. */ - if (*tp < (LONG_MAX - 2 * SECSPERDAY) - && *tp > (LONG_MIN + 2 * SECSPERDAY)) { + if (t < (LONG_MAX - 2 * SECSPERDAY) + && t > (LONG_MIN + 2 * SECSPERDAY)) { tmPtr = ComputeGMT(&time); } else { - tmPtr = ComputeGMT(tp); + tmPtr = ComputeGMT(&t); tzset(); @@ -626,7 +625,7 @@ TclpGetDate(t, useGMT) tmPtr->tm_wday = (tmPtr->tm_wday + time) % 7; } } else { - tmPtr = ComputeGMT(tp); + tmPtr = ComputeGMT(&t); } return tmPtr; } |