This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/2] Y2038: make __mktime_internal compatible with __time64_t
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: libc-alpha at sourceware dot org, Joseph Myers <joseph at codesourcery dot com>
- Date: Tue, 19 Mar 2019 16:12:20 -0700
- Subject: Re: [PATCH v2 1/2] Y2038: make __mktime_internal compatible with __time64_t
- References: <20190227112042.1794-1-lukma@denx.de> <a238c752-2cfa-17f3-9676-943d75294aa3@cs.ucla.edu> <20190312075856.33ac3c5b@jawa> <bf6ca98d-da93-0677-99d3-86c80e5470a2@cs.ucla.edu> <20190319143956.52f83a48@jawa>
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 have glibc tests to catch bugs like this? If no, please add writing some
tests to your lists of things to do.
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?
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