diff options
Diffstat (limited to 'lib')
61 files changed, 180 insertions, 302 deletions
diff --git a/lib/libc/arch/i386/string/strcat.S b/lib/libc/arch/i386/string/strcat.S index 6d80aebb06a..37f766a7231 100644 --- a/lib/libc/arch/i386/string/strcat.S +++ b/lib/libc/arch/i386/string/strcat.S @@ -5,9 +5,14 @@ #include <machine/asm.h> +#APP + .stabs "warning: strcat() is almost always misused, consider using strlcat()",30,0,0,0 + .stabs "_strcat",1,0,0,0 +#NO_APP + #if defined(LIBC_SCCS) .text - .asciz "$OpenBSD: strcat.S,v 1.2 1996/08/19 08:13:12 tholo Exp $" + .asciz "$OpenBSD: strcat.S,v 1.3 2003/06/11 21:03:10 deraadt Exp $" #endif /* diff --git a/lib/libc/arch/i386/string/strcpy.S b/lib/libc/arch/i386/string/strcpy.S index d9c74b4c82a..86632c42e1c 100644 --- a/lib/libc/arch/i386/string/strcpy.S +++ b/lib/libc/arch/i386/string/strcpy.S @@ -5,9 +5,14 @@ #include <machine/asm.h> +#APP + .stabs "warning: strcpy() is almost always misused, consider using strlcpy()",30,0,0,0 + .stabs "_strcpy",1,0,0,0 +#NO_APP + #if defined(LIBC_SCCS) .text - .asciz "$OpenBSD: strcpy.S,v 1.2 1996/08/19 08:13:17 tholo Exp $" + .asciz "$OpenBSD: strcpy.S,v 1.3 2003/06/11 21:03:10 deraadt Exp $" #endif /* diff --git a/lib/libc/arch/m68k/string/strcat.S b/lib/libc/arch/m68k/string/strcat.S index 9fa4cabf142..e988ccf79cc 100644 --- a/lib/libc/arch/m68k/string/strcat.S +++ b/lib/libc/arch/m68k/string/strcat.S @@ -33,9 +33,14 @@ #include "DEFS.h" +#APP + .stabs "warning: strcat() is almost always misused, consider using strlcat()",30,0,0,0 + .stabs "_strcat",1,0,0,0 +#NO_APP + #if defined(LIBC_SCCS) .text - .asciz "$OpenBSD: strcat.S,v 1.3 2003/06/02 20:18:31 millert Exp $" + .asciz "$OpenBSD: strcat.S,v 1.4 2003/06/11 21:03:10 deraadt Exp $" #endif /* LIBC_SCCS */ ENTRY(strcat) diff --git a/lib/libc/arch/m68k/string/strcpy.S b/lib/libc/arch/m68k/string/strcpy.S index 2e0e325ade0..a4962db432d 100644 --- a/lib/libc/arch/m68k/string/strcpy.S +++ b/lib/libc/arch/m68k/string/strcpy.S @@ -33,9 +33,14 @@ #include "DEFS.h" +#APP + .stabs "warning: strcpy() is almost always misused, consider using strlcpy()",30,0,0,0 + .stabs "_strcpy",1,0,0,0 +#NO_APP + #if defined(LIBC_SCCS) .text - .asciz "$OpenBSD: strcpy.S,v 1.4 2003/06/02 20:18:31 millert Exp $" + .asciz "$OpenBSD: strcpy.S,v 1.5 2003/06/11 21:03:10 deraadt Exp $" #endif /* LIBC_SCCS */ ENTRY(strcpy) diff --git a/lib/libc/compat-43/getdtablesize.c b/lib/libc/compat-43/getdtablesize.c index 56d150731a5..53207b750b3 100644 --- a/lib/libc/compat-43/getdtablesize.c +++ b/lib/libc/compat-43/getdtablesize.c @@ -4,13 +4,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: getdtablesize.c,v 1.2 1996/08/19 08:19:20 tholo Exp $"; +static char *rcsid = "$OpenBSD: getdtablesize.c,v 1.3 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <unistd.h> int -getdtablesize() +getdtablesize(void) { return sysconf(_SC_OPEN_MAX); } diff --git a/lib/libc/compat-43/getwd.c b/lib/libc/compat-43/getwd.c index 7cdf3502060..789fea05f96 100644 --- a/lib/libc/compat-43/getwd.c +++ b/lib/libc/compat-43/getwd.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: getwd.c,v 1.6 2003/06/02 20:18:33 millert Exp $"; +static char *rcsid = "$OpenBSD: getwd.c,v 1.7 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -38,8 +38,7 @@ static char *rcsid = "$OpenBSD: getwd.c,v 1.6 2003/06/02 20:18:33 millert Exp $" #include <string.h> char * -getwd(buf) - char *buf; +getwd(char *buf) { char *p; diff --git a/lib/libc/compat-43/sethostid.c b/lib/libc/compat-43/sethostid.c index 84d7914eac5..659700e9771 100644 --- a/lib/libc/compat-43/sethostid.c +++ b/lib/libc/compat-43/sethostid.c @@ -28,15 +28,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: sethostid.c,v 1.5 2003/06/02 20:18:33 millert Exp $"; +static char *rcsid = "$OpenBSD: sethostid.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> #include <sys/sysctl.h> int -sethostid(hostid) - long hostid; +sethostid(long hostid) { int mib[2]; diff --git a/lib/libc/compat-43/sigcompat.c b/lib/libc/compat-43/sigcompat.c index 8807676738c..30c1893ee48 100644 --- a/lib/libc/compat-43/sigcompat.c +++ b/lib/libc/compat-43/sigcompat.c @@ -28,16 +28,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: sigcompat.c,v 1.3 2003/06/02 20:18:33 millert Exp $"; +static char *rcsid = "$OpenBSD: sigcompat.c,v 1.4 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> #include <signal.h> int -sigvec(signo, sv, osv) - int signo; - struct sigvec *sv, *osv; +sigvec(int signo, struct sigvec *sv, struct sigvec *osv) { int ret; struct sigvec nsv; @@ -54,8 +52,7 @@ sigvec(signo, sv, osv) } int -sigsetmask(mask) - int mask; +sigsetmask(int mask) { int omask, n; @@ -66,8 +63,7 @@ sigsetmask(mask) } int -sigblock(mask) - int mask; +sigblock(int mask) { int omask, n; @@ -78,8 +74,7 @@ sigblock(mask) } int -sigpause(mask) - int mask; +sigpause(int mask) { return (sigsuspend((sigset_t *)&mask)); } diff --git a/lib/libc/crypt/arc4random.c b/lib/libc/crypt/arc4random.c index a41001bcc3d..b23b1955e42 100644 --- a/lib/libc/crypt/arc4random.c +++ b/lib/libc/crypt/arc4random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random.c,v 1.7 2003/02/14 17:12:54 deraadt Exp $ */ +/* $OpenBSD: arc4random.c,v 1.8 2003/06/11 21:03:10 deraadt Exp $ */ /* * Arc4 random number generator for OpenBSD. @@ -49,8 +49,7 @@ static struct arc4_stream rs; static pid_t arc4_stir_pid; static inline void -arc4_init(as) - struct arc4_stream *as; +arc4_init(struct arc4_stream *as) { int n; @@ -61,10 +60,7 @@ arc4_init(as) } static inline void -arc4_addrandom(as, dat, datlen) - struct arc4_stream *as; - u_char *dat; - int datlen; +arc4_addrandom(struct arc4_stream *as, u_char *dat, int datlen) { int n; u_int8_t si; @@ -81,8 +77,7 @@ arc4_addrandom(as, dat, datlen) } static void -arc4_stir(as) - struct arc4_stream *as; +arc4_stir(struct arc4_stream *as) { int fd; struct { @@ -119,8 +114,7 @@ arc4_stir(as) } static inline u_int8_t -arc4_getbyte(as) - struct arc4_stream *as; +arc4_getbyte(struct arc4_stream *as) { u_int8_t si, sj; @@ -134,8 +128,7 @@ arc4_getbyte(as) } static inline u_int32_t -arc4_getword(as) - struct arc4_stream *as; +arc4_getword(struct arc4_stream *as) { u_int32_t val; val = arc4_getbyte(as) << 24; @@ -146,7 +139,7 @@ arc4_getword(as) } void -arc4random_stir() +arc4random_stir(void) { if (!rs_initialized) { arc4_init(&rs); @@ -156,9 +149,7 @@ arc4random_stir() } void -arc4random_addrandom(dat, datlen) - u_char *dat; - int datlen; +arc4random_addrandom(u_char *dat, int datlen) { if (!rs_initialized) arc4random_stir(); @@ -166,7 +157,7 @@ arc4random_addrandom(dat, datlen) } u_int32_t -arc4random() +arc4random(void) { if (!rs_initialized || arc4_stir_pid != getpid()) arc4random_stir(); diff --git a/lib/libc/dlfcn/dlfcn_stubs.c b/lib/libc/dlfcn/dlfcn_stubs.c index 1f1c5f82328..7eac453bcdf 100644 --- a/lib/libc/dlfcn/dlfcn_stubs.c +++ b/lib/libc/dlfcn/dlfcn_stubs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dlfcn_stubs.c,v 1.5 2003/06/09 16:10:04 deraadt Exp $ */ +/* $OpenBSD: dlfcn_stubs.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -70,7 +70,7 @@ dlctl(void *handle, int command, void *data) } const char * -dlerror() +dlerror(void) { return "Wrong dl symbols!\n"; } diff --git a/lib/libc/gen/alarm.c b/lib/libc/gen/alarm.c index e58fd5b40be..633e0c10ccd 100644 --- a/lib/libc/gen/alarm.c +++ b/lib/libc/gen/alarm.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: alarm.c,v 1.4 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: alarm.c,v 1.5 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -38,8 +38,7 @@ static char rcsid[] = "$OpenBSD: alarm.c,v 1.4 2003/06/02 20:18:34 millert Exp $ #include <unistd.h> unsigned int -alarm(secs) - unsigned int secs; +alarm(unsigned int secs) { struct itimerval it, oitv; register struct itimerval *itp = ⁢ diff --git a/lib/libc/gen/assert.c b/lib/libc/gen/assert.c index 29c14fe35e4..fe48bc68535 100644 --- a/lib/libc/gen/assert.c +++ b/lib/libc/gen/assert.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: assert.c,v 1.6 2003/06/02 20:18:34 millert Exp $"; +static char *rcsid = "$OpenBSD: assert.c,v 1.7 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -37,9 +37,7 @@ static char *rcsid = "$OpenBSD: assert.c,v 1.6 2003/06/02 20:18:34 millert Exp $ #include <stdlib.h> void -__assert(file, line, failedexpr) - const char *file, *failedexpr; - int line; +__assert(const char *file, int line, const char *failedexpr) { (void)fprintf(stderr, "assertion \"%s\" failed: file \"%s\", line %d\n", diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c index 68adf6f8b12..01953267aad 100644 --- a/lib/libc/gen/auth_subr.c +++ b/lib/libc/gen/auth_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth_subr.c,v 1.22 2003/01/04 22:36:09 deraadt Exp $ */ +/* $OpenBSD: auth_subr.c,v 1.23 2003/06/11 21:03:10 deraadt Exp $ */ /*- * Copyright (c) 1995,1996,1997 Berkeley Software Design, Inc. @@ -138,7 +138,7 @@ struct passwd *auth_getpwd(auth_session_t *as) { return (as->pwd); } * (which can be changed later). */ auth_session_t * -auth_open() +auth_open(void) { auth_session_t *as; diff --git a/lib/libc/gen/basename.c b/lib/libc/gen/basename.c index 3c526af9a2b..9a25ad49699 100644 --- a/lib/libc/gen/basename.c +++ b/lib/libc/gen/basename.c @@ -1,4 +1,4 @@ -/* $OpenBSD: basename.c,v 1.9 2003/06/03 01:52:39 millert Exp $ */ +/* $OpenBSD: basename.c,v 1.10 2003/06/11 21:03:10 deraadt Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: basename.c,v 1.9 2003/06/03 01:52:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: basename.c,v 1.10 2003/06/11 21:03:10 deraadt Exp $"; #endif /* not lint */ #include <errno.h> @@ -26,8 +26,7 @@ static char rcsid[] = "$OpenBSD: basename.c,v 1.9 2003/06/03 01:52:39 millert Ex #include <sys/param.h> char * -basename(path) - const char *path; +basename(const char *path) { static char bname[MAXPATHLEN]; register const char *endp, *startp; diff --git a/lib/libc/gen/clock.c b/lib/libc/gen/clock.c index 0b5f78df128..58e5b48523a 100644 --- a/lib/libc/gen/clock.c +++ b/lib/libc/gen/clock.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: clock.c,v 1.3 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: clock.c,v 1.4 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -43,7 +43,7 @@ static char rcsid[] = "$OpenBSD: clock.c,v 1.3 2003/06/02 20:18:34 millert Exp $ r.tv_usec / (1000000 / CLOCKS_PER_SEC)) clock_t -clock() +clock(void) { struct rusage ru; diff --git a/lib/libc/gen/closedir.c b/lib/libc/gen/closedir.c index a02a8987437..c84b43dd10d 100644 --- a/lib/libc/gen/closedir.c +++ b/lib/libc/gen/closedir.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: closedir.c,v 1.4 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: closedir.c,v 1.5 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -41,8 +41,7 @@ static char rcsid[] = "$OpenBSD: closedir.c,v 1.4 2003/06/02 20:18:34 millert Ex * close a directory. */ int -closedir(dirp) - register DIR *dirp; +closedir(DIR *dirp) { int fd; int ret; diff --git a/lib/libc/gen/confstr.c b/lib/libc/gen/confstr.c index 41eb3a257fb..0931d1a7f29 100644 --- a/lib/libc/gen/confstr.c +++ b/lib/libc/gen/confstr.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: confstr.c,v 1.5 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: confstr.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -41,10 +41,7 @@ static char rcsid[] = "$OpenBSD: confstr.c,v 1.5 2003/06/02 20:18:34 millert Exp #include <unistd.h> size_t -confstr(name, buf, len) - int name; - char *buf; - size_t len; +confstr(int name, char *buf, size_t len) { size_t tlen; int mib[2], sverrno; diff --git a/lib/libc/gen/ctermid.c b/lib/libc/gen/ctermid.c index ee48f47c30b..31eb63e6c4b 100644 --- a/lib/libc/gen/ctermid.c +++ b/lib/libc/gen/ctermid.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ctermid.c,v 1.4 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: ctermid.c,v 1.5 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -36,8 +36,7 @@ static char rcsid[] = "$OpenBSD: ctermid.c,v 1.4 2003/06/02 20:18:34 millert Exp #include <string.h> char * -ctermid(s) - char *s; +ctermid(char *s) { static char def[] = _PATH_TTY; @@ -49,8 +48,7 @@ ctermid(s) } char * -ctermid_r(s) - char *s; +ctermid_r(char *s) { if (s) return ctermid(s); diff --git a/lib/libc/gen/daemon.c b/lib/libc/gen/daemon.c index 22d8ecb04da..828e92607cc 100644 --- a/lib/libc/gen/daemon.c +++ b/lib/libc/gen/daemon.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: daemon.c,v 1.3 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: daemon.c,v 1.4 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <fcntl.h> @@ -36,8 +36,7 @@ static char rcsid[] = "$OpenBSD: daemon.c,v 1.3 2003/06/02 20:18:34 millert Exp #include <unistd.h> int -daemon(nochdir, noclose) - int nochdir, noclose; +daemon(int nochdir, int noclose) { int fd; diff --git a/lib/libc/gen/devname.c b/lib/libc/gen/devname.c index 75a79604c51..8d57613bf1d 100644 --- a/lib/libc/gen/devname.c +++ b/lib/libc/gen/devname.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: devname.c,v 1.3 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: devname.c,v 1.4 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -42,9 +42,7 @@ static char rcsid[] = "$OpenBSD: devname.c,v 1.3 2003/06/02 20:18:34 millert Exp #include <string.h> char * -devname(dev, type) - dev_t dev; - mode_t type; +devname(dev_t dev, mode_t type) { struct { mode_t type; diff --git a/lib/libc/gen/dirname.c b/lib/libc/gen/dirname.c index 9e419aa5e63..0db5d046c0a 100644 --- a/lib/libc/gen/dirname.c +++ b/lib/libc/gen/dirname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dirname.c,v 1.8 2003/06/03 01:52:39 millert Exp $ */ +/* $OpenBSD: dirname.c,v 1.9 2003/06/11 21:03:10 deraadt Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: dirname.c,v 1.8 2003/06/03 01:52:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: dirname.c,v 1.9 2003/06/11 21:03:10 deraadt Exp $"; #endif /* not lint */ #include <errno.h> @@ -26,8 +26,7 @@ static char rcsid[] = "$OpenBSD: dirname.c,v 1.8 2003/06/03 01:52:39 millert Exp #include <sys/param.h> char * -dirname(path) - const char *path; +dirname(const char *path) { static char bname[MAXPATHLEN]; register const char *endp; diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c index ce8c551c8dd..1c9f4cfd119 100644 --- a/lib/libc/gen/disklabel.c +++ b/lib/libc/gen/disklabel.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: disklabel.c,v 1.8 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: disklabel.c,v 1.9 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -47,8 +47,7 @@ static char rcsid[] = "$OpenBSD: disklabel.c,v 1.8 2003/06/02 20:18:34 millert E static int gettype(char *, char **); struct disklabel * -getdiskbyname(name) - const char *name; +getdiskbyname(const char *name) { static struct disklabel disk; register struct disklabel *dp = &disk; @@ -155,9 +154,7 @@ getdiskbyname(name) } static int -gettype(t, names) - char *t; - char **names; +gettype(char *t, char **names) { register char **nm; diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index 97bf6edc3f3..ea3d2cdbb74 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: exec.c,v 1.15 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: exec.c,v 1.16 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -124,18 +124,14 @@ execlp(const char *name, const char *arg, ...) } int -execv(name, argv) - const char *name; - char * const *argv; +execv(const char *name, char * const *argv) { (void)execve(name, argv, environ); return (-1); } int -execvp(name, argv) - const char *name; - char * const *argv; +execvp(const char *name, char * const *argv) { char **memp; register int cnt, lp, ln, len; diff --git a/lib/libc/gen/ftok.c b/lib/libc/gen/ftok.c index 8ded096a8d4..a1feadad03e 100644 --- a/lib/libc/gen/ftok.c +++ b/lib/libc/gen/ftok.c @@ -26,7 +26,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: ftok.c,v 1.5 1998/11/15 19:19:55 deraadt Exp $"; +static char *rcsid = "$OpenBSD: ftok.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -34,9 +34,7 @@ static char *rcsid = "$OpenBSD: ftok.c,v 1.5 1998/11/15 19:19:55 deraadt Exp $"; #include <sys/ipc.h> key_t -ftok(path, id) - const char *path; - int id; +ftok(const char *path, int id) { struct stat st; diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index a64b3fa15a6..a65dd4c5b4b 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fts.c,v 1.33 2003/06/02 20:18:34 millert Exp $ */ +/* $OpenBSD: fts.c,v 1.34 2003/06/11 21:03:10 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #else -static char rcsid[] = "$OpenBSD: fts.c,v 1.33 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: fts.c,v 1.34 2003/06/11 21:03:10 deraadt Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -73,10 +73,8 @@ static int fts_safe_changedir(FTS *, FTSENT *, int, char *); #define BREAD 3 /* fts_read */ FTS * -fts_open(argv, options, compar) - char * const *argv; - int options; - int (*compar)(const FTSENT **, const FTSENT **); +fts_open(char * const *argv, int options, + int (*compar)(const FTSENT **, const FTSENT **)) { FTS *sp; FTSENT *p, *root; @@ -182,9 +180,7 @@ mem1: free(sp); } static void -fts_load(sp, p) - FTS *sp; - FTSENT *p; +fts_load(FTS *sp, FTSENT *p) { size_t len; char *cp; @@ -208,8 +204,7 @@ fts_load(sp, p) } int -fts_close(sp) - FTS *sp; +fts_close(FTS *sp) { FTSENT *freep, *p; int saved_errno = 0; @@ -263,8 +258,7 @@ fts_close(sp) ? p->fts_pathlen - 1 : p->fts_pathlen) FTSENT * -fts_read(sp) - FTS *sp; +fts_read(FTS *sp) { FTSENT *p, *tmp; int instr; @@ -459,10 +453,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent); */ /* ARGSUSED */ int -fts_set(sp, p, instr) - FTS *sp; - FTSENT *p; - int instr; +fts_set(FTS *sp, FTSENT *p, int instr) { if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW && instr != FTS_NOINSTR && instr != FTS_SKIP) { @@ -474,9 +465,7 @@ fts_set(sp, p, instr) } FTSENT * -fts_children(sp, instr) - FTS *sp; - int instr; +fts_children(FTS *sp, int instr) { FTSENT *p; int fd; @@ -556,9 +545,7 @@ fts_children(sp, instr) * been found, cutting the stat calls by about 2/3. */ static FTSENT * -fts_build(sp, type) - FTS *sp; - int type; +fts_build(FTS *sp, int type) { struct dirent *dp; FTSENT *p, *head; @@ -812,10 +799,7 @@ mem1: saved_errno = errno; } static u_short -fts_stat(sp, p, follow) - FTS *sp; - FTSENT *p; - int follow; +fts_stat(FTS *sp, FTSENT *p, int follow) { FTSENT *t; dev_t dev; @@ -895,10 +879,7 @@ err: memset(sbp, 0, sizeof(struct stat)); } static FTSENT * -fts_sort(sp, head, nitems) - FTS *sp; - FTSENT *head; - int nitems; +fts_sort(FTS *sp, FTSENT *head, int nitems) { FTSENT **ap, *p; @@ -933,10 +914,7 @@ fts_sort(sp, head, nitems) } static FTSENT * -fts_alloc(sp, name, namelen) - FTS *sp; - char *name; - size_t namelen; +fts_alloc(FTS *sp, char *name, size_t namelen) { FTSENT *p; size_t len; @@ -967,8 +945,7 @@ fts_alloc(sp, name, namelen) } static void -fts_lfree(head) - FTSENT *head; +fts_lfree(FTSENT *head) { FTSENT *p; @@ -986,9 +963,7 @@ fts_lfree(head) * plus 256 bytes so don't realloc the path 2 bytes at a time. */ static int -fts_palloc(sp, more) - FTS *sp; - size_t more; +fts_palloc(FTS *sp, size_t more) { char *p; @@ -1020,9 +995,7 @@ fts_palloc(sp, more) * already returned. */ static void -fts_padjust(sp, head) - FTS *sp; - FTSENT *head; +fts_padjust(FTS *sp, FTSENT *head) { FTSENT *p; char *addr = sp->fts_path; @@ -1046,8 +1019,7 @@ fts_padjust(sp, head) } static size_t -fts_maxarglen(argv) - char * const *argv; +fts_maxarglen(char * const *argv) { size_t len, max; @@ -1063,11 +1035,7 @@ fts_maxarglen(argv) * Assumes p->fts_dev and p->fts_ino are filled in. */ static int -fts_safe_changedir(sp, p, fd, path) - FTS *sp; - FTSENT *p; - int fd; - char *path; +fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path) { int ret, oerrno, newfd; struct stat sb; diff --git a/lib/libc/gen/getbsize.c b/lib/libc/gen/getbsize.c index 68d73baf5b7..e7fbff9bbab 100644 --- a/lib/libc/gen/getbsize.c +++ b/lib/libc/gen/getbsize.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getbsize.c,v 1.8 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: getbsize.c,v 1.9 2003/06/11 21:03:10 deraadt Exp $"; #endif /* not lint */ #include <err.h> @@ -37,9 +37,7 @@ static char rcsid[] = "$OpenBSD: getbsize.c,v 1.8 2003/06/02 20:18:34 millert Ex #include <string.h> char * -getbsize(headerlenp, blocksizep) - int *headerlenp; - long *blocksizep; +getbsize(int *headerlenp, long *blocksizep) { static char header[20]; long n, max, mul, blocksize; diff --git a/lib/libc/gen/getcwd.c b/lib/libc/gen/getcwd.c index 33c41db7f0c..42a197b1efa 100644 --- a/lib/libc/gen/getcwd.c +++ b/lib/libc/gen/getcwd.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getcwd.c,v 1.8 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: getcwd.c,v 1.9 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -46,9 +46,7 @@ static char rcsid[] = "$OpenBSD: getcwd.c,v 1.8 2003/06/02 20:18:34 millert Exp (dp->d_name[1] == '.' && dp->d_name[2] == '\0'))) char * -getcwd(pt, size) - char *pt; - size_t size; +getcwd(char *pt, size_t size) { register struct dirent *dp; register DIR *dir = NULL; diff --git a/lib/libc/gen/getdomainname.c b/lib/libc/gen/getdomainname.c index c7a5f77fef1..d8afd8276c4 100644 --- a/lib/libc/gen/getdomainname.c +++ b/lib/libc/gen/getdomainname.c @@ -28,16 +28,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getdomainname.c,v 1.4 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: getdomainname.c,v 1.5 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> #include <sys/sysctl.h> int -getdomainname(name, namelen) - char *name; - size_t namelen; +getdomainname(char *name, size_t namelen) { int mib[2]; size_t size; diff --git a/lib/libc/gen/getloadavg.c b/lib/libc/gen/getloadavg.c index 68c1367efa5..6dfad0310b6 100644 --- a/lib/libc/gen/getloadavg.c +++ b/lib/libc/gen/getloadavg.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getloadavg.c,v 1.4 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: getloadavg.c,v 1.5 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -45,9 +45,7 @@ static char rcsid[] = "$OpenBSD: getloadavg.c,v 1.4 2003/06/02 20:18:34 millert * Return number of samples retrieved, or -1 on error. */ int -getloadavg(loadavg, nelem) - double loadavg[]; - int nelem; +getloadavg(double loadavg[], int nelem) { struct loadavg loadinfo; int i, mib[2]; diff --git a/lib/libc/gen/getlogin.c b/lib/libc/gen/getlogin.c index 44d7c005876..7810dc8aad3 100644 --- a/lib/libc/gen/getlogin.c +++ b/lib/libc/gen/getlogin.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getlogin.c,v 1.8 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: getlogin.c,v 1.9 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -48,7 +48,7 @@ int _getlogin(char *, size_t); int _setlogin(const char *); char * -getlogin() +getlogin(void) { _THREAD_PRIVATE_KEY(getlogin); char * name = (char *)_THREAD_PRIVATE(getlogin, logname, NULL); @@ -63,9 +63,7 @@ getlogin() } int -getlogin_r(name, namelen) - char *name; - size_t namelen; +getlogin_r(char *name, size_t namelen) { int logname_size; @@ -92,8 +90,7 @@ getlogin_r(name, namelen) } int -setlogin(name) - const char *name; +setlogin(const char *name) { int ret; diff --git a/lib/libc/gen/isatty.c b/lib/libc/gen/isatty.c index c764022ede9..305fe83b48d 100644 --- a/lib/libc/gen/isatty.c +++ b/lib/libc/gen/isatty.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: isatty.c,v 1.4 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: isatty.c,v 1.5 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <termios.h> @@ -36,8 +36,7 @@ static char rcsid[] = "$OpenBSD: isatty.c,v 1.4 2003/06/02 20:18:34 millert Exp #include "thread_private.h" int -isatty(fd) - int fd; +isatty(int fd) { int retval; struct termios t; diff --git a/lib/libc/gen/lockf.c b/lib/libc/gen/lockf.c index 16cc1896279..2da2d867e68 100644 --- a/lib/libc/gen/lockf.c +++ b/lib/libc/gen/lockf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lockf.c,v 1.2 2003/01/07 22:02:46 miod Exp $ */ +/* $OpenBSD: lockf.c,v 1.3 2003/06/11 21:03:10 deraadt Exp $ */ /* $NetBSD: lockf.c,v 1.1 1997/12/20 20:23:18 kleink Exp $ */ /*- @@ -38,7 +38,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: lockf.c,v 1.2 2003/01/07 22:02:46 miod Exp $"; +static char rcsid[] = "$OpenBSD: lockf.c,v 1.3 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <errno.h> @@ -46,10 +46,7 @@ static char rcsid[] = "$OpenBSD: lockf.c,v 1.2 2003/01/07 22:02:46 miod Exp $"; #include <unistd.h> int -lockf(filedes, function, size) - int filedes; - int function; - off_t size; +lockf(int filedes, int function, off_t size) { struct flock fl; int cmd; diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c index ca59a9c171e..ebeda39755a 100644 --- a/lib/libc/stdio/sprintf.c +++ b/lib/libc/stdio/sprintf.c @@ -31,7 +31,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: sprintf.c,v 1.6 2003/06/02 20:18:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: sprintf.c,v 1.7 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -39,6 +39,8 @@ static char rcsid[] = "$OpenBSD: sprintf.c,v 1.6 2003/06/02 20:18:37 millert Exp #include <limits.h> #include "local.h" +__warn_references(sprintf, "warning: sprintf() is often misused, please use snprintf()"); + int sprintf(char *str, char const *fmt, ...) { diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c index 563b4082376..e3c099d0fb4 100644 --- a/lib/libc/stdio/vsprintf.c +++ b/lib/libc/stdio/vsprintf.c @@ -31,12 +31,15 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: vsprintf.c,v 1.5 2003/06/02 20:18:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: vsprintf.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> #include <limits.h> +__warn_references(vsprintf, + "warning: vsprintf() is often misused, please use vsnprintf()"); + int vsprintf(str, fmt, ap) char *str; diff --git a/lib/libc/sys/ftruncate.c b/lib/libc/sys/ftruncate.c index 1ea26845985..8d95281064e 100644 --- a/lib/libc/sys/ftruncate.c +++ b/lib/libc/sys/ftruncate.c @@ -28,7 +28,7 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ftruncate.c,v 1.10 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: ftruncate.c,v 1.11 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> @@ -44,9 +44,7 @@ quad_t __syscall(quad_t, ...); * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ int -ftruncate(fd, length) - int fd; - off_t length; +ftruncate(int fd, off_t length) { int retval; diff --git a/lib/libc/sys/lseek.c b/lib/libc/sys/lseek.c index 4340d889491..d811ce9b8ae 100644 --- a/lib/libc/sys/lseek.c +++ b/lib/libc/sys/lseek.c @@ -28,7 +28,7 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: lseek.c,v 1.9 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: lseek.c,v 1.10 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> @@ -40,10 +40,7 @@ static char rcsid[] = "$OpenBSD: lseek.c,v 1.9 2003/06/02 20:18:39 millert Exp $ * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ off_t -lseek(fd, offset, whence) - int fd; - off_t offset; - int whence; +lseek(int fd, off_t offset, int whence) { extern off_t __syscall(); off_t retval; diff --git a/lib/libc/sys/mmap.c b/lib/libc/sys/mmap.c index 09d2691639e..eb51fb70f62 100644 --- a/lib/libc/sys/mmap.c +++ b/lib/libc/sys/mmap.c @@ -28,7 +28,7 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mmap.c,v 1.11 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: mmap.c,v 1.12 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> @@ -44,13 +44,7 @@ quad_t __syscall(quad_t, ...); * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ void * -mmap(addr, len, prot, flags, fd, offset) - void *addr; - size_t len; - int prot; - int flags; - int fd; - off_t offset; +mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) { return((void *)(long)__syscall((quad_t)SYS_mmap, addr, len, prot, diff --git a/lib/libc/sys/pread.c b/lib/libc/sys/pread.c index bd08f2749f2..7d214556d2f 100644 --- a/lib/libc/sys/pread.c +++ b/lib/libc/sys/pread.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pread.c,v 1.5 2003/06/02 20:18:39 millert Exp $ */ +/* $OpenBSD: pread.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -30,7 +30,7 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: pread.c,v 1.5 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: pread.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> @@ -42,11 +42,7 @@ static char rcsid[] = "$OpenBSD: pread.c,v 1.5 2003/06/02 20:18:39 millert Exp $ * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ ssize_t -pread(fd, buf, nbyte, offset) - int fd; - void *buf; - size_t nbyte; - off_t offset; +pread(int fd, void *buf, size_t nbyte, off_t offset) { extern off_t __syscall(); quad_t q; diff --git a/lib/libc/sys/preadv.c b/lib/libc/sys/preadv.c index f7e3b134628..baabe0db0b8 100644 --- a/lib/libc/sys/preadv.c +++ b/lib/libc/sys/preadv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: preadv.c,v 1.5 2003/06/02 20:18:39 millert Exp $ */ +/* $OpenBSD: preadv.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -30,7 +30,7 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: preadv.c,v 1.5 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: preadv.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> @@ -43,11 +43,7 @@ static char rcsid[] = "$OpenBSD: preadv.c,v 1.5 2003/06/02 20:18:39 millert Exp * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ ssize_t -preadv(fd, iovp, iovcnt, offset) - int fd; - const struct iovec *iovp; - int iovcnt; - off_t offset; +preadv(int fd, const struct iovec *iovp, int iovcnt, off_t offset) { extern off_t __syscall(); quad_t q; diff --git a/lib/libc/sys/ptrace.c b/lib/libc/sys/ptrace.c index f0d02dd7ae5..7c6d83333e9 100644 --- a/lib/libc/sys/ptrace.c +++ b/lib/libc/sys/ptrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ptrace.c,v 1.2 2002/02/16 21:27:24 millert Exp $ */ +/* $OpenBSD: ptrace.c,v 1.3 2003/06/11 21:03:10 deraadt Exp $ */ /* David Leonard <d@openbsd.org>, 1999. Public domain. */ #include <sys/types.h> @@ -8,11 +8,7 @@ int _ptrace(int, pid_t, caddr_t, int); int -ptrace(request, pid, addr, data) - int request; - pid_t pid; - caddr_t addr; - int data; +ptrace(int request, pid_t pid, caddr_t addr, int data) { /* ptrace(2) is documented to clear errno on success: */ diff --git a/lib/libc/sys/pwrite.c b/lib/libc/sys/pwrite.c index e390c3cfad9..04a1c268083 100644 --- a/lib/libc/sys/pwrite.c +++ b/lib/libc/sys/pwrite.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwrite.c,v 1.5 2003/06/02 20:18:39 millert Exp $ */ +/* $OpenBSD: pwrite.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -30,7 +30,7 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: pwrite.c,v 1.5 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: pwrite.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> @@ -42,11 +42,7 @@ static char rcsid[] = "$OpenBSD: pwrite.c,v 1.5 2003/06/02 20:18:39 millert Exp * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ ssize_t -pwrite(fd, buf, nbyte, offset) - int fd; - const void *buf; - size_t nbyte; - off_t offset; +pwrite(int fd, const void *buf, size_t nbyte, off_t offset) { extern off_t __syscall(); quad_t q; diff --git a/lib/libc/sys/pwritev.c b/lib/libc/sys/pwritev.c index d5446e48a3c..0152c8912e5 100644 --- a/lib/libc/sys/pwritev.c +++ b/lib/libc/sys/pwritev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwritev.c,v 1.5 2003/06/02 20:18:39 millert Exp $ */ +/* $OpenBSD: pwritev.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -30,7 +30,7 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: pwritev.c,v 1.5 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: pwritev.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> @@ -43,11 +43,7 @@ static char rcsid[] = "$OpenBSD: pwritev.c,v 1.5 2003/06/02 20:18:39 millert Exp * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ ssize_t -pwritev(fd, iovp, iovcnt, offset) - int fd; - const struct iovec *iovp; - int iovcnt; - off_t offset; +pwritev(int fd, const struct iovec *iovp, int iovcnt, off_t offset) { extern off_t __syscall(); quad_t q; diff --git a/lib/libc/sys/timer_create.c b/lib/libc/sys/timer_create.c index 9b5ca7d3f56..f588dbd670a 100644 --- a/lib/libc/sys/timer_create.c +++ b/lib/libc/sys/timer_create.c @@ -1,5 +1,5 @@ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: timer_create.c,v 1.4 1998/02/07 20:50:54 tholo Exp $"; +static char rcsid[] = "$OpenBSD: timer_create.c,v 1.5 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <signal.h> @@ -10,10 +10,7 @@ struct sigevent; /* ARGSUSED */ int -timer_create(clock_id, evp, timerid) - clockid_t clock_id; - struct sigevent *evp; - timer_t *timerid; +timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid) { errno = ENOSYS; return -1; diff --git a/lib/libc/sys/timer_delete.c b/lib/libc/sys/timer_delete.c index cae43905868..6c45049e8b2 100644 --- a/lib/libc/sys/timer_delete.c +++ b/lib/libc/sys/timer_delete.c @@ -1,5 +1,5 @@ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: timer_delete.c,v 1.3 1997/04/30 05:49:29 tholo Exp $"; +static char rcsid[] = "$OpenBSD: timer_delete.c,v 1.4 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <signal.h> @@ -8,8 +8,7 @@ static char rcsid[] = "$OpenBSD: timer_delete.c,v 1.3 1997/04/30 05:49:29 tholo /* ARGSUSED */ int -timer_delete(timerid) - timer_t timerid; +timer_delete(timer_t timerid) { errno = ENOSYS; return -1; diff --git a/lib/libc/sys/timer_getoverrun.c b/lib/libc/sys/timer_getoverrun.c index 9fc7b512be2..2b138ebe163 100644 --- a/lib/libc/sys/timer_getoverrun.c +++ b/lib/libc/sys/timer_getoverrun.c @@ -1,5 +1,5 @@ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: timer_getoverrun.c,v 1.3 1997/04/30 05:49:29 tholo Exp $"; +static char rcsid[] = "$OpenBSD: timer_getoverrun.c,v 1.4 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <signal.h> @@ -8,8 +8,7 @@ static char rcsid[] = "$OpenBSD: timer_getoverrun.c,v 1.3 1997/04/30 05:49:29 th /* ARGSUSED */ int -timer_getoverrun(timerid) - timer_t timerid; +timer_getoverrun(timer_t timerid) { errno = ENOSYS; return -1; diff --git a/lib/libc/sys/timer_gettime.c b/lib/libc/sys/timer_gettime.c index acbfdc8cd75..c135299f659 100644 --- a/lib/libc/sys/timer_gettime.c +++ b/lib/libc/sys/timer_gettime.c @@ -1,5 +1,5 @@ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: timer_gettime.c,v 1.4 1998/02/07 20:50:55 tholo Exp $"; +static char rcsid[] = "$OpenBSD: timer_gettime.c,v 1.5 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <signal.h> @@ -10,9 +10,7 @@ struct itimerspec; /* ARGSUSED */ int -timer_gettime(timerid, value) - timer_t timerid; - struct itimerspec *value; +timer_gettime(timer_t timerid, struct itimerspec *value) { errno = ENOSYS; return -1; diff --git a/lib/libc/sys/timer_settime.c b/lib/libc/sys/timer_settime.c index 3925b89d393..22fb6dd40ad 100644 --- a/lib/libc/sys/timer_settime.c +++ b/lib/libc/sys/timer_settime.c @@ -1,5 +1,5 @@ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: timer_settime.c,v 1.4 1998/02/07 20:50:55 tholo Exp $"; +static char rcsid[] = "$OpenBSD: timer_settime.c,v 1.5 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <signal.h> @@ -10,11 +10,8 @@ struct itimerspec; /* ARGSUSED */ int -timer_settime(timerid, flags, value, ovalue) - timer_t timerid; - int flags; - const struct itimerspec *value; - struct itimerspec *ovalue; +timer_settime(timer_t timerid, int flags, const struct itimerspec *value, + struct itimerspec *ovalue) { errno = ENOSYS; return -1; diff --git a/lib/libc/sys/truncate.c b/lib/libc/sys/truncate.c index cbb104cb94b..c4a2f8d88d2 100644 --- a/lib/libc/sys/truncate.c +++ b/lib/libc/sys/truncate.c @@ -28,7 +28,7 @@ */ #if defined(SYSLIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: truncate.c,v 1.9 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: truncate.c,v 1.10 2003/06/11 21:03:10 deraadt Exp $"; #endif /* SYSLIBC_SCCS and not lint */ #include <sys/types.h> @@ -43,9 +43,7 @@ quad_t __syscall(quad_t, ...); * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ int -truncate(path, length) - const char *path; - off_t length; +truncate(const char *path, off_t length) { return(__syscall((quad_t)SYS_truncate, path, 0, length)); diff --git a/lib/libc/termios/cfgetispeed.c b/lib/libc/termios/cfgetispeed.c index c5d97d57c8d..21ed71e3b1c 100644 --- a/lib/libc/termios/cfgetispeed.c +++ b/lib/libc/termios/cfgetispeed.c @@ -28,14 +28,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: cfgetispeed.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: cfgetispeed.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <termios.h> speed_t -cfgetispeed(t) - const struct termios *t; +cfgetispeed(const struct termios *t) { return (t->c_ispeed); } diff --git a/lib/libc/termios/cfgetospeed.c b/lib/libc/termios/cfgetospeed.c index c5d3114ba2f..fcc546a3b62 100644 --- a/lib/libc/termios/cfgetospeed.c +++ b/lib/libc/termios/cfgetospeed.c @@ -28,14 +28,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: cfgetospeed.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: cfgetospeed.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <termios.h> speed_t -cfgetospeed(t) - const struct termios *t; +cfgetospeed(const struct termios *t) { return (t->c_ospeed); } diff --git a/lib/libc/termios/cfmakeraw.c b/lib/libc/termios/cfmakeraw.c index 1635860c09b..5877add33c6 100644 --- a/lib/libc/termios/cfmakeraw.c +++ b/lib/libc/termios/cfmakeraw.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: cfmakeraw.c,v 1.4 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: cfmakeraw.c,v 1.5 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <termios.h> @@ -38,8 +38,7 @@ static char rcsid[] = "$OpenBSD: cfmakeraw.c,v 1.4 2003/06/02 20:18:39 millert E * mode with no characters interpreted, 8-bit data path. */ void -cfmakeraw(t) - struct termios *t; +cfmakeraw(struct termios *t) { t->c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); t->c_oflag &= ~OPOST; diff --git a/lib/libc/termios/cfsetispeed.c b/lib/libc/termios/cfsetispeed.c index cf79042614a..3e4f8c4cdea 100644 --- a/lib/libc/termios/cfsetispeed.c +++ b/lib/libc/termios/cfsetispeed.c @@ -28,15 +28,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: cfsetispeed.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: cfsetispeed.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <termios.h> int -cfsetispeed(t, speed) - struct termios *t; - speed_t speed; +cfsetispeed(struct termios *t, speed_t speed) { t->c_ispeed = speed; return (0); diff --git a/lib/libc/termios/cfsetospeed.c b/lib/libc/termios/cfsetospeed.c index c221582a1d3..5aa83c4e570 100644 --- a/lib/libc/termios/cfsetospeed.c +++ b/lib/libc/termios/cfsetospeed.c @@ -28,15 +28,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: cfsetospeed.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: cfsetospeed.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <termios.h> int -cfsetospeed(t, speed) - struct termios *t; - speed_t speed; +cfsetospeed(struct termios *t, speed_t speed) { t->c_ospeed = speed; return (0); diff --git a/lib/libc/termios/cfsetspeed.c b/lib/libc/termios/cfsetspeed.c index a345dbef472..d5bbed307a8 100644 --- a/lib/libc/termios/cfsetspeed.c +++ b/lib/libc/termios/cfsetspeed.c @@ -28,15 +28,13 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: cfsetspeed.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: cfsetspeed.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <termios.h> int -cfsetspeed(t, speed) - struct termios *t; - speed_t speed; +cfsetspeed(struct termios *t, speed_t speed) { t->c_ispeed = t->c_ospeed = speed; return (0); diff --git a/lib/libc/termios/tcdrain.c b/lib/libc/termios/tcdrain.c index 9230c10302d..c9869db485f 100644 --- a/lib/libc/termios/tcdrain.c +++ b/lib/libc/termios/tcdrain.c @@ -28,15 +28,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tcdrain.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: tcdrain.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/ioctl.h> #include <termios.h> int -tcdrain(fd) - int fd; +tcdrain(int fd) { return (ioctl(fd, TIOCDRAIN, 0)); } diff --git a/lib/libc/termios/tcflow.c b/lib/libc/termios/tcflow.c index 71d7fc50abc..d6c48ce0a31 100644 --- a/lib/libc/termios/tcflow.c +++ b/lib/libc/termios/tcflow.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tcflow.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: tcflow.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/ioctl.h> @@ -37,8 +37,7 @@ static char rcsid[] = "$OpenBSD: tcflow.c,v 1.3 2003/06/02 20:18:39 millert Exp #include <errno.h> int -tcflow(fd, action) - int fd, action; +tcflow(int fd, int action) { struct termios term; u_char c; diff --git a/lib/libc/termios/tcflush.c b/lib/libc/termios/tcflush.c index 601e3ead01f..bbce84de096 100644 --- a/lib/libc/termios/tcflush.c +++ b/lib/libc/termios/tcflush.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tcflush.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: tcflush.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/ioctl.h> @@ -37,8 +37,7 @@ static char rcsid[] = "$OpenBSD: tcflush.c,v 1.3 2003/06/02 20:18:39 millert Exp #include <errno.h> int -tcflush(fd, which) - int fd, which; +tcflush(int fd, int which) { int com; diff --git a/lib/libc/termios/tcgetattr.c b/lib/libc/termios/tcgetattr.c index 5a6815ee2e8..f3f627f6b61 100644 --- a/lib/libc/termios/tcgetattr.c +++ b/lib/libc/termios/tcgetattr.c @@ -28,16 +28,14 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tcgetattr.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: tcgetattr.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/ioctl.h> #include <termios.h> int -tcgetattr(fd, t) - int fd; - struct termios *t; +tcgetattr(int fd, struct termios *t) { return (ioctl(fd, TIOCGETA, t)); } diff --git a/lib/libc/termios/tcgetpgrp.c b/lib/libc/termios/tcgetpgrp.c index 5ed03697f6d..06ef8bc2b71 100644 --- a/lib/libc/termios/tcgetpgrp.c +++ b/lib/libc/termios/tcgetpgrp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tcgetpgrp.c,v 1.3 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: tcgetpgrp.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -36,8 +36,7 @@ static char rcsid[] = "$OpenBSD: tcgetpgrp.c,v 1.3 2003/06/02 20:18:39 millert E #include <termios.h> pid_t -tcgetpgrp(fd) - int fd; +tcgetpgrp(int fd) { int s; diff --git a/lib/libc/termios/tcsendbreak.c b/lib/libc/termios/tcsendbreak.c index 511b6c47624..ffc775c6f39 100644 --- a/lib/libc/termios/tcsendbreak.c +++ b/lib/libc/termios/tcsendbreak.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tcsendbreak.c,v 1.4 2003/06/02 20:18:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: tcsendbreak.c,v 1.5 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -44,8 +44,7 @@ static char rcsid[] = "$OpenBSD: tcsendbreak.c,v 1.4 2003/06/02 20:18:39 millert /* ARGSUSED */ int -tcsendbreak(fd, len) - int fd, len; +tcsendbreak(int fd, int len) { struct timeval sleepytime; diff --git a/lib/libc/termios/tcsetattr.c b/lib/libc/termios/tcsetattr.c index 73c6156aa6f..d7770039bc1 100644 --- a/lib/libc/termios/tcsetattr.c +++ b/lib/libc/termios/tcsetattr.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tcsetattr.c,v 1.3 2003/06/02 20:18:40 millert Exp $"; +static char rcsid[] = "$OpenBSD: tcsetattr.c,v 1.4 2003/06/11 21:03:09 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/ioctl.h> @@ -36,9 +36,7 @@ static char rcsid[] = "$OpenBSD: tcsetattr.c,v 1.3 2003/06/02 20:18:40 millert E #include <errno.h> int -tcsetattr(fd, opt, t) - int fd, opt; - const struct termios *t; +tcsetattr(int fd, int opt, const struct termios *t) { struct termios localterm; |