[PATCH v5 1/2] Y2038: Add 64-bit time for all architectures

Paul Eggert eggert@cs.ucla.edu
Wed Jun 20 17:50:00 GMT 2018


On 06/20/2018 09:45 AM, Albert ARIBAUD wrote:
> I'll go with the
> code you suggest, with a more explicit name for the temporary and a
> one-line short comment.
>
>     /* Convert from __time64 to time_t or fail with EOVERFLOW.  */
>     time_t t32 = t64;
>     if (t32 == t64)
>       return t32;
>     __set_errno (EOVERFLOW);
>     return -1;

That's OK, except for clarity please use "t" rather than "t32" since 
time_t is not necessarily 32-bit.



More information about the Libc-alpha mailing list