Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: segfault in strftime



On 2010-02-26 09:47:31 -0800, Bart Schaefer wrote:
> That's *probably* safe in this case ... but in general I don't think
> so.  The standards make no guarantee about the value of errno in the
> case where the library call returns "successfully" (however that may
> be defined) -- that is, the implementation is allowed to set errno
> to what the next upcoming error *might* be, and is not required to
> then clear errno before returning success.

It is safe for functions that use errno: "The value of errno may
be set to nonzero by a library function call whether or not there
is an error, provided the use of errno is not documented in the
description of the function in this International Standard."

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author