]> git.saurik.com Git - apple/libc.git/blob - stdlib/FreeBSD/strtouq.c.patch
Libc-763.11.tar.gz
[apple/libc.git] / stdlib / FreeBSD / strtouq.c.patch
1 --- strtouq.c.bsdnew 2009-11-13 14:11:52.000000000 -0800
2 +++ strtouq.c 2009-11-13 14:11:52.000000000 -0800
3 @@ -33,6 +33,8 @@ static char sccsid[] = "@(#)strtouq.c 8.
4 #include <sys/cdefs.h>
5 __FBSDID("$FreeBSD: src/lib/libc/stdlib/strtouq.c,v 1.12 2007/01/09 00:28:10 imp Exp $");
6
7 +#include "xlocale_private.h"
8 +
9 #include <sys/types.h>
10
11 #include <stdlib.h>
12 @@ -44,5 +46,13 @@ u_quad_t
13 strtouq(const char *nptr, char **endptr, int base)
14 {
15
16 - return strtoull(nptr, endptr, base);
17 + return strtoull_l(nptr, endptr, base, __current_locale());
18 +}
19 +
20 +u_quad_t
21 +strtouq_l(const char *nptr, char **endptr, int base, locale_t loc)
22 +{
23 +
24 + /* no need to call NORMALIZE_LOCALE(loc) because strtoull_l will */
25 + return strtoull_l(nptr, endptr, base, loc);
26 }