diff options
| author | pk <pk@NetBSD.org> | 1993-10-23 00:34:22 +0000 |
|---|---|---|
| committer | pk <pk@NetBSD.org> | 1993-10-23 00:34:22 +0000 |
| commit | a0aae738e7c7d1c81920d18a3ac83e59ee25b7ca (patch) | |
| tree | 7b729e9c10bc09bc30c3bb620a68f38a65813208 /gnu | |
| parent | e228adedb3a6c36b5e997587c4cb1a19ca04fd8a (diff) | |
Changed prototype and internals of std_search_dir().
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/usr.bin/ld/common/ld.h | 4 | ||||
| -rw-r--r-- | gnu/usr.bin/ld/common/shlib.c | 17 | ||||
| -rw-r--r-- | gnu/usr.bin/ld/ld.h | 4 | ||||
| -rw-r--r-- | gnu/usr.bin/ld/shlib.c | 17 |
4 files changed, 20 insertions, 22 deletions
diff --git a/gnu/usr.bin/ld/common/ld.h b/gnu/usr.bin/ld/common/ld.h index 4fa3a3f767e..9f3665980cf 100644 --- a/gnu/usr.bin/ld/common/ld.h +++ b/gnu/usr.bin/ld/common/ld.h @@ -1,4 +1,4 @@ -/* $Id: ld.h,v 1.1 1993/10/16 21:52:31 pk Exp $ */ +/* $Id: ld.h,v 1.2 1993/10/23 00:34:22 pk Exp $ */ /*- * This code is derived from software copyrighted by the Free Software * Foundation. @@ -703,7 +703,7 @@ int findlib __P((struct file_entry *)); /* In shlib.c: */ char *findshlib __P((char *, int *, int *)); void add_search_dir __P((char *)); -void std_search_dirs __P((void)); +void std_search_dirs __P((char *)); /* In rrs.c: */ void init_rrs __P((void)); diff --git a/gnu/usr.bin/ld/common/shlib.c b/gnu/usr.bin/ld/common/shlib.c index 9ecbb420a3b..4be8354840c 100644 --- a/gnu/usr.bin/ld/common/shlib.c +++ b/gnu/usr.bin/ld/common/shlib.c @@ -1,5 +1,5 @@ /* - * $Id: shlib.c,v 1.2 1993/10/21 00:53:00 pk Exp $ + * $Id: shlib.c,v 1.3 1993/10/23 00:34:26 pk Exp $ */ #include <sys/param.h> @@ -40,15 +40,16 @@ add_search_dir(name) } void -std_search_dirs() +std_search_dirs(paths) +char *paths; { - char *cp, *ld_path = getenv("LD_LIBRARY_PATH"); + char *cp; int i, n; - if (ld_path != NULL) - /* Add search paths from LD_LIBRARY_PATH */ - while ((cp = strtok(ld_path, ":")) != NULL) { - ld_path = NULL; + if (paths != NULL) + /* Add search directories from `paths' */ + while ((cp = strtok(paths, ":")) != NULL) { + paths = NULL; add_search_dir(cp); } @@ -64,8 +65,6 @@ std_search_dirs() * Return the number of decoded entries in DEWEY. */ -#define MAXDEWEY 8 - int getdewey(dewey, cp) int dewey[]; diff --git a/gnu/usr.bin/ld/ld.h b/gnu/usr.bin/ld/ld.h index 4fa3a3f767e..9f3665980cf 100644 --- a/gnu/usr.bin/ld/ld.h +++ b/gnu/usr.bin/ld/ld.h @@ -1,4 +1,4 @@ -/* $Id: ld.h,v 1.1 1993/10/16 21:52:31 pk Exp $ */ +/* $Id: ld.h,v 1.2 1993/10/23 00:34:22 pk Exp $ */ /*- * This code is derived from software copyrighted by the Free Software * Foundation. @@ -703,7 +703,7 @@ int findlib __P((struct file_entry *)); /* In shlib.c: */ char *findshlib __P((char *, int *, int *)); void add_search_dir __P((char *)); -void std_search_dirs __P((void)); +void std_search_dirs __P((char *)); /* In rrs.c: */ void init_rrs __P((void)); diff --git a/gnu/usr.bin/ld/shlib.c b/gnu/usr.bin/ld/shlib.c index 9ecbb420a3b..4be8354840c 100644 --- a/gnu/usr.bin/ld/shlib.c +++ b/gnu/usr.bin/ld/shlib.c @@ -1,5 +1,5 @@ /* - * $Id: shlib.c,v 1.2 1993/10/21 00:53:00 pk Exp $ + * $Id: shlib.c,v 1.3 1993/10/23 00:34:26 pk Exp $ */ #include <sys/param.h> @@ -40,15 +40,16 @@ add_search_dir(name) } void -std_search_dirs() +std_search_dirs(paths) +char *paths; { - char *cp, *ld_path = getenv("LD_LIBRARY_PATH"); + char *cp; int i, n; - if (ld_path != NULL) - /* Add search paths from LD_LIBRARY_PATH */ - while ((cp = strtok(ld_path, ":")) != NULL) { - ld_path = NULL; + if (paths != NULL) + /* Add search directories from `paths' */ + while ((cp = strtok(paths, ":")) != NULL) { + paths = NULL; add_search_dir(cp); } @@ -64,8 +65,6 @@ std_search_dirs() * Return the number of decoded entries in DEWEY. */ -#define MAXDEWEY 8 - int getdewey(dewey, cp) int dewey[]; |
