Commit 069a6b37 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

windows: check for _WIN32 rather than WIN32

_WIN32 is the actual define for Windows. WIN32 is a CMake-ism.

Change-Id: Iea9f69ab1719325703a3c9a6cacdd6ecf13dbc34
parent 36d8666f
...@@ -376,7 +376,7 @@ bool RegularExpression::compile (const char* exp) { ...@@ -376,7 +376,7 @@ bool RegularExpression::compile (const char* exp) {
} }
// Allocate space. // Allocate space.
//#ifndef WIN32 //#ifndef _WIN32
if (this->program != 0) delete [] this->program; if (this->program != 0) delete [] this->program;
//#endif //#endif
this->program = new char[regsize]; this->program = new char[regsize];
......
...@@ -333,7 +333,7 @@ inline RegularExpression::RegularExpression (const std::string& s) ...@@ -333,7 +333,7 @@ inline RegularExpression::RegularExpression (const std::string& s)
*/ */
inline RegularExpression::~RegularExpression () inline RegularExpression::~RegularExpression ()
{ {
//#ifndef WIN32 //#ifndef _WIN32
delete [] this->program; delete [] this->program;
//#endif //#endif
} }
...@@ -396,7 +396,7 @@ inline bool RegularExpression::is_valid () const ...@@ -396,7 +396,7 @@ inline bool RegularExpression::is_valid () const
inline void RegularExpression::set_invalid () inline void RegularExpression::set_invalid ()
{ {
//#ifndef WIN32 //#ifndef _WIN32
delete [] this->program; delete [] this->program;
//#endif //#endif
this->program = 0; this->program = 0;
......
...@@ -1583,7 +1583,7 @@ SystemInformationImplementation::~SystemInformationImplementation() ...@@ -1583,7 +1583,7 @@ SystemInformationImplementation::~SystemInformationImplementation()
void SystemInformationImplementation::RunCPUCheck() void SystemInformationImplementation::RunCPUCheck()
{ {
#ifdef WIN32 #ifdef _WIN32
// Check to see if this processor supports CPUID. // Check to see if this processor supports CPUID.
bool supportsCPUID = DoesCPUSupportCPUID(); bool supportsCPUID = DoesCPUSupportCPUID();
...@@ -2056,7 +2056,7 @@ bool SystemInformationImplementation::DoesCPUSupportFeature(long int dwFeature) ...@@ -2056,7 +2056,7 @@ bool SystemInformationImplementation::DoesCPUSupportFeature(long int dwFeature)
void SystemInformationImplementation::Delay(unsigned int uiMS) void SystemInformationImplementation::Delay(unsigned int uiMS)
{ {
#ifdef WIN32 #ifdef _WIN32
LARGE_INTEGER Frequency, StartCounter, EndCounter; LARGE_INTEGER Frequency, StartCounter, EndCounter;
__int64 x; __int64 x;
......
...@@ -120,7 +120,7 @@ static int testRobustEncoding() ...@@ -120,7 +120,7 @@ static int testRobustEncoding()
ret++; ret++;
} }
#ifdef WIN32 #ifdef _WIN32
// 16 bit wchar_t - we make an invalid surrogate pair // 16 bit wchar_t - we make an invalid surrogate pair
wchar_t cwstr[] = {0xD801, 0xDA00, 0}; wchar_t cwstr[] = {0xD801, 0xDA00, 0};
// this conversion could fail // this conversion could fail
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment