crt: Provide emulation of _mktime64 function
Function _mktime64 is available since msvcr70.dll. For older msvcrt
versions provide mingw-w64 emulation via musl libc __tm_to_secs() function
with adjustment of _timezone and _dstbias variable variables, and
normalization via _localtime64() function which is now available in all
CRT import libraries (either as native symbols or as mingw-w64 emulation).
Adjustment of _dstbias needs to be done only when passed timestamp is
during the DST period which is detected by the _localtime64() function too.
Signed-off-by: Martin Storsjö <martin@martin.st>
3 files changed