aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-28 19:06:17 +0100
committerMax Kellermann <max@duempel.org>2014-11-28 19:07:59 +0100
commit4bfd104a23b3abbdfb2ab5dee88fcaec6aea3cf0 (patch)
tree4560fba8f3850185b1252f81c0ba6e3a130d5cbf
parent7745067d994c9b4adb720e10df8170c585eb4c98 (diff)
downloadmpd-4bfd104a23b3abbdfb2ab5dee88fcaec6aea3cf0.tar.gz
mpd-4bfd104a23b3abbdfb2ab5dee88fcaec6aea3cf0.tar.xz
mpd-4bfd104a23b3abbdfb2ab5dee88fcaec6aea3cf0.zip
util/Manual: reimplement GCC_CHECK_VERSION() using GCC_MAKE_VERSION()
-rw-r--r--src/Compiler.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Compiler.h b/src/Compiler.h
index f0569dd18..74dc65a13 100644
--- a/src/Compiler.h
+++ b/src/Compiler.h
@@ -22,16 +22,15 @@
#define GCC_MAKE_VERSION(major, minor, patchlevel) ((major) * 10000 + (minor) * 100 + patchlevel)
-#define GCC_CHECK_VERSION(major, minor) \
- (defined(__GNUC__) && \
- (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))))
-
#ifdef __GNUC__
#define GCC_VERSION GCC_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
#else
#define GCC_VERSION 0
#endif
+#define GCC_CHECK_VERSION(major, minor) \
+ (defined(__GNUC__) && GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
+
#ifdef __clang__
# define CLANG_VERSION GCC_MAKE_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__)
# if __clang_major__ < 3