diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index ef49ea9127bb6e636d79f9e34eccd578930d3453..e5bea3379968b978f97d0ebee3f295a360b41b66 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -134,7 +134,13 @@ static inline Type& StructAfter(TObject &X) #define HB_NULL_POOL_SIZE 264 static_assert (HB_NULL_POOL_SIZE % sizeof (void *) == 0, "Align HB_NULL_POOL_SIZE."); -extern HB_INTERNAL const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)]; + +#ifdef HB_NO_VISIBILITY +static +#else +extern HB_INTERNAL +#endif +const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)]; /* Generic nul-content Null objects. */ template diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 8ad36d225e5beda0aae8f8af1c7edccbb46da3f0..4cf6c722c7ecff059b3eb228a4dbb0ba02dc3230 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -40,7 +40,9 @@ #include "hb-ot-map-private.hh" +#ifndef HB_NO_VISIBILITY const void * const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {}; +#endif hb_ot_layout_t * diff --git a/src/hb-private.hh b/src/hb-private.hh index 4a8d950d7f805c929a69938aa67a7e4be1710405..a516624a80da8e8f2710aefc3a53c13aef5bfe5f 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -120,9 +120,7 @@ extern "C" void hb_free_impl(void *ptr); #endif #ifndef HB_INTERNAL -# ifdef __SUNPRO_CC -# define HB_INTERNAL __hidden -# elif !defined(__MINGW32__) && !defined(__CYGWIN__) +# if !defined(HB_NO_VISIBILITY) && !defined(__MINGW32__) && !defined(__CYGWIN__) # define HB_INTERNAL __attribute__((__visibility__("hidden"))) # else # define HB_INTERNAL