diff --git a/src/alert.cpp b/src/alert.cpp index 950452e7a0..0ee441818a 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -258,7 +258,7 @@ bool CAlert::ProcessAlert(bool fThread) if(AppliesToMe()) { uiInterface.NotifyAlertChanged(GetHash(), CT_NEW); - #if defined(HAVE_SYSTEM) + #if HAVE_SYSTEM std::string strCmd = gArgs.GetArg("-alertnotify", ""); if (!strCmd.empty()) { diff --git a/src/init.cpp b/src/init.cpp index f69aed77ad..c8183fb929 100755 --- a/src/init.cpp +++ b/src/init.cpp @@ -337,7 +337,7 @@ void SetupServerArgs() argsman.AddArg("-mininput=", "When creating transactions, ignore inputs with value less than this (default: 0.01)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); argsman.AddArg("-testnet", "Use the test network", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); -#if defined(HAVE_SYSTEM) +#if HAVE_SYSTEM argsman.AddArg("-blocknotify=", "Execute command when the best block changes (%s in cmd is replaced by block hash)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); argsman.AddArg("-walletnotify=", "Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)", @@ -347,7 +347,7 @@ void SetupServerArgs() ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); argsman.AddArg("-enforcecanonical", "Enforce transaction scripts to use canonical PUSH operators (default: 1)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); -#if defined(HAVE_SYSTEM) +#if HAVE_SYSTEM argsman.AddArg("-alertnotify=", "Execute command when a relevant alert is received or we see a really long fork" " (%s in cmd is replaced by message)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); diff --git a/src/main.cpp b/src/main.cpp index f0142623e7..abfdac9d13 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1277,7 +1277,7 @@ bool SetBestChain(CTxDB& txdb, CBlock &blockNew, CBlockIndex* pindexNew) EXCLUSI else LogPrintf("{SBC} new best {%s %d} ; ",hashBestChain.ToString(), nBestHeight); -#if defined(HAVE_SYSTEM) + #if HAVE_SYSTEM std::string strCmd = gArgs.GetArg("-blocknotify", ""); if (!fIsInitialDownload && !strCmd.empty()) { diff --git a/src/util.cpp b/src/util.cpp index 8073feefa0..9964cb2588 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -368,7 +368,7 @@ std::vector split(const std::string& s, const std::string& delim) return elems; } -#if defined(HAVE_SYSTEM) +#if HAVE_SYSTEM void runCommand(std::string strCommand) { #ifndef WIN32 diff --git a/src/util.h b/src/util.h index 5e5bac8eea..c21fc77d29 100644 --- a/src/util.h +++ b/src/util.h @@ -114,7 +114,7 @@ std::string GetFileContents(const fs::path filepath); int64_t GetTimeOffset(); int64_t GetAdjustedTime(); void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample); -#if defined(HAVE_SYSTEM) +#if HAVE_SYSTEM void runCommand(std::string strCommand); #endif diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index fe3a7b11b1..53d3ffe26e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -538,7 +538,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, CWalletDB* pwalletdb) NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED); // notify an external script when a wallet transaction comes in or is updated - #if defined(HAVE_SYSTEM) + #if HAVE_SYSTEM std::string strCmd = gArgs.GetArg("-walletnotify", ""); if (!strCmd.empty()) {