Hi Dagobert, Thanks for quick testing.
Dagobert Michelsen <[email protected]> writes: >> "cldr-plurals.c", line 405: warning: implicit function declaration: = > basename Oops, forgot an #include. >> "cldr-plurals.c", line 461: syntax error before or at: else >> "cldr-plurals.c", line 461: warning: old-style declaration or = > incorrect type for: rpl_optind I'm not able to check it on Solaris off hand, but does the attached patch work? Regards, -- Daiki Ueno
>From 852900278cf379a4e79016fbf3036478edac2079 Mon Sep 17 00:00:00 2001 From: Daiki Ueno <[email protected]> Date: Tue, 23 Jun 2015 18:04:35 +0900 Subject: [PATCH] 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: <https://lists.gnu.org/archive/html/bug-gettext/2015-06/msg00015.html>. --- gettext-tools/src/ChangeLog | 6 ++++++ gettext-tools/src/cldr-plurals.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 45d0464..70215e1 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,5 +1,11 @@ 2015-06-23 Daiki Ueno <[email protected]> + * 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 <[email protected]> + * Makefile.am (uninstall-local): Remove cldr-plurals. 2015-06-23 Daiki Ueno <[email protected]> diff --git a/gettext-tools/src/cldr-plurals.c b/gettext-tools/src/cldr-plurals.c index c4a655e..3bd3d54 100644 --- a/gettext-tools/src/cldr-plurals.c +++ b/gettext-tools/src/cldr-plurals.c @@ -20,6 +20,7 @@ # include <config.h> #endif +#include "basename.h" #include "cldr-plural-exp.h" #include "c-ctype.h" #include <errno.h> @@ -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; -- 2.4.2
