]> git.saurik.com Git - apple/libc.git/blob - stdio/FreeBSD/fdopen.c.patch
Libc-583.tar.gz
[apple/libc.git] / stdio / FreeBSD / fdopen.c.patch
1 --- fdopen.c.orig 2009-02-15 03:11:22.000000000 -0800
2 +++ fdopen.c 2009-02-15 17:52:46.000000000 -0800
3 @@ -34,6 +34,15 @@
4 * SUCH DAMAGE.
5 */
6
7 +#ifdef VARIANT_DARWINEXTSN
8 +#define _DARWIN_UNLIMITED_STREAMS
9 +#define COUNT 0
10 +#elif defined(VARIANT_LEGACY)
11 +#define COUNT 0
12 +#else
13 +#define COUNT 1
14 +#endif
15 +
16 #if defined(LIBC_SCCS) && !defined(lint)
17 static char sccsid[] = "@(#)fdopen.c 8.1 (Berkeley) 6/4/93";
18 #endif /* LIBC_SCCS and not lint */
19 @@ -73,7 +82,7 @@ fdopen(fd, mode)
20 return (NULL);
21 }
22
23 - if ((fp = __sfp()) == NULL)
24 + if ((fp = __sfp(COUNT)) == NULL)
25 return (NULL);
26 fp->_flags = flags;
27 /*