Loading...
stdio/FreeBSD/funopen.c Libc-1725.40.4 Libc-320
--- Libc/Libc-1725.40.4/stdio/FreeBSD/funopen.c
+++ Libc/Libc-320/stdio/FreeBSD/funopen.c
@@ -13,6 +13,10 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
  * 4. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
@@ -34,7 +38,7 @@
 static char sccsid[] = "@(#)funopen.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/funopen.c,v 1.7 2009/12/05 19:31:38 ed Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/funopen.c,v 1.5 2002/05/28 16:59:39 alfred Exp $");
 
 #include <stdio.h>
 #include <errno.h>
@@ -42,11 +46,11 @@
 #include "local.h"
 
 FILE *
-funopen(const void *cookie,
-	int (*readfn)(void *, char *, int),
-	int (*writefn)(void *, const char *, int),
-	fpos_t (*seekfn)(void *, fpos_t, int),
-	int (*closefn)(void *))
+funopen(cookie, readfn, writefn, seekfn, closefn)
+	const void *cookie;
+	int (*readfn)(), (*writefn)();
+	fpos_t (*seekfn)(void *cookie, fpos_t off, int whence);
+	int (*closefn)();
 {
 	FILE *fp;
 	int flags;
@@ -63,8 +67,7 @@
 		else
 			flags = __SRW;		/* read-write */
 	}
-	/* funopen in not covered in SUSv3, so never count the streams */
-	if ((fp = __sfp(0)) == NULL)
+	if ((fp = __sfp()) == NULL)
 		return (NULL);
 	fp->_flags = flags;
 	fp->_file = -1;