]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix build failure on Solaris
authorDaiki Ueno <ueno@gnu.org>
Tue, 23 Jun 2015 09:04:35 +0000 (18:04 +0900)
committerDaiki Ueno <ueno@gnu.org>
Tue, 23 Jun 2015 09:05:14 +0000 (18:05 +0900)
* 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
gettext-tools/src/cldr-plurals.c

index 45d04646ca971da8dc75d6f4ccee38b7a9f44c26..70215e1cefdbc873d62dd7fcba61f12aa629e9b1 100644 (file)
@@ -1,3 +1,9 @@
+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.
index c4a655e109f68d7ec1af4388cbc82db40b9ac681..3bd3d542fdd0bd441a02e31d9e0cc8606af242ff 100644 (file)
@@ -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;