diff options
| author | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-10-24 14:43:06 +0200 |
|---|---|---|
| committer | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-10-27 17:18:02 +0200 |
| commit | 91ac988a6b8662cd1e13770cdc550c2609c42178 (patch) | |
| tree | afd50335d34eb1affa5c0a1c5a19db2e7c7a1ef0 /time/Makefile | |
| parent | e5b8756dc2355c315247b710da8d50d48b7a9728 (diff) | |
| download | glibc-aaribaud/bugzilla/23789/v2.tar.xz glibc-aaribaud/bugzilla/23789/v2.zip | |
Ensure mktime sets errno on error (bug 23789)aaribaud/bugzilla/23789/v2
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.
Diffstat (limited to 'time/Makefile')
| -rw-r--r-- | time/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/time/Makefile b/time/Makefile index ec3e39dcea..743bd99f18 100644 --- a/time/Makefile +++ b/time/Makefile @@ -43,7 +43,7 @@ tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \ tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \ tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \ tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime \ - tst-tzname tst-y2039 + tst-tzname tst-y2039 bug-mktime4 include ../Rules |
