Skip to content

Commit

Permalink
build: directly include bitcoin-config.h from all necessary files
Browse files Browse the repository at this point in the history
This list was generated by grepping bitcoin-config.h.in for "undef", filtering
out the list of tokens, and grepping all source files for those tokens.
  • Loading branch information
theuni committed Feb 7, 2024
1 parent 6737331 commit 6abc898
Show file tree
Hide file tree
Showing 37 changed files with 149 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/addrdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <addrdb.h>

#include <addrman.h>
Expand Down
4 changes: 4 additions & 0 deletions src/addrman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <addrman.h>
#include <addrman_impl.h>

Expand Down
4 changes: 4 additions & 0 deletions src/bench/verify_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <bench/bench.h>
#include <key.h>
#if defined(HAVE_CONSENSUS_LIB)
Expand Down
4 changes: 4 additions & 0 deletions src/bench/wallet_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <bench/bench.h>
#include <node/context.h>
#include <random.h>
Expand Down
4 changes: 4 additions & 0 deletions src/bench/wallet_loading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <bench/bench.h>
#include <interfaces/chain.h>
#include <node/context.h>
Expand Down
4 changes: 4 additions & 0 deletions src/clientversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <clientversion.h>
#include <util/translation.h>

Expand Down
4 changes: 4 additions & 0 deletions src/common/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <common/system.h>

#include <logging.h>
Expand Down
4 changes: 4 additions & 0 deletions src/crypto/chacha20poly1305.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <crypto/chacha20poly1305.h>

#include <crypto/common.h>
Expand Down
4 changes: 4 additions & 0 deletions src/crypto/sha256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <crypto/sha256.h>
#include <crypto/common.h>

Expand Down
4 changes: 4 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <qt/bitcoingui.h>

#include <qt/bitcoinunits.h>
Expand Down
4 changes: 4 additions & 0 deletions src/qt/clientmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <qt/clientmodel.h>

#include <qt/bantablemodel.h>
Expand Down
4 changes: 4 additions & 0 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <qt/guiutil.h>

#include <qt/bitcoinaddressvalidator.h>
Expand Down
4 changes: 4 additions & 0 deletions src/qt/modaloverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <qt/modaloverlay.h>
#include <qt/forms/ui_modaloverlay.h>

Expand Down
4 changes: 4 additions & 0 deletions src/qt/notificator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <qt/notificator.h>

#include <QApplication>
Expand Down
4 changes: 4 additions & 0 deletions src/qt/test/optiontests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <common/args.h>
#include <init.h>
#include <qt/bitcoin.h>
Expand Down
4 changes: 4 additions & 0 deletions src/random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <random.h>

#include <compat/compat.h>
Expand Down
4 changes: 4 additions & 0 deletions src/rest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <rest.h>

#include <blockfilter.h>
Expand Down
4 changes: 4 additions & 0 deletions src/rpc/external_signer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <common/args.h>
#include <common/system.h>
#include <external_signer.h>
Expand Down
4 changes: 4 additions & 0 deletions src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <chain.h>
#include <chainparams.h>
#include <common/system.h>
Expand Down
4 changes: 4 additions & 0 deletions src/rpc/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <chainparams.h>
#include <httpserver.h>
#include <index/blockfilterindex.h>
Expand Down
4 changes: 4 additions & 0 deletions src/rpc/register.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#ifndef BITCOIN_RPC_REGISTER_H
#define BITCOIN_RPC_REGISTER_H

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

/** These are in one header file to avoid creating tons of single-function
* headers for everything under src/rpc/ */
class CRPCTable;
Expand Down
4 changes: 4 additions & 0 deletions src/rpc/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <rpc/server.h>

#include <common/args.h>
Expand Down
4 changes: 4 additions & 0 deletions src/rpc/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <clientversion.h>
#include <core_io.h>
#include <common/args.h>
Expand Down
4 changes: 4 additions & 0 deletions src/serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#ifndef BITCOIN_SERIALIZE_H
#define BITCOIN_SERIALIZE_H

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <attributes.h>
#include <compat/assumptions.h> // IWYU pragma: keep
#include <compat/endian.h>
Expand Down
4 changes: 4 additions & 0 deletions src/test/script_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <test/data/script_tests.json.h>
#include <test/data/bip341_wallet_vectors.json.h>

Expand Down
5 changes: 5 additions & 0 deletions src/test/system_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <test/util/setup_common.h>
#include <common/run_command.h>
#include <univalue.h>
Expand Down
4 changes: 4 additions & 0 deletions src/test/util/setup_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <test/util/setup_common.h>

#include <kernel/validation_cache_sizes.h>
Expand Down
4 changes: 4 additions & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <validation.h>

#include <arith_uint256.h>
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <common/args.h>
#include <init.h>
#include <interfaces/chain.h>
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/rpc/addresses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <core_io.h>
#include <key_io.h>
#include <rpc/util.h>
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/rpc/backup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <chain.h>
#include <clientversion.h>
#include <core_io.h>
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/rpc/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <core_io.h>
#include <key_io.h>
#include <rpc/server.h>
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/sqlite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <wallet/sqlite.h>

#include <chainparams.h>
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/test/db_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <boost/test/unit_test.hpp>

#include <test/util/setup_common.h>
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/test/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#ifndef BITCOIN_WALLET_TEST_UTIL_H
#define BITCOIN_WALLET_TEST_UTIL_H

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <addresstype.h>
#include <wallet/db.h>

Expand Down
4 changes: 4 additions & 0 deletions src/wallet/walletdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

#include <wallet/walletdb.h>

#include <common/system.h>
Expand Down
Loading

0 comments on commit 6abc898

Please sign in to comment.