]> git.ipfire.org Git - thirdparty/glibc.git/commit
Ensure mktime sets errno on error (bug 23789) aaribaud/bugzilla/23789/v2
authorAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
Wed, 24 Oct 2018 12:43:06 +0000 (14:43 +0200)
committerAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
Sat, 27 Oct 2018 15:18:02 +0000 (17:18 +0200)
commit91ac988a6b8662cd1e13770cdc550c2609c42178
treeafd50335d34eb1affa5c0a1c5a19db2e7c7a1ef0
parente5b8756dc2355c315247b710da8d50d48b7a9728
Ensure mktime sets errno on error (bug 23789)

Posix mandates that mktime set errno to EOVERFLOW
on error, that it, upon retuning -1, but the glibc
mktime does not so far on 32-bit architectures.

Fix this and add a test to prevent regressions.

The test was run through 'make check' on i686-linux-gnu,
then the fix was added and 'make check' run again.

* time/mktime.c
(mktime): Set errno to EOVERFLOW on error.
* time/bug-mktime4.c: New file.
        * time/Makefile: Add bug-mktime4.
time/Makefile
time/bug-mktime4.c [new file with mode: 0644]
time/mktime.c