MinGW Notification List
mingw****@lists*****
Sun Feb 11 02:37:28 JST 2018
#37938: Conflicts in time_t type definition between MSVCRT.DLL, UCRTBASE.DLL, and VC++ non-free runtimes Open Date: 2018-02-03 18:05 Last Update: 2018-02-10 17:37 URL for this Ticket: https://osdn.net//projects/mingw/ticket/37938 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37938 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2018-02-10 17:37 Updated by: keith Comment: Reply To earnie I do not appreciate the antagonistic tone of your comment; neither do I appreciate your apparent underhand attempt to resurrect, in public, a private disagreement which I thought we had put behind us. And what we engineer should not interfere with someone compiling the code with Visual C++ which must "blindly conform" to that documentation. Of course, but how on earth could any such engineering in any way impact users of Visual C++? They will be using Microsoft's headers and implementations; for them, our engineering is irrelevant. The engineering needs to use the versioning macros to determine what the default for time_t is. And this is exactly what my existing implementations do, for 32-bit Windows; the purpose of this ticket is to invite pragmatic discussion of what further changes, if any, may be required to support 64-bit Windows. Any missing element in MSVCRT.DLL ... There are no missing elements, among the generically named time_t dependent functions, from any version of MSVCRT.DLL. The omissions are the 64-bit time_t explicit overrides, prior to Win2K, and 32-bit explicit "overrides", (on 32-bit Windows, MSVCRT.DLL's generically named implementations unequivocally represent time_t as a 32-bit entity), prior to Vista. ... or UCRTBASE.DLL needs to be managed with a MinGW specific element which mimics the MS elements. UCRTBASE.DLL appears to exhibit the same limitations as MSVCR80.DLL, and its successors; all generically named function implementations are missing, and all must be emulated by in-line redirection within header files. Once again, I already have implementations which do this for 32-bit Windows; this ticket needs only to identify any changes which may be needed to support 64-bit Windows. --------------------------------------------------------------------- Ticket Status: Reporter: keith Owner: keith Type: Issues Status: Open [Owner assigned] Priority: 5 - Medium MileStone: (None) Component: WSL Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: According to this Microsoft on-line documentation: 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. time_t is now 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. For more information, see Standard Types and comments in the documentation for the individual time functions. While this may be true, for applications which are built using Microsoft's Visual C++, (specifically from the 2005 version onward), and linked with the accompanying non-free versions of Microsoft's C-Runtime library, (from MSVCR80.DLL onward, and perhaps also with the pseudo-free UCRTBASE.DLL), it is manifestly untrue for applications which are linked with the pseudo-free MSVCRT.DLL, (the normal case for MinGW applications), as it is for applications which are built with, and linked with the C-Runtime libraries which accompanied, earlier (legacy) versions of Microsoft's Visual C++, (i.e. applications which are linked with Microsoft's non-free runtime libraries pre-dating MSVCR80.DLL). We need to engineer a time management API which will accommodate the disparities between MSVCRT.DLL, UCRTBASE.DLL, and Microsoft's post-2005 Visual C++ implementations of various time management functions, and we must recognise that our API cannot blindly conform to the above paragraph from Microsoft's current documentation. -- Ticket information of MinGW - Minimalist GNU for Windows project MinGW - Minimalist GNU for Windows Project is hosted on OSDN Project URL: https://osdn.net/projects/mingw/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net//projects/mingw/ticket/37938 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=37938