Patchwork [libitm/testsuite] MAP_ANON

login
register
mail settings
Submitter IainS
Date Nov. 18, 2011, 2:27 p.m.
Message ID <AD9D7499-0F16-478D-AEEC-0FB8C5D8DCE9@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/126419/
State New
Headers show

Comments

IainS - Nov. 18, 2011, 2:27 p.m.
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.
Richard Henderson - Nov. 18, 2011, 5:33 p.m.
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~

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)
 {