]> git.saurik.com Git - apple/libc.git/blobdiff - stdio/FreeBSD/findfp.c.patch
Libc-498.tar.gz
[apple/libc.git] / stdio / FreeBSD / findfp.c.patch
index b971a9c8455385ae6d402640be2e8ca6225ead0a..345353657f225c1db35d816312d015394766e180 100644 (file)
@@ -1,5 +1,5 @@
---- findfp.c.orig      Tue May 20 15:22:41 2003
-+++ findfp.c   Sun Jul 20 18:50:26 2003
+--- /Volumes/XDisk/tmp/Libc/stdio/FreeBSD/findfp.c.orig        2004-05-22 08:19:41.000000000 -0700
++++ /Volumes/XDisk/tmp/Libc/stdio/FreeBSD/findfp.c     2004-10-24 17:08:30.000000000 -0700
 @@ -47,6 +47,7 @@
  #include <stdlib.h>
  #include <string.h>
  
  /*
   * We can't make this 'static' until 6.0-current due to binary
-@@ -81,17 +83,6 @@
-       std(__SWR|__SNBF, STDERR_FILENO)
- };
--/*
-- * The following kludge is done to ensure enough binary compatibility
-- * with future versions of libc.  Or rather it allows us to work with
-- * libraries that have been built with a newer libc that defines these
-- * symbols and expects libc to provide them.  We only have need to support
-- * i386 and alpha because they are the only "old" systems we have deployed.
-- */
--FILE *__stdinp = &__sF[0];
--FILE *__stdoutp = &__sF[1];
--FILE *__stderrp = &__sF[2];
--
- struct glue __sglue = { &uglue, 3, __sF };
- static struct glue *lastglue = &uglue;
-@@ -113,7 +104,7 @@
+@@ -113,7 +115,7 @@
  {
        struct glue *g;
        static FILE empty;
        FILE *p;
        struct __sFILEX *fx;
  
-@@ -179,6 +170,7 @@
+@@ -179,6 +181,7 @@
        fp->_lb._base = NULL;   /* no line buffer */
        fp->_lb._size = 0;
  /*    fp->_lock = NULL; */    /* once set always set (reused) */
 +      fp->_extra->fl_mutex = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;
        fp->_extra->orientation = 0;
- #ifdef notdef
-       /* Stateful encoding/decoding is not yet supported. */
+       memset(&fp->_extra->mbstate, 0, sizeof(mbstate_t));
+       return (fp);