This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Ensure mktime sets errno on error (bug 23789)
Hi Paul,
On Fri, 26 Oct 2018 09:28:40 -0700, Paul Eggert <eggert@cs.ucla.edu>
wrote :
> 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
status.
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().
Comments?
Cordialement,
Albert ARIBAUD
3ADEV