# HG changeset patch # User mbaesken # Date 1513343295 -3600 # Node ID 865d39b662a5c2188b226be6e33a2d980620e7a3 # Parent f9152f462cbc34769eb0629b5a69f5c3be7d858f 8193515: AIX: new Harfbuzz 1.7.1 version fails to compile with xlC Reviewed-by: prr, simonis diff -r f9152f462cbc -r 865d39b662a5 src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh --- a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh Tue Dec 19 10:03:36 2017 +0000 +++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh Fri Dec 15 14:08:15 2017 +0100 @@ -77,7 +77,13 @@ /* Bubble-sort or something equally good! * May not be good-enough for presidential candidate interviews, but good-enough for us... */ + +#if defined(_AIX) + /* Workaround AIX xlC 12 compilation problems caused by the overloaded versions of 'cmp' in IntType */ + hb_stable_sort (&glyphs[0], num_glyphs, (int(*)(const OT::GlyphID*, const OT::GlyphID *)) OT::GlyphID::cmp, &substitutes[0]); +#else hb_stable_sort (&glyphs[0], num_glyphs, OT::GlyphID::cmp, &substitutes[0]); +#endif OT::Supplier glyphs_supplier (glyphs, num_glyphs); OT::Supplier substitutes_supplier (substitutes, num_glyphs); @@ -126,7 +132,13 @@ first_glyphs_indirection[num_first_glyphs] = first_glyph_idx; num_first_glyphs++; } + +#if defined(_AIX) + /* Workaround AIX xlC 12 compilation problems caused by the overloaded versions of 'cmp' in IntType */ + hb_stable_sort (&first_glyphs[0], num_first_glyphs, (int(*)(const OT::GlyphID *, const OT::GlyphID *)) OT::GlyphID::cmp, &first_glyphs_indirection[0]); +#else hb_stable_sort (&first_glyphs[0], num_first_glyphs, OT::GlyphID::cmp, &first_glyphs_indirection[0]); +#endif /* Now that the first-glyphs are sorted, walk again, populate ligatures. */ for (unsigned int i = 0; i < num_first_glyphs; i++)