9 #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
10 #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
13 /* All the headers include this file. */
18 #if defined(MMAN_LIBRARY_DLL)
19 /* Windows shared libraries (DLL) must be declared export when building the lib and import when building the
20 application which links against the library. */
21 #if defined(MMAN_LIBRARY)
22 #define MMANSHARED_EXPORT __declspec(dllexport)
24 #define MMANSHARED_EXPORT __declspec(dllimport)
25 #endif /* MMAN_LIBRARY */
27 /* Static libraries do not require a __declspec attribute.*/
28 #define MMANSHARED_EXPORT
29 #endif /* MMAN_LIBRARY_DLL */
31 /* Determine offset type */
34 typedef int64_t OffsetType;
36 typedef uint32_t OffsetType;
39 #include <sys/types.h>
54 #define MAP_FIXED 0x10
55 #define MAP_ANONYMOUS 0x20
56 #define MAP_ANON MAP_ANONYMOUS
58 #define MAP_FAILED ((void *)-1)
60 /* Flags for msync. */
63 #define MS_INVALIDATE 4
65 MMANSHARED_EXPORT void* mmap(void *addr, size_t len, int prot, int flags, int fildes, OffsetType off);
66 MMANSHARED_EXPORT int munmap(void *addr, size_t len);
67 MMANSHARED_EXPORT int _mprotect(void *addr, size_t len, int prot);
68 MMANSHARED_EXPORT int msync(void *addr, size_t len, int flags);
69 MMANSHARED_EXPORT int mlock(const void *addr, size_t len);
70 MMANSHARED_EXPORT int munlock(const void *addr, size_t len);
76 #endif /* _SYS_MMAN_H_ */