Hi Paul, > Lukasz Majewski wrote: > > > Shouldn't we have: return s == t; ? > > Yes, absolutely. Thanks for catching that. I tested only the Gnulib > version, and Gnulib doesn't use that code. Do you plan to prepare (and send to mailing list) the next version of this patch (including the above fix)? > > Do you have glibc tests to catch bugs like this? Actually yes: https://github.com/lmajewski/y2038-tests/commits/master > If no, please add > writing some tests to your lists of things to do. > The plan is to port above tests to glibc's test suite (as now they are standalone). There is also the Yocto/OE meta layer dedicated for testing/developing Y2038 glibc with qemu: https://github.com/lmajewski/meta-y2038/commits/master And the Y2038 safe glibc: https://github.com/lmajewski/y2038_glibc/commits/Y2038-2.29-glibc-11-03-2019 This code is going to be pushed also to sourceware.org git. > > In the time/mktime.c there is: > > weak_alias (mktime, timelocal), which makes the timelocal calls > > aliases to mktime for time_t 32 and 64 bit (for Y2038 the proper > > __REDIRECT will be added). > > Sorry, I'm a bit lost here. How will that __REDIRECT work, exactly? > Should it be part of this patch, or part of a later patch? The __REDIRECT would be a part of the latter patch - the one which adds Y2038 support for 32 bit SoCs. It would simply redirect calls to mktime/timegm to internal __mktime64()/__timegm64(). > > >> Come to think of it, user code shouldn't see __time64_t > >> either.... > > > > Is that the reason for removing __time64_t definition from > > posix/bits/types.h ? > > Yes. > > In the time/mktime-internal.h you added a comment regarding BeOS > > users and posix time_t - do you know any :-) ? > > Just one. :-) See: > > https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00470.html > > Bruno's most recent BeOS-related submission to Gnulib was in October > 2017: > > https://lists.gnu.org/r/bug-gnulib/2017-10/msg00098.html Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de