This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v5 2/2] Y2038: make __tz_convert compatible with 64-bit-time
Hi Paul,
On Tue, 19 Jun 2018 16:35:53 -0700, Paul Eggert <eggert@cs.ucla.edu>
wrote :
> On 06/18/2018 12:14 PM, Albert ARIBAUD (3ADEV) wrote:
> > +#include <errno.h>
>
> Why does time/ctime.h need this addition? I don't see where the rest of
> the patch is using anything that errno.h defines. Similarly for
> time/ctime_r.c, time/gmtime.c, time/localtime.c. I suspect this is a
> leftover of the older version of this patch that had __set_errno
> (EINVAL), and I suggest not including <errno.h> in these files.
Indeed.
> > /* Figure out the correct timezone for TM and set `__tzname',
> > - `__timezone', and `__daylight' accordingly. */
> > + `__timezone', and `__daylight' accordingly.
> > + NOTE: this takes a __time64_t value, so passing a time_t value is OK. */
> > void
> > -__tz_compute (time_t timer, struct tm *tm, int use_localtime)
> > +__tz_compute (__time64_t timer, struct tm *tm, int use_localtime)
>
> Why is that "NOTE:" comment line important or needed? The proposed set
> of patches never pass a time_t value to __tz_compute. I suspect this
> line is a leftover from an older version of the patch, and suggest
> removing that line.
You're right.
> Otherwise, the patch looks OK to me.
Thanks!
Cordialement,
Albert ARIBAUD
3ADEV