X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gcc-compat.h;h=1cd30af2fc7219cb132aa9d0631518e4c6efa942;hp=c4e43107def98935f6ef1000a20128274a037b8e;hb=8fbaafaaaea2ec1e3873bdcf5cb2de3a643fc5e6;hpb=cf1e416e5db97f1673521a63dacaa1487fb875d7 diff --git a/gcc-compat.h b/gcc-compat.h index c4e43107..1cd30af2 100644 --- a/gcc-compat.h +++ b/gcc-compat.h @@ -2,11 +2,9 @@ # 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 +/* + * 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,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 */