httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor J. Orlikowski" <...@duke.edu>
Subject [PATCH] AIX proper diagnosis and pthread usage
Date Thu, 15 Jun 2000 23:13:46 GMT
In 2.0, we use autoconf.
All well and good, but our hints.m4 doesn't handle the AIX versions
presented by /usr/bin/oslevel.
This patch fixes that, as well as adding a workaround for AIX to use
threading in APR when compiling with gcc, since AIX has a broken pthread.h

Index: src/lib/apr/configure.in
===================================================================
RCS file: /cvs/apache/apache-2.0/src/lib/apr/configure.in,v
retrieving revision 1.113
diff -u -r1.113 configure.in
--- configure.in 2000/06/15 13:12:12 1.113
+++ configure.in 2000/06/15 23:07:29
@@ -201,7 +201,7 @@
 AC_CHECK_FUNCS(strcasecmp stricmp setsid nl_langinfo)
 AC_CHECK_FUNCS(sigaction, [ have_sigaction="1" ], [ have_sigaction="0" ])
 AC_CHECK_FUNCS(writev)
-AC_CHECK_FUNCS(sendfile, [ sendfile="1" ], [ sendfile="0" ])
+AC_CHECK_FUNCS(sendfile send_file, [ sendfile="1" ], [ sendfile="0" ])
 AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ])
 AC_CHECK_FUNCS(getpass)
 AC_CHECK_FUNC(inet_addr, [ inet_addr="1" ], [ inet_addr="0" ])
@@ -431,9 +431,8 @@
   [ AC_ARG_ENABLE(threads,
     [  --enable-threads        Enable threading support in APR.],
     [ ac_cv_enable_threads=$enableval] ,
-    [ AC_CHECK_HEADERS(pthread.h,
-                   [ ac_cv_enable_threads="pthread" ] ,
-                   [ ac_cv_enable_threads="no" ] ) ] ) ] )
+    [ CHECK_PTHREADS_H([ ac_cv_enable_threads="pthread" ] ,
+                       [ ac_cv_enable_threads="no" ] ) ] ) ] )

 if test "$ac_cv_enable_threads" = "no"; then
 echo "Don't enable threads"
@@ -445,7 +444,7 @@
 # We have specified pthreads for our threading library, just make sure
 # that we have everything we need
       PTHREADS_CHECK
-      AC_CHECK_HEADERS(pthread.h, [
+      CHECK_PTHREADS_H([
           threads="1"
           pthreadh="1"
           AC_DEFINE(USE_THREADS) ], [
@@ -459,7 +458,7 @@
 # them.  In this case, just look for pthreads.  In the future, we can check
 # for other threading libraries as well.
       PTHREADS_CHECK
-      AC_CHECK_HEADERS(pthread.h, [
+      CHECK_PTHREADS_H([
           threads="1"
           pthreadh="1"
           AC_DEFINE(USE_THREADS) ], [
Index: src/lib/apr/hints.m4
===================================================================
RCS file: /cvs/apache/apache-2.0/src/lib/apr/hints.m4,v
retrieving revision 1.10
diff -u -r1.10 hints.m4
--- hints.m4 2000/06/03 15:56:00 1.10
+++ hints.m4 2000/06/15 23:07:29
@@ -89,14 +89,25 @@
     *-ibm-aix4.1)
  APR_SETIFNULL(CFLAGS, [-DAIX=41 -DNEED_RLIM_T -U__STR__])
  ;;
+    *-ibm-aix4.1.*)
+        APR_SETIFNULL(CFLAGS, [-DAIX=41 -DNEED_RLIM_T -U__STR__])
+        ;;
     *-ibm-aix4.2)
  APR_SETIFNULL(CFLAGS, [-DAIX=42 -U__STR__])
  APR_SETIFNULL(LDFLAGS, [-lm])
  ;;
+    *-ibm-aix4.2.*)
+        APR_SETIFNULL(CFLAGS, [-DAIX=42 -U__STR__])
+        APR_SETIFNULL(LDFLAGS, [-lm])
+        ;;
     *-ibm-aix4.3)
  APR_SETIFNULL(CFLAGS, [-DAIX=43 -U__STR__])
  APR_SETIFNULL(LDFLAGS, [-lm])
  ;;
+    *-ibm-aix4.3.*)
+        APR_SETIFNULL(CFLAGS, [-DAIX=43 -U__STR__])
+        APR_SETIFNULL(LDFLAGS, [-lm])
+        ;;
     *-ibm-aix*)
  APR_SETIFNULL(CFLAGS, [-DAIX=1 -U__STR__])
  APR_SETIFNULL(LDFLAGS, [-lm])
Index: src/lib/apr/threads.m4
===================================================================
RCS file: /cvs/apache/apache-2.0/src/lib/apr/threads.m4,v
retrieving revision 1.10
diff -u -r1.10 threads.m4
--- threads.m4 2000/06/11 11:48:02 1.10
+++ threads.m4 2000/06/15 23:07:29
@@ -34,6 +34,14 @@
   fi
 ])dnl

+dnl Need this for silly broken AIX header files
+AC_DEFUN(CHECK_PTHREADS_H, [
+SAVE_FL="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS -w"
+AC_CHECK_HEADERS(pthread.h, [ $1 ] , [ $2 ] )
+CPPFLAGS="$SAVE_FL"
+])dnl
+
 AC_DEFUN(APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS, [
 AC_CACHE_CHECK(whether pthread_getspecific takes two arguments,
ac_cv_pthread_getspecific_two_args,[
 AC_TRY_COMPILE([



Mime
View raw message