Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Nuke `extern int errno; ' in code we compile with -Wstrict-pr...
details: https://anonhg.NetBSD.org/src/rev/9142daa1ccf9
branches: trunk
changeset: 480840:9142daa1ccf9
user: mycroft <mycroft%NetBSD.org@localhost>
date: Fri Jan 21 17:08:33 2000 +0000
description:
Nuke `extern int errno;' in code we compile with -Wstrict-prototypes. We get
the correct definition from errno.h.
diffstat:
bin/ksh/sh.h | 5 ++---
games/hunt/hunt/hunt.c | 6 ++----
games/hunt/huntd/hunt.h | 4 ++--
lib/libntp/msyslog.c | 8 ++------
lib/libntp/syssignal.c | 4 +---
lib/libwrap/hosts_access.c | 6 ++----
lib/libwrap/workarounds.c | 6 ++----
libexec/telnetd/telnetd.h | 3 +--
sbin/init/init.c | 6 ++----
usr.bin/file/file.h | 5 ++---
usr.bin/mail/lex.c | 5 ++---
usr.bin/make/compat.c | 7 +++----
usr.bin/make/job.c | 9 +++------
usr.bin/systat/vmstat.c | 5 ++---
usr.bin/telnet/externs.h | 10 ++--------
usr.bin/tftp/tftp.c | 6 ++----
usr.bin/tn3270/sys_curses/system.c | 6 ++----
usr.bin/top/commands.c | 4 +---
usr.sbin/edquota/edquota.c | 3 +--
usr.sbin/mtrace/mtrace.c | 5 ++---
usr.sbin/repquota/repquota.c | 3 +--
usr.sbin/sup/source/scm.c | 14 ++++++--------
usr.sbin/sup/source/scmio.c | 4 +---
usr.sbin/sup/source/supcdefs.h | 3 +--
usr.sbin/sup/source/supfilesrv.c | 3 +--
usr.sbin/tcpdchk/percent_m.c | 5 ++---
usr.sbin/timed/timed/globals.h | 5 ++---
usr.sbin/timed/timedc/timedc.h | 4 +---
usr.sbin/xntp/include/config.h | 5 ++++-
usr.sbin/xntp/ntpdate/ntpdate.c | 6 +++---
usr.sbin/xntp/ntptrace/ntptrace.c | 4 +++-
usr.sbin/xntp/xntpd/ntp_filegen.c | 6 +++---
usr.sbin/xntp/xntpd/ntp_intres.c | 6 +++---
usr.sbin/xntp/xntpd/ntp_io.c | 6 +++---
usr.sbin/xntp/xntpd/ntp_util.c | 6 +++---
35 files changed, 75 insertions(+), 118 deletions(-)
diffs (truncated from 867 to 300 lines):
diff -r 07db96ee5ef7 -r 9142daa1ccf9 bin/ksh/sh.h
--- a/bin/ksh/sh.h Fri Jan 21 16:49:30 2000 +0000
+++ b/bin/ksh/sh.h Fri Jan 21 17:08:33 2000 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: sh.h,v 1.3 1999/10/20 15:10:00 hubertf Exp $ */
+/* $NetBSD: sh.h,v 1.4 2000/01/21 17:08:33 mycroft Exp $ */
/*
* Public Domain Bourne/Korn shell
*/
-/* $Id: sh.h,v 1.3 1999/10/20 15:10:00 hubertf Exp $ */
+/* $Id: sh.h,v 1.4 2000/01/21 17:08:33 mycroft Exp $ */
#include "config.h" /* system and option configuration info */
@@ -118,7 +118,6 @@
#endif /* HAVE_PROTOTYPES */
#include <errno.h>
-extern int errno;
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
diff -r 07db96ee5ef7 -r 9142daa1ccf9 games/hunt/hunt/hunt.c
--- a/games/hunt/hunt/hunt.c Fri Jan 21 16:49:30 2000 +0000
+++ b/games/hunt/hunt/hunt.c Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hunt.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $ */
+/* $NetBSD: hunt.c,v 1.9 2000/01/21 17:08:33 mycroft Exp $ */
/*
* Hunt
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hunt.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $");
+__RCSID("$NetBSD: hunt.c,v 1.9 2000/01/21 17:08:33 mycroft Exp $");
#endif /* not lint */
# include <sys/stat.h>
@@ -104,7 +104,6 @@
{
char *term;
int c;
- extern int errno;
extern int Otto_mode;
extern int optind;
extern char *optarg;
@@ -390,7 +389,6 @@
static int initial = TRUE;
static struct in_addr local_address;
struct hostent *hp;
- extern int errno;
# ifdef BROADCAST
static int brdc;
static SOCKET *brdv;
diff -r 07db96ee5ef7 -r 9142daa1ccf9 games/hunt/huntd/hunt.h
--- a/games/hunt/huntd/hunt.h Fri Jan 21 16:49:30 2000 +0000
+++ b/games/hunt/huntd/hunt.h Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hunt.h,v 1.5 1998/09/13 15:27:28 hubertf Exp $ */
+/* $NetBSD: hunt.h,v 1.6 2000/01/21 17:08:34 mycroft Exp $ */
/*
* Hunt
@@ -346,7 +346,7 @@
extern char *Sock_name, *Driver;
-extern int errno, Nplayer, Num_fds, Socket, Status;
+extern int Nplayer, Num_fds, Socket, Status;
extern fd_set Fds_mask, Have_inp;
# ifdef INTERNET
diff -r 07db96ee5ef7 -r 9142daa1ccf9 lib/libntp/msyslog.c
--- a/lib/libntp/msyslog.c Fri Jan 21 16:49:30 2000 +0000
+++ b/lib/libntp/msyslog.c Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msyslog.c,v 1.5 1999/07/03 12:30:31 simonb Exp $ */
+/* $NetBSD: msyslog.c,v 1.6 2000/01/21 17:08:34 mycroft Exp $ */
/*
* msyslog - either send a message to the terminal or print it on
@@ -46,10 +46,7 @@
u_long ntp_syslogmask = ~ (u_long) 0;
-#ifndef VMS
-#ifndef SYS_WINNT
-extern int errno;
-#else
+#ifdef SYS_WINNT
HANDLE hEventSource;
LPTSTR lpszStrings[1];
static WORD event_type[] = {
@@ -58,7 +55,6 @@
EVENTLOG_INFORMATION_TYPE, EVENTLOG_INFORMATION_TYPE, EVENTLOG_INFORMATION_TYPE,
};
#endif /* SYS_WINNT */
-#endif /* VMS */
extern char *progname;
#if defined(__STDC__)
diff -r 07db96ee5ef7 -r 9142daa1ccf9 lib/libntp/syssignal.c
--- a/lib/libntp/syssignal.c Fri Jan 21 16:49:30 2000 +0000
+++ b/lib/libntp/syssignal.c Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syssignal.c,v 1.4 1999/07/03 12:30:31 simonb Exp $ */
+/* $NetBSD: syssignal.c,v 1.5 2000/01/21 17:08:34 mycroft Exp $ */
#include <stdio.h>
#include <sys/types.h>
@@ -10,8 +10,6 @@
#ifdef HAVE_SIGACTION
#include <errno.h>
-extern int errno;
-
void
signal_no_reset(sig, func)
int sig;
diff -r 07db96ee5ef7 -r 9142daa1ccf9 lib/libwrap/hosts_access.c
--- a/lib/libwrap/hosts_access.c Fri Jan 21 16:49:30 2000 +0000
+++ b/lib/libwrap/hosts_access.c Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hosts_access.c,v 1.10 1999/08/31 13:58:58 itojun Exp $ */
+/* $NetBSD: hosts_access.c,v 1.11 2000/01/21 17:08:34 mycroft Exp $ */
/*
* This module implements a simple access control language that is based on
@@ -24,7 +24,7 @@
#if 0
static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
#else
-__RCSID("$NetBSD: hosts_access.c,v 1.10 1999/08/31 13:58:58 itojun Exp $");
+__RCSID("$NetBSD: hosts_access.c,v 1.11 2000/01/21 17:08:34 mycroft Exp $");
#endif
#endif
@@ -50,8 +50,6 @@
#include <rpcsvc/ypclnt.h>
#endif
-extern int errno;
-
#ifndef INADDR_NONE
#define INADDR_NONE (-1) /* XXX should be 0xffffffff */
#endif
diff -r 07db96ee5ef7 -r 9142daa1ccf9 lib/libwrap/workarounds.c
--- a/lib/libwrap/workarounds.c Fri Jan 21 16:49:30 2000 +0000
+++ b/lib/libwrap/workarounds.c Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: workarounds.c,v 1.5 1999/08/31 13:58:58 itojun Exp $ */
+/* $NetBSD: workarounds.c,v 1.6 2000/01/21 17:08:34 mycroft Exp $ */
/*
* Workarounds for known system software bugs. This module provides wrappers
@@ -14,7 +14,7 @@
#if 0
char sccsid[] = "@(#) workarounds.c 1.6 96/03/19 16:22:25";
#else
-__RCSID("$NetBSD: workarounds.c,v 1.5 1999/08/31 13:58:58 itojun Exp $");
+__RCSID("$NetBSD: workarounds.c,v 1.6 2000/01/21 17:08:34 mycroft Exp $");
#endif
#endif
@@ -29,8 +29,6 @@
#include <syslog.h>
#include <string.h>
-extern int errno;
-
#include "tcpd.h"
/*
diff -r 07db96ee5ef7 -r 9142daa1ccf9 libexec/telnetd/telnetd.h
--- a/libexec/telnetd/telnetd.h Fri Jan 21 16:49:30 2000 +0000
+++ b/libexec/telnetd/telnetd.h Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: telnetd.h,v 1.5 1996/02/28 20:38:25 thorpej Exp $ */
+/* $NetBSD: telnetd.h,v 1.6 2000/01/21 17:08:34 mycroft Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -47,5 +47,4 @@
/* other external variables */
extern char **environ;
-extern int errno;
diff -r 07db96ee5ef7 -r 9142daa1ccf9 sbin/init/init.c
--- a/sbin/init/init.c Fri Jan 21 16:49:30 2000 +0000
+++ b/sbin/init/init.c Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.35 1999/11/09 15:06:33 drochner Exp $ */
+/* $NetBSD: init.c,v 1.36 2000/01/21 17:08:34 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: init.c,v 1.35 1999/11/09 15:06:33 drochner Exp $");
+__RCSID("$NetBSD: init.c,v 1.36 2000/01/21 17:08:34 mycroft Exp $");
#endif
#endif /* not lint */
@@ -478,7 +478,6 @@
#ifdef KERN_SECURELVL
int name[2], curlevel;
size_t len;
- extern int errno;
name[0] = CTL_KERN;
name[1] = KERN_SECURELVL;
@@ -503,7 +502,6 @@
{
#ifdef KERN_SECURELVL
int name[2], curlevel;
- extern int errno;
curlevel = getsecuritylevel();
if (newlevel == curlevel)
diff -r 07db96ee5ef7 -r 9142daa1ccf9 usr.bin/file/file.h
--- a/usr.bin/file/file.h Fri Jan 21 16:49:30 2000 +0000
+++ b/usr.bin/file/file.h Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: file.h,v 1.17 1999/12/31 13:09:20 tron Exp $ */
+/* $NetBSD: file.h,v 1.18 2000/01/21 17:08:35 mycroft Exp $ */
/*
* file.h - definitions for file(1) program
@@ -86,6 +86,7 @@
};
#include <stdio.h> /* Include that here, to make sure __P gets defined */
+#include <errno.h>
#ifndef __P
# if defined(__STDC__) || defined(__cplusplus)
@@ -117,8 +118,6 @@
extern void tryelf __P((int, unsigned char *, int));
-extern int errno; /* Some unixes don't define this.. */
-
extern char *progname; /* the program name */
extern const char *magicfile; /* name of the magic file */
extern int lineno; /* current line number in magic file */
diff -r 07db96ee5ef7 -r 9142daa1ccf9 usr.bin/mail/lex.c
--- a/usr.bin/mail/lex.c Fri Jan 21 16:49:30 2000 +0000
+++ b/usr.bin/mail/lex.c Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.13 1999/02/09 04:51:30 dean Exp $ */
+/* $NetBSD: lex.c,v 1.14 2000/01/21 17:08:35 mycroft Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95";
#else
-__RCSID("$NetBSD: lex.c,v 1.13 1999/02/09 04:51:30 dean Exp $");
+__RCSID("$NetBSD: lex.c,v 1.14 2000/01/21 17:08:35 mycroft Exp $");
#endif
#endif /* not lint */
@@ -70,7 +70,6 @@
char *who = name[1] ? name + 1 : myname;
static int shudclob;
extern char *tempMesg;
- extern int errno;
if ((name = expand(name)) == NOSTR)
return -1;
diff -r 07db96ee5ef7 -r 9142daa1ccf9 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c Fri Jan 21 16:49:30 2000 +0000
+++ b/usr.bin/make/compat.c Fri Jan 21 17:08:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.28 1999/09/16 00:49:48 mycroft Exp $ */
+/* $NetBSD: compat.c,v 1.29 2000/01/21 17:08:35 mycroft Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: compat.c,v 1.28 1999/09/16 00:49:48 mycroft Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.29 2000/01/21 17:08:35 mycroft Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: compat.c,v 1.28 1999/09/16 00:49:48 mycroft Exp $");
Home |
Main Index |
Thread Index |
Old Index