aboutsummaryrefslogtreecommitdiff
path: root/time/Makefile
diff options
context:
space:
mode:
authorAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-10-24 14:43:06 +0200
committerAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-11-02 07:03:52 +0100
commit134ae5ca82d3c5b5b9bab0ad145ffe8b1919a1ae (patch)
tree18ead43e7adb4d3260bbaed869c6de72350781bd /time/Makefile
parent3ae3c4371df5a06d84096f9c6f7bfbe0d3c46a0d (diff)
downloadglibc-134ae5ca82d3c5b5b9bab0ad145ffe8b1919a1ae.zip
glibc-134ae5ca82d3c5b5b9bab0ad145ffe8b1919a1ae.tar.gz
glibc-134ae5ca82d3c5b5b9bab0ad145ffe8b1919a1ae.tar.bz2
Ensure mktime sets errno on error [BZ #23789]aaribaud/bugzilla/23789/v4
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. Tested with 'make check' on x86-linux-gnu and i686-linux-gnu. * time/Makefile: Add bug-mktime4. * time/bug-mktime4.c: New file. * time/mktime.c (__mktime_internal): Set errno to EOVERFLOW on error. (mktime): Move call to __tzset inside conditional.
Diffstat (limited to 'time/Makefile')
-rw-r--r--time/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/time/Makefile b/time/Makefile
index ec3e39d..743bd99 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