diff options
Diffstat (limited to 'include/my_attribute.h')
-rw-r--r-- | include/my_attribute.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/my_attribute.h b/include/my_attribute.h index d35b3013bdd..13d1dc42fc1 100644 --- a/include/my_attribute.h +++ b/include/my_attribute.h @@ -36,10 +36,15 @@ #ifndef __attribute__ # if !defined(__GNUC__) # define __attribute__(A) -# elif GCC_VERSION < 2008 -# define __attribute__(A) -# elif defined(__cplusplus) && GCC_VERSION < 3004 -# define __attribute__(A) +# else +# ifndef GCC_VERSION +# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) +# endif +# if GCC_VERSION < 2008 +# define __attribute__(A) +# elif defined(__cplusplus) && GCC_VERSION < 3004 +# define __attribute__(A) +# endif # endif #endif |