OSSP CVS Repository

ossp - Difference in ossp-pkg/mm/aclocal.m4 versions 1.20 and 1.21
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/mm/aclocal.m4 1.20 -> 1.21

--- aclocal.m4   2000/10/31 07:06:54     1.20
+++ aclocal.m4   2001/01/29 20:23:47     1.21
@@ -242,6 +242,7 @@
 
 define(AC_CHECK_MAXSEGSIZE,[dnl
 AC_MSG_CHECKING(for shared memory maximum segment size)
+AC_CACHE_VAL(ac_cv_maxsegsize,[
 OCFLAGS="$CFLAGS"
 case "$1" in
     MM_SHMT_MM*    ) CFLAGS="-DTEST_MMAP   $CFLAGS" ;;
@@ -286,6 +287,9 @@
 #if !defined(MAP_FAILED)
 #define MAP_FAILED ((void *)-1)
 #endif
+#ifdef MM_OS_BEOS
+#include <kernel/OS.h>
+#endif
 
 int testit(int size)
 {
@@ -317,6 +321,14 @@
     shmdt(segment);
     shmctl(fd, IPC_RMID, NULL);
 #endif
+#ifdef TEST_BEOS
+    area_id id;
+    id = create_area("mm_test", (void*)&segment, B_ANY_ADDRESS, size, 
+                     B_LAZY_LOCK, B_READ_AREA|B_WRITE_AREA);
+    if (id < 0)
+        return 0;
+    delete_area(id);
+#endif
     return 1;
 }
 
@@ -371,9 +383,15 @@
 }
 >>
 changequote([, ])dnl
-,[
-MM_SHM_MAXSEGSIZE="`cat conftestval`"
-msg="$MM_SHM_MAXSEGSIZE"
+,[ac_cv_maxsegsize="`cat conftestval`"
+],
+ac_cv_maxsegsize=0
+,
+ac_cv_maxsegsize=0
+)
+CFLAGS="$OCFLAGS"
+])
+msg="$ac_cv_maxsegsize"
 if test $msg -eq 67108864; then
     msg="64MB (soft limit)"
 elif test $msg -gt 1048576; then
@@ -384,17 +402,10 @@
     msg="`expr $msg / 1024`"
     msg="${msg}KB"
 else
-    MM_SHM_MAXSEGSIZE=0
+    ac_cv_maxsegsize=0
     msg=unknown
 fi
-],
-MM_SHM_MAXSEGSIZE=0
-msg=unknown
-,
-MM_SHM_MAXSEGSIZE=0
-msg=unknown
-)dnl
-CFLAGS="$OCFLAGS"
+MM_SHM_MAXSEGSIZE=$ac_cv_maxsegsize
 test ".$msg" = .unknown && AC_MSG_ERROR([Unable to determine maximum shared memory segment size])
 AC_MSG_RESULT([$msg])
 AC_DEFINE_UNQUOTED(MM_SHM_MAXSEGSIZE, $MM_SHM_MAXSEGSIZE)

CVSTrac 2.0.1