Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Apr 2020 20:35:35 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r359753 - in stable/12: bin/sh cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool contrib/bmake contrib/ipfilter contrib/ipfilter/tools contrib/ntp/include contrib/ntp/...
Message-ID:  <202004092035.039KZZ0q071806@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Apr  9 20:35:35 2020
New Revision: 359753
URL: https://svnweb.freebsd.org/changeset/base/359753

Log:
  MFC -fno-common fixes: r359389, r359394, r359397-r359399, r359403-r359404,
  r359406, r359413-r359416, r359424-r359425, r359427, r359432-r359433,
  r359443, r359675-r359678
  
  Note: this is not necessarily a complete fix to get these programs to build
  with -fno-common applied; further work may be needed in this branch.
  
  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.
  
  r359424:
  openssh: -fno-common fix from upstream f47d72ddad
  
  This is currently staged in vendor/ as part of the 8.0p1 import, which isn't
  quite ready to land. Given that this is a simple one-line fix, apply it now
  as the fallout will be pretty minimal.
  
  -fno-common will become the default in GCC10/LLVM11.
  
  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.
  
  r359678:
  indent: fix the -fno-common build
  
  Spread the globals far and wide, hopefully to the files that make the most
  sense.
  
  -fno-common will become the default in GCC10/LLVM11.

Modified:
  stable/12/bin/sh/input.c
  stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h
  stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
  stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h
  stable/12/contrib/bmake/main.c
  stable/12/contrib/bmake/make.h
  stable/12/contrib/ipfilter/ipf.h
  stable/12/contrib/ipfilter/tools/ipnat.c
  stable/12/contrib/ntp/include/ntp_config.h
  stable/12/contrib/ntp/ntpd/ntp_config.c
  stable/12/contrib/tcsh/tc.sig.c
  stable/12/contrib/telnet/telnetd/ext.h
  stable/12/contrib/telnet/telnetd/global.c
  stable/12/contrib/telnet/telnetd/sys_term.c
  stable/12/contrib/telnet/telnetd/telnetd.c
  stable/12/crypto/openssh/session.c
  stable/12/gnu/usr.bin/gdb/Makefile.inc
  stable/12/libexec/ypxfr/ypxfr_main.c
  stable/12/sbin/fsck_ffs/fsck.h
  stable/12/sbin/fsck_ffs/gjournal.c
  stable/12/sbin/fsck_ffs/globs.c
  stable/12/sbin/fsck_ffs/setup.c
  stable/12/sbin/fsdb/fsdb.c
  stable/12/sbin/iscontrol/iscontrol.c
  stable/12/sbin/iscontrol/iscontrol.h
  stable/12/stand/userboot/userboot/libuserboot.h
  stable/12/tests/sys/kqueue/libkqueue/common.h
  stable/12/tests/sys/kqueue/libkqueue/proc.c
  stable/12/tests/sys/kqueue/libkqueue/read.c
  stable/12/tests/sys/kqueue/libkqueue/signal.c
  stable/12/tests/sys/kqueue/libkqueue/timer.c
  stable/12/tests/sys/kqueue/libkqueue/user.c
  stable/12/tests/sys/kqueue/libkqueue/vnode.c
  stable/12/usr.bin/indent/indent.c
  stable/12/usr.bin/indent/indent_globs.h
  stable/12/usr.bin/indent/io.c
  stable/12/usr.bin/indent/parse.c
  stable/12/usr.bin/locate/locate/locate.c
  stable/12/usr.bin/locate/locate/locate.h
  stable/12/usr.bin/systat/swap.c
  stable/12/usr.sbin/config/config.h
  stable/12/usr.sbin/config/main.c
  stable/12/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
  stable/12/usr.sbin/rpc.ypupdated/ypupdated_main.c
  stable/12/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
  stable/12/usr.sbin/ypldap/ypldap.c
  stable/12/usr.sbin/ypldap/ypldap.h
  stable/12/usr.sbin/ypserv/yp_access.c
  stable/12/usr.sbin/ypserv/yp_error.c
  stable/12/usr.sbin/ypserv/yp_main.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/bin/sh/input.c
