[EMAIL PROTECTED] (Larry Jones) writes: > Simon Josefsson writes: >> >> Yup. That's the intention. (Of course, other functions may set errno >> too, if, e.g., malloc or fclose fails.) > > malloc() doesn't set errno, either.
I believe the one in glibc does. Also, 1003.1-2004 says malloc should set errno: http://www.opengroup.org/onlinepubs/009695399/functions/malloc.html Note this part: The following new requirements on POSIX implementations derive from alignment with the Single UNIX Specification: * In the RETURN VALUE section, the requirement to set errno to indicate an error is added. * The [ENOMEM] error condition is added. /Simon