aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/dl-sysdep.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-03-05 14:03:24 +0000
committerUlrich Drepper <drepper@redhat.com>1998-03-05 14:03:24 +0000
commitea278354429c511389edab51dcb588343652601d (patch)
treea78e3c472ce68aa2d1b1e5b415edd5f68e8969ec /sysdeps/generic/dl-sysdep.c
parent2eb45444a74df5f8d47ba14e318aff2e78a915db (diff)
downloadglibc-ea278354429c511389edab51dcb588343652601d.tar
glibc-ea278354429c511389edab51dcb588343652601d.tar.gz
glibc-ea278354429c511389edab51dcb588343652601d.tar.bz2
glibc-ea278354429c511389edab51dcb588343652601d.zip
Update.
1998-03-05 Ulrich Drepper <drepper@cygnus.com> * 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 <drepper@cygnus.com> * 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 <drepper@cygnus.com> * 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 <Franz.Sirl-kernel@lauterbach.com> * 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 <aj@arthur.rhein-neckar.de> * elf/Makefile (install-bin): Change = to += for sprof to install ldd also.
Diffstat (limited to 'sysdeps/generic/dl-sysdep.c')
-rw-r--r--sysdeps/generic/dl-sysdep.c26
1 files changed, 26 insertions, 0 deletions
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;
+}