diff options
author | Peter van Heusden <pvh@junior.uwc.ac.za> | 1997-06-11 12:00:00 +1200 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1997-06-11 12:00:00 +1200 |
commit | a9581ec21a2686ca09657757555fcd66435bb205 (patch) | |
tree | bec690ee293220ea42ca4c56421f9215d13b2d9b | |
parent | 137153360e77d819f1f8e8f21d3fdc5e16babede (diff) | |
download | perl-a9581ec21a2686ca09657757555fcd66435bb205.tar.gz |
perl5.004 on AIX: Patches
I took a further look at the problems which I described in my previous
post, and managed to make a patch for the -Duseperlio problem. [this]
makes both -Duseperlio and -Dshrplib work [...]
Should have spotted this earlier, but hey...
p5p-msgid: Pine.A32.3.93.970519163700.25188A-100000@junior.uwc.ac.za
-rwxr-xr-x | Makefile.SH | 9 | ||||
-rw-r--r-- | ext/DynaLoader/dl_aix.xs | 12 | ||||
-rwxr-xr-x | perl_exp.SH | 9 |
3 files changed, 29 insertions, 1 deletions
diff --git a/Makefile.SH b/Makefile.SH index ec99d02e5c..70876e1e74 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -41,7 +41,14 @@ true) ;; aix*) shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp" - shrpldflags="$shrpldflags -b noentry $ldflags $libs $cryptlib" + case "$osvers" in + 3*) + shrpldflags="$shrpldflags -e _nostart $ldflags $libs $cryptlib" + ;; + *) + shrpldflags="$shrpldflags -b noentry $ldflags $libs $cryptlib" + ;; + esac aixinstdir=`pwd | sed 's/\/UU$//'` linklibperl="-L $archlibexp/CORE -L $aixinstdir -lperl" ;; diff --git a/ext/DynaLoader/dl_aix.xs b/ext/DynaLoader/dl_aix.xs index bdf33b2410..746666636a 100644 --- a/ext/DynaLoader/dl_aix.xs +++ b/ext/DynaLoader/dl_aix.xs @@ -29,6 +29,12 @@ #include <a.out.h> #include <ldfcn.h> +/* If using PerlIO, redefine these macros from <ldfcn.h> */ +#ifdef USE_PERLIO +#define FSEEK(ldptr,o,p) PerlIO_seek(IOPTR(ldptr),(p==BEGINNING)?(OFFSET(ldptr)+o):o,p) +#define FREAD(p,s,n,ldptr) PerlIO_read(IOPTR(ldptr),p,s*n) +#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 @@ -389,7 +395,13 @@ static int readExports(ModulePtr mp) ; return -1; } +/* This first case is a hack, since it assumes that the 3rd parameter to + FREAD is 1. See the redefinition of FREAD above to see how this works. */ +#ifdef USE_PERLIO + if (FREAD(ldbuf, sh.s_size, 1, ldp) != sh.s_size) { +#else if (FREAD(ldbuf, sh.s_size, 1, ldp) != 1) { +#endif errvalid++; strcpy(errbuf, "readExports: cannot read loader section"); safefree(ldbuf); diff --git a/perl_exp.SH b/perl_exp.SH index ef79876fce..4757c6a026 100755 --- a/perl_exp.SH +++ b/perl_exp.SH @@ -57,6 +57,15 @@ y*) ;; esac +# +# If we use the PerlIO abstraction layer, add its symbols +# + +if [ $useperlio = "define" ] +then + grep '^[A-Za-z]' perlio.sym >> perl.exp +fi + # # Extra globals not included above (including a few that might # not actually be defined, but there's no harm in that). |