New macro (DONT_USE_MMAP) to support testing as if mmap() is unavailable
authorIvan Maidanski <ivmai@mail.ru>
Tue, 19 Dec 2017 08:19:44 +0000 (11:19 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 22 Dec 2017 07:46:03 +0000 (10:46 +0300)
* src/atomic_ops_malloc.c [DONT_USE_MMAP] (HAVE_MMAP): Undefine (after
including config.h).
* tests/test_malloc.c [DONT_USE_MMAP] (HAVE_MMAP): Likewise.

src/atomic_ops_malloc.c
tests/test_malloc.c

index f78ff40..7cc7ada 100644 (file)
 # include "config.h"
 #endif
 
+#ifdef DONT_USE_MMAP /* for testing */
+# undef HAVE_MMAP
+#endif
+
 #define AO_REQUIRE_CAS
 #include "atomic_ops_malloc.h"
 
index 111e231..f799430 100644 (file)
 # include "config.h"
 #endif
 
+#ifdef DONT_USE_MMAP
+# undef HAVE_MMAP
+#endif
+
 #include "run_parallel.h"
 
 #include <stdlib.h>