diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-10-30 17:18:17 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-10-30 17:24:36 +0100 |
commit | 8d2396c9c41cbd5b8746f48f41180697f58b0681 (patch) | |
tree | ce5bb77b48ee354790eeae3f0ee3dd19d160b322 /src/clientversion.h | |
parent | c4761ffb70a9fc38b32f9febcac1434ffb4fee50 (diff) | |
parent | 71697f97d3f9512f0af934070690c14f1c0d95ea (diff) |
Merge pull request #5164
71697f9 Separate protocol versioning from clientversion (Cory Fields)
Diffstat (limited to 'src/clientversion.h')
-rw-r--r-- | src/clientversion.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/clientversion.h b/src/clientversion.h index cd7ceb78f0..acaf54c6af 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -35,4 +35,31 @@ // Copyright string used in Windows .rc files #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers" +/* + bitcoind-res.rc includes this file, but it cannot cope with real c++ code. + WINDRES_PREPROC is defined to indicate that its pre-processor is running. + Anything other than a define should be guarded below. +*/ + +#if !defined(WINDRES_PREPROC) + +#include <string> +#include <vector> + +static const int CLIENT_VERSION = + 1000000 * CLIENT_VERSION_MAJOR + + 10000 * CLIENT_VERSION_MINOR + + 100 * CLIENT_VERSION_REVISION + + 1 * CLIENT_VERSION_BUILD; + +extern const std::string CLIENT_NAME; +extern const std::string CLIENT_BUILD; +extern const std::string CLIENT_DATE; + + +std::string FormatFullVersion(); +std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments); + +#endif // WINDRES_PREPROC + #endif // CLIENTVERSION_H |