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 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