]> git.saurik.com Git - apple/libc.git/blame - locale/FreeBSD/mbsinit.c.patch
Libc-391.2.10.tar.gz
[apple/libc.git] / locale / FreeBSD / mbsinit.c.patch
CommitLineData
3d9156a7
A
1--- mbsinit.c.orig Thu Nov 25 11:38:18 2004
2+++ mbsinit.c Fri Feb 18 16:12:33 2005
3@@ -27,12 +27,21 @@
4 #include <sys/cdefs.h>
5 __FBSDID("$FreeBSD: src/lib/libc/locale/mbsinit.c,v 1.3 2004/05/12 14:09:04 tjr Exp $");
6
7+#include "xlocale_private.h"
8+
9 #include <wchar.h>
10 #include "mblocal.h"
11
12 int
13-mbsinit(const mbstate_t *ps)
14+mbsinit_l(const mbstate_t *ps, locale_t loc)
15 {
16
17- return (__mbsinit(ps));
18+ NORMALIZE_LOCALE(loc);
19+ return (loc->__lc_ctype->__mbsinit(ps, loc));
20+}
21+
22+int
23+mbsinit(const mbstate_t *ps)
24+{
25+ return mbsinit_l(ps, __current_locale());
26 }