[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Problems with lposix on win32
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 16 Jan 2006 12:43:56 -0200
> > * malloc: as far as I know, a correct malloc should not change errno.
> > An error in malloc generates a MEMERR, so errno is not used.
> Sadly, that's not true.
"The value of errno is zero at program startup, but is never set to
zero by any library function." (ISO/IEC 9899:1999, page 186)
(So, it may change errno, but only to another error code...)
> I agree with ET: errno is an awful mechanism for error reporting.
I guess we all agree on this point. But does C have another mechanism
that we could use?