aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/util.h b/src/util.h
index 70e1a5599b..178923727a 100644
--- a/src/util.h
+++ b/src/util.h
@@ -7,7 +7,7 @@
#include "uint256.h"
-#ifndef __WXMSW__
+#ifndef WIN32
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -81,7 +81,7 @@ T* alignup(T* p)
return u.ptr;
}
-#ifdef __WXMSW__
+#ifdef WIN32
#define MSG_NOSIGNAL 0
#define MSG_DONTWAIT 0
#ifndef UINT64_MAX
@@ -123,7 +123,7 @@ inline int myclosesocket(SOCKET& hSocket)
{
if (hSocket == INVALID_SOCKET)
return WSAENOTSOCK;
-#ifdef __WXMSW__
+#ifdef WIN32
int ret = closesocket(hSocket);
#else
int ret = close(hSocket);
@@ -192,7 +192,7 @@ std::string GetConfigFile();
std::string GetPidFile();
void CreatePidFile(std::string pidFile, pid_t pid);
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);
-#ifdef __WXMSW__
+#ifdef WIN32
std::string MyGetSpecialFolderPath(int nFolder, bool fCreate);
#endif
std::string GetDefaultDataDir();
@@ -390,7 +390,7 @@ inline void PrintHex(const std::vector<unsigned char>& vch, const char* pszForma
inline int64 GetPerformanceCounter()
{
int64 nCounter = 0;
-#ifdef __WXMSW__
+#ifdef WIN32
QueryPerformanceCounter((LARGE_INTEGER*)&nCounter);
#else
timeval t;
@@ -424,7 +424,7 @@ void skipspaces(T& it)
inline bool IsSwitchChar(char c)
{
-#ifdef __WXMSW__
+#ifdef WIN32
return c == '-' || c == '/';
#else
return c == '-';
@@ -467,7 +467,7 @@ inline bool GetBoolArg(const std::string& strArg)
inline void heapchk()
{
-#ifdef __WXMSW__
+#ifdef WIN32
/// for debugging
//if (_heapchk() != _HEAPOK)
// DebugBreak();
@@ -626,7 +626,7 @@ public:
// Note: It turns out we might have been able to use boost::thread
// by using TerminateThread(boost::thread.native_handle(), 0);
-#ifdef __WXMSW__
+#ifdef WIN32
typedef HANDLE pthread_t;
inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=false)
@@ -708,7 +708,7 @@ inline void ExitThread(size_t nExitCode)
inline bool AffinityBugWorkaround(void(*pfn)(void*))
{
-#ifdef __WXMSW__
+#ifdef WIN32
// Sometimes after a few hours affinity gets stuck on one processor
DWORD_PTR dwProcessAffinityMask = -1;
DWORD_PTR dwSystemAffinityMask = -1;