]> git.saurik.com Git - apple/libc.git/blame - stdlib/FreeBSD/strtoq.c.patch
Libc-391.4.1.tar.gz
[apple/libc.git] / stdlib / FreeBSD / strtoq.c.patch
CommitLineData
3d9156a7
A
1--- strtoq.c.orig 2003-05-20 15:23:25.000000000 -0700
2+++ strtoq.c 2005-02-23 18:26:32.000000000 -0800
3@@ -37,6 +37,8 @@
4 #include <sys/cdefs.h>
5 __FBSDID("$FreeBSD: src/lib/libc/stdlib/strtoq.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 strtoq(const char *nptr, char **endptr, int base)
14 {
15
16- return strtoll(nptr, endptr, base);
17+ return strtoll_l(nptr, endptr, base, __current_locale());
18+}
19+
20+quad_t
21+strtoq_l(const char *nptr, char **endptr, int base, locale_t loc)
22+{
23+
24+ /* no need to call NORMALIZE_LOCALE(loc) because strtoll_l will */
25+ return strtoll_l(nptr, endptr, base, loc);
26 }