Skip to content

Commit

Permalink
build: use #if HAVE_SYSTEM instead of defined(HAVE_SYSTEM)
Browse files Browse the repository at this point in the history
  • Loading branch information
barton2526 committed Oct 16, 2022
1 parent 6919018 commit 1058979
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/alert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
4 changes: 2 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void SetupServerArgs()
argsman.AddArg("-mininput=<amt>", "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=<cmd>", "Execute command when the best block changes (%s in cmd is replaced by block hash)",
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-walletnotify=<cmd>", "Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)",
Expand All @@ -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=<cmd>", "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);
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ std::vector<std::string> 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
Expand Down
2 changes: 1 addition & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down

0 comments on commit 1058979

Please sign in to comment.