diff options
Diffstat (limited to 'include/ruby/defines.h')
-rw-r--r-- | include/ruby/defines.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/ruby/defines.h b/include/ruby/defines.h index c741b0ec28..99305b2c4b 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -88,10 +88,13 @@ extern "C" { #define ANYARGS #endif -#if defined __GNUC__ && __GNUC__ >= 4 -#pragma GCC visibility push(default) +#ifndef RUBY_SYMBOL_EXPORT_BEGIN +# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */ +# define RUBY_SYMBOL_EXPORT_END /* end */ #endif +RUBY_SYMBOL_EXPORT_BEGIN + #define xmalloc ruby_xmalloc #define xmalloc2 ruby_xmalloc2 #define xcalloc ruby_xcalloc @@ -281,9 +284,7 @@ void rb_ia64_flushrs(void); RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args) #endif -#if defined __GNUC__ && __GNUC__ >= 4 -#pragma GCC visibility pop -#endif +RUBY_SYMBOL_EXPORT_END #if defined(__cplusplus) #if 0 |