summaryrefslogtreecommitdiff
path: root/va/sysdeps.h
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-08-06 18:16:58 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-09-26 11:53:58 +0200
commitf4a27f24ec5df32f28c3279e445200dded327585 (patch)
tree1192701889a0c066dd12068ffe496bce1b1fdc7e /va/sysdeps.h
parentbbc66c8772ee6000f9a2421922259ff39b71a272 (diff)
downloadlibva-f4a27f24ec5df32f28c3279e445200dded327585.tar.gz
configure: check for visibility attribute.
Add a check for GCC "visibility" attribute. Also define DLL_HIDDEN helper so that to declare functions as internal to a particular shared library. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'va/sysdeps.h')
-rw-r--r--va/sysdeps.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/va/sysdeps.h b/va/sysdeps.h
index 0752b17..d864721 100644
--- a/va/sysdeps.h
+++ b/va/sysdeps.h
@@ -41,4 +41,12 @@
# define False 0
#endif
+#if defined __GNUC__ && defined HAVE_GNUC_VISIBILITY_ATTRIBUTE
+# define DLL_HIDDEN __attribute__((visibility("hidden")))
+# define DLL_EXPORT __attribute__((visibility("default")))
+#else
+# define DLL_HIDDEN
+# define DLL_EXPORT
+#endif
+
#endif /* SYSDEPS_H */