MESSAGE(STATUS "atomic builtins are supported")
ENDIF()
+CHECK_C_SOURCE_RUNS("
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <unistd.h>
+#define TEST_NAME \"/test-shmem-work\"
+int
+main (int argc, char **argv)
+{
+ int fd;
+
+ fd = shm_open (TEST_NAME, O_RDWR | O_CREAT | O_EXCL, 00600);
+ if (fd == -1) {
+ return -1;
+ }
+ if (ftruncate (fd, 100) == -1) {
+ shm_unlink (TEST_NAME);
+ close (fd);
+ return -1;
+ }
+
+ if (ftruncate (fd, 200) == -1) {
+ shm_unlink (TEST_NAME);
+ close (fd);
+ return -1;
+ }
+ if (ftruncate (fd, 300) == -1) {
+ shm_unlink (TEST_NAME);
+ close (fd);
+ return -1;
+ }
+
+ close (fd);
+ shm_unlink (TEST_NAME);
+ return 0;
+}
+" HAVE_SANE_SHMEM)
+
+IF(NOT HAVE_SANE_SHMEM)
+ MESSAGE(STATUS "shmem support is NOT compatible with POSIX")
+ELSE()
+ MESSAGE(STATUS "shmem support is compatible with POSIX")
+ENDIF()
+
# Check queue.h compatibility
IF(NOT HAVE_COMPATIBLE_QUEUE_H)
INCLUDE_DIRECTORIES(compat)
#cmakedefine HAVE_PWD_H 1
#cmakedefine HAVE_READPASSPHRASE_H 1
#cmakedefine HAVE_SA_SIGINFO 1
+#cmakedefine HAVE_SANE_SHMEM 1
#cmakedefine HAVE_SCHED_YEILD 1
#cmakedefine HAVE_SC_NPROCESSORS_ONLN 1
#cmakedefine HAVE_SEARCH_H 1