aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-10-07 11:02:21 -0400
committerGavin Andresen <gavinandresen@gmail.com>2011-10-07 11:02:21 -0400
commit6853e627f12de21b38a178def14c067435517d96 (patch)
tree74a7142b2266b992b432bab674e412ddb3464db7 /src/util.cpp
parente9b95e4f6c35cb0f150ff7e70154668f142ee0ba (diff)
Fix build on windows and mac
Replaced all occurrences of #if* __WXMSW__ with WIN32, and all occurrences of __WXMAC_OSX__ with MAC_OSX, and made sure those are defined appropriately in the makefile and bitcoin-qt.pro.
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 02e2d21491..236c7f7c44 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -64,7 +64,7 @@ public:
ppmutexOpenSSL[i] = new boost::interprocess::interprocess_mutex();
CRYPTO_set_locking_callback(locking_callback);
-#ifdef __WXMSW__
+#ifdef WIN32
// Seed random number generator with screen scrape and other hardware sources
RAND_screen();
#endif
@@ -108,7 +108,7 @@ void RandAddSeedPerfmon()
return;
nLastPerfmon = GetTime();
-#ifdef __WXMSW__
+#ifdef WIN32
// Don't need this on Linux, OpenSSL automatically uses /dev/urandom
// Seed with the entire set of perfmon data
unsigned char pdata[250000];
@@ -198,7 +198,7 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
}
}
-#ifdef __WXMSW__
+#ifdef WIN32
if (fPrintToDebugger)
{
static CCriticalSection cs_OutputDebugStringF;
@@ -457,7 +457,7 @@ void ParseParameters(int argc, char* argv[])
pszValue = strchr(psz, '=');
*pszValue++ = '\0';
}
- #ifdef __WXMSW__
+ #ifdef WIN32
_strlwr(psz);
if (psz[0] == '/')
psz[0] = '-';
@@ -648,7 +648,7 @@ bool WildcardMatch(const string& str, const string& mask)
void FormatException(char* pszMessage, std::exception* pex, const char* pszThread)
{
-#ifdef __WXMSW__
+#ifdef WIN32
char pszModule[MAX_PATH];
pszModule[0] = '\0';
GetModuleFileNameA(NULL, pszModule, sizeof(pszModule));
@@ -707,7 +707,7 @@ void PrintExceptionContinue(std::exception* pex, const char* pszThread)
-#ifdef __WXMSW__
+#ifdef WIN32
typedef WINSHELLAPI BOOL (WINAPI *PSHGETSPECIALFOLDERPATHA)(HWND hwndOwner, LPSTR lpszPath, int nFolder, BOOL fCreate);
string MyGetSpecialFolderPath(int nFolder, bool fCreate)
@@ -748,7 +748,7 @@ string GetDefaultDataDir()
// Windows: C:\Documents and Settings\username\Application Data\Bitcoin
// Mac: ~/Library/Application Support/Bitcoin
// Unix: ~/.bitcoin
-#ifdef __WXMSW__
+#ifdef WIN32
// Windows
return MyGetSpecialFolderPath(CSIDL_APPDATA, true) + "\\Bitcoin";
#else
@@ -758,7 +758,7 @@ string GetDefaultDataDir()
string strHome = pszHome;
if (strHome[strHome.size()-1] != '/')
strHome += '/';
-#ifdef __WXMAC_OSX__
+#ifdef MAC_OSX
// Mac
strHome += "Library/Application Support/";
filesystem::create_directory(strHome.c_str());