elm 2.5.3 and glibc 2.1.93
Mark Brown
bmark@us.ibm.com
Fri Sep 22 11:52:00 GMT 2000
"H . J . Lu" wrote:
> Many library functions can set `errno' to a nonzero value as a
> result of calling other library functions which might fail. You
> should assume that any library function might alter `errno' when
> the function returns an error.
>
> From here, I conclude "The glibc functions do not change `errno' when
> they succeed." By not saving/restoring errno, we have changed
> documented glibc behavior. We should be consistent on it.
This doesn't follow. The text immediately above yours says that successful
routines *can* change errno inadvertantly, and that you should not depend
on errno *unless* the call reports failure.
Mark
--
Mark S. Brown bmark@us.ibm.com
Senior Technical Staff Member 512.838.3926 T/L678.3926
IBM RS/6000 AIX System Architecture Mark Brown/Austin/IBM
IBM Corporation, Austin, Texas
More information about the Libc-hacker
mailing list