httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject [PATCH] PORT: AIX 3.2, 4.1.5, 4.2, 4.3
Date Fri, 01 May 1998 10:14:39 GMT

The below patch is the assembled result from recent AIX porting with Jens-Uwe
Mager (the guy who has written the nice DSO emulator code for AIX). I've sent
the patch back to him for final testing before commit. But seems to be correct
now. Just for those who are interested in IBM's AIX...

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Index: src/CHANGES
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/CHANGES,v
retrieving revision 1.805
diff -u -r1.805 CHANGES
--- CHANGES	1998/05/01 10:00:41	1.805
+++ CHANGES	1998/05/01 10:03:38
@@ -1,5 +1,8 @@
 Changes with Apache 1.3b7
 
+  *) PORT: Various porting changes  to support AIX 3.2, 4.1.5, 4.2 and 4.3
+     [Jens-Uwe Mager, Ralf S. Engelschall]
+
   *) PORT: Some optimization defines for NetBSD
      [Jaromir Dolecek <dolecek@ics.muni.cz>] PR#2165
 
Index: src/Configure
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/Configure,v
retrieving revision 1.251
diff -u -r1.251 Configure
--- Configure	1998/05/01 10:00:42	1.251
+++ Configure	1998/05/01 10:03:12
@@ -304,19 +304,32 @@
 	DEF_WANTHSREGEX=no
 	;;
     i386-ibm-aix*)
-    	OS='IBM AIX PS/2'
+	OS='IBM AIX PS/2'
 	CFLAGS="$CFLAGS -DAIX=1 -U__STR__ -DUSEBCOPY"
 	DEF_WANTHSREGEX=no
 	;;
-    *-ibm-aix[1-3].*|*-ibm-aix4.[0-1])
-        OS='IBM AIX < v4.2'
-        CFLAGS="$CFLAGS -DAIX=1 -DNEED_RLIM_T -U__STR__"
-        ;;
+    *-ibm-aix[1-3].*)
+	OS='IBM AIX <= 3.x'
+	CFLAGS="$CFLAGS -DAIX=1 -DNEED_RLIM_T -U__STR__"
+	;;
+    *-ibm-aix4.0)
+	OS='IBM AIX 4.0'
+	CFLAGS="$CFLAGS -DAIX=40 -DNEED_RLIM_T -U__STR__"
+	;;
+    *-ibm-aix4.1)
+	OS='IBM AIX 4.1'
+	CFLAGS="$CFLAGS -DAIX=41 -DNEED_RLIM_T -U__STR__"
+	;;
+    *-ibm-aix4.2)
+	OS='IBM AIX 4.2'
+	CFLAGS="$CFLAGS -DAIX=42 -U__STR__"
+	LDFLAGS="$LDFLAGS -lm"
+	;;
     *-ibm-aix*)
-        OS='IBM AIX >= 4.2'
-        CFLAGS="$CFLAGS -DAIX=42 -U__STR__"
+	OS='IBM AIX >= 4.3'
+	CFLAGS="$CFLAGS -DAIX=43 -U__STR__"
 	LDFLAGS="$LDFLAGS -lm"
-        ;;
+	;;
     *-apollo-*)
 	OS='Apollo Domain'
 	CFLAGS="$CFLAGS -DAPOLLO"
@@ -1062,6 +1075,13 @@
 	    */cc|cc )
 		CFLAGS="$CFLAGS -n32"
 		LDFLAGS="$LDFLAGS -n32"
+	    ;;
+	esac
+	;;
+    'AIX 4.[123]')
+	case $CC in
+	    */cc|cc ) 
+		CFLAGS="$CFLAGS -qnogenpcomp -qnousepcomp"
 	    ;;
 	esac
 	;;
Index: src/README.DSO
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/README.DSO,v
retrieving revision 1.7
diff -u -r1.7 README.DSO
--- README.DSO	1998/04/30 11:32:04	1.7
+++ README.DSO	1998/05/01 09:25:02
@@ -151,7 +151,7 @@
    o  IRIX               (6.2)
    o  HP/UX              (10.20)
    o  UnixWare           (2.01, 2.1.2)
