summaryrefslogtreecommitdiff
path: root/gettext-runtime
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-06-20 03:43:54 +0200
committerBruno Haible <bruno@clisp.org>2022-10-09 09:30:42 +0200
commitab5990532570cb66c5a507b499a38a555751d5ab (patch)
treea8c82f00dced3d11f111869100317dbc2ed904b7 /gettext-runtime
parenta7df39a15b806b8a085879f61f28fcc998321b49 (diff)
downloadgettext-ab5990532570cb66c5a507b499a38a555751d5ab.tar.gz
intl: Assume strtoul exists.
* 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.
Diffstat (limited to 'gettext-runtime')
-rw-r--r--gettext-runtime/intl/plural-exp.c7
-rw-r--r--gettext-runtime/m4/intl.m44
2 files changed, 3 insertions, 8 deletions
diff --git a/gettext-runtime/intl/plural-exp.c b/gettext-runtime/intl/plural-exp.c
index 4cf10e660..00183dca4 100644
--- a/gettext-runtime/intl/plural-exp.c
+++ b/gettext-runtime/intl/plural-exp.c
@@ -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;
diff --git a/gettext-runtime/m4/intl.m4 b/gettext-runtime/m4/intl.m4
index dfe68638b..f258fec43 100644
--- a/gettext-runtime/m4/intl.m4
+++ b/gettext-runtime/m4/intl.m4
@@ -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