summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b821b97)
raw | patch | inline | side by side (parent: b821b97)
author | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:38:59 +0000 (21:38 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:38:59 +0000 (21:38 +0100) |
src/Compiler.h | patch | blob | history |
diff --git a/src/Compiler.h b/src/Compiler.h
index ef13a546c7666b9211f66cc521d3e3e0243ff219..d76c8f6b968a2269ad9c5f5ccda846cb573fd853 100644 (file)
--- a/src/Compiler.h
+++ b/src/Compiler.h
#ifndef COMPILER_H
#define COMPILER_H
-#define GCC_CHECK_VERSION(major, minor) \
- (defined(__GNUC__) && \
- (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))))
-
#define GCC_MAKE_VERSION(major, minor, patchlevel) ((major) * 10000 + (minor) * 100 + patchlevel)
#ifdef __GNUC__
# define CLANG_VERSION 0
#endif
+#define GCC_CHECK_VERSION(major, minor) \
+ (GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
+
/**
* Are we building with clang (any version) or at least the specified
* gcc version?