1.1 --- a/lemon/bits/windows.cc Thu Apr 02 14:07:38 2015 +0200
1.2 +++ b/lemon/bits/windows.cc Tue Apr 28 18:07:07 2015 +0200
1.3 @@ -21,7 +21,7 @@
1.4
1.5 #include<lemon/bits/windows.h>
1.6
1.7 -#ifdef WIN32
1.8 +#ifdef LEMON_WIN32
1.9 #ifndef WIN32_LEAN_AND_MEAN
1.10 #define WIN32_LEAN_AND_MEAN
1.11 #endif
1.12 @@ -40,7 +40,7 @@
1.13 #else
1.14 #include <unistd.h>
1.15 #include <ctime>
1.16 -#ifndef WIN32
1.17 +#ifndef LEMON_WIN32
1.18 #include <sys/times.h>
1.19 #endif
1.20 #include <sys/time.h>
1.21 @@ -55,7 +55,7 @@
1.22 double &utime, double &stime,
1.23 double &cutime, double &cstime)
1.24 {
1.25 -#ifdef WIN32
1.26 +#ifdef LEMON_WIN32
1.27 static const double ch = 4294967296.0e-7;
1.28 static const double cl = 1.0e-7;
1.29
1.30 @@ -94,11 +94,11 @@
1.31 std::string getWinFormattedDate()
1.32 {
1.33 std::ostringstream os;
1.34 -#ifdef WIN32
1.35 +#ifdef LEMON_WIN32
1.36 SYSTEMTIME time;
1.37 GetSystemTime(&time);
1.38 char buf1[11], buf2[9], buf3[5];
1.39 - if (GetDateFormat(MY_LOCALE, 0, &time,
1.40 + if (GetDateFormat(MY_LOCALE, 0, &time,
1.41 ("ddd MMM dd"), buf1, 11) &&
1.42 GetTimeFormat(MY_LOCALE, 0, &time,
1.43 ("HH':'mm':'ss"), buf2, 9) &&
1.44 @@ -120,7 +120,7 @@
1.45
1.46 int getWinRndSeed()
1.47 {
1.48 -#ifdef WIN32
1.49 +#ifdef LEMON_WIN32
1.50 FILETIME time;
1.51 GetSystemTimeAsFileTime(&time);
1.52 return GetCurrentProcessId() + time.dwHighDateTime + time.dwLowDateTime;
1.53 @@ -132,7 +132,7 @@
1.54 }
1.55
1.56 WinLock::WinLock() {
1.57 -#ifdef WIN32
1.58 +#ifdef LEMON_WIN32
1.59 CRITICAL_SECTION *lock = new CRITICAL_SECTION;
1.60 InitializeCriticalSection(lock);
1.61 _repr = lock;
1.62 @@ -142,7 +142,7 @@
1.63 }
1.64
1.65 WinLock::~WinLock() {
1.66 -#ifdef WIN32
1.67 +#ifdef LEMON_WIN32
1.68 CRITICAL_SECTION *lock = static_cast<CRITICAL_SECTION*>(_repr);
1.69 DeleteCriticalSection(lock);
1.70 delete lock;
1.71 @@ -150,14 +150,14 @@
1.72 }
1.73
1.74 void WinLock::lock() {
1.75 -#ifdef WIN32
1.76 +#ifdef LEMON_WIN32
1.77 CRITICAL_SECTION *lock = static_cast<CRITICAL_SECTION*>(_repr);
1.78 EnterCriticalSection(lock);
1.79 #endif
1.80 }
1.81
1.82 void WinLock::unlock() {
1.83 -#ifdef WIN32
1.84 +#ifdef LEMON_WIN32
1.85 CRITICAL_SECTION *lock = static_cast<CRITICAL_SECTION*>(_repr);
1.86 LeaveCriticalSection(lock);
1.87 #endif