1 --- strtoimax.c.orig 2003-05-20 15:23:25.000000000 -0700
2 +++ strtoimax.c 2005-02-23 13:20:23.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/stdlib/strtoimax.c,v 1.9 2003/01/01 18:48:43 schweikh Exp $");
7 +#include "xlocale_private.h"
13 * alphabets and digits are each contiguous.
16 -strtoimax(const char * __restrict nptr, char ** __restrict endptr, int base)
17 +strtoimax_l(const char * __restrict nptr, char ** __restrict endptr, int base,
26 + NORMALIZE_LOCALE(loc);
28 * Skip white space and pick up leading +/- sign if any.
29 * If base is 0, allow 0x for hex and 0 for octal, else
34 - } while (isspace((unsigned char)c));
35 + } while (isspace_l((unsigned char)c, loc));
40 *endptr = (char *)(any ? s - 1 : nptr);
45 +strtoimax(const char * __restrict nptr, char ** __restrict endptr, int base)
47 + return strtoimax_l(nptr, endptr, base, __current_locale());