]> git.saurik.com Git - apple/libc.git/blame - stdlib/FreeBSD/strtouq.c.patch
Libc-391.tar.gz
[apple/libc.git] / stdlib / FreeBSD / strtouq.c.patch
CommitLineData
3d9156a7
A
1--- strtouq.c.orig 2003-05-20 15:23:25.000000000 -0700
2+++ strtouq.c 2005-02-23 18:29:05.000000000 -0800
3@@ -37,6 +37,8 @@
4 #include <sys/cdefs.h>
5 __FBSDID("$FreeBSD: src/lib/libc/stdlib/strtouq.c,v 1.11 2002/08/15 09:25:04 robert Exp $");
6
7+#include "xlocale_private.h"
8+
9 #include <sys/types.h>
10
11 #include <stdlib.h>
12@@ -48,5 +50,13 @@
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 }