]> git.saurik.com Git - apple/libc.git/blobdiff - stdio/FreeBSD/ungetwc.c.patch
Libc-763.11.tar.gz
[apple/libc.git] / stdio / FreeBSD / ungetwc.c.patch
index 4b01c938496318a92be03ce55e3d581a7246723f..e9e1c3d79f1c47d14996961160414104130f1e1c 100644 (file)
@@ -1,15 +1,15 @@
---- ungetwc.c.orig     2004-11-25 11:38:35.000000000 -0800
-+++ ungetwc.c  2005-02-23 17:38:14.000000000 -0800
+--- ungetwc.c.bsdnew   2009-11-11 13:33:18.000000000 -0800
++++ ungetwc.c  2009-11-11 16:30:36.000000000 -0800
 @@ -27,6 +27,8 @@
  #include <sys/cdefs.h>
- __FBSDID("$FreeBSD: src/lib/libc/stdio/ungetwc.c,v 1.9 2004/07/20 08:27:27 tjr Exp $");
+ __FBSDID("$FreeBSD: src/lib/libc/stdio/ungetwc.c,v 1.11 2008/04/17 22:17:54 jhb Exp $");
  
 +#include "xlocale_private.h"
 +
  #include "namespace.h"
  #include <errno.h>
- #include <stdio.h>
-@@ -41,14 +43,14 @@
+ #include <limits.h>
+@@ -42,14 +44,14 @@ __FBSDID("$FreeBSD: src/lib/libc/stdio/u
   * Non-MT-safe version.
   */
  wint_t
  
        if (wc == WEOF)
                return (WEOF);
--      if ((len = __wcrtomb(buf, wc, &fp->_extra->mbstate)) == (size_t)-1) {
-+      if ((len = loc->__lc_ctype->__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);
        }
-@@ -69,7 +71,21 @@
+@@ -70,7 +72,21 @@ ungetwc(wint_t wc, FILE *fp)
  
        FLOCKFILE(fp);
        ORIENT(fp, 1);