POSIX.4 defines MAP_FAILED to be the error return from mmap().
This commit is contained in:
parent
9e78e166b7
commit
6616431596
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user