]> git.saurik.com Git - apple/libc.git/blame - stdio/FreeBSD/putwchar.c.patch
Libc-391.tar.gz
[apple/libc.git] / stdio / FreeBSD / putwchar.c.patch
CommitLineData
3d9156a7
A
1--- putwchar.c.orig 2004-11-25 11:38:35.000000000 -0800
2+++ putwchar.c 2005-02-23 17:33:23.000000000 -0800
3@@ -27,6 +27,8 @@
4 #include <sys/cdefs.h>
5 __FBSDID("$FreeBSD: src/lib/libc/stdio/putwchar.c,v 1.3 2004/05/25 10:42:52 tjr Exp $");
6
7+#include "xlocale_private.h"
8+
9 #include "namespace.h"
10 #include <stdio.h>
11 #include <wchar.h>
12@@ -43,5 +45,13 @@
13 putwchar(wchar_t wc)
14 {
15
16- return (fputwc(wc, stdout));
17+ return (fputwc_l(wc, stdout, __current_locale()));
18+}
19+
20+wint_t
21+putwchar_l(wchar_t wc, locale_t loc)
22+{
23+
24+ /* no need to call NORMALIZE_LOCALE(loc) because fputwc_l will */
25+ return (fputwc_l(wc, stdout, loc));
26 }