Loading...
stdio/FreeBSD/setvbuf.c Libc-1725.40.4 Libc-583
--- Libc/Libc-1725.40.4/stdio/FreeBSD/setvbuf.c
+++ Libc/Libc-583/stdio/FreeBSD/setvbuf.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[] = "@(#)setvbuf.c	8.2 (Berkeley) 11/16/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/setvbuf.c,v 1.14 2007/01/09 00:28:07 imp Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/setvbuf.c,v 1.13 2002/09/06 11:23:55 tjr Exp $");
 
 #include "namespace.h"
 #include <stdio.h>
@@ -42,7 +46,6 @@
 #include "un-namespace.h"
 #include "local.h"
 #include "libc_private.h"
-#include "libc_hooks_impl.h"
 
 /*
  * Set one of the three kinds of buffering, optionally including
@@ -63,9 +66,6 @@
 	if (mode != _IONBF)
 		if ((mode != _IOFBF && mode != _IOLBF) || (int)size < 0)
 			return (EOF);
-
-	libc_hooks_will_write(fp, sizeof(*fp));
-	libc_hooks_will_write(buf, size);
 
 	FLOCKFILE(fp);
 	/*
@@ -158,11 +158,7 @@
 		/* begin/continue reading, or stay in intermediate state */
 		fp->_w = 0;
 	}
-#ifdef __APPLE__
-	__cleanup = 1;
-#else
 	__cleanup = _cleanup;
-#endif // __APPLE__
 
 	FUNLOCKFILE(fp);
 	return (ret);