From: Jarkko Hietaniemi Date: Wed, 14 Mar 2001 20:23:53 +0000 (+0000) Subject: Retract #9136: breaks threading (and binary compatibility). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f464b2eb090216cc66e37fd53ea85cc759ad9be;p=p5sagit%2Fp5-mst-13.2.git Retract #9136: breaks threading (and binary compatibility). p4raw-id: //depot/perl@9155 --- diff --git a/ext/DynaLoader/dl_aix.xs b/ext/DynaLoader/dl_aix.xs index 95c8b1c..b2c92d8 100644 --- a/ext/DynaLoader/dl_aix.xs +++ b/ext/DynaLoader/dl_aix.xs @@ -14,21 +14,6 @@ #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 - -#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 @@ -104,13 +89,6 @@ # 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 @@ -649,7 +627,6 @@ static void * findMain(void) safefree(buf); return ret; } -#endif /* USE_NATIVE_DLOPEN */ /* dl_dlopen.xs * @@ -695,7 +672,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, RTLD_GLOBAL|RTLD_LAZY) ; + RETVAL = dlopen(filename, 1) ; DLDEBUG(2,PerlIO_printf(Perl_debug_log, " libref=%x\n", RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) diff --git a/hints/aix.sh b/hints/aix.sh index 406c442..31d189f 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -55,11 +55,9 @@ esac case "$osvers" in 3.*|4.1.*|4.2.*) usenm='undef' - usenativedlopen='false' ;; *) usenm='true' - usenativedlopen='true' ;; esac @@ -431,25 +429,20 @@ $define|true|[yY]*) esac EOCBU -if test $usenativedlopen = 'true' -then - ccflags="$ccflags -DUSE_NATIVE_DLOPEN" -else - # If the C++ libraries, libC and libC_r, are available we will prefer them - # over the vanilla libc, because the libC contain loadAndInit() and - # terminateAndUnload() which work correctly with C++ statics while libc - # load() and unload() do not. See ext/DynaLoader/dl_aix.xs. - # The C-to-C_r switch is done by usethreads.cbu, if needed. - if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then - # Cify libswanted. - set `echo X "$libswanted "| sed -e 's/ c / C c /'` - shift - libswanted="$*" - # Cify lddlflags. - set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'` - shift - lddlflags="$*" - fi +# If the C++ libraries, libC and libC_r, are available we will prefer them +# over the vanilla libc, because the libC contain loadAndInit() and +# terminateAndUnload() which work correctly with C++ statics while libc +# load() and unload() do not. See ext/DynaLoader/dl_aix.xs. +# The C-to-C_r switch is done by usethreads.cbu, if needed. +if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then + # Cify libswanted. + set `echo X "$libswanted "| sed -e 's/ c / C c /'` + shift + libswanted="$*" + # Cify lddlflags. + set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'` + shift + lddlflags="$*" fi # EOF diff --git a/makedef.pl b/makedef.pl index ed882ae..f165a90 100644 --- a/makedef.pl +++ b/makedef.pl @@ -161,15 +161,7 @@ EXPORTS ---EOP--- } elsif ($PLATFORM eq 'aix') { - $OSVER = `uname -v`; - chop $OSVER; - $OSREL = `uname -r`; - chop $OSREL; - if ($OSVER > 4 || ($OSVER == 4 && $OSREL >= 3)) { - print "#! .\n"; - } else { - print "#!\n"; - } + print "#!\n"; } my %skip;