diff libmudflap/testsuite/libmudflap.c/fail40-frag.c @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children
line wrap: on
line diff
--- a/libmudflap/testsuite/libmudflap.c/fail40-frag.c	Sun Feb 07 18:28:00 2010 +0900
+++ b/libmudflap/testsuite/libmudflap.c/fail40-frag.c	Fri Feb 12 23:39:51 2010 +0900
@@ -14,6 +14,9 @@
 #ifndef MAP_ANONYMOUS
 #define MAP_ANONYMOUS MAP_ANON
 #endif
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
 #ifdef HAVE_MMAP
   volatile unsigned char *p;
   unsigned num = getpagesize ();
@@ -23,8 +26,8 @@
   /* Get a bit of usable address space.  We really want an 2**N+1-sized object,
      so the low/high addresses wrap when hashed into the lookup cache.  So we
      will manually unregister the entire mmap, then re-register a slice.  */
-  p = mmap (NULL, num, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
-  if (p == NULL)
+  p = mmap (NULL, num, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
+  if (p == MAP_FAILED)
     return 1;
   /* Now unregister it, as if munmap was called.  But don't actually munmap, so
      we can write into the memory.  */