From: Bruno Haible Date: Sat, 13 Apr 2019 13:09:17 +0000 (+0200) Subject: cldr-plurals: Fix a test failure on IRIX 6.5. X-Git-Tag: v0.20~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7af391ac0ea0c52b3b0ee6bc7fb1cfc02f8a9c03;p=thirdparty%2Fgettext.git cldr-plurals: Fix a test failure on IRIX 6.5. * gettext-tools/src/cldr-plural-exp.c (cldr_plural_rule_list_print): Don't assume that fprintf supports %zu. --- diff --git a/gettext-tools/src/cldr-plural-exp.c b/gettext-tools/src/cldr-plural-exp.c index 460d05404..69f999789 100644 --- a/gettext-tools/src/cldr-plural-exp.c +++ b/gettext-tools/src/cldr-plural-exp.c @@ -1,5 +1,5 @@ /* Unicode CLDR plural rule parser and converter - Copyright (C) 2015, 2018 Free Software Foundation, Inc. + Copyright (C) 2015, 2018-2019 Free Software Foundation, Inc. This file was written by Daiki Ueno , 2015. @@ -668,7 +668,7 @@ cldr_plural_rule_list_print (struct cldr_plural_rule_list_ty *rules, FILE *fp) } /* If there are more printable rules, build a ternary operator. */ - fprintf (fp, "nplurals=%zu; plural=(", nplurals); + fprintf (fp, "nplurals=%lu; plural=(", (unsigned long) nplurals); for (i = 0, count = 0; i < rules->nitems; i++) { struct cldr_plural_rule_ty *rule = rules->items[i]; @@ -686,10 +686,11 @@ cldr_plural_rule_list_print (struct cldr_plural_rule_list_ty *rules, FILE *fp) printable_left = true; if (i < rules->nitems - 1 && printable_left) - fprintf (fp, " ? %zu : ", count++); + fprintf (fp, " ? %lu : ", (unsigned long) count++); } } if (rules->nitems > 1) - fprintf (fp, " ? %zu : %zu", count, count + 1); + fprintf (fp, " ? %lu : %lu", + (unsigned long) count, (unsigned long) (count + 1)); fprintf (fp, ");\n"); }