summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc <devnull@localhost>1998-04-07 23:05:07 +0000
committerwtc <devnull@localhost>1998-04-07 23:05:07 +0000
commit44e835c53d88497b2fada70a7a157262a7116f06 (patch)
tree5677aba4feb0f3ffbd60f202d746959ca4534159
parentd3166ef58de4561ad8a692bf2e3a0a43b19e6941 (diff)
downloadnspr-hg-44e835c53d88497b2fada70a7a157262a7116f06.tar.gz
If RTLD_LAZY is not defined, define it to be the same as RTLD_NOW,
as oppposed to the value 1. This is to avoid conflicting with the value of other RTLD_XXX flags. On HP-UX, shared libraries built using aCC cannot be dynamically loaded with BIND_DEFERRED, so we have to use the BIND_IMMEDIATE flag in shl_load().
-rw-r--r--pr/src/linking/prlink.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c
index aacc7715..0ce0d80a 100644
--- a/pr/src/linking/prlink.c
+++ b/pr/src/linking/prlink.c
@@ -36,7 +36,7 @@
/* Define this on systems which don't have it (AIX) */
#ifndef RTLD_LAZY
-#define RTLD_LAZY 1
+#define RTLD_LAZY RTLD_NOW
#endif
#endif /* XP_UNIX */
@@ -621,7 +621,11 @@ PR_LoadLibrary(const char *name)
#if defined(USE_DLFCN)
void *h = dlopen(name, RTLD_LAZY);
#elif defined(USE_HPSHL)
- shl_t h = shl_load(name, BIND_DEFERRED | DYNAMIC_PATH, 0L);
+ /*
+ * Shared libraries built using aCC cannot be dynamically loaded
+ * with BIND_DEFERRED, so we have to use the BIND_IMMEDIATE flag.
+ */
+ shl_t h = shl_load(name, BIND_IMMEDIATE | DYNAMIC_PATH, 0L);
#else
#error Configuration error
#endif