On 11/6/2018 4:42 AM, Mateusz wrote:
W dniu 06.11.2018 o 04:58, Earnie via Mingw-w64-public pisze:
On 11/5/2018 11:49 AM, Mateusz wrote:

functions. In my patch we use _ftime32 and _ftime64 functions and we define 
_ftime to _ftime32 or _ftime64. It should work on WinXP because _ftime32 is 
aliased as _ftime for 32-bit libmsvcrt.a.


But what about 32bit Win10?  Does this idea still work there?

Yes, it works.

_ftime functions in msvcrt.dll:
WinXPsp2: _ftime, _ftime64
Vista/7/10: _ftime, _ftime32, _ftime32_s, _ftime64, _ftime64_s

_ftime functions in msvcr100.dll and newer:
_ftime32, _ftime32_s, _ftime64, _ftime64_s

In 32-bit msvcrt.dll _ftime it is the same as _ftime32.
In 64-bit msvcrt.dll _ftime it is the same as _ftime64.

After this patch in 64-bit libs we use _ftime32, _ftime32_s, _ftime64, 
_ftime64_s as base functions.
In 32-bit libs we use for msvcrt.dll -- _ftime, _ftime32_s, _ftime64, 
_ftime64_s as base functions, for newer dll (like msvcr120.dll) -- _ftime32, 
_ftime32_s, _ftime64, _ftime64_s as base functions. The trick is not in *.h 
files but int 32-bit libmsvcrt.a where we emulate _ftime32 as _ftime function 
(it works from WinXP up to 10).
Exactly in file mingw-w64-crt/lib-common/msvcrt.def.in
+F_I386(_ftime32 == _ftime)
+F_NON_I386(_ftime32)


Thanks for the explanation.

--
Earnie


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to