summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-11 00:00:52 +0800
committerKristian Høgsberg <krh@bitplanet.net>2010-01-11 10:04:37 -0500
commit108c2bf5ab9228843d21c188d8819a54b1201d07 (patch)
tree480ee18229fb6b9a966a32578227538494e0fd61 /src
parent5ec99c04a99fc67ae460d0cccbe1cbf5c2aaab1b (diff)
gallium: Add PUBLIC macro for function visibility.
As the default build has -fvisibility=hidden, add a macro to control the visibility. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/include/pipe/p_compiler.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 8c56f21efc..26a940593f 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -101,6 +101,17 @@ typedef unsigned char boolean;
# endif
#endif
+
+/* Function visibility */
+#ifndef PUBLIC
+# if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+# define PUBLIC __attribute__((visibility("default")))
+# else
+# define PUBLIC
+# endif
+#endif
+
+
/* The __FUNCTION__ gcc variable is generally only used for debugging.
* If we're not using gcc, define __FUNCTION__ as a cpp symbol here.
*/