From: Bruno Haible Date: Sun, 20 Jun 2021 01:43:54 +0000 (+0200) Subject: intl: Assume strtoul exists. X-Git-Tag: v0.21.1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab5990532570cb66c5a507b499a38a555751d5ab;p=thirdparty%2Fgettext.git 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. --- 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 , 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