POSIX.4 defines MAP_FAILED to be the error return from mmap().

This commit is contained in:
Alexander Langer 1996-12-12 01:00:14 +00:00
parent 9e78e166b7
commit 6616431596
2 changed files with 7 additions and 2 deletions

View File

@ -149,7 +149,7 @@ should be done.
Upon successful completion,
.Fn mmap
returns a pointer to the mapped region.
Otherwise, a value of -1 is returned and
Otherwise, a value of MAP_FAILED is returned and
.Va errno
is set to indicate the error.
.Sh ERRORS

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mman.h 8.2 (Berkeley) 1/9/95
* $Id: mman.h,v 1.13 1996/05/19 07:36:41 dyson Exp $
* $Id: mman.h,v 1.14 1996/05/23 00:45:44 dyson Exp $
*/
#ifndef _SYS_MMAN_H_
@ -63,6 +63,11 @@
#define MAP_NOEXTEND 0x0100 /* for MAP_FILE, don't change file size */
#define MAP_HASSEMAPHORE 0x0200 /* region may contain semaphores */
/*
* Error return from mmap()
*/
#define MAP_FAILED ((caddr_t)-1)
/*
* msync() flags
*/