Loading...
--- Libc/Libc-498/stdio/FreeBSD/fputwc.c.patch
+++ Libc/Libc-763.11/stdio/FreeBSD/fputwc.c.patch
@@ -1,15 +1,15 @@
---- fputwc.c.orig 2004-11-25 11:38:34.000000000 -0800
-+++ fputwc.c 2005-02-23 17:21:10.000000000 -0800
+--- fputwc.c.orig 2009-11-11 13:33:08.000000000 -0800
++++ fputwc.c 2009-11-13 11:45:45.000000000 -0800
@@ -27,6 +27,8 @@
#include <sys/cdefs.h>
- __FBSDID("$FreeBSD: src/lib/libc/stdio/fputwc.c,v 1.10 2004/07/20 08:27:27 tjr Exp $");
+ __FBSDID("$FreeBSD: src/lib/libc/stdio/fputwc.c,v 1.11 2008/04/17 22:17:53 jhb Exp $");
+#include "xlocale_private.h"
+
#include "namespace.h"
#include <errno.h>
#include <limits.h>
-@@ -41,13 +43,14 @@
+@@ -41,13 +43,14 @@ __FBSDID("$FreeBSD: src/lib/libc/stdio/f
/*
* Non-MT-safe version.
*/
@@ -27,16 +27,16 @@
/*
* Assume single-byte locale with no special encoding.
* A more careful test would be to check
-@@ -56,7 +59,7 @@
+@@ -56,7 +59,7 @@ __fputwc(wchar_t wc, FILE *fp)
*buf = (unsigned char)wc;
len = 1;
} else {
-- if ((len = __wcrtomb(buf, wc, &fp->_extra->mbstate)) ==
-+ if ((len = xrl->__wcrtomb(buf, wc, &fp->_extra->mbstate, loc)) ==
- (size_t)-1) {
+- if ((len = __wcrtomb(buf, wc, &fp->_mbstate)) == (size_t)-1) {
++ if ((len = loc->__lc_ctype->__wcrtomb(buf, wc, &fp->_mbstate, loc)) == (size_t)-1) {
fp->_flags |= __SERR;
return (WEOF);
-@@ -80,7 +83,21 @@
+ }
+@@ -79,7 +82,21 @@ fputwc(wchar_t wc, FILE *fp)
FLOCKFILE(fp);
ORIENT(fp, 1);