-   o  AIX                (4.2)
+   o  AIX                (3.2, 4.1.5, 4.2, 4.3)
    o  ReliantUNIX/SINIX  (5.43)
    o  SVR4               (-)
 
Index: src/include/conf.h
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/include/conf.h,v
retrieving revision 1.204
diff -u -r1.204 conf.h
--- conf.h	1998/05/01 10:00:45	1.204
+++ conf.h	1998/05/01 10:03:17
@@ -815,9 +815,11 @@
 #if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 7 || defined(NEXT)
 #define ap_inline
 #define __attribute__(__x)
+#define ENUM_BITFIELD(e,n,w)  signed int n : w
 #else
 #define ap_inline __inline__
 #define USE_GNU_INLINE
+#define ENUM_BITFIELD(e,n,w)  e n : w
 #endif
 
 /* Do we have sys/resource.h; assume that BSD does. */
Index: src/main/http_main.c
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/main/http_main.c,v
retrieving revision 1.327
diff -u -r1.327 http_main.c
--- http_main.c	1998/04/28 05:59:53	1.327
+++ http_main.c	1998/05/01 09:22:14
@@ -3529,7 +3529,7 @@
     }
 
     if (!pid) {
-#ifdef AIX
+#if defined(AIX) && AIX >= 41
 /* by default AIX binds to a single processor
  * this bit unbinds children which will then bind to another cpu
  */
Index: src/modules/proxy/proxy_cache.c
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/modules/proxy/proxy_cache.c,v
retrieving revision 1.37
diff -u -r1.37 proxy_cache.c
--- proxy_cache.c	1998/04/15 17:09:29	1.37
+++ proxy_cache.c	1998/05/01 09:48:29
@@ -71,7 +71,9 @@
 
 DEF_Explain
 
+#ifndef abs
 #define	abs(c)	((c) >= 0 ? (c) : -(c))
+#endif
 
 struct gc_ent {
     unsigned long int len;
Index: src/modules/standard/mod_setenvif.c
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/modules/standard/mod_setenvif.c,v
retrieving revision 1.21
diff -u -r1.21 mod_setenvif.c
--- mod_setenvif.c	1998/04/11 12:00:51	1.21
+++ mod_setenvif.c	1998/05/01 09:01:43
@@ -132,7 +132,9 @@
     char *regex;                /* regex to match against */
     regex_t *preg;              /* compiled regex */
     table *features;            /* env vars to set (or unset) */
-    enum special special_type : 4;	/* is it a "special" header ? */
+    ENUM_BITFIELD(              /* is it a "special" header ? */
+	enum special,
+	special_type,4);
     unsigned icase : 1;		/* ignoring case? */
 } sei_entry;
 
Index: src/os/unix/os-aix-dso.c
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/os/unix/os-aix-dso.c,v
retrieving revision 1.1
diff -u -r1.1 os-aix-dso.c
--- os-aix-dso.c	1998/04/28 08:42:11	1.1
+++ os-aix-dso.c	1998/05/01 09:20:40
@@ -92,6 +92,20 @@
 #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
+
+/*
  * Mode flags for the dlopen routine.
  */
 #undef  RTLD_LAZY
Index: src/support/logresolve.c
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/support/logresolve.c,v
retrieving revision 1.12
diff -u -r1.12 logresolve.c
--- logresolve.c	1998/04/21 20:14:06	1.12
+++ logresolve.c	1998/05/01 09:27:13
@@ -117,7 +117,9 @@
     struct nsrec **current, *new;
     struct hostent *hostdata;
     char *name;
-    extern int h_errno;		/* some machines don't have this in their headers */
+#ifndef h_errno
+    extern int h_errno; /* some machines don't have this in their headers */
+#endif
 
     current = &nscache[((ipnum.s_addr + (ipnum.s_addr >> 8) +
 			 (ipnum.s_addr >> 16) + (ipnum.s_addr >> 24)) % BUCKETS)];

Mime
View raw message