From Derek Price: Define MAP_FAILED when necessary.
authorBruno Haible <bruno@clisp.org>
Thu, 3 Mar 2005 20:33:06 +0000 (20:33 +0000)
committerBruno Haible <bruno@clisp.org>
Thu, 3 Mar 2005 20:33:06 +0000 (20:33 +0000)
m4/mmap-anon.m4

index 3a6e0bf..2abbe55 100644 (file)
@@ -49,6 +49,11 @@ AC_DEFUN([gl_FUNC_MMAP_ANON],
 [/* Define MAP_FILE when it isn't otherwise.  */
 #ifndef MAP_FILE
 # define MAP_FILE 0
+#endif
+
+/* Define MAP_FAILED for old systems which neglect to.  */
+#ifndef MAP_FAILED
+# define MAP_FAILED ((void *)-1)
 #endif])
   fi
 ])