1 --- strtoull.c.bsdnew 2009-11-13 14:11:52.000000000 -0800
2 +++ strtoull.c 2009-11-13 14:11:52.000000000 -0800
3 @@ -33,6 +33,8 @@ static char sccsid[] = "@(#)strtouq.c 8.
5 __FBSDID("$FreeBSD: src/lib/libc/stdlib/strtoull.c,v 1.21 2007/01/09 00:28:10 imp Exp $");
7 +#include "xlocale_private.h"
12 @@ -45,7 +47,8 @@ __FBSDID("$FreeBSD: src/lib/libc/stdlib/
13 * alphabets and digits are each contiguous.
16 -strtoull(const char * __restrict nptr, char ** __restrict endptr, int base)
17 +strtoull_l(const char * __restrict nptr, char ** __restrict endptr, int base,
21 unsigned long long acc;
22 @@ -53,13 +56,14 @@ strtoull(const char * __restrict nptr, c
23 unsigned long long cutoff;
26 + NORMALIZE_LOCALE(loc);
28 * See strtoq for comments as to the logic used.
33 - } while (isspace((unsigned char)c));
34 + } while (isspace_l((unsigned char)c, loc));
38 @@ -116,3 +120,9 @@ noconv:
39 *endptr = (char *)(any ? s - 1 : nptr);
44 +strtoull(const char * __restrict nptr, char ** __restrict endptr, int base)
46 + return strtoull_l(nptr, endptr, base, __current_locale());