Why this strange change?
Ulrich Drepper
drepper@cygnus.com
Sun Jun 27 22:11:00 GMT 1999
hjl@lucon.org (H.J. Lu) writes:
> Your change
>
> 1999-06-17 Ulrich Drepper <drepper@cygnus.com>
>
> * nss/getXXbyYY_r.c: Return error code not -1.
> * nss/getXXent_r.c: Likewise.
>
> breaks glibc and Linux very badly. Any codes like
>
> if (getXXbyYY_r (......) < 0)
>
> now don't work anymore since now getXXbyYY_r () returns errno which is
> a positive number. Did you mean to return NAGATIVE of the error code?
Because this is the correct behaviour. See POSIX.
User code must only test for != 0.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------
More information about the Libc-hacker
mailing list