On Friday 05 April 2024 10:29:26 Martin Storsjö wrote: > On Thu, 4 Apr 2024, Pali Rohár wrote: > > > Windows XP x64 does not provide 32-bit time functions. Those are provided > > on X64 systems since Windows Vista x64. > > > > Main function symbols (those without suffixes) are 64-bit on all Windows > > x64 systems. > > > > So remove aliasing of X64 "time" symbol to "_time64" symbol as it is not > > needed. > > > > Symbol "_difftime64" was added in Windows Vista. So for compatibility with > > Windows XP x64, define "_difftime64" symbol as alias to "difftime". Both > > symbols have same functionality. > > > > And export _ctime32, _mktime32, _time32 and _wctime32 symbols also on X64 > > version of msvcrt.dll as they are available since Windows Vista for both > > I386 and X64. Note that they are not available on Windows XP x64, but there > > is no reason to not export them (because mingw-w64 crt does not provide any > > fallback replacement implementation). > > --- > > mingw-w64-crt/lib-common/msvcrt.def.in | 22 +++++++--------------- > > 1 file changed, 7 insertions(+), 15 deletions(-) > > > > diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in > > b/mingw-w64-crt/lib-common/msvcrt.def.in > > index ffc2812b92ac..c3dc34745aef 100644 > > --- a/mingw-w64-crt/lib-common/msvcrt.def.in > > +++ b/mingw-w64-crt/lib-common/msvcrt.def.in > > @@ -952,7 +952,7 @@ swscanf > > system > > tan > > tanh ; if we implement tanh, we can set it to DATA only. > > -time F_NON_I386(== _time64) > > +time > > Note that this change isn't a no-op as intended. > > On arm32, the unsuffixed "time" function is a 32 bit form, so previously, at > link time, the "time" symbol used to resolve to a 64 bit form, now it is a > 32 bit one.
Good point. I have not spotted it. And I really wanted to ensure that it does not affect ARM versions (as I do not have test env for ARM version of mingw). > But I think this is the right thing to do anyway, and the previous behaviour > looks like a bug. In practice, it probably doesn't make any difference in > practice as time() usually is called via an inline function that redirects > to _time32 or _time64 anyway. > > With that noted, I think this patch (and the rest of this set) looks ok. But > it would be good to mention this aspect of the change in the commit message. > (I guess I can edit it before applying too, if I remember.) > > As this patchset depends a bit on some of the unapplied parts of the > previous set, I'll defer applying it until all parts o the previous set has > landed. > > // Martin Thanks for review of all patches! Now I have sent a new version of all patches which were not applied yet. I addresses issues about which you pointed and some patches I squashed. _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public