summaryrefslogtreecommitdiff
path: root/src/localconsts.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-30 22:09:28 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-30 22:09:28 +0300
commitd3d6c6fc60a878b2742bb614e87fee0a04c69759 (patch)
treea7d81843fcda860a03c6e58dbb07308f069785b7 /src/localconsts.h
parentb8fefae63e5ddd8a3463988fbfeaea25d389e225 (diff)
downloadmanaverse-d3d6c6fc60a878b2742bb614e87fee0a04c69759.tar.gz
manaverse-d3d6c6fc60a878b2742bb614e87fee0a04c69759.tar.bz2
manaverse-d3d6c6fc60a878b2742bb614e87fee0a04c69759.tar.xz
manaverse-d3d6c6fc60a878b2742bb614e87fee0a04c69759.zip
Fix some macro definition for some compiler versions.
Add clang version macro.
Diffstat (limited to 'src/localconsts.h')
-rw-r--r--src/localconsts.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/localconsts.h b/src/localconsts.h
index df49f8098..4b1616db1 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -33,6 +33,12 @@
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
+#ifdef __clang__
+#define CLANG_VERSION (__clang_major__ * 10000 \
+ + __clang_minor__ * 100 \
+ + __clang_patchlevel__)
+#endif // __clang__
+
#if !defined(__GXX_EXPERIMENTAL_CXX0X__)
#undef nullptr
#define nullptr 0
@@ -55,6 +61,7 @@
#define noexcept
#endif // __clang__
#define noexcept2
+#define constexpr2
// #define A_DELETE
// #define A_DELETE_COPY
@@ -174,7 +181,7 @@
#ifdef __clang__
#define PRAGMACLANG(str) _Pragma(#str)
-#if __clang_major__ >= 6
+#if CLANG_VERSION >= 30800
#define PRAGMACLANG6(str) _Pragma(#str)
#else // __clang_major__ >= 6
#define PRAGMACLANG6(str)