From 3c7b327994a027cc0fe2584ee9655d98e63d1798 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 10 Mar 2017 21:38:59 +0100 Subject: [PATCH] Compiler.h: reimplement GCC_CHECK_VERSION() using GCC_MAKE_VERSION() --- src/Compiler.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Compiler.h b/src/Compiler.h index ef13a54..d76c8f6 100644 --- a/src/Compiler.h +++ b/src/Compiler.h @@ -20,10 +20,6 @@ #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__ @@ -38,6 +34,9 @@ # 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? -- 2.30.2