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().
This commit is contained in:
wtc 1998-04-07 23:05:07 +00:00
Родитель 4d20316856
Коммит 9bde636b16
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -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