From 9cb1ec9c6ee2a26dcb7ca3eadc551a084c6128a5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 15 Oct 2017 02:04:29 +0300 Subject: [PATCH] WIN32 -> _WIN32 --- src/bitcoind.cpp | 2 +- src/compat.h | 10 +++++----- src/init.cpp | 14 +++++++------- src/komodo_pax.h | 2 +- src/komodo_structs.h | 2 +- src/komodo_utils.h | 10 +++++----- src/metrics.cpp | 4 ++-- src/net.cpp | 16 ++++++++-------- src/net.h | 2 +- src/netbase.cpp | 18 +++++++++--------- src/netbase.h | 2 +- src/protocol.cpp | 2 +- src/random.cpp | 6 +++--- src/support/pagelocker.cpp | 6 +++--- src/test/alert_tests.cpp | 2 +- src/util.cpp | 30 +++++++++++++++--------------- src/util.h | 6 +++--- src/wallet/db.cpp | 2 +- 18 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 26e9c8327..050305117 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -173,7 +173,7 @@ bool AppInit(int argc, char* argv[]) exit(1); } -#ifndef WIN32 +#ifndef _WIN32 fDaemon = GetBoolArg("-daemon", false); if (fDaemon) { diff --git a/src/compat.h b/src/compat.h index feaa544e2..27afc8b2a 100644 --- a/src/compat.h +++ b/src/compat.h @@ -10,7 +10,7 @@ #include "config/bitcoin-config.h" #endif -#ifdef WIN32 +#ifdef _WIN32 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif @@ -46,7 +46,7 @@ #include #endif -#ifdef WIN32 +#ifdef _WIN32 #define MSG_DONTWAIT 0 #else typedef u_int SOCKET; @@ -64,7 +64,7 @@ typedef u_int SOCKET; #define SOCKET_ERROR -1 #endif -#ifdef WIN32 +#ifdef _WIN32 #ifndef S_IRUSR #define S_IRUSR 0400 #define S_IWUSR 0200 @@ -78,7 +78,7 @@ typedef u_int SOCKET; #define MSG_NOSIGNAL 0 #endif -#ifndef WIN32 +#ifndef _WIN32 // PRIO_MAX is not defined on Solaris #ifndef PRIO_MAX #define PRIO_MAX 20 @@ -94,7 +94,7 @@ size_t strnlen( const char *start, size_t max_len); #endif // HAVE_DECL_STRNLEN bool static inline IsSelectableSocket(SOCKET s) { -#ifdef WIN32 +#ifdef _WIN32 return true; #else return (s < FD_SETSIZE); diff --git a/src/init.cpp b/src/init.cpp index 7905b268e..fe10401a8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -40,7 +40,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif @@ -74,7 +74,7 @@ bool fFeeEstimatesInitialized = false; static CZMQNotificationInterface* pzmqNotificationInterface = NULL; #endif -#ifdef WIN32 +#ifdef _WIN32 // Win32 LevelDB doesn't use file descriptors, and the ones used for // accessing block files don't count towards the fd_set size limit // anyway. @@ -236,7 +236,7 @@ void Shutdown() } #endif -#ifndef WIN32 +#ifndef _WIN32 try { boost::filesystem::remove(GetPidFile()); } catch (const boost::filesystem::filesystem_error& e) { @@ -334,7 +334,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-maxorphantx=", strprintf(_("Keep at most unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS)); strUsage += HelpMessageOpt("-par=", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS)); -#ifndef WIN32 +#ifndef _WIN32 strUsage += HelpMessageOpt("-pid=", strprintf(_("Specify pid file (default: %s)"), "komodod.pid")); #endif strUsage += HelpMessageOpt("-prune=", strprintf(_("Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. " @@ -716,7 +716,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // Disable confusing "helpful" text message on abort, Ctrl-C _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); #endif -#ifdef WIN32 +#ifdef _WIN32 // Enable Data Execution Prevention (DEP) // Minimum supported OS versions: WinXP SP3, WinVista >= SP1, Win Server 2008 // A failure is non-critical and needs no further attention! @@ -733,7 +733,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (!SetupNetworking()) return InitError("Error: Initializing networking failed"); -#ifndef WIN32 +#ifndef _WIN32 if (GetBoolArg("-sysperms", false)) { #ifdef ENABLE_WALLET if (!GetBoolArg("-disablewallet", false)) @@ -1047,7 +1047,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Komodo is probably already running.") + " %s.", strDataDir, e.what())); } -#ifndef WIN32 +#ifndef _WIN32 CreatePidFile(GetPidFile(), getpid()); #endif if (GetBoolArg("-shrinkdebugfile", !fDebug)) diff --git a/src/komodo_pax.h b/src/komodo_pax.h index 55b14bd4a..f5655e6f1 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -233,7 +233,7 @@ int32_t komodo_pax_opreturn(int32_t height,uint8_t *opret,int32_t maxsize) { static uint32_t lastcrc; FILE *fp; char fname[512]; uint32_t crc32,check,timestamp; int32_t i,n=0,retval,fsize,len=0; uint8_t data[8192]; -#ifdef WIN32 +#ifdef _WIN32 sprintf(fname,"%s\\%s",GetDataDir(false).string().c_str(),(char *)"komodofeed"); #else sprintf(fname,"%s/%s",GetDataDir(false).string().c_str(),(char *)"komodofeed"); diff --git a/src/komodo_structs.h b/src/komodo_structs.h index a35e7e008..510a7e488 100644 --- a/src/komodo_structs.h +++ b/src/komodo_structs.h @@ -16,7 +16,7 @@ #include "uthash.h" #include "utlist.h" -/*#ifdef WIN32 +/*#ifdef _WIN32 #define PACKED #else #define PACKED __attribute__((packed)) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index e330a66ac..e3749a5b1 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1305,7 +1305,7 @@ void komodo_statefname(char *fname,char *symbol,char *str) } else { -#ifdef WIN32 +#ifdef _WIN32 strcat(fname,"\\"); #else strcat(fname,"/"); @@ -1315,7 +1315,7 @@ void komodo_statefname(char *fname,char *symbol,char *str) { strcat(fname,symbol); //printf("statefname.(%s) -> (%s)\n",symbol,fname); -#ifdef WIN32 +#ifdef _WIN32 strcat(fname,"\\"); #else strcat(fname,"/"); @@ -1347,7 +1347,7 @@ void komodo_configfile(char *symbol,uint16_t port) password[i*2] = 0; sprintf(buf,"%s.conf",symbol); BITCOIND_PORT = port; -#ifdef WIN32 +#ifdef _WIN32 sprintf(fname,"%s\\%s",GetDataDir(false).string().c_str(),buf); #else sprintf(fname,"%s/%s",GetDataDir(false).string().c_str(),buf); @@ -1371,7 +1371,7 @@ void komodo_configfile(char *symbol,uint16_t port) } } strcpy(fname,GetDataDir().string().c_str()); -#ifdef WIN32 +#ifdef _WIN32 while ( fname[strlen(fname)-1] != '\\' ) fname[strlen(fname)-1] = 0; strcat(fname,"komodo.conf"); @@ -1576,7 +1576,7 @@ void komodo_args(char *argv0) for (iter=0; iter<2; iter++) { strcpy(fname,GetDataDir().string().c_str()); -#ifdef WIN32 +#ifdef _WIN32 while ( fname[strlen(fname)-1] != '\\' ) fname[strlen(fname)-1] = 0; if ( iter == 0 ) diff --git a/src/metrics.cpp b/src/metrics.cpp index 92e4b6590..b45b5dc6b 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -411,7 +411,7 @@ void ThreadShowMetricsScreen() // Get current window size if (isTTY) { - #ifdef WIN32 +#ifdef _WIN32 CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); cols = csbi.srWindow.Right - csbi.srWindow.Left + 1; @@ -421,7 +421,7 @@ void ThreadShowMetricsScreen() if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1 && w.ws_col != 0) { cols = w.ws_col; } - #endif +#endif } if (isScreen) { diff --git a/src/net.cpp b/src/net.cpp index 073353be5..0dcdae7db 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -17,7 +17,7 @@ #include "ui_interface.h" #include "crypto/common.h" -#ifdef WIN32 +#ifdef _WIN32 #include #else #include @@ -42,7 +42,7 @@ // Fix for ancient MinGW versions, that don't have defined these in ws2tcpip.h. // Todo: Can be removed when our pull-tester is upgraded to a modern MinGW version. -#ifdef WIN32 +#ifdef _WIN32 #ifndef PROTECTION_LEVEL_UNRESTRICTED #define PROTECTION_LEVEL_UNRESTRICTED 10 #endif @@ -930,7 +930,7 @@ static void AcceptConnection(const ListenSocket& hListenSocket) { // According to the internet TCP_NODELAY is not carried into accepted sockets // on all platforms. Set it again here just to be sure. int set = 1; -#ifdef WIN32 +#ifdef _WIN32 setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (const char*)&set, sizeof(int)); #else setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (void*)&set, sizeof(int)); @@ -1727,7 +1727,7 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste } -#ifndef WIN32 +#ifndef _WIN32 #ifdef SO_NOSIGPIPE // Different way of disabling SIGPIPE on BSD setsockopt(hListenSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&nOne, sizeof(int)); @@ -1753,13 +1753,13 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste // and enable it by default or not. Try to enable it, if possible. if (addrBind.IsIPv6()) { #ifdef IPV6_V6ONLY -#ifdef WIN32 +#ifdef _WIN32 setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&nOne, sizeof(int)); #else setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&nOne, sizeof(int)); #endif #endif -#ifdef WIN32 +#ifdef _WIN32 int nProtLevel = PROTECTION_LEVEL_UNRESTRICTED; setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL, (const char*)&nProtLevel, sizeof(int)); #endif @@ -1800,7 +1800,7 @@ void static Discover(boost::thread_group& threadGroup) if (!fDiscover) return; -#ifdef WIN32 +#ifdef _WIN32 // Get local host IP char pszHostName[256] = ""; if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR) @@ -1945,7 +1945,7 @@ public: delete pnodeLocalHost; pnodeLocalHost = NULL; -#ifdef WIN32 +#ifdef _WIN32 // Shutdown Windows Sockets WSACleanup(); #endif diff --git a/src/net.h b/src/net.h index bb79acf17..6f28f3872 100644 --- a/src/net.h +++ b/src/net.h @@ -22,7 +22,7 @@ #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif diff --git a/src/netbase.cpp b/src/netbase.cpp index c65d66ac1..6a28532f1 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -26,7 +26,7 @@ #include #endif -#ifndef WIN32 +#ifndef _WIN32 #if HAVE_INET_PTON #include #endif @@ -129,7 +129,7 @@ bool static LookupIntern(const char *pszName, std::vector& vIP, unsign aiHint.ai_socktype = SOCK_STREAM; aiHint.ai_protocol = IPPROTO_TCP; aiHint.ai_family = AF_UNSPEC; -#ifdef WIN32 +#ifdef _WIN32 aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST; #else aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST; @@ -454,7 +454,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe #endif //Disable Nagle's algorithm -#ifdef WIN32 +#ifdef _WIN32 setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (const char*)&set, sizeof(int)); #else setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (void*)&set, sizeof(int)); @@ -488,7 +488,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe return false; } socklen_t nRetSize = sizeof(nRet); -#ifdef WIN32 +#ifdef _WIN32 if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, (char*)(&nRet), &nRetSize) == SOCKET_ERROR) #else if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, &nRet, &nRetSize) == SOCKET_ERROR) @@ -505,7 +505,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe return false; } } -#ifdef WIN32 +#ifdef _WIN32 else if (WSAGetLastError() != WSAEISCONN) #else else @@ -1348,7 +1348,7 @@ bool operator<(const CSubNet& a, const CSubNet& b) return (a.network < b.network || (a.network == b.network && memcmp(a.netmask, b.netmask, 16) < 0)); } -#ifdef WIN32 +#ifdef _WIN32 std::string NetworkErrorString(int err) { char buf[256]; @@ -1386,7 +1386,7 @@ bool CloseSocket(SOCKET& hSocket) { if (hSocket == INVALID_SOCKET) return false; -#ifdef WIN32 +#ifdef _WIN32 int ret = closesocket(hSocket); #else int ret = close(hSocket); @@ -1398,7 +1398,7 @@ bool CloseSocket(SOCKET& hSocket) bool SetSocketNonBlocking(SOCKET& hSocket, bool fNonBlocking) { if (fNonBlocking) { -#ifdef WIN32 +#ifdef _WIN32 u_long nOne = 1; if (ioctlsocket(hSocket, FIONBIO, &nOne) == SOCKET_ERROR) { #else @@ -1409,7 +1409,7 @@ bool SetSocketNonBlocking(SOCKET& hSocket, bool fNonBlocking) return false; } } else { -#ifdef WIN32 +#ifdef _WIN32 u_long nZero = 0; if (ioctlsocket(hSocket, FIONBIO, &nZero) == SOCKET_ERROR) { #else diff --git a/src/netbase.h b/src/netbase.h index 21ac0aa4c..83ce22663 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -22,7 +22,7 @@ extern bool fNameLookup; /** -timeout default */ static const int DEFAULT_CONNECT_TIMEOUT = 5000; -#ifdef WIN32 +#ifdef _WIN32 // In MSVC, this is defined as a macro, undefine it to prevent a compile and link error #undef SetPort #endif diff --git a/src/protocol.cpp b/src/protocol.cpp index dd855aa33..33b9ee773 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -8,7 +8,7 @@ #include "util.h" #include "utilstrencodings.h" -#ifndef WIN32 +#ifndef _WIN32 # include #endif diff --git a/src/random.cpp b/src/random.cpp index 29faa32a7..87b3f648e 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -6,7 +6,7 @@ #include "random.h" #include "support/cleanse.h" -#ifdef WIN32 +#ifdef _WIN32 #include "compat.h" // for Windows API #endif #include "serialize.h" // for begin_ptr(vec) @@ -15,7 +15,7 @@ #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif @@ -24,7 +24,7 @@ static inline int64_t GetPerformanceCounter() { int64_t nCounter = 0; -#ifdef WIN32 +#ifdef _WIN32 QueryPerformanceCounter((LARGE_INTEGER*)&nCounter); #else timeval t; diff --git a/src/support/pagelocker.cpp b/src/support/pagelocker.cpp index 440e0a519..d0b0d4dd8 100644 --- a/src/support/pagelocker.cpp +++ b/src/support/pagelocker.cpp @@ -8,7 +8,7 @@ #include "config/bitcoin-config.h" #endif -#ifdef WIN32 +#ifdef _WIN32 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif @@ -49,7 +49,7 @@ static inline size_t GetSystemPageSize() bool MemoryPageLocker::Lock(const void* addr, size_t len) { -#ifdef WIN32 +#ifdef _WIN32 return VirtualLock(const_cast(addr), len) != 0; #else return mlock(addr, len) == 0; @@ -58,7 +58,7 @@ bool MemoryPageLocker::Lock(const void* addr, size_t len) bool MemoryPageLocker::Unlock(const void* addr, size_t len) { -#ifdef WIN32 +#ifdef _WIN32 return VirtualUnlock(const_cast(addr), len) != 0; #else return munlock(addr, len) == 0; diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp index ab3841c48..ef607dacc 100644 --- a/src/test/alert_tests.cpp +++ b/src/test/alert_tests.cpp @@ -340,7 +340,7 @@ BOOST_AUTO_TEST_CASE(AlertNotify) // Windows built-in echo semantics are different than posixy shells. Quotes and // whitespace are printed literally. -#ifndef WIN32 +#ifndef _WIN32 BOOST_CHECK_EQUAL(r[0], "Alert 1"); BOOST_CHECK_EQUAL(r[1], "Alert 2, cancels 1"); BOOST_CHECK_EQUAL(r[2], "Alert 2, cancels 1"); diff --git a/src/util.cpp b/src/util.cpp index b452cea72..ec83e17ce 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -23,7 +23,7 @@ #include #endif -#ifndef WIN32 +#ifndef _WIN32 // for posix_fallocate #ifdef __linux__ @@ -335,7 +335,7 @@ void ParseParameters(int argc, const char* const argv[]) strValue = str.substr(is_index+1); str = str.substr(0, is_index); } -#ifdef WIN32 +#ifdef _WIN32 boost::to_lower(str); if (boost::algorithm::starts_with(str, "/")) str = "-" + str.substr(1); @@ -419,7 +419,7 @@ std::string HelpMessageOpt(const std::string &option, const std::string &message static std::string FormatException(const std::exception* pex, const char* pszThread) { -#ifdef WIN32 +#ifdef _WIN32 char pszModule[MAX_PATH] = ""; GetModuleFileNameA(NULL, pszModule, sizeof(pszModule)); #else @@ -455,7 +455,7 @@ boost::filesystem::path GetDefaultDataDir() // Windows >= Vista: C:\Users\Username\AppData\Roaming\Zcash // Mac: ~/Library/Application Support/Zcash // Unix: ~/.zcash -#ifdef WIN32 +#ifdef _WIN32 // Windows if ( symbol[0] == 0 ) return GetSpecialFolderPath(CSIDL_APPDATA) / "Komodo"; @@ -502,7 +502,7 @@ static boost::filesystem::path ZC_GetBaseParamsDir() // Windows >= Vista: C:\Users\Username\AppData\Roaming\ZcashParams // Mac: ~/Library/Application Support/ZcashParams // Unix: ~/.zcash-params -#ifdef WIN32 +#ifdef _WIN32 // Windows return GetSpecialFolderPath(CSIDL_APPDATA) / "ZcashParams"; #else @@ -648,7 +648,7 @@ void ReadConfigFile(map& mapSettingsRet, //fprintf(stderr,"from conf file %s RPC %u, used to be %u\n",ASSETCHAINS_SYMBOL,BITCOIND_PORT,BITCOIND_PORT); } -#ifndef WIN32 +#ifndef _WIN32 boost::filesystem::path GetPidFile() { boost::filesystem::path pathPidFile(GetArg("-pid", "komodod.pid")); @@ -669,13 +669,13 @@ void CreatePidFile(const boost::filesystem::path &path, pid_t pid) bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest) { -#ifdef WIN32 +#ifdef _WIN32 return MoveFileExA(src.string().c_str(), dest.string().c_str(), MOVEFILE_REPLACE_EXISTING) != 0; #else int rc = std::rename(src.string().c_str(), dest.string().c_str()); return (rc == 0); -#endif /* WIN32 */ +#endif /* _WIN32 */ } /** @@ -700,7 +700,7 @@ bool TryCreateDirectory(const boost::filesystem::path& p) void FileCommit(FILE *fileout) { fflush(fileout); // harmless if redundantly called -#ifdef WIN32 +#ifdef _WIN32 HANDLE hFile = (HANDLE)_get_osfhandle(_fileno(fileout)); FlushFileBuffers(hFile); #else @@ -815,7 +815,7 @@ void ShrinkDebugFile() fclose(file); } -#ifdef WIN32 +#ifdef _WIN32 boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate) { namespace fs = boost::filesystem; @@ -838,7 +838,7 @@ boost::filesystem::path GetTempPath() { #else // TODO: remove when we don't support filesystem v2 anymore boost::filesystem::path path; -#ifdef WIN32 +#ifdef _WIN32 char pszPath[MAX_PATH] = ""; if (GetTempPathA(MAX_PATH, pszPath)) @@ -898,7 +898,7 @@ void SetupEnvironment() bool SetupNetworking() { -#ifdef WIN32 +#ifdef _WIN32 // Initialize Windows Sockets WSADATA wsadata; int ret = WSAStartup(MAKEWORD(2,2), &wsadata); @@ -910,15 +910,15 @@ bool SetupNetworking() void SetThreadPriority(int nPriority) { -#ifdef WIN32 +#ifdef _WIN32 SetThreadPriority(GetCurrentThread(), nPriority); -#else // WIN32 +#else // _WIN32 #ifdef PRIO_THREAD setpriority(PRIO_THREAD, 0, nPriority); #else // PRIO_THREAD setpriority(PRIO_PROCESS, 0, nPriority); #endif // PRIO_THREAD -#endif // WIN32 +#endif // _WIN32 } std::string PrivacyInfo() diff --git a/src/util.h b/src/util.h index 361a9271f..424c6693a 100644 --- a/src/util.h +++ b/src/util.h @@ -124,7 +124,7 @@ boost::filesystem::path GetDefaultDataDir(); const boost::filesystem::path &GetDataDir(bool fNetSpecific = true); void ClearDatadirCache(); boost::filesystem::path GetConfigFile(); -#ifndef WIN32 +#ifndef _WIN32 boost::filesystem::path GetPidFile(); void CreatePidFile(const boost::filesystem::path &path, pid_t pid); #endif @@ -133,7 +133,7 @@ public: missing_zcash_conf() : std::runtime_error("Missing komodo.conf") { } }; void ReadConfigFile(std::map& mapSettingsRet, std::map >& mapMultiSettingsRet); -#ifdef WIN32 +#ifdef _WIN32 boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true); #endif boost::filesystem::path GetTempPath(); @@ -150,7 +150,7 @@ std::string LicenseInfo(); inline bool IsSwitchChar(char c) { -#ifdef WIN32 +#ifdef _WIN32 return c == '-' || c == '/'; #else return c == '-'; diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 766e2afda..c6beb8a52 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -13,7 +13,7 @@ #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif