diff options
| author | jtc <jtc@NetBSD.org> | 1993-11-11 19:04:04 +0000 |
|---|---|---|
| committer | jtc <jtc@NetBSD.org> | 1993-11-11 19:04:04 +0000 |
| commit | a054c6582aa8bf9dedeb688ddb84d55edbfac3bd (patch) | |
| tree | f0e435ad075ccaceffa9943ffe8ef5fd7330b946 /lib | |
| parent | 243bc4cc0592f299956616ba3e08c4a1f5eae2f2 (diff) | |
First pass at getting a clean compile with "gcc -Wall", mostly explictly
declaring function return values, etc.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/compat-43/creat.c | 3 | ||||
| -rw-r--r-- | lib/libc/compat-43/killpg.c | 3 | ||||
| -rw-r--r-- | lib/libc/compat-43/setpgrp.c | 3 | ||||
| -rw-r--r-- | lib/libc/compat-43/sigcompat.c | 6 | ||||
| -rw-r--r-- | lib/libc/gen/disklabel.c | 28 | ||||
| -rw-r--r-- | lib/libc/gen/fnmatch.c | 3 | ||||
| -rw-r--r-- | lib/libc/gen/isctype.c | 2 | ||||
| -rw-r--r-- | lib/libc/gen/popen.c | 3 | ||||
| -rw-r--r-- | lib/libc/gen/raise.c | 3 | ||||
| -rw-r--r-- | lib/libc/gen/sigsetops.c | 7 | ||||
| -rw-r--r-- | lib/libc/stdio/mktemp.c | 7 |
11 files changed, 42 insertions, 26 deletions
diff --git a/lib/libc/compat-43/creat.c b/lib/libc/compat-43/creat.c index 23e52cb5abd..aeafdf23dbf 100644 --- a/lib/libc/compat-43/creat.c +++ b/lib/libc/compat-43/creat.c @@ -33,11 +33,12 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)creat.c 5.3 (Berkeley) 2/24/91";*/ -static char *rcsid = "$Id: creat.c,v 1.3 1993/08/26 00:43:03 jtc Exp $"; +static char *rcsid = "$Id: creat.c,v 1.4 1993/11/11 19:04:04 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <fcntl.h> +int #if __STDC__ creat(const char *path, mode_t mode) #else diff --git a/lib/libc/compat-43/killpg.c b/lib/libc/compat-43/killpg.c index 38d72299dfb..7a24a1d25cc 100644 --- a/lib/libc/compat-43/killpg.c +++ b/lib/libc/compat-43/killpg.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)killpg.c 5.3 (Berkeley) 2/24/91";*/ -static char *rcsid = "$Id: killpg.c,v 1.3 1993/08/26 00:43:06 jtc Exp $"; +static char *rcsid = "$Id: killpg.c,v 1.4 1993/11/11 19:04:06 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -43,6 +43,7 @@ static char *rcsid = "$Id: killpg.c,v 1.3 1993/08/26 00:43:06 jtc Exp $"; /* * Backwards-compatible killpg(). */ +int #if __STDC__ killpg(pid_t pgid, int sig) #else diff --git a/lib/libc/compat-43/setpgrp.c b/lib/libc/compat-43/setpgrp.c index d846709c22d..76dab1e59a2 100644 --- a/lib/libc/compat-43/setpgrp.c +++ b/lib/libc/compat-43/setpgrp.c @@ -33,12 +33,13 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)setpgrp.c 5.2 (Berkeley) 2/24/91";*/ -static char *rcsid = "$Id: setpgrp.c,v 1.3 1993/08/26 00:43:07 jtc Exp $"; +static char *rcsid = "$Id: setpgrp.c,v 1.4 1993/11/11 19:04:07 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> #include <unistd.h> +int #if __STDC__ setpgrp(pid_t pid, pid_t pgid) #else diff --git a/lib/libc/compat-43/sigcompat.c b/lib/libc/compat-43/sigcompat.c index bcea5fbaf14..8536a31b8a6 100644 --- a/lib/libc/compat-43/sigcompat.c +++ b/lib/libc/compat-43/sigcompat.c @@ -33,12 +33,13 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)sigcompat.c 5.3 (Berkeley) 2/24/91";*/ -static char *rcsid = "$Id: sigcompat.c,v 1.3 1993/08/26 00:43:07 jtc Exp $"; +static char *rcsid = "$Id: sigcompat.c,v 1.4 1993/11/11 19:04:08 jtc 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; @@ -53,6 +54,7 @@ sigvec(signo, sv, osv) return (ret); } +int sigsetmask(mask) int mask; { @@ -64,6 +66,7 @@ sigsetmask(mask) return (omask); } +int sigblock(mask) int mask; { @@ -75,6 +78,7 @@ sigblock(mask) return (omask); } +int sigpause(mask) int mask; { diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c index 54e8ef58fe4..289f880ee50 100644 --- a/lib/libc/gen/disklabel.c +++ b/lib/libc/gen/disklabel.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)disklabel.c 5.17 (Berkeley) 2/23/91";*/ -static char *rcsid = "$Id: disklabel.c,v 1.3 1993/08/26 00:44:26 jtc Exp $"; +static char *rcsid = "$Id: disklabel.c,v 1.4 1993/11/11 19:04:22 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -47,13 +47,13 @@ static char *rcsid = "$Id: disklabel.c,v 1.3 1993/08/26 00:44:26 jtc Exp $"; #include <stdlib.h> #include <unistd.h> -static char *dgetstr(); -static dgetent(); -static dnamatch(); -static dgetnum(); -static dgetflag(); -static gettype(); -static error(); +static char *dgetstr(); +static int dgetent(); +static int dnamatch(); +static int dgetnum(); +static int dgetflag(); +static int gettype(); +static void error(); struct disklabel * getdiskbyname(name) @@ -166,7 +166,7 @@ static char *ddecode(); * from the diskcap file. Parse is very rudimentary; * we just notice escaped newlines. */ -static +static int dgetent(bp, name) char *bp, *name; { @@ -226,7 +226,7 @@ dgetent(bp, name) * against each such name. The normal : terminator after the last * name (before the first field) stops us. */ -static +static int dnamatch(np) char *np; { @@ -273,7 +273,7 @@ dskip(bp) * a # character. If the option is not found we return -1. * Note that we handle octal numbers beginning with 0. */ -static +static int dgetnum(id) char *id; { @@ -307,7 +307,7 @@ dgetnum(id) * of the buffer. Return 1 if we find the option, or 0 if it is * not given. */ -static +static int dgetflag(id) char *id; { @@ -404,7 +404,7 @@ nextc: return (str); } -static +static int gettype(t, names) char *t; char **names; @@ -419,7 +419,7 @@ gettype(t, names) return (0); } -static +static void error(err) int err; { diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c index af6b4fdb127..b30725e08e0 100644 --- a/lib/libc/gen/fnmatch.c +++ b/lib/libc/gen/fnmatch.c @@ -36,7 +36,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /* from: static char sccsid[] = "@(#)fnmatch.c 8.1 (Berkeley) 6/4/93"; */ -static char *rcsid = "$Id: fnmatch.c,v 1.8 1993/11/11 03:21:24 jtc Exp $"; +static char *rcsid = "$Id: fnmatch.c,v 1.9 1993/11/11 19:04:25 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -51,6 +51,7 @@ static char *rcsid = "$Id: fnmatch.c,v 1.8 1993/11/11 03:21:24 jtc Exp $"; static const char *rangematch __P((const char *, int, int)); +int fnmatch(pattern, string, flags) register const char *pattern, *string; int flags; diff --git a/lib/libc/gen/isctype.c b/lib/libc/gen/isctype.c index 3dc887baafe..b5140f51032 100644 --- a/lib/libc/gen/isctype.c +++ b/lib/libc/gen/isctype.c @@ -1 +1 @@ -revision 1.10 intentionally removed +revision 1.11 intentionally removed diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c index 8388598f6d5..e663b45f411 100644 --- a/lib/libc/gen/popen.c +++ b/lib/libc/gen/popen.c @@ -36,7 +36,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)popen.c 5.15 (Berkeley) 2/23/91";*/ -static char *rcsid = "$Id: popen.c,v 1.5 1993/08/26 00:44:55 jtc Exp $"; +static char *rcsid = "$Id: popen.c,v 1.6 1993/11/11 19:04:30 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -113,7 +113,6 @@ pclose(iop) FILE *iop; { register int fdes; - int omask; int pstat; pid_t pid; diff --git a/lib/libc/gen/raise.c b/lib/libc/gen/raise.c index 52df39db05a..4f364f1cda3 100644 --- a/lib/libc/gen/raise.c +++ b/lib/libc/gen/raise.c @@ -33,12 +33,13 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)raise.c 5.1 (Berkeley) 2/19/91";*/ -static char *rcsid = "$Id: raise.c,v 1.3 1993/08/26 00:44:57 jtc Exp $"; +static char *rcsid = "$Id: raise.c,v 1.4 1993/11/11 19:04:32 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <signal.h> #include <unistd.h> +int raise(s) int s; { diff --git a/lib/libc/gen/sigsetops.c b/lib/libc/gen/sigsetops.c index a7fa8ccfeff..968d167a05f 100644 --- a/lib/libc/gen/sigsetops.c +++ b/lib/libc/gen/sigsetops.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)sigsetops.c 5.3 (Berkeley) 2/23/91";*/ -static char *rcsid = "$Id: sigsetops.c,v 1.4 1993/08/26 00:45:10 jtc Exp $"; +static char *rcsid = "$Id: sigsetops.c,v 1.5 1993/11/11 19:04:33 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/signal.h> @@ -44,6 +44,7 @@ static char *rcsid = "$Id: sigsetops.c,v 1.4 1993/08/26 00:45:10 jtc Exp $"; #undef sigdelset #undef sigismember +int sigemptyset(set) sigset_t *set; { @@ -51,6 +52,7 @@ sigemptyset(set) return (0); } +int sigfillset(set) sigset_t *set; { @@ -58,6 +60,7 @@ sigfillset(set) return (0); } +int sigaddset(set, signo) sigset_t *set; int signo; @@ -66,6 +69,7 @@ sigaddset(set, signo) return (0); } +int sigdelset(set, signo) sigset_t *set; int signo; @@ -74,6 +78,7 @@ sigdelset(set, signo) return (0); } +int sigismember(set, signo) const sigset_t *set; int signo; diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c index 8419f43e7f8..ca83d07870b 100644 --- a/lib/libc/stdio/mktemp.c +++ b/lib/libc/stdio/mktemp.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)mktemp.c 5.10 (Berkeley) 2/24/91";*/ -static char *rcsid = "$Id: mktemp.c,v 1.3 1993/08/26 00:47:09 jtc Exp $"; +static char *rcsid = "$Id: mktemp.c,v 1.4 1993/11/11 19:04:43 jtc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -41,9 +41,12 @@ static char *rcsid = "$Id: mktemp.c,v 1.3 1993/08/26 00:47:09 jtc Exp $"; #include <fcntl.h> #include <errno.h> #include <stdio.h> +#include <ctype.h> +#include <unistd.h> static int _gettemp(); +int mkstemp(path) char *path; { @@ -59,7 +62,7 @@ mktemp(path) return(_gettemp(path, (int *)NULL) ? path : (char *)NULL); } -static +static int _gettemp(path, doopen) char *path; register int *doopen; |
