diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-05-17 14:02:37 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-05-17 14:02:37 (GMT) |
commit | e810c9099a64e6af0d3aad22f673de6edcb68cd7 (patch) | |
tree | 12f52eab3efaa66365d83ac1ebca1d9a82552186 /win | |
parent | a88536e249e7c0d450e0719ee852a1fbb4a748fa (diff) | |
parent | 7ba4645e08b43df72712f9266336efe3d9badfba (diff) | |
download | tcl-e810c9099a64e6af0d3aad22f673de6edcb68cd7.zip tcl-e810c9099a64e6af0d3aad22f673de6edcb68cd7.tar.gz tcl-e810c9099a64e6af0d3aad22f673de6edcb68cd7.tar.bz2 |
rebase
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinFile.c | 14 | ||||
-rw-r--r-- | win/tclWinPort.h | 9 |
2 files changed, 10 insertions, 13 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 8e517d1..0deeb70 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -144,8 +144,8 @@ typedef struct { * Other typedefs required by this code. */ -static time_t ToCTime(FILETIME fileTime); -static void FromCTime(time_t posixTime, FILETIME *fileTime); +static __time64_t ToCTime(FILETIME fileTime); +static void FromCTime(__time64_t posixTime, FILETIME *fileTime); /* * Declarations for local functions defined in this file: @@ -2152,7 +2152,7 @@ NativeStatMode( * * ToCTime -- * - * Converts a Windows FILETIME to a time_t in UTC. + * Converts a Windows FILETIME to a __time64_t in UTC. * * Results: * Returns the count of seconds from the Posix epoch. @@ -2160,7 +2160,7 @@ NativeStatMode( *------------------------------------------------------------------------ */ -static time_t +static __time64_t ToCTime( FILETIME fileTime) /* UTC time */ { @@ -2169,7 +2169,7 @@ ToCTime( convertedTime.LowPart = fileTime.dwLowDateTime; convertedTime.HighPart = (LONG) fileTime.dwHighDateTime; - return (time_t) ((convertedTime.QuadPart - + return (__time64_t) ((convertedTime.QuadPart - (Tcl_WideInt) POSIX_EPOCH_AS_FILETIME) / (Tcl_WideInt) 10000000); } @@ -2178,7 +2178,7 @@ ToCTime( * * FromCTime -- * - * Converts a time_t to a Windows FILETIME + * Converts a __time64_t to a Windows FILETIME * * Results: * Returns the count of 100-ns ticks seconds from the Windows epoch. @@ -2188,7 +2188,7 @@ ToCTime( static void FromCTime( - time_t posixTime, + __time64_t posixTime, FILETIME *fileTime) /* UTC Time */ { LARGE_INTEGER convertedTime; diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 48f7894..c8013e6 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -14,11 +14,6 @@ #ifndef _TCLWINPORT #define _TCLWINPORT -#if !defined(_WIN64) && defined(BUILD_tcl) -/* See [Bug 3354324]: file mtime sets wrong time */ -# define _USE_32BIT_TIME_T -#endif - /* * We must specify the lower version we intend to support. * @@ -31,6 +26,9 @@ #ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0501 #endif +#ifndef __MSVCRT_VERSION__ +# define __MSVCRT_VERSION__ 0x0601 +#endif #define WIN32_LEAN_AND_MEAN #include <windows.h> @@ -115,7 +113,6 @@ typedef DWORD_PTR * PDWORD_PTR; #endif /* __MWERKS__ */ #include <time.h> - /* * The following defines redefine the Windows Socket errors as * BSD errors so Tcl_PosixError can do the right thing. |