summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-26 17:57:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-26 17:57:45 +0000
commitf19c1a4fea645cb229b7c4786d84b0e869e67230 (patch)
treeed895d37f4b4fe0b84add531f5973cb0d983a276 /gnu
parent785cba52cbeec67e4fbb24881e1f9c44810fd6f2 (diff)
If a good matching shared library is found, don't look in the next
directories. This is compatible with the SunOS behaviour. Also, it fixes a problem where it was not possible for some 3rd party package to have a library with the same name as a library already in the system, and a lower version number. The highest version would always be picked. This particular problem shows up with Mozilla, which has a libutil.so.1.0; fvdl
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/ld/shlib.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gnu/usr.bin/ld/shlib.c b/gnu/usr.bin/ld/shlib.c
index c2c09fa54b9..c6057bb4611 100644
--- a/gnu/usr.bin/ld/shlib.c
+++ b/gnu/usr.bin/ld/shlib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shlib.c,v 1.2 1998/03/26 19:46:24 niklas Exp $*/
+/* $NetBSD: shlib.c,v 1.13 1998/04/04 01:00:29 fvdl Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -244,12 +244,14 @@ int do_dot_a;
DIR *dd = opendir(search_dirs[i]);
struct dirent *dp;
int found_dot_a = 0;
+ int might_take_it;
if (dd == NULL)
continue;
+ might_take_it = 0;
while ((dp = readdir(dd)) != NULL) {
- int n, might_take_it = 0;
+ int n;
if (do_dot_a && path == NULL &&
dp->d_namlen == len + 2 &&
@@ -306,9 +308,9 @@ int do_dot_a;
}
closedir(dd);
- if (found_dot_a)
+ if (found_dot_a || might_take_it)
/*
- * There's a .a archive here.
+ * There's a lib in this dir; take it.
*/
return path;
}