summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2004-04-16 17:12:42 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2004-04-16 17:12:42 +0000
commitbf0e0e6ff71120d58af02bd399d9ed9293b55cfe (patch)
tree4ecb2cbdfd312a38f48c553aa33c0775e9a9b41b
parent9b7cea209349b01dbb1e7ba64b74e6fa600263d9 (diff)
downloadlibapr-bf0e0e6ff71120d58af02bd399d9ed9293b55cfe.tar.gz
backport this from apr 1.0-dev:
*) Provide workaround for socklen_t declaration problem with 64-bit build on HP-UX. Stop setting a PA-RISC-specific compile option on ia64. Look for -mt thread option, which is used with HP-UX vendor compiler on ia64. Alluded to by: Madhusudan Mathihalli git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65065 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES6
-rw-r--r--build/apr_threads.m42
-rw-r--r--configure.in26
3 files changed, 29 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 061d1af91..28252897f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,11 @@
Changes with APR 0.9.5
+ *) Provide workaround for socklen_t declaration problem with 64-bit
+ build on HP-UX. Stop setting a PA-RISC-specific compile option
+ on ia64. Look for -mt thread option, which is used with HP-UX
+ vendor compiler on ia64. [Jeff Trawick, based on idea from
+ Madhusudan Mathihalli]
+
*) Return an error instead of silently failing when apr_poll() is
used with file descriptors >= FD_SETSIZE. (Unix systems with
no native poll()) [Jeff Trawick, Brad Nicholes]
diff --git a/build/apr_threads.m4 b/build/apr_threads.m4
index fe38290e6..1d2d2a849 100644
--- a/build/apr_threads.m4
+++ b/build/apr_threads.m4
@@ -110,7 +110,7 @@ AC_DEFUN(APR_PTHREADS_CHECK,[
AC_CACHE_CHECK([for CFLAGS needed for pthreads], [apr_cv_pthreads_cflags],
[apr_ptc_cflags=$CFLAGS
- for flag in none -kthread -pthread -pthreads -mthreads -Kthread -threads; do
+ for flag in none -kthread -pthread -pthreads -mt -mthreads -Kthread -threads; do
CFLAGS=$apr_ptc_cflags
test "x$flag" != "xnone" && CFLAGS="$CFLAGS $flag"
APR_PTHREADS_TRY_RUN([
diff --git a/configure.in b/configure.in
index 622e5d08b..b898c8411 100644
--- a/configure.in
+++ b/configure.in
@@ -324,10 +324,16 @@ fi
case "$host:$CC" in
*-hp-hpux*:cc )
APR_ADDTO(CFLAGS,[-Ae +Z])
- if echo "$CFLAGS " | grep '+DA' >/dev/null; then :
- else
- APR_ADDTO(CFLAGS,[+DAportable])
- fi
+ case $host in
+ ia64-* )
+ ;;
+ * )
+ if echo "$CFLAGS " | grep '+DA' >/dev/null; then :
+ else
+ APR_ADDTO(CFLAGS,[+DAportable])
+ fi
+ ;;
+ esac
;;
powerpc-*-beos:mwcc* )
APR_SETVAR(CPP,[mwcc -E])
@@ -1151,6 +1157,18 @@ else
fi
if test "$ac_cv_socklen_t" = "yes"; then
socklen_t_value="socklen_t"
+ case $host in
+ *-hp-hpux*)
+ if test "$ac_cv_sizeof_long" = "8"; then
+ # 64-bit HP-UX requires 32-bit socklens in
+ # kernel, but user-space declarations say
+ # 64-bit (socklen_t == size_t == long).
+ # This will result in many compile warnings,
+ # but we're functionally busted otherwise.
+ socklen_t_value="int"
+ fi
+ ;;
+ esac
else
socklen_t_value="int"
fi