==============================================================================
--- stable/12/bin/sh/input.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/bin/sh/input.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h
==============================================================================
--- stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
==============================================================================
--- stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h
==============================================================================
--- stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/bmake/main.c
==============================================================================
--- stable/12/contrib/bmake/main.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/bmake/main.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/bmake/make.h
==============================================================================
--- stable/12/contrib/bmake/make.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/bmake/make.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/ipfilter/ipf.h
==============================================================================
--- stable/12/contrib/ipfilter/ipf.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/ipfilter/ipf.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/ipfilter/tools/ipnat.c
==============================================================================
--- stable/12/contrib/ipfilter/tools/ipnat.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/ipfilter/tools/ipnat.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/ntp/include/ntp_config.h
==============================================================================
--- stable/12/contrib/ntp/include/ntp_config.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/ntp/include/ntp_config.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/ntp/ntpd/ntp_config.c
==============================================================================
--- stable/12/contrib/ntp/ntpd/ntp_config.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/ntp/ntpd/ntp_config.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/tcsh/tc.sig.c
==============================================================================
--- stable/12/contrib/tcsh/tc.sig.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/tcsh/tc.sig.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/telnet/telnetd/ext.h
==============================================================================
--- stable/12/contrib/telnet/telnetd/ext.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/telnet/telnetd/ext.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/telnet/telnetd/global.c
==============================================================================
--- stable/12/contrib/telnet/telnetd/global.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/telnet/telnetd/global.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -44,5 +44,5 @@ __FBSDID("$FreeBSD$");
  */
 
 #include "defs.h"
-#define extern
+#define EXTERN
 #include "ext.h"

Modified: stable/12/contrib/telnet/telnetd/sys_term.c
==============================================================================
--- stable/12/contrib/telnet/telnetd/sys_term.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/telnet/telnetd/sys_term.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/contrib/telnet/telnetd/telnetd.c
==============================================================================
--- stable/12/contrib/telnet/telnetd/telnetd.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/contrib/telnet/telnetd/telnetd.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/crypto/openssh/session.c
==============================================================================
--- stable/12/crypto/openssh/session.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/crypto/openssh/session.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -143,7 +143,7 @@ extern int startup_pipe;
 extern void destroy_sensitive_data(void);
 extern struct sshbuf *loginmsg;
 extern struct sshauthopt *auth_opts;
-char *tun_fwd_ifnames; /* serverloop.c */
+extern char *tun_fwd_ifnames; /* serverloop.c */
 
 /* original command from peer. */
 const char *original_command = NULL;

Modified: stable/12/gnu/usr.bin/gdb/Makefile.inc
==============================================================================
--- stable/12/gnu/usr.bin/gdb/Makefile.inc	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/gnu/usr.bin/gdb/Makefile.inc	Thu Apr  9 20:35:35 2020	(r359753)
@@ -47,6 +47,11 @@ CFLAGS+= -I${CNTRB_GDB}/include
 CFLAGS+= -I${CNTRB_BU}/bfd
 CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit
 
+# 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/12/libexec/ypxfr/ypxfr_main.c
==============================================================================
--- stable/12/libexec/ypxfr/ypxfr_main.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/libexec/ypxfr/ypxfr_main.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -53,6 +53,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;
@@ -175,8 +177,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/12/sbin/fsck_ffs/fsck.h
==============================================================================
--- stable/12/sbin/fsck_ffs/fsck.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/sbin/fsck_ffs/fsck.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -127,7 +127,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;
@@ -271,13 +271,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/12/sbin/fsck_ffs/gjournal.c
==============================================================================
--- stable/12/sbin/fsck_ffs/gjournal.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/sbin/fsck_ffs/gjournal.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -93,7 +93,6 @@ static LIST_HEAD(, cgchain) cglist = LIST_HEAD_INITIAL
 static const char *devnam;
 static struct uufsd *diskp = NULL;
 static struct fs *fs = NULL;
-struct ufs2_dinode ufs2_zino;
 
 static void putcgs(void);
 

Modified: stable/12/sbin/fsck_ffs/globs.c
==============================================================================
--- stable/12/sbin/fsck_ffs/globs.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/sbin/fsck_ffs/globs.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -117,6 +117,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/12/sbin/fsck_ffs/setup.c
==============================================================================
--- stable/12/sbin/fsck_ffs/setup.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/sbin/fsck_ffs/setup.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -58,6 +58,8 @@ __FBSDID("$FreeBSD$");
 
 #include "fsck.h"
 
+struct inoinfo **inphead, **inpsort;
+
 struct uufsd disk;
 struct bufarea asblk;
 #define altsblock (*asblk.b_un.b_fs)

Modified: stable/12/sbin/fsdb/fsdb.c
==============================================================================
--- stable/12/sbin/fsdb/fsdb.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/sbin/fsdb/fsdb.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/sbin/iscontrol/iscontrol.c
==============================================================================
--- stable/12/sbin/iscontrol/iscontrol.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/sbin/iscontrol/iscontrol.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -82,6 +82,9 @@ token_t	DigestMethods[] = {
      {0, 0}
 };
 
