* 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>
This commit is contained in:
Alexandre Oliva 1999-03-06 20:25:04 +00:00 committed by Alexandre Oliva
parent dfd78f15c9
commit f6cd1529ac
2 changed files with 28 additions and 9 deletions

View File

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

View 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;