You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@locus.apache.org on 2000/04/13 13:03:20 UTC
cvs commit: apache-2.0/src acinclude.m4
martin 00/04/13 04:03:20
Modified: src/lib/apr/shmem/unix/mm aclocal.m4
src acinclude.m4
Log:
On all the systems I could get hold of (Solaris, ReliantUNIX, BS2000, SINIX),
SHM_R was always 0400, never 0x400. My assumption is that is usually (always) is.
Feel free to change it to an OS test like this (if your OS differs):
case `uname -s` in
SunOS | POSIX-BC | SINIX-* | ReliantUNIX-* ) # BS2000
AC_DEFINE(SHM_R, 0400, [ ])
AC_DEFINE(SHM_W, 0200, [ ])
;;
*)
AC_DEFINE(SHM_R, 0x400, [ ])
AC_DEFINE(SHM_W, 0x200, [ ])
;;
esac
Revision Changes Path
1.3 +6 -0 apache-2.0/src/lib/apr/shmem/unix/mm/aclocal.m4
Index: aclocal.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/shmem/unix/mm/aclocal.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -u -r1.2 -r1.3
--- aclocal.m4 1999/09/27 07:42:00 1.2
+++ aclocal.m4 2000/04/13 11:03:20 1.3
@@ -236,7 +236,13 @@
#endif
#ifdef TEST_SHMGET
#include <sys/ipc.h>
+#ifndef _OSD_POSIX
#include <sys/shm.h>
+#else
+#define _KMEMUSER 1 /* BS2000 needs this to enable SHM_[RW] */
+#include <sys/shm.h>
+#undef _KMEMUSER
+#endif
#endif
#if !defined(MAP_FAILED)
#define MAP_FAILED ((void *)-1)
1.22 +8 -2 apache-2.0/src/acinclude.m4
Index: acinclude.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -u -r1.21 -r1.22
--- acinclude.m4 2000/04/07 02:45:11 1.21
+++ acinclude.m4 2000/04/13 11:03:20 1.22
@@ -181,7 +181,13 @@
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/ipc.h>
+#ifndef _OSD_POSIX
#include <sys/shm.h>
+#else
+#define _KMEMUSER /* BS2000 needs this to enable SHM_[RW] */
+#include <sys/shm.h>
+#undef _KMEMUSER
+#endif
],[
int x = SHM_R | SHM_W;
],[
@@ -190,8 +196,8 @@
ac_cv_shm_rw=no
])])
if test "$ac_cv_shm_rw" = "no"; then
- AC_DEFINE(SHM_R, 0x400, [ ])
- AC_DEFINE(SHM_W, 0x200, [ ])
+ AC_DEFINE(SHM_R, 0400, [ ])
+ AC_DEFINE(SHM_W, 0200, [ ])
fi
])
Re: cvs commit: apache-2.0/src acinclude.m4
Posted by Jeff Trawick <tr...@bellsouth.net>.
You found a bug. SHM_R is just a convenience which means user-read.
And user-read is 0400, not 0x400. A program doesn't have to use SHM_R
to do this.
Thus, going back to the original but changing "0x" to "0" should be
the right thing to do.
--
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...
Re: cvs commit: apache-2.0/src acinclude.m4
Posted by Jeff Trawick <tr...@bellsouth.net>.
You found a bug. SHM_R is just a convenience which means user-read.
And user-read is 0400, not 0x400. A program doesn't have to use SHM_R
to do this.
Thus, going back to the original but changing "0x" to "0" should be
the right thing to do.
--
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...