From: Daiki Ueno Date: Tue, 23 Jun 2015 09:04:35 +0000 (+0900) Subject: build: Fix build failure on Solaris X-Git-Tag: v0.19.5~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=852900278cf379a4e79016fbf3036478edac2079;p=thirdparty%2Fgettext.git build: Fix build failure on Solaris * gettext-tools/src/cldr-plurals.c: Include "basename.h". (main): Place optind on the right hand side of the expression, to work around build failure on Solaris. Reported by Dagobert Michelsen in: . --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 45d04646c..70215e1ce 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2015-06-23 Daiki Ueno + + * cldr-plurals.c: Include "basename.h". + (main): Place optind on the right hand side of the expression, to + work around build failure on Solaris. + 2015-06-23 Daiki Ueno * Makefile.am (uninstall-local): Remove cldr-plurals. diff --git a/gettext-tools/src/cldr-plurals.c b/gettext-tools/src/cldr-plurals.c index c4a655e10..3bd3d542f 100644 --- a/gettext-tools/src/cldr-plurals.c +++ b/gettext-tools/src/cldr-plurals.c @@ -20,6 +20,7 @@ # include #endif +#include "basename.h" #include "cldr-plural-exp.h" #include "c-ctype.h" #include @@ -418,7 +419,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\ if (do_help) usage (EXIT_SUCCESS); - if (argc - optind == 2) + if (argc == optind + 2) { /* Two arguments: Read CLDR rules from a file. */ #if DYNLOAD_LIBEXPAT || HAVE_LIBEXPAT @@ -458,7 +459,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\ #endif } } - else if (argc - optind == 0) + else if (argc == optind) { /* No argument: Read CLDR rules from standard input. */ char *line = NULL;