16 #ifdef HAVE_BUILD_INFO
17 #include <obj/build.h>
30 #define BUILD_DESC BUILD_GIT_TAG
31 #define BUILD_SUFFIX ""
34 "v" STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE( \
35 CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_REVISION)
36 #ifdef BUILD_GIT_COMMIT
37 #define BUILD_SUFFIX "-" BUILD_GIT_COMMIT
38 #elif defined(GIT_COMMIT_ID)
39 #define BUILD_SUFFIX "-g" GIT_COMMIT_ID
41 #define BUILD_SUFFIX "-unk"
48 if (nVersion % 100 == 0) {
49 return strprintf(
"%d.%d.%d", nVersion / 1000000,
50 (nVersion / 10000) % 100, (nVersion / 100) % 100);
52 return strprintf(
"%d.%d.%d.%d", nVersion / 1000000,
53 (nVersion / 10000) % 100, (nVersion / 100) % 100,
67 const std::vector<std::string> &comments) {
68 std::ostringstream ss;
70 ss <<
name <<
":" << version;
71 if (!comments.empty()) {
72 std::vector<std::string>::const_iterator it(comments.begin());
74 for (++it; it != comments.end(); ++it) {
const std::string CLIENT_NAME("Bitcoin ABC")
Name of client reported in the 'version' message.
#define BUILD_DESC
git will put "#define GIT_COMMIT_ID ..." on the next line inside archives.
std::string FormatVersion(int nVersion)
std::string FormatFullVersion()
const std::string CLIENT_BUILD(BUILD_DESC BUILD_SUFFIX)
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.