1 --- fopen.c.orig 2009-02-15 03:11:22.000000000 -0800
2 +++ fopen.c 2009-02-15 17:53:37.000000000 -0800
7 +#ifdef VARIANT_DARWINEXTSN
8 +#define _DARWIN_UNLIMITED_STREAMS
10 +#elif defined(VARIANT_LEGACY)
16 #if defined(LIBC_SCCS) && !defined(lint)
17 static char sccsid[] = "@(#)fopen.c 8.1 (Berkeley) 6/4/93";
18 #endif /* LIBC_SCCS and not lint */
19 @@ -61,10 +70,10 @@ fopen(file, mode)
21 if ((flags = __sflags(mode, &oflags)) == 0)
23 - if ((fp = __sfp()) == NULL)
24 + if ((fp = __sfp(COUNT)) == NULL)
26 if ((f = _open(file, oflags, DEFFILEMODE)) < 0) {
27 - fp->_flags = 0; /* release */
28 + __sfprelease(fp); /* release */