X-Git-Url: http://git.tuebingen.mpg.de/?p=osl.git;a=blobdiff_plain;f=gcc-compat.h;h=20e07fc8804ed9d40d441c3465e3d91860979506;hp=61c3c88d1c4551a965aaa22c626ddf8fabec31ba;hb=884d9b3ac360755d8dd8e28e3d049cb6b0e2b1e8;hpb=5952112a37ecdaedf3b76e08f97d307f1056c512 diff --git a/gcc-compat.h b/gcc-compat.h index 61c3c88..20e07fc 100644 --- a/gcc-compat.h +++ b/gcc-compat.h @@ -4,6 +4,8 @@ # define __a_unused __attribute__ ((unused)) # define likely(x) __builtin_expect (!!(x), 1) # define unlikely(x) __builtin_expect (!!(x), 0) +# define __must_check __attribute__ ((warn_unused_result)) +# define __export __attribute__((visibility("default"))) /* * p is the number of the "format string" parameter, and q is * the number of the first variadic parameter @@ -11,15 +13,9 @@ # define __printf(p,q) __attribute__ ((format (printf, p, q))) /* * as direct use of __printf(p,q) confuses doxygen, here are two extra macros - * for those values p,q that are actually used by paraslash. + * for those values p,q that are actually used by libosl. */ #define __printf_1_2 __printf(1,2) #define __printf_2_3 __printf(2,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