]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (LTDL_LAZY_OR_NOW): renamed from LTDL_NOW; prefer
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Sat, 6 Mar 1999 20:25:04 +0000 (20:25 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sat, 6 Mar 1999 20:25:04 +0000 (20:25 +0000)
LAZY loading because it's much faster and NOW is apparently
partially broken on FreeBSD
Reported by Archie Cobbs <archie@whistle.com>

ChangeLog
libltdl/ltdl.c

index eb246103488fd33c623f7f732f8d4f27b716bae5..a3b2417fff49cc7b6d68cf58de7c4651092bd330 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+1999-03-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * libltdl/ltdl.c (LTDL_LAZY_OR_NOW): renamed from LTDL_NOW; prefer 
+       LAZY loading because it's much faster and NOW is apparently
+       partially broken on FreeBSD
+       Reported by Archie Cobbs <archie@whistle.com>
+
 1999-03-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * ltconfig.in (archive_expsym_cmds, solaris, without_gnu_ld):
index 2b4432730a301c7040ba483ed543c9fd23160269..63bb2be56c39b67197f005b2fc8a291d2415bedf 100644 (file)
@@ -216,23 +216,35 @@ strrchr(str, ch)
 #define        dlerror()       unknown_error
 #endif
 
-#if RTLD_GLOBAL
+#ifdef RTLD_GLOBAL
 # define LTDL_GLOBAL   RTLD_GLOBAL
 #else
-# if DL_GLOBAL
+# ifdef DL_GLOBAL
 #  define LTDL_GLOBAL  DL_GLOBAL
 # else
 #  define LTDL_GLOBAL  0
 # endif
 #endif
 
-#if RTLD_NOW
-# define LTDL_NOW      RTLD_NOW
-#else
-# if DL_NOW
-#  define LTDL_NOW     DL_NOW
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+#  define LTDL_LAZY_OR_NOW     RTLD_LAZY
 # else
-#  define LTDL_NOW     0
+#  ifdef DL_LAZY
+#   define LTDL_LAZY_OR_NOW    DL_LAZY
+#  else
+#   ifdef RTLD_NOW
+#    define LTDL_LAZY_OR_NOW   RTLD_NOW
+#   else
+#    ifdef DL_NOW
+#     define LTDL_LAZY_OR_NOW  DL_NOW
+#    else
+#     define LTDL_LAZY_OR_NOW  0
+#    endif
+#   endif
+#  endif
 # endif
 #endif
 
@@ -253,7 +265,7 @@ dl_open (handle, filename)
        lt_dlhandle handle;
        const char *filename;
 {
-       handle->handle = dlopen(filename, LTDL_GLOBAL | LTDL_NOW);
+       handle->handle = dlopen(filename, LTDL_GLOBAL | LTDL_LAZY_OR_NOW);
        if (!handle->handle) {
                last_error = dlerror();
                return 1;