diff --git a/src/hb-private.hh b/src/hb-private.hh index 59d732afc3015f1c474ae7df27014e3022417619..cfd816ba598d59785aa8074c0f20b50e2b54d082 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -120,7 +120,9 @@ extern "C" void hb_free_impl(void *ptr); #endif #ifndef HB_INTERNAL -# if !defined(__MINGW32__) && !defined(__CYGWIN__) +# ifdef __SUNPRO_CC +# define HB_INTERNAL __hidden +# elif !defined(__MINGW32__) && !defined(__CYGWIN__) # define HB_INTERNAL __attribute__((__visibility__("hidden"))) # else # define HB_INTERNAL @@ -136,6 +138,11 @@ extern "C" void hb_free_impl(void *ptr); #define HB_FUNC __func__ #endif +#ifdef __SUNPRO_CC +/* https://github.com/harfbuzz/harfbuzz/issues/630 */ +#define __restrict +#endif + /* * Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411 * HB_FALLTHROUGH is an annotation to suppress compiler warnings about switch