This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/1] Y2038: make __mktime_internal compatible with 64-bit-time
On Tue, 19 Jun 2018, Albert ARIBAUD (3ADEV) wrote:
> if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
> {
> - /* time_t isn't large enough to rule out overflows, so check
> - for major overflows. A gross check suffices, since if t0
> + /* __time64_t is large enough to rule out overflows, but check
> + for major overflows anyway. A gross check suffices, since if t0
Are you sure it's coherent to have code in this file using a TIME_T_MAX
that's defined in terms of time_t, when the code is using __time64_t? I'd
expect you to need to define TIME_T_MAX and TIME_T_MIN in terms of
__time64_t instead.
> + __set_errno(EOVERFLOW);
Missing space before '('. You need to watch out for such issues
throughout the patch series.
> + __set_errno(EOVERFLOW);
Likewise.
--
Joseph S. Myers
joseph@codesourcery.com