]> sjero.net Git - wget/commitdiff
[svn] Define MAP_FAILED if it's missing.
authorhniksic <devnull@localhost>
Thu, 14 Jun 2001 20:28:19 +0000 (13:28 -0700)
committerhniksic <devnull@localhost>
Thu, 14 Jun 2001 20:28:19 +0000 (13:28 -0700)
Published in <sxshexirelo.fsf@florida.arsdigita.de>.

src/ChangeLog
src/sysdep.h

index f5ee64b27a928d569da7f7380c80eb17f32bd18f..cf6d5275721d7262ee0fc38e6604220b90c98695 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-14  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * sysdep.h (MAP_FAILED): Provide MAP_FAILED for systems that don't
+       define it.
+
 2001-06-09  Jan Prikryl  <prikryl@cg.tuwien.ac.at>
 
        * ftp.h: Provide correct prototype for ftp_parse_ls().
index 52db05da12928f30bd7a08c75edb9e67697c9611..6568980a668bdd98cfe50ffb306eca8d947e5a7f 100644 (file)
@@ -178,4 +178,14 @@ void *memcpy ();
 #endif /* sun */
 #endif /* STDC_HEADERS */
 
+/* Some systems don't provide MAP_FAILED, a symbolic constant for the
+   value returned by mmap() when it doesn't work.  Usually, this
+   constant should be -1.  This only makes sense for files that use
+   mmap() and include sys/mman.h *before* sysdep.h, but doesn't hurt
+   others.  */
+
+#ifndef MAP_FAILED
+# define MAP_FAILED ((void *) -1)
+#endif
+
 #endif /* SYSDEP_H */