diff --git a/src/Makefile.am b/src/Makefile.am index eeb24db97a..b6522714db 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -265,6 +265,7 @@ BITCOIN_CORE_H = \ util/fees.h \ util/system.h \ util/asmap.h \ + util/macros.h \ util/memory.h \ util/moneystr.h \ util/string.h \ diff --git a/src/sync.h b/src/sync.h index 1c742ef214..6572e7e70a 100644 --- a/src/sync.h +++ b/src/sync.h @@ -7,6 +7,7 @@ #define BITCOIN_SYNC_H #include +#include #include #include @@ -183,9 +184,6 @@ public: template using DebugLock = UniqueLock::type>::type>; -#define PASTE(x, y) x ## y -#define PASTE2(x, y) PASTE(x, y) - #define LOCK(cs) DebugLock PASTE2(criticalblock, __COUNTER__)(cs, #cs, __FILE__, __LINE__) #define LOCK2(cs1, cs2) \ DebugLock criticalblock1(cs1, #cs1, __FILE__, __LINE__); \ diff --git a/src/util/macros.h b/src/util/macros.h new file mode 100644 index 0000000000..36ea87c0fe --- /dev/null +++ b/src/util/macros.h @@ -0,0 +1,11 @@ +// Copyright (c) 2019 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_UTIL_MACROS_H +#define BITCOIN_UTIL_MACROS_H + +#define PASTE(x, y) x ## y +#define PASTE2(x, y) PASTE(x, y) + +#endif // BITCOIN_UTIL_MACROS_H