use c++11-conformant _WIN32 test macro

This commit is contained in:
Joshua Warner 2014-07-30 08:38:48 -06:00
parent d47fcdc349
commit e92230c89c
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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);