summaryrefslogtreecommitdiff
path: root/include/xine/attributes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/xine/attributes.h')
-rw-r--r--include/xine/attributes.h41
1 files changed, 37 insertions, 4 deletions
diff --git a/include/xine/attributes.h b/include/xine/attributes.h
index b25c76572..3819818d5 100644
--- a/include/xine/attributes.h
+++ b/include/xine/attributes.h
@@ -34,6 +34,27 @@
#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
+# define SUPPORT_ATTRIBUTE_CONST 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 */
@@ -51,6 +72,12 @@
# define XINE_SENTINEL
#endif
+#ifdef SUPPORT_ATTRIBUTE_DEPRECATED
+# define XINE_DEPRECATED __attribute__((__deprecated__))
+#else
+# define XINE_DEPRECATED
+#endif
+
#ifndef __attr_unused
# ifdef SUPPORT_ATTRIBUTE_UNUSED
# define __attr_unused __attribute__((__unused__))
@@ -71,16 +98,22 @@
# define XINE_FORMAT_PRINTF_ARG(fmt)
#endif
+#ifdef SUPPORT_ATTRIBUTE_MALLOC
+# define XINE_MALLOC __attribute__((__malloc__))
+#else
+# define XINE_MALLOC
+#endif
+
#ifdef SUPPORT_ATTRIBUTE_PACKED
-# define XINE_PACKED __attribute__((packed))
+# define XINE_PACKED __attribute__((__packed__))
#else
# define XINE_PACKED
#endif
-#ifdef SUPPORT_ATTRIBUTE_MALLOC
-# define XINE_MALLOC __attribute__((__malloc__))
+#ifdef SUPPORT_ATTRIBUTE_CONST
+# define XINE_CONST __attribute__((__const__))
#else
-# define XINE_MALLOC
+# define XINE_CONST
#endif
#endif /* ATTRIBUTE_H_ */