From ea278354429c511389edab51dcb588343652601d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 5 Mar 1998 14:03:24 +0000 Subject: Update. 1998-03-05 Ulrich Drepper * elf/rtld.c: Speed up processing of environment variables. Do only one run on the environment by avoiding to call getenv. * sysdeps/generic/dl-sysdep.c (_dl_next_ld_env_entry): New function. Used by patch above. 1998-03-05 10:25 Ulrich Drepper * nss/getXXbyYY_r.c: Don't try to contact nscd every time when it failed. Only do this every NSS_NSCD_RETRY times. * nss/nsswitch.c: Define __nss_nscd_not_available, used by above change. * nscd/nscd_getgr_r.c (__nscd_getgr_r): Return 2 if contacting the daemon failed. * nscd/nscd_getpw_r.c (__nscd_getpw_r): Likewise. 1998-03-05 Ulrich Drepper * nss/nsswitch.c (nss_lookup_function): Don't modify errno if NSS module cannot be found. Reported by Andreas Jaeger. 1998-03-05 11:40 Franz Sirl * nscd/nscd_getgr_r.c: Change char to int to avoid compiler warning on platforms which default to unsigned chars. * nscd/nscd_getpw_r.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep.h: Undefine L before defining it. 1998-03-05 Andreas Jaeger * elf/Makefile (install-bin): Change = to += for sprof to install ldd also. --- sysdeps/generic/dl-sysdep.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'sysdeps/generic/dl-sysdep.c') diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c index b007aa6b9d..21b470c6ae 100644 --- a/sysdeps/generic/dl-sysdep.c +++ b/sysdeps/generic/dl-sysdep.c @@ -243,3 +243,29 @@ _dl_show_auxv (void) break; } } + +/* Walk through the environment of the process and return all entries + starting with `LD_'. */ +char * +_dl_next_ld_env_entry (char ***position) +{ + char **current = *position; + char *result = NULL; + + if (current == NULL) + /* We start over. */ + current = _environ; + + while (result == NULL && *current != NULL) + { + if ((*current)[0] == 'L' && (*current)[1] == 'D' && (*current)[2] == '_') + result = *current; + + ++current; + } + + /* Save current position for next visit. */ + *position = current; + + return result; +} -- cgit v1.2.3