+int	vflag;
+char	*iscsidev;
+
 u_char	isid[6 + 6];
 /*
  | Default values

Modified: stable/12/sbin/iscontrol/iscontrol.h
==============================================================================
--- stable/12/sbin/iscontrol/iscontrol.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/sbin/iscontrol/iscontrol.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/stand/userboot/userboot/libuserboot.h
==============================================================================
--- stable/12/stand/userboot/userboot/libuserboot.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/stand/userboot/userboot/libuserboot.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -44,7 +44,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/12/tests/sys/kqueue/libkqueue/common.h
==============================================================================
--- stable/12/tests/sys/kqueue/libkqueue/common.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/tests/sys/kqueue/libkqueue/common.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/tests/sys/kqueue/libkqueue/proc.c
==============================================================================
--- stable/12/tests/sys/kqueue/libkqueue/proc.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/tests/sys/kqueue/libkqueue/proc.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -25,7 +25,6 @@
 
 static int sigusr1_caught = 0;
 
-int kqfd;
 
 static void
 sig_handler(int signum)

Modified: stable/12/tests/sys/kqueue/libkqueue/read.c
==============================================================================
--- stable/12/tests/sys/kqueue/libkqueue/read.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/tests/sys/kqueue/libkqueue/read.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -18,7 +18,6 @@
 
 #include "common.h"
 
-int kqfd;
 int sockfd[2];
 
 static void

Modified: stable/12/tests/sys/kqueue/libkqueue/signal.c
==============================================================================
--- stable/12/tests/sys/kqueue/libkqueue/signal.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/tests/sys/kqueue/libkqueue/signal.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -18,7 +18,6 @@
 
 #include "common.h"
 
-int kqfd;
 
 void
 test_kevent_signal_add(void)

Modified: stable/12/tests/sys/kqueue/libkqueue/timer.c
==============================================================================
--- stable/12/tests/sys/kqueue/libkqueue/timer.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/tests/sys/kqueue/libkqueue/timer.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/tests/sys/kqueue/libkqueue/user.c
==============================================================================
--- stable/12/tests/sys/kqueue/libkqueue/user.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/tests/sys/kqueue/libkqueue/user.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -18,7 +18,6 @@
 
 #include "common.h"
 
-int kqfd;
 
 static void
 add_and_delete(void)

Modified: stable/12/tests/sys/kqueue/libkqueue/vnode.c
==============================================================================
--- stable/12/tests/sys/kqueue/libkqueue/vnode.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/tests/sys/kqueue/libkqueue/vnode.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -18,7 +18,6 @@
 
 #include "common.h"
 
-int kqfd;
 int vnode_fd;
 
 void

Modified: stable/12/usr.bin/indent/indent.c
==============================================================================
--- stable/12/usr.bin/indent/indent.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.bin/indent/indent.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -59,6 +59,30 @@ __FBSDID("$FreeBSD$");
 #include "indent_codes.h"
 #include "indent.h"
 
+/* Globals */
+FILE	*input, *output;
+char	*labbuf, *s_lab, *e_lab, *l_lab;
+char	*codebuf, *s_code, *e_code, *l_code;
+char	*combuf, *s_com, *e_com, *l_com;
+char	*tokenbuf, *s_token, *e_token, *l_token;
+char	*in_buffer, *in_buffer_limit;
+char	*buf_ptr, *buf_end;
+
+char	 sc_buf[sc_size];
+
+char	*save_com, *sc_end;
+char	*bp_save;
+char	*be_save;
+
+struct options		opt;
+int	 line_no;
+
+struct parser_state	ps;
+int	 ifdef_level;
+struct parser_state	state_stack[5];
+struct parser_state	match_state[5];
+
+
 static void bakcopy(void);
 static void indent_declaration(int, int);
 

Modified: stable/12/usr.bin/indent/indent_globs.h
==============================================================================
--- stable/12/usr.bin/indent/indent_globs.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.bin/indent/indent_globs.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -49,8 +49,8 @@
 #define true  1
 
 
-FILE       *input;		/* the fid for the input file */
-FILE       *output;		/* the output file */
+extern FILE       *input;		/* the fid for the input file */
+extern FILE       *output;		/* the output file */
 
 #define CHECK_SIZE_CODE(desired_size) \
 	if (e_code + (desired_size) >= l_code) { \
@@ -104,41 +104,43 @@ FILE       *output;		/* the output file */
 	    s_token = tokenbuf + 1; \
 	}
 
