From 521591a8ef0ad5a7c9161733f8f2d6d2c705f3ef Mon Sep 17 00:00:00 2001 From: wtc Date: Tue, 7 Apr 1998 23:05:07 +0000 Subject: [PATCH] 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(). --- nsprpub/pr/src/linking/prlink.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nsprpub/pr/src/linking/prlink.c b/nsprpub/pr/src/linking/prlink.c index aacc771577e..0ce0d80a080 100644 --- a/nsprpub/pr/src/linking/prlink.c +++ b/nsprpub/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