*: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized and may be missing. Closes #169
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <errno.h>
|
||||
@@ -61,7 +61,7 @@ FormatFatalError(const char *fmt, ...)
|
||||
Abort();
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
|
||||
void
|
||||
FatalSystemError(const char *msg, DWORD code)
|
||||
@@ -79,7 +79,7 @@ FatalSystemError(const char *msg, DWORD code)
|
||||
void
|
||||
FatalSystemError(const char *msg)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
FatalSystemError(msg, GetLastError());
|
||||
#else
|
||||
const char *system_error = strerror(errno);
|
||||
|
Reference in New Issue
Block a user