-char       *labbuf;		/* buffer for label */
-char       *s_lab;		/* start ... */
-char       *e_lab;		/* .. and end of stored label */
-char       *l_lab;		/* limit of label buffer */
+extern char       *labbuf;		/* buffer for label */
+extern char       *s_lab;		/* start ... */
+extern char       *e_lab;		/* .. and end of stored label */
+extern char       *l_lab;		/* limit of label buffer */
 
-char       *codebuf;		/* buffer for code section */
-char       *s_code;		/* start ... */
-char       *e_code;		/* .. and end of stored code */
-char       *l_code;		/* limit of code section */
+extern char       *codebuf;		/* buffer for code section */
+extern char       *s_code;		/* start ... */
+extern char       *e_code;		/* .. and end of stored code */
+extern char       *l_code;		/* limit of code section */
 
-char       *combuf;		/* buffer for comments */
-char       *s_com;		/* start ... */
-char       *e_com;		/* ... and end of stored comments */
-char       *l_com;		/* limit of comment buffer */
+extern char       *combuf;		/* buffer for comments */
+extern char       *s_com;		/* start ... */
+extern char       *e_com;		/* ... and end of stored comments */
+extern char       *l_com;		/* limit of comment buffer */
 
 #define token s_token
-char       *tokenbuf;		/* the last token scanned */
-char	   *s_token;
-char       *e_token;
-char	   *l_token;
+extern char       *tokenbuf;		/* the last token scanned */
+extern char	  *s_token;
+extern char       *e_token;
+extern char	  *l_token;
 
-char       *in_buffer;		/* input buffer */
-char	   *in_buffer_limit;	/* the end of the input buffer */
-char       *buf_ptr;		/* ptr to next character to be taken from
-				 * in_buffer */
-char       *buf_end;		/* ptr to first after last char in in_buffer */
+extern char       *in_buffer;		/* input buffer */
+extern char	  *in_buffer_limit;	/* the end of the input buffer */
+extern char       *buf_ptr;		/* ptr to next character to be taken
+				 * from in_buffer */
+extern char       *buf_end;		/* ptr to first after last char in
+				* in_buffer */
 
-char        sc_buf[sc_size];	/* input text is saved here when looking for
-				 * the brace after an if, while, etc */
-char       *save_com;		/* start of the comment stored in sc_buf */
-char       *sc_end;		/* pointer into save_com buffer */
+extern char        sc_buf[sc_size];	/* input text is saved here when looking
+				 * for the brace after an if, while, etc */
+extern char       *save_com;		/* start of the comment stored in
+				 * sc_buf */
+extern char       *sc_end;		/* pointer into save_com buffer */
 
-char       *bp_save;		/* saved value of buf_ptr when taking input
-				 * from save_com */
-char       *be_save;		/* similarly saved value of buf_end */
+extern char       *bp_save;		/* saved value of buf_ptr when taking
+				 * input from save_com */
+extern char       *be_save;		/* similarly saved value of buf_end */
 
 
 struct options {
@@ -217,21 +219,22 @@ struct options {
 				 * uses all spaces */
     int         verbose;	/* when true, non-essential error messages
 				 * are printed */
-} opt;
+};
+extern struct options opt;
 
-int         found_err;
-int         n_real_blanklines;
-int         prefix_blankline_requested;
-int         postfix_blankline_requested;
-int         break_comma;	/* when true and not in parens, break after a
+extern int         found_err;
+extern int         n_real_blanklines;
+extern int         prefix_blankline_requested;
+extern int         postfix_blankline_requested;
+extern int         break_comma;	/* when true and not in parens, break after a
 				 * comma */
-float       case_ind;		/* indentation level to be used for a "case
+extern float       case_ind;	/* indentation level to be used for a "case
 				 * n:" */
-int         code_lines;		/* count of lines with code */
-int         had_eof;		/* set to true when input is exhausted */
-int         line_no;		/* the current line number. */
-int         inhibit_formatting;	/* true if INDENT OFF is in effect */
-int         suppress_blanklines;/* set iff following blanklines should be
+extern int         code_lines;	/* count of lines with code */
+extern int         had_eof;	/* set to true when input is exhausted */
+extern int         line_no;	/* the current line number. */
+extern int         inhibit_formatting;	/* true if INDENT OFF is in effect */
+extern int         suppress_blanklines;/* set iff following blanklines should be
 				 * suppressed */
 
 #define	STACKSIZE 256
@@ -312,8 +315,10 @@ struct parser_state {
     int         tos;		/* pointer to top of stack */
     char        procname[100];	/* The name of the current procedure */
     int         just_saw_decl;
-}           ps;
+};
 
