From: Jeff Trawick Date: Thu, 3 Oct 2002 19:58:09 +0000 (+0000) Subject: PORT: Enable SINGLE_LISTEN_UNSERIALIZED_ACCEPT for AIX 4.3.2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bec6a1e2cf0d23f01e1a05d059dbad273019a65;p=thirdparty%2Fapache%2Fhttpd.git PORT: Enable SINGLE_LISTEN_UNSERIALIZED_ACCEPT for AIX 4.3.2 and above. Rewrite configure logic for modern levels of AIX to support future releases of AIX with no changes to Apache. This is basically a housekeeping matter to avoid having separate stanzas for each AIX release and to add some finer detail to the -DAIX=xxx value so that we know when to enable SINGLE_LISTEN_UNSERIALIZED_ACCEPT. I suspect that this fixes the recognition of AIX on ia64, but nobody complained when it was broken and I don't know where to find such a beast. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@97091 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index fd282b6d92b..7f034137dc3 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,6 +1,9 @@ Changes with Apache 1.3.28 - + *) PORT: Enable SINGLE_LISTEN_UNSERIALIZED_ACCEPT for AIX 4.3.2 + and above. Update AIX configure logic to allow higher AIX + release numbers without having to change Apache. + [Jeff Trawick] Changes with Apache 1.3.27 diff --git a/src/Configure b/src/Configure index fca3b8718f1..71be31ff522 100755 --- a/src/Configure +++ b/src/Configure @@ -300,40 +300,9 @@ case "$PLAT" in ;; i386-ibm-aix*) OS='IBM AIX PS/2' - CFLAGS="$CFLAGS -DAIX=1 -U__STR__ -DUSEBCOPY" + CFLAGS="$CFLAGS -DAIX=100 -U__STR__ -DUSEBCOPY" DEF_WANTHSREGEX=no ;; - *-ibm-aix[1-2].*) - OS='IBM AIX 1.x/2.x' - CFLAGS="$CFLAGS -DAIX=1 -DNEED_RLIM_T -U__STR__" - ;; - *-ibm-aix3.*) - OS='IBM AIX 3.x' - CFLAGS="$CFLAGS -DAIX=30 -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-aix4.3) - OS='IBM AIX 4.3' - CFLAGS="$CFLAGS -DAIX=43 -DUSE_PTHREAD_SERIALIZED_ACCEPT -U__STR__" - LDFLAGS="$LDFLAGS -lm -lpthread" - RULE_SHARED_CORE=no - DEF_SHARED_CORE=no - ;; - *-ibm-aix5.1) - OS='IBM AIX 5.1' - CFLAGS="$CFLAGS -DAIX=51 -DUSE_PTHREAD_SERIALIZED_ACCEPT -U__STR__" - LDFLAGS="$LDFLAGS -lm -lpthread" - RULE_SHARED_CORE=no - DEF_SHARED_CORE=no - ;; ia64-ibm-aix*) OS='IBM AIX IA64' CFLAGS="$CFLAGS -DAIXIA64 -U__STR__" @@ -341,9 +310,40 @@ case "$PLAT" in RULE_SHARED_CORE=no DEF_SHARED_CORE=no ;; + *-ibm-aix[1-2].*) + OS='IBM AIX 1.x/2.x' + CFLAGS="$CFLAGS -DAIX=100 -DNEED_RLIM_T -U__STR__" + ;; + *-ibm-aix3.*) + OS='IBM AIX 3.x' + CFLAGS="$CFLAGS -DAIX=300 -DNEED_RLIM_T -U__STR__" + ;; + *-ibm-aix[45678].*) + PLATOSVERS=`echo $PLAT | sed 's/^.*ibm-aix//'` + OS="AIX $PLATOSVERS" + PLATOSVERSNUM=`echo $PLATOSVERS | sed 's/\.//'` + if test $PLATOSVERSNUM -ge 43; then + PLATOSVERSNUM=`oslevel | sed 's/\.//g' | sed 's/.$//'` + else + PLATOSVERSNUM="$PLATOSVERSNUM"0 + fi + # PLATOSVERSNUM is a three digit number at this point + CFLAGS="$CFLAGS -DAIX=$PLATOSVERSNUM -U__STR__" + if test $PLATOSVERSNUM -lt 420; then + CFLAGS="$CFLAGS -DNEED_RLIM_T" + fi + if test $PLATOSVERSNUM -ge 420; then + LDFLAGS="$LDFLAGS -lm" + fi + if test $PLATOSVERSNUM -ge 430; then + LDFLAGS="$LDFLAGS -lpthread" + RULE_SHARED_CORE=no + DEF_SHARED_CORE=no + fi + ;; *-ibm-aix*) OS='IBM AIX' - CFLAGS="$CFLAGS -DAIX=1 -U__STR__" + CFLAGS="$CFLAGS -DAIX=100 -U__STR__" LDFLAGS="$LDFLAGS -lm" ;; *-apollo-*) diff --git a/src/include/ap_config.h b/src/include/ap_config.h index 44d1d00157c..defa76c40a4 100644 --- a/src/include/ap_config.h +++ b/src/include/ap_config.h @@ -284,15 +284,21 @@ typedef int rlim_t; #define HAVE_FCNTL_SERIALIZED_ACCEPT #define HAVE_SYSVSEM_SERIALIZED_ACCEPT #define NEED_UNION_SEMUN -#if !defined(USE_PTHREAD_SERIALIZED_ACCEPT) +#if AIX >= 430 +#define HAVE_PTHREAD_SERIALIZED_ACCEPT +#define USE_PTHREAD_SERIALIZED_ACCEPT +#else #define USE_FCNTL_SERIALIZED_ACCEPT #endif +#if AIX >= 432 +#define SINGLE_LISTEN_UNSERIALIZED_ACCEPT +#endif #ifdef USEBCOPY #define memmove(a,b,c) bcopy(b,a,c) #endif -#if AIX >= 51 +#if AIX >= 510 #define NET_SIZE_T socklen_t -#elif AIX >= 42 +#elif AIX >= 420 #define NET_SIZE_T size_t #endif @@ -990,6 +996,7 @@ typedef int rlim_t; #define USE_MMAP_FILES #define NEED_UNION_SEMUN #define HAVE_SYSVSEM_SERIALIZED_ACCEPT +#define HAVE_FCNTL_SERIALIZED_ACCEPT #define _POSIX_SOURCE #include #ifdef SIGDUMP /* SIGDUMP is not defined by OS/390 v1r2 */ diff --git a/src/os/unix/os.c b/src/os/unix/os.c index 3ee29642c49..aa259a14b27 100644 --- a/src/os/unix/os.c +++ b/src/os/unix/os.c @@ -18,7 +18,7 @@ void ap_is_not_here(void) {} * to 4.3. Use the native DSO code for 4.3 and later. */ #if defined(AIX) && !defined(NO_DL_NEEDED) -#if AIX < 43 +#if AIX < 430 #include "os-aix-dso.c" #endif #endif diff --git a/src/os/unix/os.h b/src/os/unix/os.h index ff1f22be28c..988f5bedfc5 100644 --- a/src/os/unix/os.h +++ b/src/os/unix/os.h @@ -109,7 +109,7 @@ extern int ap_os_is_path_absolute(const char *file); * to 4.3. */ #ifdef AIX -#if AIX < 43 +#if AIX < 430 #undef HAVE_DLFCN_H #endif #endif