[HarfBuzz] Compile error (using harfbuzz-20120730.tar.bz2 on osx)

Jonathan Kew jfkthame at googlemail.com
Mon Jul 30 13:45:00 PDT 2012


On 30/7/12 21:25, Rolf Langenhuijzen wrote:
> I tried installing the latest version.
> ./configure runs without problems.
> when I do "make" it stops:
> -----------
>> CXX    libharfbuzz_la-hb-ot-layout.lo
> In file included from hb-ot-layout.cc:34:
> hb-ot-layout-gsub-table.hh: In member function ‘bool Ligature::apply(hb_apply_context_t*) const’:
> hb-ot-layout-gsub-table.hh:588: error: no matching function for call to ‘MAX(unsigned int, int)’
> hb-ot-layout-gsub-table.hh:607: error: no matching function for call to ‘MAX(unsigned int, int)’
> make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> (quits)
> -----------

The attached patch should fix this.

JK


-------------- next part --------------
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 4ad61a9..bdc7b38 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -585,7 +585,7 @@ struct Ligature
       {
 	if (!is_mark_ligature) {
 	  unsigned int new_lig_comp = components_so_far - last_num_components +
-				      MIN (MAX (get_lig_comp (c->buffer->cur()), 1), last_num_components);
+				      MIN (MAX (get_lig_comp (c->buffer->cur()), 1u), last_num_components);
 	  set_lig_props_for_mark (c->buffer->cur(), lig_id, new_lig_comp);
 	}
 	c->buffer->next_glyph ();
@@ -604,7 +604,7 @@ struct Ligature
       for (unsigned int i = c->buffer->idx; i < c->buffer->len; i++) {
 	if (last_lig_id == get_lig_id (c->buffer->info[i])) {
 	  unsigned int new_lig_comp = components_so_far - last_num_components +
-				      MIN (MAX (get_lig_comp (c->buffer->info[i]), 1), last_num_components);
+				      MIN (MAX (get_lig_comp (c->buffer->info[i]), 1u), last_num_components);
 	  set_lig_props_for_mark (c->buffer->info[i], lig_id, new_lig_comp);
 	} else
 	  break;


More information about the HarfBuzz mailing list