From: Max Kellermann Date: Fri, 10 Mar 2017 20:32:54 +0000 (+0100) Subject: Compiler.h: add macro GCC_MAKE_VERSION() X-Git-Tag: v0.26~80 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=85c7f15a1b0d25d9d855ef771fa753b2361b277a;p=ncmpc.git Compiler.h: add macro GCC_MAKE_VERSION() --- diff --git a/src/Compiler.h b/src/Compiler.h index 9756e1f..43bc9a8 100644 --- a/src/Compiler.h +++ b/src/Compiler.h @@ -24,12 +24,12 @@ (defined(__GNUC__) && \ (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))) +#define GCC_MAKE_VERSION(major, minor, patchlevel) ((major) * 10000 + (minor) * 100 + patchlevel) + #ifdef __GNUC__ -#define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) +# define GCC_VERSION GCC_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) #else -#define GCC_VERSION 0 +# define GCC_VERSION 0 #endif #if GCC_CHECK_VERSION(4,0)