]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl: Assume strtoul exists.
authorBruno Haible <bruno@clisp.org>
Sun, 20 Jun 2021 01:43:54 +0000 (03:43 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2022 07:30:42 +0000 (09:30 +0200)
* gettext-runtime/intl/plural-exp.c (EXTRACT_PLURAL_EXPRESSION): Assume
HAVE_STRTOUL to be 1.
* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't test for strtoul.

gettext-runtime/intl/plural-exp.c
gettext-runtime/m4/intl.m4

index 4cf10e66045b0282e565a40ed79ad9a76fea0453..00183dca46de89b435fa6f595e134b75ba5a2d88 100644 (file)
@@ -1,5 +1,5 @@
 /* Expression parsing for plural form selection.
-   Copyright (C) 2000-2016 Free Software Foundation, Inc.
+   Copyright (C) 2000-2016, 2021 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
 
    This program is free software: you can redistribute it and/or modify
@@ -118,12 +118,7 @@ EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
            ++nplurals;
          if (!(*nplurals >= '0' && *nplurals <= '9'))
            goto no_plural;
-#if defined HAVE_STRTOUL || defined _LIBC
          n = strtoul (nplurals, &endp, 10);
-#else
-         for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
-           n = n * 10 + (*endp - '0');
-#endif
          if (nplurals == endp)
            goto no_plural;
          *npluralsp = n;
index dfe68638b32c8b4b950025fd1f4b94b0251ff124..f258fec43d3c87236b1b16453220d8a625753d5b 100644 (file)
@@ -1,4 +1,4 @@
-# intl.m4 serial 50 (gettext-0.21.1)
+# intl.m4 serial 51 (gettext-0.21.1)
 dnl Copyright (C) 1995-2014, 2016-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -242,7 +242,7 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE],
 
   AC_CHECK_HEADERS([inttypes.h unistd.h sys/param.h])
   AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
-    stpcpy strcasecmp strtoul tsearch __fsetlocking])
+    stpcpy strcasecmp tsearch __fsetlocking])
 
   dnl Use the *_unlocked functions only if they are declared.
   dnl (because some of them were defined without being declared in Solaris