On Mon, 19 Jul 2021, Jeremy Drake via Mingw-w64-public wrote:

> Also, this test turned up what appears to be a bug in the UCRT path:
> #include <time.h>
> #include <stdio.h>
>
> int main(int argc, char ** argv)
> {
>         time_t t = 2147483647;
>         printf("%zu\n", sizeof(time_t));
>         printf("%p\n", localtime(&t));
>         return 0;
> }
>
> In 32-bit msvcrt this prints
> 4
> 001f0d68
>
> But in 32-bit UCRT this prints
> 4
> 00000000
>

This is due to ucrt/inc/corecrt_internal_time.h having, for 32-bit time_t:
max_time_t = 0x7fffd27f


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to