This patch is verified to work on AIX 4.2.1, but it was suggested
to me by the reporter (Elrond <[EMAIL PROTECTED]>) that we do
the same for other platforms for things like _REENTRANT and I
agree. Does anyone see a reason not to do this?
Currently, without this patch, AIX 4.2.1 breaks with --disable-threads.
The only problem I see with this approach in general is something that
has popped up on this list often -- and that is dealing with standalone
installations of APR in threaded and non-threaded modes. Will we
eventually go to the libapr.so and libapr_r.so modes?
-aaron
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.398
diff -u -u -r1.398 configure.in
--- configure.in 13 Jan 2002 04:20:10 -0000 1.398
+++ configure.in 22 Jan 2002 18:22:38 -0000
@@ -409,6 +409,12 @@
AC_DEFINE(GETHOSTBYADDR_IS_THREAD_SAFE)
fi
AC_CHECK_FUNCS(gethostbyname_r gethostbyaddr_r)
+
+ case "$host" in
+ *-ibm-aix*)
+ APR_ADDTO(CPPFLAGS, [-D_THREAD_SAFE])
+ ;;
+ esac
else
echo "APR will be non-threaded"
fi
Index: build/apr_hints.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_hints.m4,v
retrieving revision 1.32
diff -u -u -r1.32 apr_hints.m4
--- build/apr_hints.m4 12 Dec 2001 19:35:06 -0000 1.32
+++ build/apr_hints.m4 22 Jan 2002 18:22:39 -0000
@@ -63,7 +63,6 @@
APR_ADDTO(CFLAGS, [-qHALT=E])
fi
APR_SETIFNULL(apr_iconv_inbuf_const, [1])
- APR_ADDTO(CPPFLAGS, [-D_THREAD_SAFE])
APR_ADDTO(LDFLAGS, [-Wl,-brtl])
;;
*-apollo-*)