mirror of git://sourceware.org/git/glibc.git
Update.
2003-09-03 Ulrich Drepper <drepper@redhat.com> * nss/getXXbyYY_r.c (INTERNAL): Explicitly set errno and avoid returning ERANGE if this wasn't intended.
This commit is contained in:
parent
9c42bc3b9e
commit
35504a6f2d
|
|
@ -1,3 +1,8 @@
|
||||||
|
2003-09-03 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* nss/getXXbyYY_r.c (INTERNAL): Explicitly set errno and avoid
|
||||||
|
returning ERANGE if this wasn't intended.
|
||||||
|
|
||||||
2003-09-03 Jakub Jelinek <jakub@redhat.com>
|
2003-09-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* intl/loadmsgcat.c (open, close, read, mmap, munmap): Define as
|
* intl/loadmsgcat.c (open, close, read, mmap, munmap): Define as
|
||||||
|
|
|
||||||
|
|
@ -247,13 +247,24 @@ done:
|
||||||
#ifdef POSTPROCESS
|
#ifdef POSTPROCESS
|
||||||
POSTPROCESS;
|
POSTPROCESS;
|
||||||
#endif
|
#endif
|
||||||
return (status == NSS_STATUS_SUCCESS ? 0
|
|
||||||
|
int result;
|
||||||
|
if (status == NSS_STATUS_SUCCESS)
|
||||||
|
result = 0;
|
||||||
|
/* Don't pass back ERANGE if this is not for a too-small buffer. */
|
||||||
|
else if (errno == ERANGE && status != NSS_STATUS_TRYAGAIN)
|
||||||
|
{
|
||||||
#ifdef NEED_H_ERRNO
|
#ifdef NEED_H_ERRNO
|
||||||
/* These functions only set errno if h_errno is NETDB_INTERNAL. */
|
/* These functions only set errno if h_errno is NETDB_INTERNAL. */
|
||||||
: status == NSS_STATUS_TRYAGAIN && *h_errnop != NETDB_INTERNAL
|
if (*h_errnop != NETDB_INTERNAL)
|
||||||
? EAGAIN
|
|
||||||
#endif
|
#endif
|
||||||
: errno);
|
result = ENOENT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return errno;
|
||||||
|
|
||||||
|
__set_errno (result);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue