mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
use c++11-conformant _WIN32 test macro
This commit is contained in:
parent
d47fcdc349
commit
e92230c89c
@ -4,7 +4,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <sys/mman.h>
|
||||
@ -65,7 +65,7 @@ int main(int argc, const char** argv)
|
||||
struct stat s;
|
||||
int r = fstat(fd, &s);
|
||||
if (r != -1) {
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
HANDLE fm;
|
||||
HANDLE h = (HANDLE)_get_osfhandle(fd);
|
||||
|
||||
@ -178,7 +178,7 @@ int main(int argc, const char** argv)
|
||||
fprintf(stderr, "unable to determine uncompressed size\n");
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
UnmapViewOfFile(data);
|
||||
#else
|
||||
munmap(data, size);
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
#else
|
||||
@ -120,7 +120,7 @@ int main(int argc, const char** argv)
|
||||
struct stat s;
|
||||
int r = fstat(fd, &s);
|
||||
if (r != -1) {
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
HANDLE fm;
|
||||
HANDLE h = (HANDLE)_get_osfhandle(fd);
|
||||
|
||||
@ -157,7 +157,7 @@ int main(int argc, const char** argv)
|
||||
fprintf(stderr, "unable to open %s\n", argv[2]);
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
UnmapViewOfFile(data);
|
||||
#else
|
||||
munmap(data, size);
|
||||
|
Loading…
Reference in New Issue
Block a user