#ifdef HAVE_SHLIB
/* Thankfully, most systems follow the ELFish dlopen() method.
-** HAVE__DLOPEN is lame, but SCO has their dl* functions as _dl*, and
-** unless you include dlfcn.h you don't get the macros to mask them, and
-** autoconf fails to find them. No longer true as of 5.0.5.
-**
-** Anybody who wants to use this on SCO needs to have their configure.in
-** look for _dlopen() as well as dlopen()
*/
-#if defined(HAVE_DLOPEN) || defined(HAVE__DLOPEN) || defined(HAVE_DLFCN_H)
+#if defined(HAVE_DLOPEN)
#include <dlfcn.h>
#ifndef RTLD_LAZY
# define RTLD_LAZY 1
#endif /* RTLD_LAZY isn't defined under FreeBSD - ick */
-#ifndef RTLD_GLOBAL
-# define RTLD_GLOBAL 0
+#ifndef RTLD_NOW
+# define RTLD_NOW 2
#endif
int
dll_handle
dll_open (const char *fname)
{
- return (dll_handle) dlopen (fname, RTLD_LAZY | RTLD_GLOBAL);
+ return (dll_handle) dlopen (fname, RTLD_NOW);
}
int