diff options
author | glen.beasley%sun.com <devnull@localhost> | 2009-03-20 06:49:37 +0000 |
---|---|---|
committer | glen.beasley%sun.com <devnull@localhost> | 2009-03-20 06:49:37 +0000 |
commit | a6bbc8171dab90642a297e5c2d2bfc26a2e7413f (patch) | |
tree | 6d70707a217dc18dede29a5188d64b161ae3f20c | |
parent | c206148e08ba5d72835e8d067200e5003c8c173a (diff) | |
download | nspr-hg-a6bbc8171dab90642a297e5c2d2bfc26a2e7413f.tar.gz |
480730 dlopen on MAC OS X ignores provided path forgot #4 in review r=wan-tehNSPR_HEAD_20090321
-rw-r--r-- | pr/src/linking/prlink.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c index 1a7ce8bc..72796eab 100644 --- a/pr/src/linking/prlink.c +++ b/pr/src/linking/prlink.c @@ -894,14 +894,10 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags) /* ensure the file exists if it contains a slash character i.e. path */ /* DARWIN's dlopen ignores the provided path and checks for the */ /* plain filename in DYLD_LIBRARY_PATH */ - if (strchr(name, PR_DIRECTORY_SEPARATOR) != NULL) { - if (PR_Access(name, PR_ACCESS_EXISTS) == PR_SUCCESS) { + if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL || + PR_Access(name, PR_ACCESS_EXISTS) == PR_SUCCESS) { h = dlopen(name, dl_flags); } - } else { - /* search for name in the library path */ - h = dlopen(name, dl_flags); - } #else h = dlopen(name, dl_flags); #endif |