Pull upstream FreeBSD revision 249810.
Fix license clause numbering.
Convert libc/stdio from K&R to ANSI C.
And add '__restrict' where it appeared in the header prototypes.
Change-Id: I5fdb22f79d3effa2298d03f9aa8412b4b087da04
Upstream: http://svnweb.freebsd.org/base?view=revision&revision=249810
diff --git a/libc/NOTICE b/libc/NOTICE
index 730fa46..be59d38 100644
--- a/libc/NOTICE
+++ b/libc/NOTICE
@@ -2056,6 +2056,35 @@
Copyright (c) 1992, 1993
The Regents of the University of California. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+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.
+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.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+ The Regents of the University of California. All rights reserved.
+
This code is derived from software contributed to Berkeley by
Ralph Campbell.
diff --git a/libc/upstream-freebsd/lib/libc/stdio/clrerr.c b/libc/upstream-freebsd/lib/libc/stdio/clrerr.c
index 1b318e6..f161a6e 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/clrerr.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/clrerr.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -45,8 +45,7 @@
#undef clearerr_unlocked
void
-clearerr(fp)
- FILE *fp;
+clearerr(FILE *fp)
{
FLOCKFILE(fp);
__sclearerr(fp);
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fclose.c b/libc/upstream-freebsd/lib/libc/stdio/fclose.c
index 3957b6a..5ed8b2c 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fclose.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fclose.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fdopen.c b/libc/upstream-freebsd/lib/libc/stdio/fdopen.c
index 8fc90a4..2e19b9f 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fdopen.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fdopen.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -47,9 +47,7 @@
#include "local.h"
FILE *
-fdopen(fd, mode)
- int fd;
- const char *mode;
+fdopen(int fd, const char *mode)
{
FILE *fp;
int flags, oflags, fdflags, tmp;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/feof.c b/libc/upstream-freebsd/lib/libc/stdio/feof.c
index 502f1e5..b970248 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/feof.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/feof.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/ferror.c b/libc/upstream-freebsd/lib/libc/stdio/ferror.c
index d155ff0..7e0f8f9 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/ferror.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/ferror.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fgetln.c b/libc/upstream-freebsd/lib/libc/stdio/fgetln.c
index 7cb2854..1779de2 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fgetln.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fgetln.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -115,7 +115,7 @@
* As a bonus, though, we can leave off the __SMOD.
*
* OPTIMISTIC is length that we (optimistically) expect will
- * accomodate the `rest' of the string, on each trip through the
+ * accommodate the `rest' of the string, on each trip through the
* loop below.
*/
#define OPTIMISTIC 80
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fgetpos.c b/libc/upstream-freebsd/lib/libc/stdio/fgetpos.c
index 9053be8..f161f43 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fgetpos.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fgetpos.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fgets.c b/libc/upstream-freebsd/lib/libc/stdio/fgets.c
index a0cc724..9abf559 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fgets.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fgets.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -49,10 +49,7 @@
* Return first argument, or NULL if no characters were read.
*/
char *
-fgets(buf, n, fp)
- char *buf;
- int n;
- FILE *fp;
+fgets(char * __restrict buf, int n, FILE * __restrict fp)
{
size_t len;
char *s;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fileno.c b/libc/upstream-freebsd/lib/libc/stdio/fileno.c
index 1962bb7..3ac1830 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fileno.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fileno.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/flags.c b/libc/upstream-freebsd/lib/libc/stdio/flags.c
index e445fed..1878c2f 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/flags.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/flags.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -49,9 +49,7 @@
* Return 0 on error.
*/
int
-__sflags(mode, optr)
- const char *mode;
- int *optr;
+__sflags(const char *mode, int *optr)
{
int ret, m, o;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fopen.c b/libc/upstream-freebsd/lib/libc/stdio/fopen.c
index 6fe536a..b08e336 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fopen.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fopen.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -49,9 +49,7 @@
#include "local.h"
FILE *
-fopen(file, mode)
- const char * __restrict file;
- const char * __restrict mode;
+fopen(const char * __restrict file, const char * __restrict mode)
{
FILE *fp;
int f;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fpurge.c b/libc/upstream-freebsd/lib/libc/stdio/fpurge.c
index 148e490..f205bdf 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fpurge.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fpurge.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -49,8 +49,7 @@
* given FILE's buffer empty.
*/
int
-fpurge(fp)
- FILE *fp;
+fpurge(FILE *fp)
{
int retval;
FLOCKFILE(fp);
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fputs.c b/libc/upstream-freebsd/lib/libc/stdio/fputs.c
index eb20f9e..3b8f2c9 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fputs.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fputs.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -48,9 +48,7 @@
* Write the given string to the given file.
*/
int
-fputs(s, fp)
- const char * __restrict s;
- FILE * __restrict fp;
+fputs(const char * __restrict s, FILE * __restrict fp)
{
int retval;
struct __suio uio;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fsetpos.c b/libc/upstream-freebsd/lib/libc/stdio/fsetpos.c
index f9a742e..c6b8b78 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fsetpos.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fsetpos.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -43,9 +43,7 @@
* fsetpos: like fseek.
*/
int
-fsetpos(iop, pos)
- FILE *iop;
- const fpos_t *pos;
+fsetpos(FILE *iop, const fpos_t *pos)
{
return (fseeko(iop, (off_t)*pos, SEEK_SET));
}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/funopen.c b/libc/upstream-freebsd/lib/libc/stdio/funopen.c
index 573589f..983fe50 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/funopen.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/funopen.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fwalk.c b/libc/upstream-freebsd/lib/libc/stdio/fwalk.c
index cb20071..151837b 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fwalk.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fwalk.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -42,8 +42,7 @@
#include "glue.h"
int
-_fwalk(function)
- int (*function)(FILE *);
+_fwalk(int (*function)(FILE *))
{
FILE *fp;
int n, ret;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fwrite.c b/libc/upstream-freebsd/lib/libc/stdio/fwrite.c
index acac943..707d362 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/fwrite.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/fwrite.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -50,10 +50,7 @@
* Return the number of whole objects written.
*/
size_t
-fwrite(buf, size, count, fp)
- const void * __restrict buf;
- size_t size, count;
- FILE * __restrict fp;
+fwrite(const void * __restrict buf, size_t size, size_t count, FILE * __restrict fp)
{
size_t n;
struct __suio uio;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/getc.c b/libc/upstream-freebsd/lib/libc/stdio/getc.c
index 5c94e60..4963c8c 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/getc.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/getc.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/getchar.c b/libc/upstream-freebsd/lib/libc/stdio/getchar.c
index 90c84ab..21040bc 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/getchar.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/getchar.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/putc.c b/libc/upstream-freebsd/lib/libc/stdio/putc.c
index d0882f0..aaffece 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/putc.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/putc.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -46,9 +46,7 @@
#undef putc_unlocked
int
-putc(c, fp)
- int c;
- FILE *fp;
+putc(int c, FILE *fp)
{
int retval;
FLOCKFILE(fp);
diff --git a/libc/upstream-freebsd/lib/libc/stdio/putchar.c b/libc/upstream-freebsd/lib/libc/stdio/putchar.c
index d263970..7561559 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/putchar.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/putchar.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -49,8 +49,7 @@
* A subroutine version of the macro putchar
*/
int
-putchar(c)
- int c;
+putchar(int c)
{
int retval;
FILE *so = stdout;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/puts.c b/libc/upstream-freebsd/lib/libc/stdio/puts.c
index 2dc945b..5ee7fc1 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/puts.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/puts.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -48,8 +48,7 @@
* Write the given string to stdout, appending a newline.
*/
int
-puts(s)
- char const *s;
+puts(char const *s)
{
int retval;
size_t c = strlen(s);
diff --git a/libc/upstream-freebsd/lib/libc/stdio/putw.c b/libc/upstream-freebsd/lib/libc/stdio/putw.c
index 8fc1b4d..0360caf 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/putw.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/putw.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -43,9 +43,7 @@
#include "libc_private.h"
int
-putw(w, fp)
- int w;
- FILE *fp;
+putw(int w, FILE *fp)
{
int retval;
struct __suio uio;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/remove.c b/libc/upstream-freebsd/lib/libc/stdio/remove.c
index f08e47c..2e984ba 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/remove.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/remove.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -42,8 +42,7 @@
#include <stdio.h>
int
-remove(file)
- const char *file;
+remove(const char *file)
{
struct stat sb;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/rget.c b/libc/upstream-freebsd/lib/libc/stdio/rget.c
index 71c75e0..bdc0311 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/rget.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/rget.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/setbuf.c b/libc/upstream-freebsd/lib/libc/stdio/setbuf.c
index 0daef54..5c65f97 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/setbuf.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/setbuf.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
diff --git a/libc/upstream-freebsd/lib/libc/stdio/setbuffer.c b/libc/upstream-freebsd/lib/libc/stdio/setbuffer.c
index dd1caa0..af5eb3c 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/setbuffer.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/setbuffer.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -39,10 +39,7 @@
#include <stdio.h>
void
-setbuffer(fp, buf, size)
- FILE *fp;
- char *buf;
- int size;
+setbuffer(FILE *fp, char *buf, int size)
{
(void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, (size_t)size);
@@ -52,8 +49,7 @@
* set line buffering
*/
int
-setlinebuf(fp)
- FILE *fp;
+setlinebuf(FILE *fp)
{
return (setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0));
diff --git a/libc/upstream-freebsd/lib/libc/stdio/tempnam.c b/libc/upstream-freebsd/lib/libc/stdio/tempnam.c
index ea4a2c8..e15746f 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/tempnam.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/tempnam.c
@@ -10,7 +10,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -47,8 +47,7 @@
extern char *_mktemp(char *);
char *
-tempnam(dir, pfx)
- const char *dir, *pfx;
+tempnam(const char *dir, const char *pfx)
{
int sverrno;
char *f, *name;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/tmpnam.c b/libc/upstream-freebsd/lib/libc/stdio/tmpnam.c
index 05bcb5b..ce32dcc 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/tmpnam.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/tmpnam.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -47,8 +47,7 @@
extern char *_mktemp(char *);
char *
-tmpnam(s)
- char *s;
+tmpnam(char *s)
{
static u_long tmpcount;
static char buf[L_tmpnam];
diff --git a/libc/upstream-freebsd/lib/libc/stdio/wsetup.c b/libc/upstream-freebsd/lib/libc/stdio/wsetup.c
index 37bfc58..70f8247 100644
--- a/libc/upstream-freebsd/lib/libc/stdio/wsetup.c
+++ b/libc/upstream-freebsd/lib/libc/stdio/wsetup.c
@@ -13,7 +13,7 @@
* 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.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. 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.
*
@@ -47,8 +47,7 @@
* _wsetup returns 0 if OK to write; otherwise, it returns EOF and sets errno.
*/
int
-__swsetup(fp)
- FILE *fp;
+__swsetup(FILE *fp)
{
/* make sure stdio is set up */
if (!__sdidinit)