From: SourceForge.net <no...@so...> - 2009-01-31 22:24:39
|
Patches item #2134161, was opened at 2008-09-28 13:41 Message generated for change (Comment added) made by keithmarshall You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=2134161&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Roumen Petrov (rumen) Assigned to: Nobody/Anonymous (nobody) Summary: time64 functions and types for msvcrt >= 8.0 Initial Comment: Internet search for "localtime mingw" point to pages describing a problem with time functions. It seems to that issue isn't reported to mingw. Internet search for "localtime msdn" point to a page for MS VS 7.1. On the page exist links to VS 8.0 and 9.0. What is difference (msvcrt >= 8.0): In Visual C++ 2005, localtime is an inline function which evaluates to _localtime64, and time_t is equivalent to __time64_t. If you need to force the compiler to interpret time_t as the old 32-bit time_t, you can define _USE_32BIT_TIME_T. Doing this will cause localtime to evaluate to _localtime32. This is not recommended because your application may fail after January 19, 2038, and it is not allowed on 64-bit platforms. Also for v >= 8.0 msvcrt add some functions with _s suffix. Another problem is that MSDN don't descibe correctly "Compatibility" column in paragraph "Requirements". As example for localtime_s the pages show only VS 8.0 and 9.0, i.e. localtime_s is missing in 7.1. Comparing documentation for 7.1, 8.0 and 9.0 I note following differences: %asctime: + asctime_s (new 8.0) %ctime: ctime -> _ctime32 + _ctime32_s (new 8.0) + _ctime64_s (new 8.0) _wctime -> _wctime32 + _wctime32_s (new 8.0) + _wctime64_s (new 8.0) %difftime: difftime -> _difftime32 +_difftime64 (new 8.0) %_ftime: _ftime -> _ftime32 + _ftime32_s (new 8.0) + _ftime64_s (new 8.0) %_futime: _futime -> _futime32 %gmtime: gmtime -> _gmtime32 + _gmtime32_s (new 8.0) + _gmtime64_s (new 8.0) %localtime: localtime -> _localtime32 + _localtime32_s (new 8.0) + _localtime64_s (new 8.0) %mktime: mktime -> _mktime32 %_mkgmtime: (new 8.0) _mkgmtime inline for _mkgmtime64 + _mkgmtime32 (new 8.0) + _mkgmtime64 (new 8.0) %strdate: + _strdate_s (new 8.0) + _wstrdate_s (new 8.0) %strtime: + _strtime_s (new 8.0) + _wstrtime_s (new 8.0) %time time -> _time32 %_utime _utime -> _utime32 _wutime -> _wutime32 %timezone variales(now as functions): + _get_daylight (new 8.0) + _get_dstbias (new 8.0) + _get_timezone (new 8.0) + _get_tzname (new 8.0) ---------------------------------------------------------------------- >Comment By: Keith Marshall (keithmarshall) Date: 2009-01-31 22:24 Message: Roumen, You've clearly put a fair bit of effort into this, thanks. Can you please confirm that your reference source is exclusively MSDN, and also provide an appropriate ChangeLog entry, in the format described in the GNU Coding Standards. For future reference, this would likely have attracted quicker attention on the patch tracker, to which I've now moved it, rather than as a feature request. However, we do require the ChangeLog, before ultimate acceptance. ---------------------------------------------------------------------- Comment By: Roumen Petrov (rumen) Date: 2008-10-16 21:39 Message: I would like to propose for review the attached patch. File Added: mingwrt-3.15.1-mingw32.patch ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=2134161&group_id=2435 |