summaryrefslogtreecommitdiffstats
path: root/gettext-tools
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2015-06-23 18:04:35 +0900
committerDaiki Ueno <ueno@gnu.org>2015-06-23 18:05:14 +0900
commit852900278cf379a4e79016fbf3036478edac2079 (patch)
treee5f4068b5d46c1a5344a654ee64a04999714f980 /gettext-tools
parente70e107c7745f14187db0411f2d6285ce8017673 (diff)
downloadexternal_gettext-852900278cf379a4e79016fbf3036478edac2079.zip
external_gettext-852900278cf379a4e79016fbf3036478edac2079.tar.gz
external_gettext-852900278cf379a4e79016fbf3036478edac2079.tar.bz2
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>.
Diffstat (limited to 'gettext-tools')
-rw-r--r--gettext-tools/src/ChangeLog6
-rw-r--r--gettext-tools/src/cldr-plurals.c5
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 <ueno@gnu.org>
+ * 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 <ueno@gnu.org>
+
* Makefile.am (uninstall-local): Remove cldr-plurals.
2015-06-23 Daiki Ueno <ueno@gnu.org>
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;