Added support for _POSIX_MAPPED_FILES if defined in source (#564)
This commit is contained in:
parent
1a5ee11377
commit
c9c820ff36
2 changed files with 4 additions and 1 deletions
2
main.cpp
2
main.cpp
|
@ -24,6 +24,8 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#elif defined (_POSIX_MAPPED_FILES)
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#define ROUNDUP(X, K) (((X) + (K)-1) & -(K))
|
||||
|
|
3
mmap.h
3
mmap.h
|
@ -8,11 +8,12 @@
|
|||
#include <stdint.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined (_MSC_VER) && !(defined (_POSIX_MAPPED_FILES))
|
||||
#define NEED_WIN32_MMAP
|
||||
#include <Windows.h>
|
||||
#include <io.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue