diff options
author | radha <devnull@localhost> | 1998-05-01 23:27:04 +0000 |
---|---|---|
committer | radha <devnull@localhost> | 1998-05-01 23:27:04 +0000 |
commit | a3d785f532a6f2bb1b2ad837e09f7f312eee62df (patch) | |
tree | ca873a3b6e6be4f4f90a6829342bae1b1b104608 | |
parent | efbb1092d30138e0c17ce55efe3283ded6a1007d (diff) | |
download | nspr-hg-a3d785f532a6f2bb1b2ad837e09f7f312eee62df.tar.gz |
Bug fix for 83769. Add MOZILLA_HOME/lib to the list of library_paths.
-rw-r--r-- | pr/src/linking/prlink.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c index 0ce0d80a..11dd33e7 100644 --- a/pr/src/linking/prlink.c +++ b/pr/src/linking/prlink.c @@ -283,7 +283,8 @@ PR_GetLibraryPath() { char *home; char *local; - char *p; + char *p=NULL; + char * mozilla_home=NULL; int len; ev = getenv("LD_LIBRARY_PATH"); @@ -301,6 +302,11 @@ PR_GetLibraryPath() len += strlen(home) + 1; /* +1 for the colon */ } + mozilla_home = getenv("MOZILLA_HOME"); + if (mozilla_home && mozilla_home[0]) { + len += strlen(mozilla_home) + 5 ; /* +5 for initial : and trailing "/lib" */ + } + local = ":/usr/local/netscape/lib/" PR_LINKER_ARCH; len += strlen(local); /* already got the : */ p = (char*) PR_MALLOC(len+50); @@ -310,10 +316,18 @@ PR_GetLibraryPath() strcat(p, ":"); strcat(p, home); } + if (mozilla_home && mozilla_home[0]) { + strcat(p, ":"); + strcat(p, mozilla_home); + strcat(p, "/lib"); + } strcat(p, local); - } + } /* if (p) */ ev = p; PR_LOG(_pr_io_lm, PR_LOG_NOTICE, ("linker path '%s'", ev)); + + printf("linker_path = %s\n", ev); + } #else /* AFAIK there isn't a library path with the HP SHL interface --Rob */ @@ -920,7 +934,7 @@ PR_FindSymbolAndLibrary(const char *raw_name, PRLibrary* *lib) PR_IMPLEMENT(PRLibrary*) PR_LoadStaticLibrary(const char *name, const PRStaticLinkTable *slt) { - PRLibrary *lm; + PRLibrary *lm=NULL; PRLibrary* result = NULL; /* See if library is already loaded */ |