diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2006-06-14 15:21:12 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2006-06-14 15:21:12 (GMT) |
commit | 509281cd2ab88a10a9e781f373d5e59f29f3bc79 (patch) | |
tree | b7f93c0f3fad3eccfb16e8fcd337ce453d85e1c7 /win/tclWinTime.c | |
parent | 0c32ed9ff184245f1517edf43a56d458a73b871f (diff) | |
download | tcl-509281cd2ab88a10a9e781f373d5e59f29f3bc79.zip tcl-509281cd2ab88a10a9e781f373d5e59f29f3bc79.tar.gz tcl-509281cd2ab88a10a9e781f373d5e59f29f3bc79.tar.bz2 |
Enable building Tcl with Microsoft's latest compiler offering
(VS2005). We have to handle a number of oddities as they have
deprecated most of the standard C library and now generate manifest
files to be linked into the binaries. SF bug #1424909
Diffstat (limited to 'win/tclWinTime.c')
-rw-r--r-- | win/tclWinTime.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/win/tclWinTime.c b/win/tclWinTime.c index dbb6dbc..842d114 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.14.2.8 2005/03/30 05:31:13 hobbs Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.14.2.9 2006/06/14 15:21:15 patthoyts Exp $ */ #include "tclWinInt.h" @@ -422,7 +422,7 @@ Tcl_GetTime(timePtr) timeInfo.fileTimeLastCall.QuadPart = curFileTime; timeInfo.perfCounterLastCall.QuadPart = curCounter.QuadPart; usecSincePosixEpoch = ( curFileTime - posixEpoch.QuadPart ) / 10; - timePtr->sec = (time_t) ( usecSincePosixEpoch / 1000000 ); + timePtr->sec = (long) ( usecSincePosixEpoch / 1000000 ); timePtr->usec = (unsigned long ) ( usecSincePosixEpoch % 1000000 ); useFtime = 0; } @@ -434,7 +434,7 @@ Tcl_GetTime(timePtr) /* High resolution timer is not available. Just use ftime */ ftime(&t); - timePtr->sec = t.time; + timePtr->sec = (long)t.time; timePtr->usec = t.millitm * 1000; } } @@ -636,9 +636,9 @@ TclpGetDate(t, useGMT) } time /= 24; - tmPtr->tm_mday += time; - tmPtr->tm_yday += time; - tmPtr->tm_wday = (tmPtr->tm_wday + time) % 7; + tmPtr->tm_mday += (int)time; + tmPtr->tm_yday += (int)time; + tmPtr->tm_wday = (tmPtr->tm_wday + (int)time) % 7; } } else { tmPtr = ComputeGMT(tp); @@ -679,8 +679,8 @@ ComputeGMT(tp) * Compute the 4 year span containing the specified time. */ - tmp = *tp / SECSPER4YEAR; - rem = *tp % SECSPER4YEAR; + tmp = (long)(*tp / SECSPER4YEAR); + rem = (LONG)(*tp % SECSPER4YEAR); /* * Correct for weird mod semantics so the remainder is always positive. @@ -746,7 +746,7 @@ ComputeGMT(tp) * Compute day of week. Epoch started on a Thursday. */ - tmPtr->tm_wday = (*tp / SECSPERDAY) + 4; + tmPtr->tm_wday = (long)(*tp / SECSPERDAY) + 4; if ((*tp % SECSPERDAY) < 0) { tmPtr->tm_wday--; } |