summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-07 14:55:50 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-07 14:55:50 +0200
commit47c1651eb8c42ab6dddaff7c0663c45ac49b4fcf (patch)
treeb2de0106dabc1c4077ea39dc04e22fddbe74b5ee
parentde4e5cbc53859edf5a2e75331988e9e39d1253d9 (diff)
downloadxine-lib-47c1651eb8c42ab6dddaff7c0663c45ac49b4fcf.tar.gz
xine-lib-47c1651eb8c42ab6dddaff7c0663c45ac49b4fcf.tar.bz2
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).
-rw-r--r--src/xine-utils/attributes.h17
1 files changed, 17 insertions, 0 deletions
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 */