X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gcc-compat.h;h=45d9c9ba8dcf1497001014a6fa06841c427d08be;hp=c4e43107def98935f6ef1000a20128274a037b8e;hb=75d545612d8fb51b7e6b2f8a7349b54502004cfa;hpb=cf1e416e5db97f1673521a63dacaa1487fb875d7 diff --git a/gcc-compat.h b/gcc-compat.h index c4e43107..45d9c9ba 100644 --- a/gcc-compat.h +++ b/gcc-compat.h @@ -1,12 +1,12 @@ -# define inline inline __attribute__ ((always_inline)) -# define __noreturn __attribute__ ((noreturn)) -# define __malloc __attribute__ ((malloc)) -# define __a_unused __attribute__ ((unused)) -# define likely(x) __builtin_expect (!!(x), 1) -# define unlikely(x) __builtin_expect (!!(x), 0) -/* - * p is the number of the "format string" parameter, and q is - * the number of the first variadic parameter +#define inline inline __attribute__ ((always_inline)) +#define __noreturn __attribute__ ((noreturn)) +#define __malloc __attribute__ ((malloc)) +#define __a_unused __attribute__ ((unused)) +#define __a_aligned(alignment) __attribute__((__aligned__(alignment))) + +/* + * p is the number of the "format string" parameter, and q is + * the number of the first variadic parameter. */ # define __printf(p,q) __attribute__ ((format (printf, p, q))) /* @@ -16,10 +16,11 @@ #define __printf_1_2 __printf(1,2) #define __printf_2_3 __printf(2,3) -# if __GNUC__ >=3 && __GNUC_MINOR__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3) # define __must_check __attribute__ ((warn_unused_result)) # else # define __must_check /* no warn_unused_result */ # endif #define _static_inline_ static inline +