-int         ifdef_level;
-struct parser_state state_stack[5];
-struct parser_state match_state[5];
+extern struct parser_state ps;
+
+extern int         ifdef_level;
+extern struct parser_state state_stack[5];
+extern struct parser_state match_state[5];

Modified: stable/12/usr.bin/indent/io.c
==============================================================================
--- stable/12/usr.bin/indent/io.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.bin/indent/io.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -52,6 +52,15 @@ __FBSDID("$FreeBSD$");
 #include "indent_globs.h"
 #include "indent.h"
 
+/* Globals */
+int	found_err;
+int	n_real_blanklines;
+int	prefix_blankline_requested, postfix_blankline_requested;
+int	code_lines;
+int	had_eof;
+int	inhibit_formatting;
+int	suppress_blanklines;
+
 int         comment_open;
 static int  paren_target;
 static int pad_output(int current, int target);

Modified: stable/12/usr.bin/indent/parse.c
==============================================================================
--- stable/12/usr.bin/indent/parse.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.bin/indent/parse.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -50,6 +50,10 @@ __FBSDID("$FreeBSD$");
 #include "indent_codes.h"
 #include "indent.h"
 
+/* Globals */
+int	break_comma;
+float	case_ind;
+
 static void reduce(void);
 
 void

Modified: stable/12/usr.bin/locate/locate/locate.c
==============================================================================
--- stable/12/usr.bin/locate/locate/locate.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.bin/locate/locate/locate.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -116,6 +116,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/12/usr.bin/locate/locate/locate.h
==============================================================================
--- stable/12/usr.bin/locate/locate/locate.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.bin/locate/locate/locate.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -65,7 +65,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/12/usr.bin/systat/swap.c
==============================================================================
--- stable/12/usr.bin/systat/swap.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.bin/systat/swap.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -56,8 +56,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/12/usr.sbin/config/config.h
==============================================================================
--- stable/12/usr.sbin/config/config.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/config/config.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -45,7 +45,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;
@@ -103,8 +103,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.
@@ -115,7 +115,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,
@@ -131,7 +131,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;
@@ -141,7 +141,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;
@@ -149,21 +149,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/12/usr.sbin/config/main.c
==============================================================================
--- stable/12/usr.sbin/config/main.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/config/main.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -72,6 +72,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/12/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
==============================================================================
--- stable/12/usr.sbin/rpc.yppasswdd/yppasswdd_main.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/rpc.yppasswdd/yppasswdd_main.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -83,6 +83,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";
@@ -172,8 +173,6 @@ main(int argc, char *argv[])
 	char *mastername;
 	char myname[MAXHOSTNAMELEN + 2];
 	int maxrec = RPC_MAXDATASIZE;
-
-	extern int debug;
 
 	debug = 1;
 

Modified: stable/12/usr.sbin/rpc.ypupdated/ypupdated_main.c
==============================================================================
--- stable/12/usr.sbin/rpc.ypupdated/ypupdated_main.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/rpc.ypupdated/ypupdated_main.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -76,6 +76,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/12/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
==============================================================================
--- stable/12/usr.sbin/rpc.ypxfrd/ypxfrd_main.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/rpc.ypxfrd/ypxfrd_main.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -78,6 +78,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/12/usr.sbin/ypldap/ypldap.c
==============================================================================
--- stable/12/usr.sbin/ypldap/ypldap.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/ypldap/ypldap.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/usr.sbin/ypldap/ypldap.h
==============================================================================
--- stable/12/usr.sbin/ypldap/ypldap.h	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/ypldap/ypldap.h	Thu Apr  9 20:35:35 2020	(r359753)
@@ -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/12/usr.sbin/ypserv/yp_access.c
==============================================================================
--- stable/12/usr.sbin/ypserv/yp_access.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/ypserv/yp_access.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -57,8 +57,6 @@ __FBSDID("$FreeBSD$");
 #include "tcpd.h"
 #endif
 
-extern int debug;
-
 static const char *yp_procs[] = {
 	/* NIS v1 */
 	"ypoldproc_null",

Modified: stable/12/usr.sbin/ypserv/yp_error.c
==============================================================================
--- stable/12/usr.sbin/ypserv/yp_error.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/ypserv/yp_error.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -47,8 +47,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/12/usr.sbin/ypserv/yp_main.c
==============================================================================
--- stable/12/usr.sbin/ypserv/yp_main.c	Thu Apr  9 18:38:00 2020	(r359752)
+++ stable/12/usr.sbin/ypserv/yp_main.c	Thu Apr  9 20:35:35 2020	(r359753)
@@ -89,7 +89,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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004092035.039KZZ0q071806>