]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygwin/include/sys/mman.h
* mmap.cc (mmap64): Change address types from caddr_t to void *
[newlib-cygwin.git] / winsup / cygwin / include / sys / mman.h
1 /* sys/mman.h
2
3 Copyright 1996, 1997, 1998, 2000, 2001 Red Hat, Inc.
4
5 This file is part of Cygwin.
6
7 This software is a copyrighted work licensed under the terms of the
8 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
9 details. */
10
11 #ifndef _SYS_MMAN_H_
12 #define _SYS_MMAN_H_
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
17
18 #include <stddef.h>
19 #include <sys/types.h>
20
21 #define PROT_NONE 0
22 #define PROT_READ 1
23 #define PROT_WRITE 2
24 #define PROT_EXEC 4
25
26 #define MAP_FILE 0
27 #define MAP_SHARED 1
28 #define MAP_PRIVATE 2
29 #define MAP_TYPE 0xF
30 #define MAP_FIXED 0x10
31 #define MAP_ANONYMOUS 0x20
32 #define MAP_ANON MAP_ANONYMOUS
33
34 #define MAP_FAILED ((caddr_t)-1)
35
36 /*
37 * Flags for msync.
38 */
39 #define MS_ASYNC 1
40 #define MS_SYNC 2
41 #define MS_INVALIDATE 4
42
43 #ifndef __INSIDE_CYGWIN__
44 extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, off_t __off);
45 #endif
46 extern int munmap (void *__addr, size_t __len);
47 extern int mprotect (void *__addr, size_t __len, int __prot);
48 extern int msync (void *__addr, size_t __len, int __flags);
49
50 #ifdef __cplusplus
51 };
52 #endif /* __cplusplus */
53
54 #endif /* _SYS_MMAN_H_ */
This page took 0.072108 seconds and 5 git commands to generate.