version 1.1, 2013/10/14 10:32:48
|
version 1.1.1.2, 2016/11/02 10:35:00
|
Line 1
|
Line 1
|
#ifndef WIN32_MMAP_H | #ifndef LI_SYS_MMAP_H |
#define WIN32_MMAP_H | #define LI_SYS_MMAP_H |
| #include "first.h" |
|
|
#ifdef __WIN32 | #if defined(HAVE_SYS_MMAN_H) |
| # include <sys/mman.h> |
| #else /* HAVE_SYS_MMAN_H */ |
|
|
#define MAP_FAILED -1 | # define PROT_SHARED 0 |
#define PROT_SHARED 0 | # define MAP_SHARED 0 |
#define MAP_SHARED 0 | # define PROT_READ 0 |
#define PROT_READ 0 | |
|
|
#define mmap(a, b, c, d, e, f) (-1) | # define mmap(a, b, c, d, e, f) (-1) |
#define munmap(a, b) (-1) | # define munmap(a, b) (-1) |
|
|
#include <windows.h> | #endif /* HAVE_SYS_MMAN_H */ |
|
|
#else | /* NetBSD 1.3.x needs it; also make it available if mmap() is not present */ |
#include <sys/mman.h> | #if !defined(MAP_FAILED) |
| # define MAP_FAILED ((char*)-1) |
#ifndef MAP_FAILED | |
#define MAP_FAILED -1 | |
#endif | |
#endif |
#endif |
|
|
#endif |
#endif |