summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-02-26 21:18:02 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-02-26 21:18:02 +0000
commitb9973c73a7fd32c9728ea786ee9a6a06eb254596 (patch)
treeb040d9670761c15e488162bb8bc7ea12b9a8009c
parent55ccff03394441007827a74bc0066781aa132bac (diff)
downloadlibapr-b9973c73a7fd32c9728ea786ee9a6a06eb254596.tar.gz
Backport Tru64 fixes from HEAD:
* shmem/unix/shm.c (apr_shm_create): Fix build with Tru64 "cc -std"; cast MAP_FAILED to (void *). * build/apr_hints.m4: Disable use of POSIX process-shared mutexes on Tru64 since they don't seem to be working. (these are selected as the default locking mechanism since the "mmap of /dev/zero" configure test was fixed!) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64921 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--build/apr_hints.m42
-rw-r--r--shmem/unix/shm.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/build/apr_hints.m4 b/build/apr_hints.m4
index 1be35abd0..98116f56b 100644
--- a/build/apr_hints.m4
+++ b/build/apr_hints.m4
@@ -155,6 +155,8 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
;;
*-dec-osf*)
APR_ADDTO(CPPFLAGS, [-DOSF1])
+ # process-shared mutexes don't seem to work in Tru64 5.0
+ APR_SETIFNULL(apr_cv_process_shared_works, [no])
;;
*-nto-qnx*)
;;
diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c
index 0769b1564..655fca989 100644
--- a/shmem/unix/shm.c
+++ b/shmem/unix/shm.c
@@ -139,7 +139,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
new_m->base = mmap(NULL, new_m->realsize, PROT_READ|PROT_WRITE,
MAP_SHARED, tmpfd, 0);
- if (new_m->base == MAP_FAILED) {
+ if (new_m->base == (void *)MAP_FAILED) {
return errno;
}
@@ -161,7 +161,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
#elif APR_USE_SHMEM_MMAP_ANON
new_m->base = mmap(NULL, new_m->realsize, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_SHARED, -1, 0);
- if (new_m->base == MAP_FAILED) {
+ if (new_m->base == (void *)MAP_FAILED) {
return errno;
}