diff options
author | imp <imp@FreeBSD.org> | 2000-04-14 06:39:19 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2000-04-14 06:39:19 +0000 |
commit | 4721d7ef435f4d79e92d8d98ba9b645bb25993fb (patch) | |
tree | c7963b41252b2e47e3e9896854edbbb0300e6576 | |
parent | 7fec3d2787608459e561d33aa2c5f4370c7eb11f (diff) | |
download | FreeBSD-src-4721d7ef435f4d79e92d8d98ba9b645bb25993fb.zip FreeBSD-src-4721d7ef435f4d79e92d8d98ba9b645bb25993fb.tar.gz |
#include <errno.h> where needed. Kill extern int errno;.
Minor warnings in tip corrected.
-rw-r--r-- | usr.bin/mail/lex.c | 3 | ||||
-rw-r--r-- | usr.bin/make/compat.c | 1 | ||||
-rw-r--r-- | usr.bin/make/util.c | 5 | ||||
-rw-r--r-- | usr.bin/more/os.c | 4 | ||||
-rw-r--r-- | usr.bin/renice/renice.c | 2 | ||||
-rw-r--r-- | usr.bin/systat/vmstat.c | 2 | ||||
-rw-r--r-- | usr.bin/tip/libacu/dn11.c | 4 | ||||
-rw-r--r-- | usr.bin/tip/libacu/v831.c | 4 | ||||
-rw-r--r-- | usr.bin/tip/tip/cmds.c | 3 | ||||
-rw-r--r-- | usr.bin/tip/tip/tip.c | 2 | ||||
-rw-r--r-- | usr.bin/tip/tip/tip.h | 4 | ||||
-rw-r--r-- | usr.bin/tip/tip/tipout.c | 2 | ||||
-rw-r--r-- | usr.bin/tip/tip/value.c | 4 | ||||
-rw-r--r-- | usr.bin/window/ttoutput.c | 5 | ||||
-rw-r--r-- | usr.bin/window/wwchild.c | 4 | ||||
-rw-r--r-- | usr.bin/window/wwerror.c | 4 |
16 files changed, 32 insertions, 21 deletions
diff --git a/usr.bin/mail/lex.c b/usr.bin/mail/lex.c index 9c3e288..4550f2b 100644 --- a/usr.bin/mail/lex.c +++ b/usr.bin/mail/lex.c @@ -29,6 +29,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef lint @@ -65,7 +67,6 @@ setfile(name) char *who = name[1] ? name + 1 : myname; static int shudclob; extern char *tempMesg; - extern int errno; if ((name = expand(name)) == NOSTR) return -1; diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index bb3f501..f9f7e79 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -69,7 +69,6 @@ static const char rcsid[] = #include "hash.h" #include "dir.h" #include "job.h" -extern int errno; /* * The following array is used to make a fast determination of which diff --git a/usr.bin/make/util.c b/usr.bin/make/util.c index 174954e..3874e96 100644 --- a/usr.bin/make/util.c +++ b/usr.bin/make/util.c @@ -7,6 +7,7 @@ static char rcsid[] = "$FreeBSD$"; #endif #include <stdio.h> +#include <errno.h> #include "make.h" #if !__STDC__ @@ -16,9 +17,6 @@ static char rcsid[] = "$FreeBSD$"; #endif #ifdef sun - - - extern int errno, sys_nerr; extern char *sys_errlist[]; @@ -182,7 +180,6 @@ getwd(pathname) { DIR *dp; struct dirent *d; - extern int errno; struct stat st_root, st_cur, st_next, st_dotdot; char pathbuf[MAXPATHLEN], nextpathbuf[MAXPATHLEN * 2]; diff --git a/usr.bin/more/os.c b/usr.bin/more/os.c index 208494d..a922f47 100644 --- a/usr.bin/more/os.c +++ b/usr.bin/more/os.c @@ -30,6 +30,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef lint @@ -51,6 +53,7 @@ static char sccsid[] = "@(#)os.c 8.1 (Berkeley) 6/6/93"; #include <sys/param.h> #include <sys/stat.h> #include <sys/file.h> +#include <errno.h> #include <signal.h> #include <setjmp.h> #include <stdio.h> @@ -250,7 +253,6 @@ bad_file(filename, message, len) char *filename, *message; u_int len; { - extern int errno; struct stat statbuf; char *strcat(), *strerror(); diff --git a/usr.bin/renice/renice.c b/usr.bin/renice/renice.c index baed30a..b20f732 100644 --- a/usr.bin/renice/renice.c +++ b/usr.bin/renice/renice.c @@ -50,6 +50,7 @@ static const char rcsid[] = #include <sys/resource.h> #include <err.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <pwd.h> @@ -124,7 +125,6 @@ donice(which, who, prio) int which, who, prio; { int oldprio; - extern int errno; errno = 0, oldprio = getpriority(which, who); if (oldprio == -1 && errno) { diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index 89e78a2..44fdcf9 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -58,6 +58,7 @@ static const char rcsid[] = #include <ctype.h> #include <err.h> +#include <errno.h> #include <nlist.h> #include <paths.h> #include <signal.h> @@ -731,7 +732,6 @@ getinfo(s, st) { struct devinfo *tmp_dinfo; int mib[2], size; - extern int errno; NREAD(X_CPTIME, s->time, sizeof s->time); NREAD(X_CPTIME, cur.cp_time, sizeof(cur.cp_time)); diff --git a/usr.bin/tip/libacu/dn11.c b/usr.bin/tip/libacu/dn11.c index 52749da..6a2fc3e 100644 --- a/usr.bin/tip/libacu/dn11.c +++ b/usr.bin/tip/libacu/dn11.c @@ -29,6 +29,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef lint @@ -40,6 +42,7 @@ static char sccsid[] = "@(#)dn11.c 8.1 (Berkeley) 6/6/93"; */ #include "tipconf.h" #include "tip.h" +#include <errno.h> int dn_abort(); void alarmtr(); @@ -49,7 +52,6 @@ static int child = -1, dn; dn_dialer(num, acu) char *num, *acu; { - extern errno; char *p, *q, phone[40]; int lt, nw, connected = 1; register int timelim; diff --git a/usr.bin/tip/libacu/v831.c b/usr.bin/tip/libacu/v831.c index b670c2a..e02121c 100644 --- a/usr.bin/tip/libacu/v831.c +++ b/usr.bin/tip/libacu/v831.c @@ -29,6 +29,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef lint @@ -40,10 +42,10 @@ static char sccsid[] = "@(#)v831.c 8.1 (Berkeley) 6/6/93"; */ #include "tipconf.h" #include "tip.h" +#include <errno.h> int v831_abort(); static void alarmtr(); -extern int errno; static jmp_buf jmpbuf; static int child = -1; diff --git a/usr.bin/tip/tip/cmds.c b/usr.bin/tip/tip/cmds.c index ec57346..10198ba 100644 --- a/usr.bin/tip/tip/cmds.c +++ b/usr.bin/tip/tip/cmds.c @@ -725,7 +725,7 @@ tiplink (char *cmd, unsigned int flags) * 1 <-> remote tty out * 2 <-> local tty out */ -void +int consh(c) { char buf[256]; @@ -733,6 +733,7 @@ consh(c) if (prompt("Local command? ", buf, sizeof(buf))) return; tiplink (buf, TL_SIGNAL_TIPOUT | TL_VERBOSE); + return 0; } #endif diff --git a/usr.bin/tip/tip/tip.c b/usr.bin/tip/tip/tip.c index 348f8a0..2b11d0b 100644 --- a/usr.bin/tip/tip/tip.c +++ b/usr.bin/tip/tip/tip.c @@ -58,6 +58,7 @@ void ttysetup (int speed); */ #include <err.h> +#include <errno.h> #include <sys/types.h> #include <libutil.h> #include "tipconf.h" @@ -666,7 +667,6 @@ xpwrite(fd, buf, n) { register int i; register char *bp; - extern int errno; bp = buf; if (bits8 == 0) diff --git a/usr.bin/tip/tip/tip.h b/usr.bin/tip/tip/tip.h index ea841ff..9aa69c2 100644 --- a/usr.bin/tip/tip/tip.h +++ b/usr.bin/tip/tip/tip.h @@ -32,6 +32,8 @@ * SUCH DAMAGE. * * @(#)tip.h 8.1 (Berkeley) 6/6/93 + * + * $FreeBSD$ */ /* @@ -318,7 +320,7 @@ extern void shell_uid __P((void)); extern void unraw __P((void)); extern void xpwrite __P((int, char *, int)); extern int prompt __P((char *, char *, size_t)); -extern void consh __P((int)); +extern int consh __P((int)); extern void tipabort __P((char *)); #define TL_VERBOSE 0x00000001 diff --git a/usr.bin/tip/tip/tipout.c b/usr.bin/tip/tip/tipout.c index c9292a8..de1fe6a 100644 --- a/usr.bin/tip/tip/tipout.c +++ b/usr.bin/tip/tip/tipout.c @@ -40,6 +40,7 @@ static const char rcsid[] = #endif /* not lint */ #include "tip.h" +#include <errno.h> /* * tip * @@ -122,7 +123,6 @@ tipout() char buf[BUFSIZ]; register char *cp; register int cnt; - extern int errno; int omask; signal(SIGINT, SIG_IGN); diff --git a/usr.bin/tip/tip/value.c b/usr.bin/tip/tip/value.c index 8be5cd9..0c103c8 100644 --- a/usr.bin/tip/tip/value.c +++ b/usr.bin/tip/tip/value.c @@ -185,7 +185,7 @@ vtoken(s) if ((p = vlookup(s))) { cp++; if (p->v_type&NUMBER) - vassign(p, atoi(cp)); + vassign(p, (char *) atoi(cp)); else { if (strcmp(s, "record") == 0) cp = expand(cp); @@ -358,7 +358,7 @@ vstring(s,v) if (p == 0) return (1); if (p->v_type&NUMBER) - vassign(p, atoi(v)); + vassign(p, (char *) atoi(v)); else { if (strcmp(s, "record") == 0) v = expand(v); diff --git a/usr.bin/window/ttoutput.c b/usr.bin/window/ttoutput.c index 5c582d6..6a2a36e 100644 --- a/usr.bin/window/ttoutput.c +++ b/usr.bin/window/ttoutput.c @@ -32,6 +32,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef lint @@ -40,7 +42,7 @@ static char sccsid[] = "@(#)ttoutput.c 8.1 (Berkeley) 6/6/93"; #include "ww.h" #include "tt.h" -#include <sys/errno.h> +#include <errno.h> /* * Buffered output package. @@ -51,7 +53,6 @@ ttflush() { register char *p; register n = tt_obp - tt_ob; - extern errno; if (n == 0) return; diff --git a/usr.bin/window/wwchild.c b/usr.bin/window/wwchild.c index 944bdd9..0e96466 100644 --- a/usr.bin/window/wwchild.c +++ b/usr.bin/window/wwchild.c @@ -32,6 +32,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef lint @@ -39,13 +41,13 @@ static char sccsid[] = "@(#)wwchild.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #include "ww.h" +#include <errno.h> #include <sys/types.h> #include <sys/wait.h> void wwchild() { - extern errno; int olderrno; register struct ww **wp; union wait w; diff --git a/usr.bin/window/wwerror.c b/usr.bin/window/wwerror.c index 0bba6f5..c2b971c 100644 --- a/usr.bin/window/wwerror.c +++ b/usr.bin/window/wwerror.c @@ -32,18 +32,20 @@ * 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. + * + * $FreeBSD$ */ #ifndef lint static char sccsid[] = "@(#)wwerror.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ +#include <errno.h> #include "ww.h" char * wwerror() { - extern int errno; char *strerror(); switch (wwerrno) { |