[PATCH] Fix 32-bit overflow in mktime() when time_t is 64-bits long

Freddie Chopin freddie_chopin@op.pl
Tue May 15 19:08:00 GMT 2018


Hello!

Currently when time_t is configured to be 64-bits long, mktime() will
fail for years above 2038. For example converting 01.01.2040 00:00:00
gives -2085978496 instead of the expected 2208988800. Patch which fixes
this behaviour is attached.

I'll try to post an improved version of mktime() in a few days.

Regards,
FCh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-32-bit-overflow-in-mktime-when-time_t-is-64-bits.patch
Type: text/x-patch
Size: 940 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20180515/fc133e64/attachment.bin>


More information about the Newlib mailing list