mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 14:50:05 +00:00
* nss/getnssent_r.c (__nss_getent_r): Use EAGAIN instead of errno
when using h_errno and it's not set to NETDB_INTERNAL. * nss/getXXbyYY_r.c [NEED_H_ERRNO]: Likewise. * Makefile ($(common-objpfx)testrun.sh): New target. (others): Depend on it. (postclean-generated): Append it.
This commit is contained in:
parent
049e7c97d6
commit
9bfce4bf28
@ -1,5 +1,13 @@
|
||||
2002-09-11 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* nss/getnssent_r.c (__nss_getent_r): Use EAGAIN instead of errno
|
||||
when using h_errno and it's not set to NETDB_INTERNAL.
|
||||
* nss/getXXbyYY_r.c [NEED_H_ERRNO]: Likewise.
|
||||
|
||||
* Makefile ($(common-objpfx)testrun.sh): New target.
|
||||
(others): Depend on it.
|
||||
(postclean-generated): Append it.
|
||||
|
||||
* nss/bug-erange.c: New file.
|
||||
* nss/Makefile (tests): Add it.
|
||||
|
||||
|
15
Makefile
15
Makefile
@ -130,6 +130,21 @@ ifeq (yes,$(build-shared))
|
||||
# Build the shared object from the PIC object library.
|
||||
lib: $(common-objpfx)libc.so
|
||||
endif
|
||||
|
||||
|
||||
# This is a handy script for running any dynamically linked program against
|
||||
# the current libc build for testing.
|
||||
$(common-objpfx)testrun.sh: $(common-objpfx)config.make \
|
||||
$(..)Makeconfig $(..)Makefile
|
||||
(echo '#!/bin/sh'; \
|
||||
echo "GCONV_PATH='$(common-objpfx)iconvdata' \\"; \
|
||||
echo 'exec $(run-program-prefix) $${1+"$$@"}'; \
|
||||
) > $@T
|
||||
chmod a+x $@T
|
||||
mv -f $@T $@
|
||||
postclean-generated += testrun.sh
|
||||
|
||||
others: $(common-objpfx)testrun.sh
|
||||
|
||||
# Makerules creates a file `stubs' in each subdirectory, which
|
||||
# contains `#define __stub_FUNCTION' for each function defined in that
|
||||
|
@ -244,6 +244,13 @@ done:
|
||||
#endif
|
||||
return (status == NSS_STATUS_SUCCESS
|
||||
? 0 : (status == NSS_STATUS_TRYAGAIN ? errno : ENOENT));
|
||||
return (status == NSS_STATUS_SUCCESS ? 0
|
||||
: status != NSS_STATUS_TRYAGAIN ? ENOENT
|
||||
#ifdef NEED_H_ERRNO
|
||||
/* These functions only set errno if h_errno is NETDB_INTERNAL. */
|
||||
: *h_errnop != NETDB_INTERNAL ? EAGAIN
|
||||
#endif
|
||||
: errno);
|
||||
}
|
||||
|
||||
|
||||
|
@ -197,6 +197,9 @@ __nss_getent_r (const char *getent_func_name,
|
||||
}
|
||||
|
||||
*result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
|
||||
return (status == NSS_STATUS_SUCCESS
|
||||
? 0 : status == NSS_STATUS_TRYAGAIN ? errno : ENOENT);
|
||||
return (status == NSS_STATUS_SUCCESS ? 0
|
||||
: status != NSS_STATUS_TRYAGAIN ? ENOENT
|
||||
/* h_errno functions only set errno if h_errno is NETDB_INTERNAL. */
|
||||
: (h_errnop == NULL || *h_errnop == NETDB_INTERNAL) ? errno
|
||||
: EAGAIN);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user