changeset 53480:390566f1850a tip

8228466: Fix build on AIX and with Solaris Studio 12u4 in 12u after HarfBuzz 2.3.1 upgrade Reviewed-by: mbaesken
author clanger
date Thu, 25 Jul 2019 14:10:23 +0100
parents c45c2cbfb841
children
files make/lib/Awt2dLibraries.gmk src/java.desktop/share/native/libfontmanager/harfbuzz/hb-null.hh src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff-common.hh
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/lib/Awt2dLibraries.gmk	Wed Jul 17 14:58:26 2019 +0000
+++ b/make/lib/Awt2dLibraries.gmk	Thu Jul 25 14:10:23 2019 +0100
@@ -624,7 +624,7 @@
         E_ENUM_VAL_OVERFLOWS_INT_MAX, \
     DISABLED_WARNINGS_CXX_solstudio := \
         truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \
-        hidevf w_novirtualdescr arrowrtn2 refmemnoconstr_aggr unknownpragma, \
+        hidevf w_novirtualdescr arrowrtn2 unknownpragma, \
     DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101 4068 4805 4138, \
     LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
         $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
--- a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-null.hh	Wed Jul 17 14:58:26 2019 +0000
+++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-null.hh	Thu Jul 25 14:10:23 2019 +0100
@@ -83,7 +83,9 @@
 
 template <typename T, typename V, typename B>
 struct _hb_assign
-{ static inline void value (T &o, const V v) { o = v; } };
+// add cast to please AIX xlc12.1
+//{ static inline void value (T &o, const V v) { o = v; } };
+{ static inline void value (T &o, const V v) { o = (T&) v; } };
 template <typename T, typename V>
 struct _hb_assign<T, V, _hb_bool_type<(bool) (1 + (unsigned int) T::min_size)> >
 { static inline void value (T &o, const V v) { o.set (v); } };
--- a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff-common.hh	Wed Jul 17 14:58:26 2019 +0000
+++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-subset-cff-common.hh	Thu Jul 25 14:10:23 2019 +0100
@@ -280,6 +280,10 @@
 {
   str_buff_t     &flatStr;
   bool  drop_hints;
+
+  // Solaris: OS12u4 complains about "A class with a reference member lacks a user-defined constructor"
+  // so provide the constructor
+  flatten_param_t(str_buff_t& sbt, bool dh) : flatStr(sbt), drop_hints(dh) {}
 };
 
 template <typename ACC, typename ENV, typename OPSET>
@@ -305,7 +309,9 @@
         return false;
       cs_interpreter_t<ENV, OPSET, flatten_param_t> interp;
       interp.env.init (str, acc, fd);
-      flatten_param_t  param = { flat_charstrings[i], drop_hints };
+      // Solaris: OS12u4 does not like the C++11 style init
+      // flatten_param_t  param = { flat_charstrings[i], drop_hints };
+      flatten_param_t  param(flat_charstrings[i], drop_hints);
       if (unlikely (!interp.interpret (param)))
         return false;
     }