src/macros.h

changeset 140
04a6eb68f226
parent 139
cf11621ae422
--- a/src/macros.h	Tue Jul 22 19:05:58 2014 +0300
+++ b/src/macros.h	Tue Jul 22 19:22:31 2014 +0300
@@ -45,6 +45,15 @@
 #define MAKE_VERSION_NUMBER(MAJ, MIN, PAT) ((MAJ * 10000) + (MIN * 100) + PAT)
 #define VERSION_NUMBER MAKE_VERSION_NUMBER (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)
 
+#if VERSION_PATCH > 0
+# define VERSION_STRING MACRO_TO_STRING(VERSION_MAJOR) \
+					"." MACRO_TO_STRING(VERSION_MINOR) \
+					"." MACRO_TO_STRING(VERSION_PATCH)
+#else
+# define VERSION_STRING MACRO_TO_STRING(VERSION_MAJOR) \
+					"." MACRO_TO_STRING(VERSION_MINOR)
+#endif
+
 // On Windows, files are case-insensitive
 #if (defined(WIN32) or defined(_WIN32) or defined(__WIN32)) and !defined(__CYGWIN__)
 # define FILE_CASEINSENSITIVE

mercurial