From: Chia-I Wu Date: Sun, 10 Jan 2010 16:00:52 +0000 (+0800) Subject: gallium: Add PUBLIC macro for function visibility. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=108c2bf5ab9228843d21c188d8819a54b1201d07;p=mesa.git 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 --- diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h index 8c56f21efc4..26a940593f0 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. */