# HG changeset patch # User mbaesken # Date 1513343295 -3600 # Fri Dec 15 14:08:15 2017 +0100 # Node ID f877cdb2c0402d52d414ff03d1b80ccbbeb9f533 # Parent a8e39cc7b88fcbe08a171bd9aaee475e05f982a8 8193515: AIX : new Harfbuzz 1.7.1 version fails to compile diff --git a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh b/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 +++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh @@ -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 issues caused by the 2 cmp in the IntType template */ + 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 issues caused by the 2 cmp in the IntType template */ + 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++)