[PATCH] Ensure mktime sets errno on error (bug 23789)
Albert ARIBAUD
albert.aribaud@3adev.fr
Sat Oct 27 00:10:00 GMT 2018
Hi Paul,
On Fri, 26 Oct 2018 15:45:29 -0700, Paul Eggert <eggert@cs.ucla.edu>
wrote :
> On 10/26/18 2:18 PM, Albert ARIBAUD wrote:
> > Is it allowed behavior to
> > alter errno when not returning an error condition?
>
> Ordinarily yes. But it would be better if mktime left errno alone when
> -1 does not represent an error, so that the caller can easily
> distinguish valid -1 return values from erroneous ones.
Ok, so this requirement extends to all functions called by mktime(),
directly or indirectly (and ditto for gmtime).
Cordialement,
Albert ARIBAUD
3ADEV
More information about the Libc-alpha
mailing list