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] Ensure mktime sets errno on error (bug 23789)


On Tue, 30 Oct 2018, Albert ARIBAUD (3ADEV) wrote:

> Posix mandates that mktime set errno to EOVERFLOW
> on error, but the glibc mktime wasn't doing it so
> far.
> 
> Fix this and add a test to prevent regressions.
> The fix also fixes the same issue in timegm.
> 
> The test was run through 'make check' on i686-linux-gnu,
> then the fix was added and 'make check' run again.

I strongly advise testing this sort of thing on both 32-bit *and* 64-bit 
platforms, given the likelihood of differences when time_t is 64-bit.

-- 
Joseph S. Myers
joseph@codesourcery.com


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