summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2013-05-17 15:08:48 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2013-05-17 15:08:48 (GMT)
commitbc35ec8d03d01b7274ba1915a4cb299b2775df54 (patch)
tree0c3ab2d3a69e70373084c032d1498f40a4b73c96
parent5203c5360181cd6258d12719d448e05dea6f1365 (diff)
downloadtcl-bc35ec8d03d01b7274ba1915a4cb299b2775df54.zip
tcl-bc35ec8d03d01b7274ba1915a4cb299b2775df54.tar.gz
tcl-bc35ec8d03d01b7274ba1915a4cb299b2775df54.tar.bz2
- eliminate compiler warning when compiling with Visual Studio.
- Make sure that _ftime() from msvcrt.dll is used, not ftime() from mingw (which might use 64-bit time_t) FossilOrigin-Name: 62fbe65d17da7213d4aab3a2dc7c489c86c28d69
-rw-r--r--generic/tclBasic.c1
-rw-r--r--win/tclWinTime.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 0fd025a..757f9ca 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -19,6 +19,7 @@
# define _USE_32BIT_TIME_T
#endif
+#include <sys/stat.h>
#include "tclInt.h"
#include "tclCompile.h"
#ifndef TCL_GENERIC_ONLY
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 8bbd8fd..8fdc071 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -258,7 +258,7 @@ void
Tcl_GetTime(timePtr)
Tcl_Time *timePtr; /* Location to store time information. */
{
- struct timeb t;
+ struct _timeb t;
int useFtime = 1; /* Flag == TRUE if we need to fall back
* on ftime rather than using the perf
@@ -431,7 +431,7 @@ Tcl_GetTime(timePtr)
if ( useFtime ) {
/* High resolution timer is not available. Just use ftime */
- ftime(&t);
+ _ftime(&t);
timePtr->sec = (long)t.time;
timePtr->usec = t.millitm * 1000;
}