From 8cef3a61995317d3a5724221108647d7e66fe24a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 9 Feb 2018 16:04:23 -0600 Subject: [PATCH] Try fixing build with Sun Studio Trying to fix: https://circleci.com/gh/harfbuzz/harfbuzz/6635 Also part of: https://github.com/harfbuzz/harfbuzz/issues/630 --- src/hb-private.hh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/hb-private.hh b/src/hb-private.hh index 59d732af..cfd816ba 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 -- GitLab