This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] Y2038: make __mktime_internal compatibles with __time64_t


On 10/24/18 4:23 AM, Albert ARIBAUD wrote:

In the case where neither _LIBC nor NEED_MKTIME_WORKING are defined,
"another" mktime() is called. Do we assume this other mktime will set
errno to EOVERFLOW, or do we do it too in that case?

I would, yes. If the other mktime is broken Gnulib can deal with it in a different way; you don't need to worry about it.


Also, I assume tests would be needed for both cases where
__mktime_internal() returns -1? If so, I would need struct tm values
which trigger either one, or at least indications on how to find ones.

You want outlandish values, where (for example) tm_year is INT_MIN or INT_MAX. On typical 64-bit platforms there are no outlandish values, as EOVERFLOW isn't possible when int is 32 bits and time_t is 64 bits.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]