diff options
Diffstat (limited to 'include/xine/attributes.h')
-rw-r--r-- | include/xine/attributes.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/include/xine/attributes.h b/include/xine/attributes.h index c339e7113..29bb9f28f 100644 --- a/include/xine/attributes.h +++ b/include/xine/attributes.h @@ -34,6 +34,26 @@ #ifdef XINE_COMPILE # include "configure.h" +#else +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95 ) +# define SUPPORT_ATTRIBUTE_PACKED 1 +# endif + +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3 ) +# define SUPPORT_ATTRIBUTE_DEPRECATED 1 +# define SUPPORT_ATTRIBUTE_FORMAT 1 +# define SUPPORT_ATTRIBUTE_FORMAT_ARG 1 +# define SUPPORT_ATTRIBUTE_MALLOC 1 +# define SUPPORT_ATTRIBUTE_UNUSED 1 +# endif + +# if __GNUC__ >= 4 +# define SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT 1 +# if __ELF__ +# define SUPPORT_ATTRIBUTE_VISIBILITY_PROTECTED 1 +# endif +# define SUPPORT_ATTRIBUTE_SENTINEL 1 +# endif #endif /* Export protected only for libxine functions */ @@ -77,16 +97,16 @@ # define XINE_FORMAT_PRINTF_ARG(fmt) #endif -#ifdef SUPPORT_ATTRIBUTE_PACKED -# define XINE_PACKED __attribute__((packed)) -#else -# define XINE_PACKED -#endif - #ifdef SUPPORT_ATTRIBUTE_MALLOC # define XINE_MALLOC __attribute__((__malloc__)) #else # define XINE_MALLOC #endif +#ifdef SUPPORT_ATTRIBUTE_PACKED +# define XINE_PACKED __attribute__((__packed__)) +#else +# define XINE_PACKED +#endif + #endif /* ATTRIBUTE_H_ */ |