X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gcc-compat.h;h=1cd30af2fc7219cb132aa9d0631518e4c6efa942;hp=5fea55d5cec035b1e504f0ac928e1f9cdcd463ff;hb=fcb24360b1b14c9fe0e510282cf85f4e112eaf23;hpb=153980b65dec0addcd5cccf4bc6b240378355735;ds=inline diff --git a/gcc-compat.h b/gcc-compat.h index 5fea55d5..1cd30af2 100644 --- a/gcc-compat.h +++ b/gcc-compat.h @@ -1,14 +1,10 @@ # define inline inline __attribute__ ((always_inline)) # define __noreturn __attribute__ ((noreturn)) # define __malloc __attribute__ ((malloc)) -# define __used __attribute__ ((used)) # define __a_unused __attribute__ ((unused)) -# define __packed __attribute__ ((packed)) -# 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 +/* + * 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))) /* @@ -18,7 +14,7 @@ #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 */