Skip to content

Commit f711280

Browse files
committed
8193515: AIX: new Harfbuzz 1.7.1 version fails to compile with xlC
Reviewed-by: prr, simonis
1 parent 7b054f3 commit f711280

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS
7777

7878
/* Bubble-sort or something equally good!
7979
* May not be good-enough for presidential candidate interviews, but good-enough for us... */
80+
81+
#if defined(_AIX)
82+
/* Workaround AIX xlC 12 compilation problems caused by the overloaded versions of 'cmp' in IntType */
83+
hb_stable_sort (&glyphs[0], num_glyphs, (int(*)(const OT::GlyphID*, const OT::GlyphID *)) OT::GlyphID::cmp, &substitutes[0]);
84+
#else
8085
hb_stable_sort (&glyphs[0], num_glyphs, OT::GlyphID::cmp, &substitutes[0]);
86+
#endif
8187

8288
OT::Supplier<OT::GlyphID> glyphs_supplier (glyphs, num_glyphs);
8389
OT::Supplier<OT::GlyphID> substitutes_supplier (substitutes, num_glyphs);
@@ -126,7 +132,13 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN
126132
first_glyphs_indirection[num_first_glyphs] = first_glyph_idx;
127133
num_first_glyphs++;
128134
}
135+
136+
#if defined(_AIX)
137+
/* Workaround AIX xlC 12 compilation problems caused by the overloaded versions of 'cmp' in IntType */
138+
hb_stable_sort (&first_glyphs[0], num_first_glyphs, (int(*)(const OT::GlyphID *, const OT::GlyphID *)) OT::GlyphID::cmp, &first_glyphs_indirection[0]);
139+
#else
129140
hb_stable_sort (&first_glyphs[0], num_first_glyphs, OT::GlyphID::cmp, &first_glyphs_indirection[0]);
141+
#endif
130142

131143
/* Now that the first-glyphs are sorted, walk again, populate ligatures. */
132144
for (unsigned int i = 0; i < num_first_glyphs; i++)

0 commit comments

Comments
 (0)