summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Uwe Mager <jum@helios.de>1998-04-26 17:55:47 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1998-04-28 20:20:21 +1200
commitae153287a040a224cc168b1c52f0a47dc16e850d (patch)
treef0d66700fe106f52cc8fde4abcfd353437a8cd19
parent9256df36d58b5295b529a24634912dcaa5b71c8e (diff)
downloadperl-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.xs14
-rw-r--r--pp_sys.c2
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)
diff --git a/pp_sys.c b/pp_sys.c
index 12cc36e31b..87007f9f8a 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -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