This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Ensure mktime sets errno on error (bug 23789)
On Fri, 26 Oct 2018 09:28:40 -0700, Paul Eggert <firstname.lastname@example.org>
> On 10/26/18 9:12 AM, Albert ARIBAUD wrote:
> > the solution is to keep tzset() an alias
> > of __tzset(), keep __tzset() a 'void (*) (void)' as it is now, and
> > introduce another function
> Yes, that sounds right.
... and another problem:
Apparently range_convert() does everything to never fail in converting
a long int time into a struct tm.
On the other hand, ranged_convert() much indirectly ends up possibly
calling __offtime(), which sets EOVERFLOW when it returns a failure
In other words, even though range_convert() hides failures from its
caller, it may return with errno modified. Is it allowed behavior to
alter errno when not returning an error condition?
If it is not allowed, then __offtime() may need to be modified so that
it does not set errno when called from range_convert().