httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor J. Orlikowski" <...@raleigh.ibm.com>
Subject Re: [PATCH] Make AIX versions 4.3 and above use pthreads for locking in 1.3
Date Tue, 13 Jun 2000 15:46:51 GMT
Ok, following Manoj's advice, here is the resubmit.
Added a new helper script to check the presence of a #define in a header
file for 1.3.x

# This file needs adding to cvs.

Index: src/helpers/checkdefine.sh
#!/bin/sh
##
##  checkdefine.sh -- Check whether a define exists in a header
##   Modified from Ralf S. Engelschall's checkheader.sh
##   by Victor Orlikowski for the Apache configuration mechanism
##
#
# This script falls under the Apache License.
# See http://www.apache.org/docs/LICENSE


header=$1
define=$2
rc=1
if [ "x$CPP" = "x" ]; then
    CPP='NOT-AVAILABLE'
fi
if [ "x$CPP" != "xNOT-AVAILABLE" ]; then
    #   create a test C source
    cat >conftest.c <<EOF
#include <$header>
#ifdef $define
YES_IS_DEFINED
#endif
EOF
    if (eval "$CPP conftest.c") 2>/dev/null |
        egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
        rc=0
    fi
fi
rm -f conftest.*
exit $rc


Index: src/Configure
===================================================================
RCS file: /cvs/apache/apache-1.3/src/Configure,v
retrieving revision 1.397
diff -u -r1.397 Configure
--- Configure 2000/04/18 19:26:28 1.397
+++ Configure 2000/06/13 15:34:15
@@ -967,11 +967,18 @@
 ####################################################################
 # Special AIX 4.x support: need to check for sys/processor.h
 # to decide whether the Processor Binding can be used or not
+# ADDENDUM: For large SMP boxen, AIX likes pthreads. Check to make
+# sure these work OK, then put them in.
 case "$PLAT" in
     *-ibm-aix*)
  CPP=$CPP ./helpers/checkheader.sh sys/processor.h
  if [ $? -eq 0 ]; then
      CFLAGS="$CFLAGS -DAIX_BIND_PROCESSOR"
+ fi
+ CPP=$CPP ./helpers/checkdefine.sh pthread.h PTHREAD_PROCESS_SHARED
+ if [ $? -eq 0 ]; then
+     CFLAGS="$CFLAGS -DUSE_PTHREAD_SERIALIZED_ACCEPT"
+     LDFLAGS="$LDFLAGS -lpthread"
  fi
  ;;
 esac
Index: src/include/ap_config.h
===================================================================
RCS file: /cvs/apache/apache-1.3/src/include/ap_config.h,v
retrieving revision 1.287
diff -u -r1.287 ap_config.h
--- ap_config.h 2000/06/01 23:42:23 1.287
+++ ap_config.h 2000/06/13 15:34:16
@@ -268,7 +268,9 @@
 #ifdef NEED_RLIM_T
 typedef int rlim_t;
 #endif
+#ifndef USE_PTHREAD_SERIALIZED_ACCEPT
 #define USE_FCNTL_SERIALIZED_ACCEPT
+#endif
 #ifdef USEBCOPY
 #define memmove(a,b,c) bcopy(b,a,c)
 #endif



Mime
View raw message