This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
intl patches (8)
- To: libc-alpha at sources dot redhat dot com
- Subject: intl patches (8)
- From: Bruno Haible <haible at ilog dot fr>
- Date: Mon, 19 Mar 2001 20:03:52 +0100 (CET)
libintl.{a,so} must remain self-contained, even on platforms without 'strtoul'.
This patch has no effect inside glibc.
2001-01-05 Bruno Haible <haible@clisp.cons.org>
* intl/loadmsgcat.c (_nl_load_domain): Add fallback code for platforms
lacking strtoul, like SunOS4.
diff -r -c3 intl/loadmsgcat.c intl-98/loadmsgcat.c
*** intl/loadmsgcat.c Mon Jan 29 18:29:03 2001
--- intl/loadmsgcat.c Sat Mar 17 14:52:33 2001
***************
*** 381,392 ****
{
/* First get the number. */
char *endp;
struct parse_args args;
nplurals += 9;
while (*nplurals != '\0' && isspace (*nplurals))
++nplurals;
! domain->nplurals = strtoul (nplurals, &endp, 10);
if (nplurals == endp)
goto no_plural;
--- 443,461 ----
{
/* First get the number. */
char *endp;
+ unsigned long int n;
struct parse_args args;
nplurals += 9;
while (*nplurals != '\0' && isspace (*nplurals))
++nplurals;
! #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
! domain->nplurals = n;
if (nplurals == endp)
goto no_plural;