Bitcoin ABC  0.26.3
P2P Digital Currency
clientversion.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2016 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Bitcoin developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_CLIENTVERSION_H
7 #define BITCOIN_CLIENTVERSION_H
8 
9 #include <util/macros.h>
10 
11 #if defined(HAVE_CONFIG_H)
12 #include <config/bitcoin-config.h>
13 #endif // HAVE_CONFIG_H
14 #include <config/version.h>
15 
16 // Check that required client information is defined
17 #if !defined(CLIENT_VERSION_MAJOR) || !defined(CLIENT_VERSION_MINOR) || \
18  !defined(CLIENT_VERSION_REVISION) || !defined(COPYRIGHT_YEAR) || \
19  !defined(CLIENT_VERSION_IS_RELEASE)
20 #error Client version information missing: version is not defined by bitcoin-config.h nor defined any other way
21 #endif
22 
24 #define COPYRIGHT_STR \
25  "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
26 
33 #if !defined(WINDRES_PREPROC)
34 
35 #include <string>
36 #include <vector>
37 
38 static constexpr int CLIENT_VERSION = 1000000 * CLIENT_VERSION_MAJOR +
39  10000 * CLIENT_VERSION_MINOR +
40  100 * CLIENT_VERSION_REVISION;
41 
42 extern const std::string CLIENT_NAME;
43 extern const std::string CLIENT_BUILD;
44 
45 std::string FormatVersion(int nVersion);
46 std::string FormatFullVersion();
47 std::string FormatUserAgent(const std::string &name, const std::string &version,
48  const std::vector<std::string> &comments);
49 
50 #endif // WINDRES_PREPROC
51 
52 #endif // BITCOIN_CLIENTVERSION_H
const std::string CLIENT_BUILD
static constexpr int CLIENT_VERSION
bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
Definition: clientversion.h:38
std::string FormatVersion(int nVersion)
std::string FormatFullVersion()
const std::string CLIENT_NAME
std::string FormatUserAgent(const std::string &name, const std::string &version, const std::vector< std::string > &comments)
Format the subversion field according to BIP 14 spec.
const char * name
Definition: rest.cpp:48