Go to the documentation of this file.
32 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95 )
33 # define SUPPORT_ATTRIBUTE_PACKED 1
36 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3 )
37 # define SUPPORT_ATTRIBUTE_DEPRECATED 1
38 # define SUPPORT_ATTRIBUTE_FORMAT 1
39 # define SUPPORT_ATTRIBUTE_FORMAT_ARG 1
40 # define SUPPORT_ATTRIBUTE_MALLOC 1
41 # define SUPPORT_ATTRIBUTE_UNUSED 1
42 # define SUPPORT_ATTRIBUTE_CONST 1
43 # define SUPPORT_ATTRIBUTE_WARN_UNUSED_RESULT 1
47 # define SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT 1
48 # if defined(__ELF__) && __ELF__
49 # define SUPPORT_ATTRIBUTE_VISIBILITY_PROTECTED 1
51 # define SUPPORT_ATTRIBUTE_SENTINEL 1
55 #if defined(SUPPORT_ATTRIBUTE_WARN_UNUSED_RESULT)
56 # define XINE_USED __attribute__((warn_unused_result))
61 #ifdef ATTRIBUTE_ALIGNED_MAX
62 #define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
64 #define ATTR_ALIGN(align)
68 #if defined(XINE_LIBRARY_COMPILE) && defined(SUPPORT_ATTRIBUTE_VISIBILITY_PROTECTED)
69 # define XINE_PROTECTED __attribute__((__visibility__("protected")))
70 #elif defined(XINE_LIBRARY_COMPILE) && defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT)
71 # define XINE_PROTECTED __attribute__((__visibility__("default")))
73 # define XINE_PROTECTED
76 #ifdef SUPPORT_ATTRIBUTE_SENTINEL
77 # define XINE_SENTINEL __attribute__((__sentinel__))
79 # define XINE_SENTINEL
82 #if defined(SUPPORT_ATTRIBUTE_DEPRECATED) && (!defined(XINE_COMPILE) || defined(DEBUG))
83 # define XINE_DEPRECATED __attribute__((__deprecated__))
85 # define XINE_DEPRECATED
88 #if defined(SUPPORT_ATTRIBUTE_DEPRECATED) && (!defined(XINE_LIBRARY_COMPILE)) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5 ))
89 # define XINE_PRIVATE_FIELD __attribute__((__deprecated__("this is xine-engine private field")))
90 #elif defined(SUPPORT_ATTRIBUTE_DEPRECATED) && (!defined(XINE_LIBRARY_COMPILE))
91 # define XINE_PRIVATE_FIELD __attribute__((__deprecated__))
93 # define XINE_PRIVATE_FIELD
96 #ifdef SUPPORT_ATTRIBUTE_WEAK
97 # define XINE_WEAK __attribute__((weak))
102 #ifndef __attr_unused
103 # ifdef SUPPORT_ATTRIBUTE_UNUSED
104 # define __attr_unused __attribute__((__unused__))
106 # define __attr_unused
111 #ifdef SUPPORT_ATTRIBUTE_FORMAT
112 # if defined(__MINGW32__)
113 # if defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO
114 # ifndef __MINGW_PRINTF_FORMAT
115 # define __MINGW_PRINTF_FORMAT gnu_printf
118 # ifndef __MINGW_PRINTF_FORMAT
119 # define __MINGW_PRINTF_FORMAT __printf__
121 # define XINE_FORMAT_PRINTF(fmt,var) __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt, var)))
123 # define XINE_FORMAT_PRINTF(fmt,var) __attribute__((__format__(__printf__, fmt, var)))
125 # define XINE_FORMAT_SCANF(fmt,var) __attribute__((__format__(__scanf__, fmt, var)))
127 # define XINE_FORMAT_PRINTF(fmt,var)
128 # define XINE_FORMAT_SCANF(fmt,var)
130 #ifdef SUPPORT_ATTRIBUTE_FORMAT_ARG
131 # define XINE_FORMAT_PRINTF_ARG(fmt) __attribute__((__format_arg__(fmt)))
133 # define XINE_FORMAT_PRINTF_ARG(fmt)
136 #ifdef SUPPORT_ATTRIBUTE_MALLOC
137 # define XINE_MALLOC __attribute__((__malloc__))
142 #ifdef SUPPORT_ATTRIBUTE_PACKED
143 # define XINE_PACKED __attribute__((__packed__))
148 #ifdef SUPPORT_ATTRIBUTE_CONST
149 # define XINE_CONST __attribute__((__const__))