From 47c1651eb8c42ab6dddaff7c0663c45ac49b4fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 7 May 2008 14:55:50 +0200 Subject: Define support for attributes based on compiler's version outside xine build. When we're including xine/attributes.h but we're not building xine, define the support for particular attributes based on the compiler and its version. This way semantic information is maintained outside xine's build (such as deprecated functions). --- src/xine-utils/attributes.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/xine-utils/attributes.h b/src/xine-utils/attributes.h index 3d6e66359..cb861303d 100644 --- a/src/xine-utils/attributes.h +++ b/src/xine-utils/attributes.h @@ -46,6 +46,23 @@ #ifdef XINE_COMPILE # include "configure.h" +#else +# 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_PACKED 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 */ -- cgit v1.2.3