Loading...
stdio/FreeBSD/fopen.c Libc-1725.40.4 Libc-763.13
--- Libc/Libc-1725.40.4/stdio/FreeBSD/fopen.c
+++ Libc/Libc-763.13/stdio/FreeBSD/fopen.c
@@ -30,15 +30,6 @@
  * SUCH DAMAGE.
  */
 
-#ifdef VARIANT_DARWINEXTSN
-#define _DARWIN_UNLIMITED_STREAMS
-#define COUNT	0
-#elif defined(VARIANT_LEGACY)
-#define COUNT	0
-#else
-#define COUNT	1
-#endif
-
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)fopen.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
@@ -56,24 +47,22 @@
 #include "un-namespace.h"
 
 #include "local.h"
-#include "libc_hooks_impl.h"
 
 FILE *
-fopen(const char * __restrict file, const char * __restrict mode)
+fopen(file, mode)
+	const char * __restrict file;
+	const char * __restrict mode;
 {
 	FILE *fp;
 	int f;
 	int flags, oflags;
 
-	libc_hooks_will_read_cstring(file);
-	libc_hooks_will_read_cstring(mode);
-
 	if ((flags = __sflags(mode, &oflags)) == 0)
 		return (NULL);
-	if ((fp = __sfp(COUNT)) == NULL)
+	if ((fp = __sfp()) == NULL)
 		return (NULL);
 	if ((f = _open(file, oflags, DEFFILEMODE)) < 0) {
-		__sfprelease(fp);		/* release */
+		fp->_flags = 0;			/* release */
 		return (NULL);
 	}
 	/*