summaryrefslogtreecommitdiff
path: root/utils/ldconfig.c
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-10-06 07:34:17 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-10-06 07:34:17 +0000
commit9f9ab4922338d58f5adf8353286039eae09e1c2f (patch)
treea9149db236c6d220b3fd10c72855ea1a720292e1 /utils/ldconfig.c
parente93138024a06eab6edeaa542c4660d246ef2cfce (diff)
Puts common defines into dl-defs.h (in ldso/include) from dl-elf.h and
dl-cache.h and make use of it. Also disables the lib-path-redundancy check for the case the cache is not used. Makes use of _PRELOAD_FILE_SUPPORT. From Peter Mazinger.
Diffstat (limited to 'utils/ldconfig.c')
-rw-r--r--utils/ldconfig.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/utils/ldconfig.c b/utils/ldconfig.c
index e466a42fb..52dc55b1d 100644
--- a/utils/ldconfig.c
+++ b/utils/ldconfig.c
@@ -876,7 +876,7 @@ int main(int argc, char **argv)
{
scan_dir(UCLIBC_RUNTIME_PREFIX "lib");
scan_dir(UCLIBC_RUNTIME_PREFIX "usr/lib");
-#if !defined (__LDSO_CACHE_SUPPORT__)
+#ifndef __LDSO_CACHE_SUPPORT__
scan_dir(UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib");
#endif
@@ -884,21 +884,20 @@ int main(int argc, char **argv)
if ((extpath = get_extpath()))
{
for (cp = strtok(extpath, DIR_SEP); cp; cp = strtok(NULL, DIR_SEP)) {
- /* strip traling slashes */
+ /* we do the redundancy check only if cache usage is enabled */
+#ifdef __LDSO_CACHE_SUPPORT__
+ /* strip trailing slashes */
int len = strlen(cp);
if (len)
while (cp[--len] == '/' && len)
cp[len] = 0;
- if (strcmp(UCLIBC_RUNTIME_PREFIX "lib", cp) == 0
- || strcmp(UCLIBC_RUNTIME_PREFIX "usr/lib", cp) == 0
-#if !defined (__LDSO_CACHE_SUPPORT__)
- || strcmp(UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib", cp) == 0
-#endif
- ) {
+ if (strcmp(UCLIBC_RUNTIME_PREFIX "lib", cp) == 0 ||
+ strcmp(UCLIBC_RUNTIME_PREFIX "usr/lib", cp) == 0) {
if (verbose >= 0)
- warnx("Path `%s' given more than once\n", cp);
+ warnx("Remove `%s' from `%s'\n", cp, LDSO_CONF);
continue;
}
+#endif
scan_dir(cp);
}
free(extpath);