diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build-data/buildh.in | 2 | ||||
-rw-r--r-- | src/utils/version.cpp | 2 | ||||
-rw-r--r-- | src/utils/version.h | 8 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index 2f5413113..6a203234a 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -8,6 +8,8 @@ #define BOTAN_VERSION_MINOR %{version_minor} #define BOTAN_VERSION_PATCH %{version_patch} +#define BOTAN_VERSION_DATESTAMP %{version_datestamp} + #ifndef BOTAN_DLL #define BOTAN_DLL %{dll_import_flags} #endif diff --git a/src/utils/version.cpp b/src/utils/version.cpp index d540864b2..22827cbe5 100644 --- a/src/utils/version.cpp +++ b/src/utils/version.cpp @@ -26,6 +26,8 @@ std::string version_string() to_string(version_patch()); } +u32bit version_datestamp() { return BOTAN_VERSION_DATESTAMP; } + /* * Return parts of the version as integers */ diff --git a/src/utils/version.h b/src/utils/version.h index 3cc44e806..9ed776ed7 100644 --- a/src/utils/version.h +++ b/src/utils/version.h @@ -24,6 +24,14 @@ namespace Botan { BOTAN_DLL std::string version_string(); /** +* Return the date this version of botan was released, in an +* integer of the form YYYYMMDD. For instance a version released +* on May 21, 2013 would return the integer 20130521 +* @return the release date +*/ +BOTAN_DLL u32bit version_datestamp(); + +/** * Get the major version number. * @return the major version number */ |