On Wed, 18 Sep 2024, Pali Rohár wrote:
These functions return pointer to global variables with same name but
without the first leading underscore. These functions are available also
under name with leading "__p" prefix.
Functions __daylight(), __dstbias(), __timezone() and __tzname() are
available in msvcr80+ libraries and also in UCRT.
Functions __daylight(), __dstbias() are also available in later versions of
i386 and x64 msvcrt.dll and are available in all ARM versions of msvcrt.dll.
Functions __p__daylight(), __p__timezone() and __p__tzname() are available
since msvcrt20.dll and are present in all later msvcrt versions except the
UCRT and non-i386 OS system version of msvcrt.dll.
Function __p__dstbias() is available since msvcrt40.dll and is present also
in all later msvcrt versions except the UCRT and non-i386 OS system version
of msvcrt.dll.
Global variables _daylight, _timezone and _tzname are available in all
msvcrt versions except UCRT.
Global variable _dstbias is present since msvcrt40.dll, except UCRT and
non-i386 OS system versions of msvcrt.dll.
Define __daylight, __dstbias, __timezone and __tzname for all CRT import
libraries either as aliases to __p__daylight, __p__dstbias, __p__timezone,
and __p__tzname or as function wrappers around variables _daylight,
_dstbias, _timezone and _tzname, based on what each DLL library provides.
With this change also unifies time.h file to define _daylight, _dstbias,
_timezone and _tzname for all CRT builds via functions. This removes
another ifdef _UCRT and improves ABI compatibility between UCRT and
non-UCRT builds.
LGTM, pushed.
(I'll get to the others that you have sent as well, but unfortunately it
probably takes another couple of days until I get to them.)
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public