Go to the documentation of this file.
30# if defined(HAVE_CONFIG_H) && !defined(__XINE_LIB_CONFIG_H__)
31# error config.h not included in source file !
34# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95 )
35# define SUPPORT_ATTRIBUTE_PACKED 1
38# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3 )
39# define SUPPORT_ATTRIBUTE_DEPRECATED 1
40# define SUPPORT_ATTRIBUTE_FORMAT 1
41# define SUPPORT_ATTRIBUTE_FORMAT_ARG 1
42# define SUPPORT_ATTRIBUTE_MALLOC 1
43# define SUPPORT_ATTRIBUTE_UNUSED 1
44# define SUPPORT_ATTRIBUTE_CONST 1
45# define SUPPORT_ATTRIBUTE_WARN_UNUSED_RESULT 1
49# define SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT 1
50# if defined(__ELF__) && __ELF__
51# define SUPPORT_ATTRIBUTE_VISIBILITY_PROTECTED 1
53# define SUPPORT_ATTRIBUTE_SENTINEL 1
57#if defined(SUPPORT_ATTRIBUTE_WARN_UNUSED_RESULT)
58# define XINE_USED __attribute__((warn_unused_result))
63#ifdef ATTRIBUTE_ALIGNED_MAX
64#define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
66#define ATTR_ALIGN(align)
70#if defined(XINE_LIBRARY_COMPILE) && defined(SUPPORT_ATTRIBUTE_VISIBILITY_PROTECTED)
71# define XINE_PROTECTED __attribute__((__visibility__("protected")))
72#elif defined(XINE_LIBRARY_COMPILE) && defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT)
73# define XINE_PROTECTED __attribute__((__visibility__("default")))
75# define XINE_PROTECTED
78#ifdef SUPPORT_ATTRIBUTE_SENTINEL
79# define XINE_SENTINEL __attribute__((__sentinel__))
84#if defined(SUPPORT_ATTRIBUTE_DEPRECATED) && (!defined(XINE_COMPILE) || defined(DEBUG))
85# define XINE_DEPRECATED __attribute__((__deprecated__))
87# define XINE_DEPRECATED
90#if defined(SUPPORT_ATTRIBUTE_DEPRECATED) && (!defined(XINE_LIBRARY_COMPILE)) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5 ))
91# define XINE_PRIVATE_FIELD __attribute__((__deprecated__("this is xine-engine private field")))
92#elif defined(SUPPORT_ATTRIBUTE_DEPRECATED) && (!defined(XINE_LIBRARY_COMPILE))
93# define XINE_PRIVATE_FIELD __attribute__((__deprecated__))
95# define XINE_PRIVATE_FIELD
98#ifdef SUPPORT_ATTRIBUTE_WEAK
99# define XINE_WEAK __attribute__((weak))
105# ifdef SUPPORT_ATTRIBUTE_UNUSED
106# define __attr_unused __attribute__((__unused__))
108# define __attr_unused
113#ifdef SUPPORT_ATTRIBUTE_FORMAT
114# if defined(__MINGW32__)
115# if defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO
116# ifndef __MINGW_PRINTF_FORMAT
117# define __MINGW_PRINTF_FORMAT gnu_printf
120# ifndef __MINGW_PRINTF_FORMAT
121# define __MINGW_PRINTF_FORMAT __printf__
123# define XINE_FORMAT_PRINTF(fmt,var) __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt, var)))
125# define XINE_FORMAT_PRINTF(fmt,var) __attribute__((__format__(__printf__, fmt, var)))
127# define XINE_FORMAT_SCANF(fmt,var) __attribute__((__format__(__scanf__, fmt, var)))
129# define XINE_FORMAT_PRINTF(fmt,var)
130# define XINE_FORMAT_SCANF(fmt,var)
132#ifdef SUPPORT_ATTRIBUTE_FORMAT_ARG
133# define XINE_FORMAT_PRINTF_ARG(fmt) __attribute__((__format_arg__(fmt)))
135# define XINE_FORMAT_PRINTF_ARG(fmt)
138#ifdef SUPPORT_ATTRIBUTE_MALLOC
139# define XINE_MALLOC __attribute__((__malloc__))
144#ifdef SUPPORT_ATTRIBUTE_PACKED
145# define XINE_PACKED __attribute__((__packed__))
150#ifdef SUPPORT_ATTRIBUTE_CONST
151# define XINE_CONST __attribute__((__const__))