This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] Ensure mktime sets errno on error (bug 23789)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Albert ARIBAUD (3ADEV)" <albert dot aribaud at 3adev dot fr>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 30 Oct 2018 00:19:27 +0000
- Subject: Re: [PATCH v3] Ensure mktime sets errno on error (bug 23789)
- References: <20181029232638.5865-1-albert.aribaud@3adev.fr>
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