diff --git a/libc/NOTICE b/libc/NOTICE index 730fa4681..be59d38c7 100644 --- a/libc/NOTICE +++ b/libc/NOTICE @@ -2053,6 +2053,35 @@ SUCH DAMAGE. ------------------------------------------------------------------- +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. diff --git a/libc/upstream-freebsd/lib/libc/stdio/clrerr.c b/libc/upstream-freebsd/lib/libc/stdio/clrerr.c index 1b318e6a8..f161a6e1e 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 @@ __FBSDID("$FreeBSD$"); #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 3957b6a42..5ed8b2c54 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 8fc90a438..2e19b9feb 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 @@ __FBSDID("$FreeBSD$"); #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 502f1e5a3..b970248a3 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 d155ff0c3..7e0f8f957 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 7cb2854d9..1779de2ae 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 @@ fgetln(FILE *fp, size_t *lenp) * 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 9053be84a..f161f4325 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 a0cc72452..9abf559bf 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 @@ __FBSDID("$FreeBSD$"); * 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 1962bb79b..3ac183010 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 e445fedd0..1878c2f4e 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 @@ __FBSDID("$FreeBSD$"); * 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 6fe536a0c..b08e3366a 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 @@ __FBSDID("$FreeBSD$"); #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 148e490ea..f205bdfc3 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 @@ __FBSDID("$FreeBSD$"); * 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 eb20f9eb4..3b8f2c9d1 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 @@ __FBSDID("$FreeBSD$"); * 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 f9a742e53..c6b8b7859 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 @@ __FBSDID("$FreeBSD$"); * 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 573589f14..983fe5011 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 cb200710d..151837b29 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 @@ __FBSDID("$FreeBSD$"); #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 acac94398..707d36279 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 @@ __FBSDID("$FreeBSD$"); * 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 5c94e6017..4963c8ce6 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 90c84ab9f..21040bc8c 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 d0882f0d3..aaffece49 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 @@ __FBSDID("$FreeBSD$"); #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 d263970ed..756155902 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 @@ __FBSDID("$FreeBSD$"); * 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 2dc945b86..5ee7fc1c6 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 @@ __FBSDID("$FreeBSD$"); * 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 8fc1b4da1..0360cafc4 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 @@ __FBSDID("$FreeBSD$"); #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 f08e47c4e..2e984baf9 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 @@ __FBSDID("$FreeBSD$"); #include 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 71c75e0ac..bdc031167 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 0daef5422..5c65f976c 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 dd1caa01f..af5eb3cab 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 @@ __FBSDID("$FreeBSD$"); #include 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 @@ setbuffer(fp, buf, size) * 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 ea4a2c8ca..e15746f31 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 @@ __warn_references(tempnam, 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 05bcb5bad..ce32dcc28 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 @@ __warn_references(tmpnam, 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 37bfc58bc..70f8247c0 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 @@ __FBSDID("$FreeBSD$"); * _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)