diff mbox

[libitm/testsuite] MAP_ANON

Message ID AD9D7499-0F16-478D-AEEC-0FB8C5D8DCE9@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Nov. 18, 2011, 2:27 p.m. UTC
For some reason, Darwin spells "MAP_ANONYMOUS" and "MAP_ANON" which  
causes the memcpy/set tests to fail.

fixed as below
OK for trunk?
Iain

libitm:

	* testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
	* testsuite/libitm.c/memset-1.c: Likewise.

Comments

Richard Henderson Nov. 18, 2011, 5:33 p.m. UTC | #1
On 11/18/2011 04:27 AM, Iain Sandoe wrote:
> libitm:
> 
>     * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
>     * testsuite/libitm.c/memset-1.c: Likewise.

Ok.


r~
diff mbox

Patch

Index: libitm/testsuite/libitm.c/memcpy-1.c
===================================================================
--- libitm/testsuite/libitm.c/memcpy-1.c	(revision 181470)
+++ libitm/testsuite/libitm.c/memcpy-1.c	(working copy)
@@ -84,6 +84,12 @@  do_test (size_t align1, size_t align2, size_t len)
       }
 }
 
+#ifndef MAP_ANONYMOUS
+#  ifdef MAP_ANON
+#    define MAP_ANONYMOUS MAP_ANON
+#  endif
+#endif
+
 int main()
 {
   size_t i, j;
Index: libitm/testsuite/libitm.c/memset-1.c
===================================================================
--- libitm/testsuite/libitm.c/memset-1.c	(revision 181470)
+++ libitm/testsuite/libitm.c/memset-1.c	(working copy)
@@ -33,6 +33,12 @@  static unsigned char *buf;
 static size_t bufsize, page_size;
 static int fail;
 
+#ifndef MAP_ANONYMOUS
+#  ifdef MAP_ANON
+#    define MAP_ANONYMOUS MAP_ANON
+#  endif
+#endif
+
 static void
 do_test (size_t align, size_t len)
 {