diff options
author | Jens-Uwe Mager <jum@helios.de> | 1998-04-26 17:55:47 +1200 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1998-04-28 20:20:21 +1200 |
commit | ae153287a040a224cc168b1c52f0a47dc16e850d (patch) | |
tree | f0d66700fe106f52cc8fde4abcfd353437a8cd19 | |
parent | 9256df36d58b5295b529a24634912dcaa5b71c8e (diff) | |
download | perl-ae153287a040a224cc168b1c52f0a47dc16e850d.tar.gz |
perl compile fix for AIX 4.3
Perl does not compile under AIX 4.3 due to two problems. First,
in an attempt to make the DNS resolver thread safe h_errno is
not a simple variable any more, it is a define. This causes the
definition in pp_sys.c to fail. Second the XCOFF header files
remove some useful definitions that the dynamic loader in dl_aix.xs
did rely upon. The following is a patch that fixes both problems.
p5p-msgid: 199804261611.SAA34728@ans.helios.de
-rw-r--r-- | ext/DynaLoader/dl_aix.xs | 14 | ||||
-rw-r--r-- | pp_sys.c | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/ext/DynaLoader/dl_aix.xs b/ext/DynaLoader/dl_aix.xs index 746666636a..7dbb855f09 100644 --- a/ext/DynaLoader/dl_aix.xs +++ b/ext/DynaLoader/dl_aix.xs @@ -29,6 +29,20 @@ #include <a.out.h> #include <ldfcn.h> +/* + * AIX 4.3 does remove some useful definitions from ldfcn.h. Define + * these here to compensate for that lossage. + */ +#ifndef BEGINNING +# define BEGINNING SEEK_SET +#endif +#ifndef FSEEK +# define FSEEK(ldptr,o,p) fseek(IOPTR(ldptr),(p==BEGINNING)?(OFFSET(ldptr) +o):o,p) +#endif +#ifndef FREAD +# define FREAD(p,s,n,ldptr) fread(p,s,n,IOPTR(ldptr)) +#endif + /* 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) @@ -47,8 +47,10 @@ #endif #if defined(HOST_NOT_FOUND) && !defined(h_errno) +#ifndef h_errno extern int h_errno; #endif +#endif #ifdef HAS_PASSWD # ifdef I_PWD |