svn commit: r359754 - in stable/11: bin/sh cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool contrib/bmake contrib/ipfilter contrib/ipfilter/tools contrib/ntp/include contrib/ntp/...
Kyle Evans
kevans at FreeBSD.org
Thu Apr 9 20:38:45 UTC 2020
Author: kevans
Date: Thu Apr 9 20:38:36 2020
New Revision: 359754
URL: https://svnweb.freebsd.org/changeset/base/359754
Log:
MFC -fno-common fixes: r359389, r359394, r359397-r359399, r359403-r359404,
r359406, r359413-r359416, r359425, r359427, r359432-r359433, r359443,
r359675-r359677
Note: this is not necessarily a complete fix to get these programs to build
with -fno-common applied.
r359389:
config(8): fixes for -fno-common
Move this handful of definitions into main.c, properly declare these as
extern in config.h. This fixes the config(8) build with -fno-common.
Unexplained in my previous commit to gas, -fno-common will become the
default in GCC10 and LLVM11, so it's worth addressing these in advance.
r359394:
MFV r359393: tcsh: import 6974bc35a5cd
This removes an extra variable definition that causes the -fno-common build
to fail, which will be a new default in GCC10/LLVM11.
r359397:
zfs: fix -fno-common issues
A similar (or identical?) fix has already landed in OpenZFS.
-fno-common will become the default in GCC10/LLVM11.
r359398:
sh: remove duplicate el definition
el is declared extern in myhistedit.h and defined in histedit.c. Remove the
duplicate definition in input.c to appease the -fno-common build.
-fno-common will become the default in GCC10/LLVM11.
r359399:
telnet: remove some duplicate definitions, mark terminaltype extern
Most of these were already properly declared and defined elsewhere, this is
effectively just a minor cleanup that fixes the -fno-common build.
-fno-common will become the default in GCC10/LLVM11.
r359403:
Revert 359399: telnet -fno-common bits
There was a large misfire from my local diff that I need to investigate, and
this version committed did not build.
r359404:
Re-apply r359399: telnet -fno-common fix
line and auth_level's redefinitions are just extraneous
telnetd will #define extern and then include ext.h to allocate storage for
all of these extern'd vars; however, two of them are actually defined in
libtelnet instead. Instead of doing an #ifdef extern dance around those
function pointers, just add an EXTERN macro to make it easier to
differentiate by sight which ones will get allocated in globals.c and which
ones are defined elsewhere.
r359406:
telnet: kill off remaining duplicate definition
r359413:
ipfilter: remove duplicate definition of 'thishost'
thishost is already defined in lib/initparse.c; no need for this one. This
fixes the ipfilter build with -fno-common.
-fno-common will become the default in GCC10/LLVM11.
r359414:
iscontrol: move definition of vflag/iscsidev to iscontrol.c
Mark the declaration extern as these are used elsewhere; this fixes the
build with -fno-common.
r359415:
userboot: mark host_fsops as extern
This is already defined elsewhere; mark this declaration extern to the fix
the -fno-common build.
r359416:
systat: remove redundant definition of kd
kd is already properly declared in extern.h and defined in main.c, rendering
this definition useless. This fixes the -fno-common build.
r359425:
locate: fix -fno-common build
Just a single variable declaration to extern and define elsewhere here,
myctype.
-fno-common will become a default in GCC10/LLVM11.
r359427:
fsck_ffs/fsdb: fix -fno-common build
This one is also a small list:
- 3x duplicate definition (ufs2_zino, returntosingle, nflag)
- 5x 'needs extern', 3/5 of which are referenced in fsdb
-fno-common will become the default in GCC10/LLVM11.
r359432:
gdb: compile with -fcommon explicitly
As described in the comment, gdb relies on some of the linker magic that
happens with -fcommon. I suspect the life expectancy of gdb-in-base is low
enough that this isn't worth spending much time addressing, especially given
the vintage. Hit it with the -fcommon hammer so that it continues to just
work.
r359433:
bmake: fix -fno-common build
debug was declared extern, but debug_file was not; correct this and define
debug_file in main.c (as debug is) to fix the -fno-common build.
-fno-common will become the default with GCC10/LLVM11.
r359443:
MFV r359442: bmake: import -fno-common fix build back from upstream
sjg@ committed the local patch previously committed upstream; pull it in to
vendor/ to ease any potential stress of future imports.
r359675:
kqueue tests: fix -fno-common build
vnode_fd and kqfd are both shared among multiple CU; define them exactly
once.
In the case of vnode_fd, it was simply the declaration that needed
correction.
-fno-common will become the default in GCC10/LLVM11.
r359676:
ntpd: fix build with -fno-common
Only a small nit here: psl should be declared extern and defined exactly
once.
-fno-common will become the default in GCC10/LLVM11.
r359677:
yp*: fix -fno-common build
This is mostly two problems spread out far and wide:
- ypldap_process should be declared properly
- debug is defined differently in many programs
For the latter, just extern it and define it everywhere that actually needs
it. This mostly works out nicely for ^/libexec/ypxfr, which can remove the
assignment at the beginning of main in favor of defining it properly.
-fno-common will become the default in GCC10/LLVM11.
Modified:
stable/11/bin/sh/input.c
stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h
stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h
stable/11/contrib/bmake/main.c
stable/11/contrib/bmake/make.h
stable/11/contrib/ipfilter/ipf.h
stable/11/contrib/ipfilter/tools/ipnat.c
stable/11/contrib/ntp/include/ntp_config.h
stable/11/contrib/ntp/ntpd/ntp_config.c
stable/11/contrib/tcsh/tc.sig.c
stable/11/contrib/telnet/telnetd/ext.h
stable/11/contrib/telnet/telnetd/global.c
stable/11/contrib/telnet/telnetd/sys_term.c
stable/11/contrib/telnet/telnetd/telnetd.c
stable/11/gnu/usr.bin/gdb/Makefile.inc
stable/11/libexec/ypxfr/ypxfr_main.c
stable/11/sbin/fsck_ffs/fsck.h
stable/11/sbin/fsck_ffs/gjournal.c
stable/11/sbin/fsck_ffs/globs.c
stable/11/sbin/fsck_ffs/setup.c
stable/11/sbin/fsdb/fsdb.c
stable/11/sbin/iscontrol/iscontrol.c
stable/11/sbin/iscontrol/iscontrol.h
stable/11/stand/userboot/userboot/libuserboot.h
stable/11/tests/sys/kqueue/libkqueue/common.h
stable/11/tests/sys/kqueue/libkqueue/proc.c
stable/11/tests/sys/kqueue/libkqueue/read.c
stable/11/tests/sys/kqueue/libkqueue/signal.c
stable/11/tests/sys/kqueue/libkqueue/timer.c
stable/11/tests/sys/kqueue/libkqueue/user.c
stable/11/tests/sys/kqueue/libkqueue/vnode.c
stable/11/usr.bin/locate/locate/locate.c
stable/11/usr.bin/locate/locate/locate.h
stable/11/usr.bin/systat/swap.c
stable/11/usr.sbin/config/config.h
stable/11/usr.sbin/config/main.c
stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
stable/11/usr.sbin/rpc.ypupdated/ypupdated_main.c
stable/11/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
stable/11/usr.sbin/ypldap/ypldap.c
stable/11/usr.sbin/ypldap/ypldap.h
stable/11/usr.sbin/ypserv/yp_access.c
stable/11/usr.sbin/ypserv/yp_error.c
stable/11/usr.sbin/ypserv/yp_main.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/bin/sh/input.c
==============================================================================
--- stable/11/bin/sh/input.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/bin/sh/input.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -102,8 +102,6 @@ static struct parsefile basepf = { /* top level input
static struct parsefile *parsefile = &basepf; /* current input file */
int whichprompt; /* 1 == PS1, 2 == PS2 */
-EditLine *el; /* cookie for editline package */
-
static void pushfile(void);
static int preadfd(void);
static void popstring(void);
Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h
==============================================================================
--- stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -33,7 +33,7 @@ extern "C" {
void * safe_malloc(size_t size);
void nomem(void);
-libzfs_handle_t *g_zfs;
+extern libzfs_handle_t *g_zfs;
#ifdef __cplusplus
}
Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
==============================================================================
--- stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -62,6 +62,8 @@
#include "statcommon.h"
+libzfs_handle_t *g_zfs;
+
static int zpool_do_create(int, char **);
static int zpool_do_destroy(int, char **);
Modified: stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h
==============================================================================
--- stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -64,7 +64,7 @@ void pool_list_free(zpool_list_t *);
int pool_list_count(zpool_list_t *);
void pool_list_remove(zpool_list_t *, zpool_handle_t *);
-libzfs_handle_t *g_zfs;
+extern libzfs_handle_t *g_zfs;
#ifdef __cplusplus
}
Modified: stable/11/contrib/bmake/main.c
==============================================================================
--- stable/11/contrib/bmake/main.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/bmake/main.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $ */
+/* $NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $");
#endif
#endif /* not lint */
#endif
@@ -198,6 +198,8 @@ char *progname; /* the program name */
char *makeDependfile;
pid_t myPid;
int makelevel;
+
+FILE *debug_file;
Boolean forceJobs = FALSE;
Modified: stable/11/contrib/bmake/make.h
==============================================================================
--- stable/11/contrib/bmake/make.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/bmake/make.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.104 2018/02/12 21:38:09 sjg Exp $ */
+/* $NetBSD: make.h,v 1.105 2020/03/30 02:41:06 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -464,7 +464,7 @@ extern pid_t myPid;
* There is one bit per module. It is up to the module what debug
* information to print.
*/
-FILE *debug_file; /* Output written here - default stdout */
+extern FILE *debug_file; /* Output written here - default stdout */
extern int debug;
#define DEBUG_ARCH 0x00001
#define DEBUG_COND 0x00002
Modified: stable/11/contrib/ipfilter/ipf.h
==============================================================================
--- stable/11/contrib/ipfilter/ipf.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/ipfilter/ipf.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -191,7 +191,7 @@ typedef int (* addfunc_t) __P((int, ioctlfunc_t, void
typedef int (* copyfunc_t) __P((void *, void *, size_t));
-extern char thishost[];
+extern char thishost[MAXHOSTNAMELEN];
extern char flagset[];
extern u_char flags[];
extern struct ipopt_names ionames[];
Modified: stable/11/contrib/ipfilter/tools/ipnat.c
==============================================================================
--- stable/11/contrib/ipfilter/tools/ipnat.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/ipfilter/tools/ipnat.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -60,7 +60,6 @@ static const char rcsid[] = "@(#)$Id$";
#define bzero(a,b) memset(a,0,b)
#endif
int use_inet6 = 0;
-char thishost[MAXHOSTNAMELEN];
extern char *optarg;
Modified: stable/11/contrib/ntp/include/ntp_config.h
==============================================================================
--- stable/11/contrib/ntp/include/ntp_config.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/ntp/include/ntp_config.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -280,7 +280,7 @@ typedef struct settrap_parms_tag {
* Poll Skew List
*/
-psl_item psl[17-3+1]; /* values for polls 3-17 */
+extern psl_item psl[17-3+1]; /* values for polls 3-17 */
/* To simplify the runtime code we */
/* don't want to have to special-case */
/* dealing with a default */
Modified: stable/11/contrib/ntp/ntpd/ntp_config.c
==============================================================================
--- stable/11/contrib/ntp/ntpd/ntp_config.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/ntp/ntpd/ntp_config.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -202,6 +202,8 @@ int cryptosw; /* crypto command called */
extern char *stats_drift_file; /* name of the driftfile */
+psl_item psl[17-3+1];
+
#ifdef BC_LIST_FRAMEWORK_NOT_YET_USED
/*
* backwards compatibility flags
Modified: stable/11/contrib/tcsh/tc.sig.c
==============================================================================
--- stable/11/contrib/tcsh/tc.sig.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/tcsh/tc.sig.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -56,7 +56,6 @@ int alrmcatch_disabled; /* = 0; */
int phup_disabled; /* = 0; */
int pchild_disabled; /* = 0; */
int pintr_disabled; /* = 0; */
-int handle_interrupt; /* = 0; */
int
handle_pending_signals(void)
Modified: stable/11/contrib/telnet/telnetd/ext.h
==============================================================================
--- stable/11/contrib/telnet/telnetd/ext.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/telnet/telnetd/ext.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -30,53 +30,57 @@
* $FreeBSD$
*/
+#ifndef EXTERN
+#define EXTERN extern
+#endif
+
/*
* Telnet server variable declarations
*/
-extern char options[256];
-extern char do_dont_resp[256];
-extern char will_wont_resp[256];
-extern int linemode; /* linemode on/off */
+EXTERN char options[256];
+EXTERN char do_dont_resp[256];
+EXTERN char will_wont_resp[256];
+EXTERN int linemode; /* linemode on/off */
#ifdef LINEMODE
-extern int uselinemode; /* what linemode to use (on/off) */
-extern int editmode; /* edit modes in use */
-extern int useeditmode; /* edit modes to use */
-extern int alwayslinemode; /* command line option */
-extern int lmodetype; /* Client support for linemode */
+EXTERN int uselinemode; /* what linemode to use (on/off) */
+EXTERN int editmode; /* edit modes in use */
+EXTERN int useeditmode; /* edit modes to use */
+EXTERN int alwayslinemode; /* command line option */
+EXTERN int lmodetype; /* Client support for linemode */
#endif /* LINEMODE */
-extern int flowmode; /* current flow control state */
-extern int restartany; /* restart output on any character state */
+EXTERN int flowmode; /* current flow control state */
+EXTERN int restartany; /* restart output on any character state */
#ifdef DIAGNOSTICS
-extern int diagnostic; /* telnet diagnostic capabilities */
+EXTERN int diagnostic; /* telnet diagnostic capabilities */
#endif /* DIAGNOSTICS */
#ifdef BFTPDAEMON
-extern int bftpd; /* behave as bftp daemon */
+EXTERN int bftpd; /* behave as bftp daemon */
#endif /* BFTPDAEMON */
#ifdef AUTHENTICATION
-extern int auth_level;
+EXTERN int auth_level;
#endif
-extern slcfun slctab[NSLC + 1]; /* slc mapping table */
+EXTERN slcfun slctab[NSLC + 1]; /* slc mapping table */
-char *terminaltype;
+EXTERN char *terminaltype;
/*
* I/O data buffers, pointers, and counters.
*/
-extern char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
+EXTERN char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
-extern char netibuf[BUFSIZ], *netip;
+EXTERN char netibuf[BUFSIZ], *netip;
-extern char netobuf[BUFSIZ], *nfrontp, *nbackp;
-extern char *neturg; /* one past last bye of urgent data */
+EXTERN char netobuf[BUFSIZ], *nfrontp, *nbackp;
+EXTERN char *neturg; /* one past last bye of urgent data */
-extern int pcc, ncc;
+EXTERN int pcc, ncc;
-extern int pty, net;
-extern char line[32];
-extern int SYNCHing; /* we are in TELNET SYNCH mode */
+EXTERN int pty, net;
+EXTERN char line[32];
+EXTERN int SYNCHing; /* we are in TELNET SYNCH mode */
-extern void
+EXTERN void
_termstat(void),
add_slc(char, char, cc_t),
check_slc(void),
@@ -133,7 +137,7 @@ extern void
tty_binaryin(int),
tty_binaryout(int);
-extern int
+EXTERN int
end_slc(unsigned char **),
getnpty(void),
#ifndef convex
@@ -158,7 +162,7 @@ extern int
tty_istrapsig(void),
tty_linemode(void);
-extern void
+EXTERN void
tty_rspeed(int),
tty_setecho(int),
tty_setedit(int),
@@ -177,7 +181,7 @@ void startslave(char *, int, char *);
#ifdef ENCRYPTION
extern void (*encrypt_output)(unsigned char *, int);
extern int (*decrypt_input)(int);
-extern char *nclearto;
+EXTERN char *nclearto;
#endif /* ENCRYPTION */
@@ -186,7 +190,7 @@ extern char *nclearto;
* the relationship between various variables.
*/
-extern struct {
+EXTERN struct {
int
system, /* what the current time is */
echotoggle, /* last time user entered echo character */
Modified: stable/11/contrib/telnet/telnetd/global.c
==============================================================================
--- stable/11/contrib/telnet/telnetd/global.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/telnet/telnetd/global.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -44,5 +44,5 @@ __FBSDID("$FreeBSD$");
*/
#include "defs.h"
-#define extern
+#define EXTERN
#include "ext.h"
Modified: stable/11/contrib/telnet/telnetd/sys_term.c
==============================================================================
--- stable/11/contrib/telnet/telnetd/sys_term.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/telnet/telnetd/sys_term.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -376,8 +376,6 @@ spcset(int func, cc_t *valp, cc_t **valpp)
*
* Returns the file descriptor of the opened pty.
*/
-char line[32];
-
int
getpty(int *ptynum __unused)
{
Modified: stable/11/contrib/telnet/telnetd/telnetd.c
==============================================================================
--- stable/11/contrib/telnet/telnetd/telnetd.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/contrib/telnet/telnetd/telnetd.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
#ifdef AUTHENTICATION
#include <libtelnet/auth.h>
-int auth_level = 0;
#endif
#ifdef ENCRYPTION
#include <libtelnet/encrypt.h>
Modified: stable/11/gnu/usr.bin/gdb/Makefile.inc
==============================================================================
--- stable/11/gnu/usr.bin/gdb/Makefile.inc Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/gnu/usr.bin/gdb/Makefile.inc Thu Apr 9 20:38:36 2020 (r359754)
@@ -47,6 +47,11 @@ CFLAGS+= -I${CNTRB_GDB}/include
CFLAGS+= -I${CNTRB_BU}/bfd
CFLAGS+= -I${OBJ_RL:H}
+# Some bits here currently rely on some of the linker-merging magic that happens
+# with -fcommon. While this is the default right now, explicitly set -fcommon
+# so that it continues to build when the default flips.
+CFLAGS+= -fcommon
+
GENSRCS+= nm.h tm.h
.if defined(GDB_CROSS_DEBUGGER)
Modified: stable/11/libexec/ypxfr/ypxfr_main.c
==============================================================================
--- stable/11/libexec/ypxfr/ypxfr_main.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/libexec/ypxfr/ypxfr_main.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$");
#include <rpcsvc/ypxfrd.h>
#include "ypxfr_extern.h"
+int debug = 1;
+
char *progname = "ypxfr";
char *yp_dir = _PATH_YP;
int _rpcpmstart = 0;
@@ -173,8 +175,6 @@ main(int argc, char *argv[])
int remoteport;
int interdom = 0;
int secure = 0;
-
- debug = 1;
if (!isatty(fileno(stderr))) {
openlog("ypxfr", LOG_PID, LOG_DAEMON);
Modified: stable/11/sbin/fsck_ffs/fsck.h
==============================================================================
--- stable/11/sbin/fsck_ffs/fsck.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/sbin/fsck_ffs/fsck.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -125,7 +125,7 @@ struct inostat {
* Inode state information is contained on per cylinder group lists
* which are described by the following structure.
*/
-struct inostatlist {
+extern struct inostatlist {
long il_numalloced; /* number of inodes allocated in this cg */
struct inostat *il_stat;/* inostat info for this cylinder group */
} *inostathead;
@@ -269,13 +269,13 @@ struct dups {
struct dups *next;
ufs2_daddr_t dup;
};
-struct dups *duplist; /* head of dup list */
-struct dups *muldup; /* end of unique duplicate dup block numbers */
+extern struct dups *duplist; /* head of dup list */
+extern struct dups *muldup; /* end of unique duplicate dup block numbers */
/*
* Inode cache data structures.
*/
-struct inoinfo {
+extern struct inoinfo {
struct inoinfo *i_nexthash; /* next entry in hash chain */
ino_t i_number; /* inode number of this entry */
ino_t i_parent; /* inode number of parent */
Modified: stable/11/sbin/fsck_ffs/gjournal.c
==============================================================================
--- stable/11/sbin/fsck_ffs/gjournal.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/sbin/fsck_ffs/gjournal.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -91,7 +91,6 @@ static LIST_HEAD(, cgchain) cglist = LIST_HEAD_INITIAL
static const char *devnam;
static struct uufsd *disk = NULL;
static struct fs *fs = NULL;
-struct ufs2_dinode ufs2_zino;
static void putcgs(void);
Modified: stable/11/sbin/fsck_ffs/globs.c
==============================================================================
--- stable/11/sbin/fsck_ffs/globs.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/sbin/fsck_ffs/globs.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -114,6 +114,10 @@ volatile sig_atomic_t got_sigalarm; /* received a SIGA
struct ufs1_dinode ufs1_zino;
struct ufs2_dinode ufs2_zino;
+struct dups *duplist;
+struct dups *muldup;
+struct inostatlist *inostathead;
+
void
fsckinit(void)
{
Modified: stable/11/sbin/fsck_ffs/setup.c
==============================================================================
--- stable/11/sbin/fsck_ffs/setup.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/sbin/fsck_ffs/setup.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -55,6 +55,8 @@ __FBSDID("$FreeBSD$");
#include "fsck.h"
+struct inoinfo **inphead, **inpsort;
+
struct bufarea asblk;
#define altsblock (*asblk.b_un.b_fs)
#define POWEROF2(num) (((num) & ((num) - 1)) == 0)
Modified: stable/11/sbin/fsdb/fsdb.c
==============================================================================
--- stable/11/sbin/fsdb/fsdb.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/sbin/fsdb/fsdb.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -70,9 +70,6 @@ usage(void)
exit(1);
}
-int returntosingle;
-char nflag;
-
/*
* We suck in lots of fsck code, and just pick & choose the stuff we want.
*
Modified: stable/11/sbin/iscontrol/iscontrol.c
==============================================================================
--- stable/11/sbin/iscontrol/iscontrol.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/sbin/iscontrol/iscontrol.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -82,6 +82,9 @@ token_t DigestMethods[] = {
{0, 0}
};
+int vflag;
+char *iscsidev;
+
u_char isid[6 + 6];
/*
| Default values
Modified: stable/11/sbin/iscontrol/iscontrol.h
==============================================================================
--- stable/11/sbin/iscontrol/iscontrol.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/sbin/iscontrol/iscontrol.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -149,8 +149,8 @@ int recvpdu(isess_t *sess, pdu_t *pp);
int lookup(token_t *tbl, char *m);
-int vflag;
-char *iscsidev;
+extern int vflag;
+extern char *iscsidev;
void parseArgs(int nargs, char **args, isc_opt_t *op);
void parseConfig(FILE *fd, char *key, isc_opt_t *op);
Modified: stable/11/stand/userboot/userboot/libuserboot.h
==============================================================================
--- stable/11/stand/userboot/userboot/libuserboot.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/stand/userboot/userboot/libuserboot.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -43,7 +43,7 @@ extern int userboot_disk_maxunit;
extern struct devsw host_dev;
/* access to host filesystem */
-struct fs_ops host_fsops;
+extern struct fs_ops host_fsops;
struct bootinfo;
struct preloaded_file;
Modified: stable/11/tests/sys/kqueue/libkqueue/common.h
==============================================================================
--- stable/11/tests/sys/kqueue/libkqueue/common.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/tests/sys/kqueue/libkqueue/common.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -41,7 +41,8 @@
#include <sys/event.h>
extern char *cur_test_id;
-int vnode_fd;
+extern int vnode_fd;
+extern int kqfd;
extern char * kevent_to_str(struct kevent *);
struct kevent * kevent_get(int);
Modified: stable/11/tests/sys/kqueue/libkqueue/proc.c
==============================================================================
--- stable/11/tests/sys/kqueue/libkqueue/proc.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/tests/sys/kqueue/libkqueue/proc.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -25,7 +25,6 @@
static int sigusr1_caught = 0;
-int kqfd;
static void
sig_handler(int signum)
Modified: stable/11/tests/sys/kqueue/libkqueue/read.c
==============================================================================
--- stable/11/tests/sys/kqueue/libkqueue/read.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/tests/sys/kqueue/libkqueue/read.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -18,7 +18,6 @@
#include "common.h"
-int kqfd;
int sockfd[2];
static void
Modified: stable/11/tests/sys/kqueue/libkqueue/signal.c
==============================================================================
--- stable/11/tests/sys/kqueue/libkqueue/signal.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/tests/sys/kqueue/libkqueue/signal.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -18,7 +18,6 @@
#include "common.h"
-int kqfd;
void
test_kevent_signal_add(void)
Modified: stable/11/tests/sys/kqueue/libkqueue/timer.c
==============================================================================
--- stable/11/tests/sys/kqueue/libkqueue/timer.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/tests/sys/kqueue/libkqueue/timer.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -26,7 +26,6 @@
#define MS_TO_US(t) ((t) * THOUSAND) /* Convert milliseconds to microseconds. */
#define US_TO_NS(t) ((t) * THOUSAND) /* Convert microseconds to nanoseconds. */
-int kqfd;
/* Get the current time with microsecond precision. Used for
* sub-second timing to make some timer tests run faster.
Modified: stable/11/tests/sys/kqueue/libkqueue/user.c
==============================================================================
--- stable/11/tests/sys/kqueue/libkqueue/user.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/tests/sys/kqueue/libkqueue/user.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -18,7 +18,6 @@
#include "common.h"
-int kqfd;
static void
add_and_delete(void)
Modified: stable/11/tests/sys/kqueue/libkqueue/vnode.c
==============================================================================
--- stable/11/tests/sys/kqueue/libkqueue/vnode.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/tests/sys/kqueue/libkqueue/vnode.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -18,7 +18,6 @@
#include "common.h"
-int kqfd;
int vnode_fd;
void
Modified: stable/11/usr.bin/locate/locate/locate.c
==============================================================================
--- stable/11/usr.bin/locate/locate/locate.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.bin/locate/locate/locate.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -114,6 +114,7 @@ int f_limit; /* limit number of output line
u_int counter; /* counter for matches [-c] */
char separator='\n'; /* line separator */
+u_char myctype[UCHAR_MAX + 1];
void usage(void);
void statistic(FILE *, char *);
Modified: stable/11/usr.bin/locate/locate/locate.h
==============================================================================
--- stable/11/usr.bin/locate/locate/locate.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.bin/locate/locate/locate.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -63,7 +63,7 @@
define TOLOWER(ch) tolower(ch)
#else
-u_char myctype[UCHAR_MAX + 1];
+extern u_char myctype[UCHAR_MAX + 1];
#define TOLOWER(ch) (myctype[ch])
#endif
Modified: stable/11/usr.bin/systat/swap.c
==============================================================================
--- stable/11/usr.bin/systat/swap.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.bin/systat/swap.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -54,8 +54,6 @@ static const char sccsid[] = "@(#)swap.c 8.3 (Berkeley
#include "systat.h"
#include "extern.h"
-kvm_t *kd;
-
static char *header;
static long blocksize;
static int dlen, odlen;
Modified: stable/11/usr.sbin/config/config.h
==============================================================================
--- stable/11/usr.sbin/config/config.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/config/config.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -43,7 +43,7 @@ struct cfgfile {
STAILQ_ENTRY(cfgfile) cfg_next;
char *cfg_path;
};
-STAILQ_HEAD(, cfgfile) cfgfiles;
+extern STAILQ_HEAD(cfgfile_head, cfgfile) cfgfiles;
struct file_list {
STAILQ_ENTRY(file_list) f_next;
@@ -100,8 +100,8 @@ struct config {
* in the makerules, etc. machinearch is the global notion of the
* MACHINE_ARCH for this MACHINE.
*/
-char *machinename;
-char *machinearch;
+extern char *machinename;
+extern char *machinearch;
/*
* For each machine, a set of CPU's may be specified as supported.
@@ -112,7 +112,7 @@ struct cputype {
SLIST_ENTRY(cputype) cpu_next;
};
-SLIST_HEAD(, cputype) cputype;
+extern SLIST_HEAD(cputype_head, cputype) cputype;
/*
* A set of options may also be specified which are like CPU types,
@@ -127,7 +127,7 @@ struct opt {
SLIST_ENTRY(opt) op_append;
};
-SLIST_HEAD(opt_head, opt) opt, mkopt, rmopts;
+extern SLIST_HEAD(opt_head, opt) opt, mkopt, rmopts;
struct opt_list {
char *o_name;
@@ -137,7 +137,7 @@ struct opt_list {
SLIST_ENTRY(opt_list) o_next;
};
-SLIST_HEAD(, opt_list) otab;
+extern SLIST_HEAD(opt_list_head, opt_list) otab;
struct envvar {
char *env_str;
@@ -145,21 +145,21 @@ struct envvar {
STAILQ_ENTRY(envvar) envvar_next;
};
-STAILQ_HEAD(envvar_head, envvar) envvars;
+extern STAILQ_HEAD(envvar_head, envvar) envvars;
struct hint {
char *hint_name;
STAILQ_ENTRY(hint) hint_next;
};
-STAILQ_HEAD(hint_head, hint) hints;
+extern STAILQ_HEAD(hint_head, hint) hints;
struct includepath {
char *path;
SLIST_ENTRY(includepath) path_next;
};
-SLIST_HEAD(, includepath) includepath;
+extern SLIST_HEAD(includepath_head, includepath) includepath;
/*
* Tag present in the kernconf.tmpl template file. It's mandatory for those
Modified: stable/11/usr.sbin/config/main.c
==============================================================================
--- stable/11/usr.sbin/config/main.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/config/main.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -70,6 +70,17 @@ static const char rcsid[] =
#define CDIR "../compile/"
+char *machinename;
+char *machinearch;
+
+struct cfgfile_head cfgfiles;
+struct cputype_head cputype;
+struct opt_head opt, mkopt, rmopts;
+struct opt_list_head otab;
+struct envvar_head envvars;
+struct hint_head hints;
+struct includepath_head includepath;
+
char * PREFIX;
char destdir[MAXPATHLEN];
char srcdir[MAXPATHLEN];
Modified: stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
==============================================================================
--- stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -81,6 +81,7 @@ static int _rpcfdtype;
#define _IDLE 0
#define _SERVED 1
#define _SERVING 2
+int debug;
static char _localhost[] = "localhost";
static char _passwd_byname[] = "passwd.byname";
@@ -170,8 +171,6 @@ main(int argc, char *argv[])
char *mastername;
char myname[MAXHOSTNAMELEN + 2];
int maxrec = RPC_MAXDATASIZE;
-
- extern int debug;
debug = 1;
Modified: stable/11/usr.sbin/rpc.ypupdated/ypupdated_main.c
==============================================================================
--- stable/11/usr.sbin/rpc.ypupdated/ypupdated_main.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/rpc.ypupdated/ypupdated_main.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -74,6 +74,8 @@ static int _rpcfdtype;
extern int _rpcsvcstate; /* Set when a request is serviced */
+int debug;
+
char *progname = "rpc.ypupdated";
char *yp_dir = "/var/yp/";
Modified: stable/11/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
==============================================================================
--- stable/11/usr.sbin/rpc.ypxfrd/ypxfrd_main.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/rpc.ypxfrd/ypxfrd_main.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -76,6 +76,8 @@ static int _rpcfdtype;
extern int _rpcsvcstate; /* Set when a request is serviced */
+int debug;
+
char *progname = "rpc.ypxfrd";
char *yp_dir = "/var/yp/";
Modified: stable/11/usr.sbin/ypldap/ypldap.c
==============================================================================
--- stable/11/usr.sbin/ypldap/ypldap.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/ypldap/ypldap.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -40,6 +40,8 @@
#include "ypldap.h"
+enum ypldap_process_type ypldap_process;
+
__dead2 void usage(void);
int check_child(pid_t, const char *);
void main_sig_handler(int, short, void *);
Modified: stable/11/usr.sbin/ypldap/ypldap.h
==============================================================================
--- stable/11/usr.sbin/ypldap/ypldap.h Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/ypldap/ypldap.h Thu Apr 9 20:38:36 2020 (r359754)
@@ -47,10 +47,11 @@ struct ypldap_addr {
};
TAILQ_HEAD(ypldap_addr_list, ypldap_addr);
-enum {
+enum ypldap_process_type {
PROC_MAIN,
PROC_CLIENT
-} ypldap_process;
+};
+extern enum ypldap_process_type ypldap_process;
struct userent {
RB_ENTRY(userent) ue_name_node;
Modified: stable/11/usr.sbin/ypserv/yp_access.c
==============================================================================
--- stable/11/usr.sbin/ypserv/yp_access.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/ypserv/yp_access.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$");
#include "tcpd.h"
#endif
-extern int debug;
-
static const char *yp_procs[] = {
/* NIS v1 */
"ypoldproc_null",
Modified: stable/11/usr.sbin/ypserv/yp_error.c
==============================================================================
--- stable/11/usr.sbin/ypserv/yp_error.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/ypserv/yp_error.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$");
#include <syslog.h>
#include "yp_extern.h"
-int debug;
-
extern int _rpcpmstart;
extern char *progname;
static void __verr(const char *fmt, va_list ap) __printflike(1, 0);
Modified: stable/11/usr.sbin/ypserv/yp_main.c
==============================================================================
--- stable/11/usr.sbin/ypserv/yp_main.c Thu Apr 9 20:35:35 2020 (r359753)
+++ stable/11/usr.sbin/ypserv/yp_main.c Thu Apr 9 20:38:36 2020 (r359754)
@@ -87,7 +87,7 @@ extern int _rpc_dtablesize(void);
extern int _rpcsvcstate; /* Set when a request is serviced */
char *progname = "ypserv";
char *yp_dir = _PATH_YP;
-/*int debug = 0;*/
+int debug;
int do_dns = 0;
int resfd;
More information about the svn-src-stable-11
mailing list