diff options
author | fanquake <fanquake@gmail.com> | 2019-07-07 10:35:15 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2019-07-07 10:53:24 +0800 |
commit | f373beebbcc0c7d1160e02dc638a00b3e6831d98 (patch) | |
tree | 82010d87db9fe5ce00776a0e8863d642849559c3 /src/init.cpp | |
parent | 584168c7f9d9e78a3bf82ab85b52feb0ced67f9d (diff) | |
parent | 976b034b13d28877aee641833d5ee28a8cc5d83f (diff) | |
download | bitcoin-f373beebbcc0c7d1160e02dc638a00b3e6831d98.tar.xz |
Merge #16344: build: use #if HAVE_SYSTEM instead of defined(HAVE_SYSTEM)
976b034b13d28877aee641833d5ee28a8cc5d83f [build]: use #if HAVE_SYSTEM instead of defined(HAVE_SYSTEM) (Sjors Provoost)
Pull request description:
It seems that `AC_DEFINE([HAVE_SYSTEM], [HAVE_STD__SYSTEM || HAVE_WSYSTEM]` causes `HAVE_SYSTEM` to always be defined, so we need to use `#if HAVE_SYSTEM` instead of `#if defined(HAVE_SYSTEM)`.
Followup for #15457, can be tested with #12557.
ACKs for top commit:
dongcarl:
ACK https://github.com/bitcoin/bitcoin/pull/16344/commits/976b034b13d28877aee641833d5ee28a8cc5d83f.
promag:
ACK 976b034b13d28877aee641833d5ee28a8cc5d83f.
fanquake:
ACK 976b034b13d28877aee641833d5ee28a8cc5d83f
Tree-SHA512: b8cdd04c2ec399fd15638aef5d75ea0886ec1572d3cf4fcea27c193e1e6390344315908262cad8981a9b0a905ab9520619ce2ffe9a717f4ee6bfa8b028ebbdc6
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp index e2a1b99e37..8a83ded47a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -376,12 +376,12 @@ void SetupServerArgs() "-allowselfsignedrootcertificates", "-choosedatadir", "-lang=<lang>", "-min", "-resetguisettings", "-rootcertificates=<file>", "-splash", "-uiplatform"}; gArgs.AddArg("-version", "Print version and exit", false, OptionsCategory::OPTIONS); -#if defined(HAVE_SYSTEM) +#if HAVE_SYSTEM gArgs.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)", false, OptionsCategory::OPTIONS); #endif gArgs.AddArg("-assumevalid=<hex>", strprintf("If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)", defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), false, OptionsCategory::OPTIONS); gArgs.AddArg("-blocksdir=<dir>", "Specify directory to hold blocks subdirectory for *.dat files (default: <datadir>)", false, OptionsCategory::OPTIONS); -#if defined(HAVE_SYSTEM) +#if HAVE_SYSTEM gArgs.AddArg("-blocknotify=<cmd>", "Execute command when the best block changes (%s in cmd is replaced by block hash)", false, OptionsCategory::OPTIONS); #endif gArgs.AddArg("-blockreconstructionextratxn=<n>", strprintf("Extra transactions to keep in memory for compact block reconstructions (default: %u)", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), false, OptionsCategory::OPTIONS); @@ -583,7 +583,7 @@ std::string LicenseInfo() "\n"; } -#if defined(HAVE_SYSTEM) +#if HAVE_SYSTEM static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex) { if (initialSync || !pBlockIndex) @@ -1714,7 +1714,7 @@ bool AppInitMain(InitInterfaces& interfaces) fHaveGenesis = true; } -#if defined(HAVE_SYSTEM) +#if HAVE_SYSTEM if (gArgs.IsArgSet("-blocknotify")) uiInterface.NotifyBlockTip_connect(BlockNotifyCallback); #endif |