aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/version.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-28 23:53:01 +0000
committerlloyd <[email protected]>2008-09-28 23:53:01 +0000
commit7853a74932791f7760961ddeb3a6064721eeb8b4 (patch)
treed5a3cbccc143148af63757cdc78166d85416eb3d /src/utils/version.h
parentfaadc351369d187b6bb42c6e5a165242a62231da (diff)
Move util functions into utils/ module
Diffstat (limited to 'src/utils/version.h')
-rw-r--r--src/utils/version.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/utils/version.h b/src/utils/version.h
new file mode 100644
index 000000000..6604b1885
--- /dev/null
+++ b/src/utils/version.h
@@ -0,0 +1,33 @@
+/*************************************************
+* Version Information Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_VERSION_H__
+#define BOTAN_VERSION_H__
+
+#include <botan/types.h>
+#include <string>
+
+namespace Botan {
+
+/*************************************************
+* Get information describing the version *
+*************************************************/
+BOTAN_DLL std::string version_string();
+BOTAN_DLL u32bit version_major();
+BOTAN_DLL u32bit version_minor();
+BOTAN_DLL u32bit version_patch();
+
+/*************************************************
+* Macros for compile-time version checks *
+*************************************************/
+#define BOTAN_VERSION_CODE_FOR(a,b,c) ((a << 16) | (b << 8) | (c))
+
+#define BOTAN_VERSION_CODE BOTAN_VERSION_CODE_FOR(BOTAN_VERSION_MAJOR, \
+ BOTAN_VERSION_MINOR, \
+ BOTAN_VERSION_PATCH)
+
+}
+
+#endif