You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Victor J. Orlikowski" <vj...@raleigh.ibm.com> on 2000/06/23 16:57:59 UTC
[PATCH] Work around for GCC complaints on pthread.h on AIX 4.3.3
This is a re-submit of a work around for GCC on AIX, which fails to detect
pthread.h due to some silly spacing causing warnings.
Index: src/lib/apr/configure.in
===================================================================
RCS file: /cvs/apache/apache-2.0/src/lib/apr/configure.in,v
retrieving revision 1.116
diff -u -r1.116 configure.in
--- configure.in 2000/06/23 12:24:35 1.116
+++ configure.in 2000/06/23 14:34:28
@@ -422,9 +422,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"
@@ -436,7 +435,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) ], [
@@ -450,7 +449,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/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/23 14:34:28
@@ -34,6 +34,19 @@
fi
])dnl
+dnl gcc issues warnings when parsing AIX 4.3.3's pthread.h.
+dnl Turn off warnings if we're using gcc.
+AC_DEFUN(CHECK_PTHREADS_H, [
+ if test "$GCC" = "yes"; then
+ SAVE_FL="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -w"
+ AC_CHECK_HEADERS(pthread.h, [ $1 ] , [ $2 ] )
+ CPPFLAGS="$SAVE_FL"
+ else
+ AC_CHECK_HEADERS(pthread.h, [ $1 ] , [ $2 ] )
+ fi
+])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([