]> git.saurik.com Git - apple/libc.git/blobdiff - stdio/FreeBSD/putwc.c.patch
Libc-391.tar.gz
[apple/libc.git] / stdio / FreeBSD / putwc.c.patch
diff --git a/stdio/FreeBSD/putwc.c.patch b/stdio/FreeBSD/putwc.c.patch
new file mode 100644 (file)
index 0000000..b8cbdee
--- /dev/null
@@ -0,0 +1,26 @@
+--- putwc.c.orig       2004-11-25 11:38:35.000000000 -0800
++++ putwc.c    2005-02-23 17:32:05.000000000 -0800
+@@ -27,6 +27,8 @@
+ #include <sys/cdefs.h>
+ __FBSDID("$FreeBSD: src/lib/libc/stdio/putwc.c,v 1.3 2004/05/25 10:42:52 tjr Exp $");
++#include "xlocale_private.h"
++
+ #include "namespace.h"
+ #include <stdio.h>
+ #include <wchar.h>
+@@ -44,5 +46,13 @@
+ putwc(wchar_t wc, FILE *fp)
+ {
+-      return (fputwc(wc, fp));
++      return (fputwc_l(wc, fp, __current_locale()));
++}
++
++wint_t
++putwc_l(wchar_t wc, FILE *fp, locale_t loc)
++{
++
++      /* no need to call NORMALIZE_LOCALE(loc) because fputwc_l will */
++      return (fputwc_l(wc, fp, loc));
+ }