Overview
| Artifact ID: | f83f6408108456e4009686fe646fea0dcca1cbb3 |
|---|---|
| Ticket: | 3571241fffffffffffffffffffffffffffffffff
_USE_32BIT_TIME_T wrong for 32bit __MINGW32__ |
| User & Date: | twylite on 2012-09-25 23:12:31 |
Changes
- icomment:
"In versions of Visual C++ and Microsoft C/C++ before Visual C++ 2005, time_t was a long int (32 bits) and hence could not be used for dates past 3:14:07 January 19, 2038, UTC. In Visual C++ 2005, time_t is equivalent to __time64_t by default, but defining _USE_32BIT_TIME_T changes time_t to __time32_t and forces many time functions to call versions that take the 32-bit time_t." -- http://msdn.microsoft.com/en-us/library/w4ddyt9h(v=vs.80).aspx This macro is required to force time_t to 32-bits (as expected by the Tcl sources in a 32-bit environment) when the compiler is MSVC2005 or later. Earlier versions of the compiler don't recognise the macro and safely ignore it. What you are saying is that the MinGW headers respect _USE_32BIT_TIME_T, but the libraries you link against don't. In other words you have a mismatch between the headers and the libraries. That is a problem in your development environment, not with Tcl. "Since a 32bit time_t is an after thought and was given to help out legacy code and since 64bit time_t is the default it should be up to the users of the source to have it enabled or not during the configure process with disabled being the default to match the compilers." The need for _USE_32BIT_TIME_T relates to assumptions in the Tcl sources about typecasting and time_t arithmetic in a 32-bit environment. The Tcl developers decide that, not the person compiling the software.
- login: "twylite"
- mimetype: "text/plain"
- username: "twylite"