Patchwork [committed] Defined MAP_FAILED in gcc.dg/20050826-1.c and gcc.dg/20050826-1.c if not defined

login
register
mail settings
Submitter John David Anglin
Date Dec. 9, 2012, 5:45 p.m.
Message ID <20121209174526.GA19911@hiauly1.hia.nrc.ca>
Download mbox | patch
Permalink /patch/204755/
State New
Headers show

Comments

John David Anglin - Dec. 9, 2012, 5:45 p.m.
This fixes gcc.dg/20030711-1.c and gcc.dg/20050826-1.c on HP-UX 10.

Committed to trunk.

Dave

Patch

Index: gcc.dg/20030711-1.c
===================================================================
--- gcc.dg/20030711-1.c	(revision 194272)
+++ gcc.dg/20030711-1.c	(working copy)
@@ -11,6 +11,9 @@ 
 #ifndef MAP_ANON
 #define MAP_ANON 0
 #endif
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
 #include <stdlib.h>
 
 void __attribute__((noinline)) test (const char *p)
Index: gcc.dg/20050826-1.c
===================================================================
--- gcc.dg/20050826-1.c	(revision 194272)
+++ gcc.dg/20050826-1.c	(working copy)
@@ -12,6 +12,9 @@ 
 #ifndef MAP_ANON
 #define MAP_ANON 0
 #endif
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
 #include <stdlib.h>
 
     struct Flags {