8204509: Fix compilation error in harfbuzz 1.7.6 for Solaris Developer Studio 12.6
Reviewed-by: serb
--- a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-face.cc Sat Jun 09 13:33:35 2018 -0700
+++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-face.cc Sun Jun 10 18:04:43 2018 -0700
@@ -117,9 +117,6 @@
return closure;
}
-#ifdef __SUNPRO_CC
-extern "C" {
-#endif
static void
_hb_face_for_data_closure_destroy (void *data)
{
@@ -128,9 +125,6 @@
hb_blob_destroy (closure->blob);
free (closure);
}
-#ifdef __SUNPRO_CC
-}
-#endif
static hb_blob_t *
_hb_face_for_data_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
@@ -496,7 +490,7 @@
unsigned int *table_count, /* IN/OUT */
hb_tag_t *table_tags /* OUT */)
{
- if (face->destroy != _hb_face_for_data_closure_destroy)
+ if (face->destroy != (hb_destroy_func_t) _hb_face_for_data_closure_destroy)
{
if (table_count)
*table_count = 0;
--- a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-private.hh Sat Jun 09 13:33:35 2018 -0700
+++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-private.hh Sun Jun 10 18:04:43 2018 -0700
@@ -139,7 +139,7 @@
#define HB_FUNC __func__
#endif
-#ifdef __SUNPRO_CC
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)
/* https://github.com/harfbuzz/harfbuzz/issues/630 */
#define __restrict
#endif