This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug time/23789] mktime does not set errno on failure
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 02 Nov 2018 06:05:04 +0000
- Subject: [Bug time/23789] mktime does not set errno on failure
- Auto-submitted: auto-generated
- References: <bug-23789-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=23789
--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, aaribaud/bugzilla/23789/v4 has been created
at 134ae5ca82d3c5b5b9bab0ad145ffe8b1919a1ae (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=134ae5ca82d3c5b5b9bab0ad145ffe8b1919a1ae
commit 134ae5ca82d3c5b5b9bab0ad145ffe8b1919a1ae
Author: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
Date: Wed Oct 24 14:43:06 2018 +0200
Ensure mktime sets errno on error [BZ #23789]
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.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.