diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-13 02:23:16 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-13 02:23:16 +0000 |
commit | 61d42ce43847d6cea183d4f40e2921e53606f13f (patch) | |
tree | 98a862f5466c34e760371d4530634e628ebe4f2c /ext | |
parent | ce8217e0ee91404d9ead31e9161c90ae176fd05b (diff) | |
download | perl-61d42ce43847d6cea183d4f40e2921e53606f13f.tar.gz |
New AIX dynaloading code from Jens-Uwe Mager.
Does break binary compatibility.
p4raw-id: //depot/perl@10554
Diffstat (limited to 'ext')
-rw-r--r-- | ext/DynaLoader/dl_aix.xs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/ext/DynaLoader/dl_aix.xs b/ext/DynaLoader/dl_aix.xs index e29c0f85f7..9334a15c97 100644 --- a/ext/DynaLoader/dl_aix.xs +++ b/ext/DynaLoader/dl_aix.xs @@ -14,6 +14,21 @@ #define PERLIO_NOT_STDIO 0 /* + * On AIX 4.3 and above the emulation layer is not needed any more, and + * indeed if perl uses its emulation and perl is linked into apache + * which is supposed to use the native dlopen conflicts arise. + * Jens-Uwe Mager jum@helios.de + */ +#ifdef USE_NATIVE_DLOPEN + +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" +#include <dlfcn.h> + +#else + +/* * @(#)dlfcn.c 1.5 revision of 93/02/14 20:14:17 * This is an unpublished work copyright (c) 1992 Helios Software GmbH * 3000 Hannover 1, Germany @@ -94,6 +109,13 @@ # define FREAD(p,s,n,ldptr) fread(p,s,n,IOPTR(ldptr)) #endif +#ifndef RTLD_LAZY +# define RTLD_LAZY 0 +#endif +#ifndef RTLD_GLOBAL +# define RTLD_GLOBAL 0 +#endif + /* * We simulate dlopen() et al. through a call to load. Because AIX has * no call to find an exported symbol we read the loader section of the @@ -632,6 +654,7 @@ static void * findMain(void) safefree(buf); return ret; } +#endif /* USE_NATIVE_DLOPEN */ /* dl_dlopen.xs * @@ -677,7 +700,7 @@ dl_load_file(filename, flags=0) DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", filename,flags)); if (flags & 0x01) Perl_warn(aTHX_ "Can't make loaded symbols global on this platform while loading %s",filename); - RETVAL = dlopen(filename, 1) ; + RETVAL = dlopen(filename, RTLD_GLOBAL|RTLD_LAZY) ; DLDEBUG(2,PerlIO_printf(Perl_debug_log, " libref=%x\n", RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) |