1 /* @(#)mman.h	1.4 07/01/16 Copyright 2001-2007 J. Schilling */
2 /*
3  *	Definitions to be used for mmap()
4  *
5  *	Copyright (c) 2001-2007 J. Schilling
6  */
7 /*
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License, Version 1.0 only
10  * (the "License").  You may not use this file except in compliance
11  * with the License.
12  *
13  * See the file CDDL.Schily.txt in this distribution for details.
14  * A copy of the CDDL is also available via the Internet at
15  * http://www.opensource.org/licenses/cddl1.txt
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file CDDL.Schily.txt from this distribution.
19  */
20 
21 #ifndef	_SCHILY_MMAN_H
22 #define	_SCHILY_MMAN_H
23 
24 #ifndef	_SCHILY_MCONFIG_H
25 #include <schily/mconfig.h>
26 #endif
27 
28 #ifndef	_SCHILY_TYPES_H
29 #include <schily/types.h>
30 #endif
31 
32 #if defined(HAVE_SMMAP)
33 
34 #ifndef	_INCL_SYS_MMAN_H
35 #include <sys/mman.h>
36 #define	_INCL_SYS_MMAN_H
37 #endif
38 
39 #ifndef	MAP_ANONYMOUS
40 #	ifdef	MAP_ANON
41 #	define	MAP_ANONYMOUS	MAP_ANON
42 #	endif
43 #endif
44 
45 #ifndef MAP_FILE
46 #	define MAP_FILE		0	/* Needed on Apollo Domain/OS */
47 #endif
48 
49 /*
50  * Needed for Apollo Domain/OS and may be for others?
51  */
52 #ifdef	_MMAP_WITH_SIZEP
53 #	define	mmap_sizeparm(s)	(&(s))
54 #else
55 #	define	mmap_sizeparm(s)	(s)
56 #endif
57 
58 #endif	/* defined(HAVE_SMMAP) */
59 
60 #endif	/* _SCHILY_MMAN_H */
61