diff options
Diffstat (limited to 'lib/compiler.h')
| -rw-r--r-- | lib/compiler.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compiler.h b/lib/compiler.h index c2e57db7f8..7509428220 100644 --- a/lib/compiler.h +++ b/lib/compiler.h @@ -50,6 +50,16 @@ extern "C" { #endif #endif +#if !defined(__GNUC__) +#error module code needs GCC visibility extensions +#elif __GNUC__ < 4 +#error module code needs GCC visibility extensions +#else +# define DSO_PUBLIC __attribute__ ((visibility ("default"))) +# define DSO_SELF __attribute__ ((visibility ("protected"))) +# define DSO_LOCAL __attribute__ ((visibility ("hidden"))) +#endif + #ifdef __sun /* Solaris doesn't do constructor priorities due to linker restrictions */ #undef _CONSTRUCTOR |
