Forward declaring static variables as extern is invalid ISO-C. Now that

GCC can properly handle forward static declarations, do this properly.
This commit is contained in:
David E. O'Brien 2005-09-07 10:06:14 +00:00
parent 8070a603b2
commit 5b1c0294e4
4 changed files with 6 additions and 5 deletions

View File

@ -61,7 +61,7 @@ struct timehands {
struct timehands *th_next;
};
extern struct timehands th0;
static struct timehands th0;
static struct timehands th9 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th0};
static struct timehands th8 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th9};
static struct timehands th7 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0, &th8};

View File

@ -1254,7 +1254,7 @@ SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock, "");
* Definitions of protocols supported in the ROUTE domain.
*/
extern struct domain routedomain; /* or at least forward */
static struct domain routedomain; /* or at least forward */
static struct protosw routesw[] = {
{ SOCK_RAW, &routedomain, 0, PR_ATOMIC|PR_ADDR,

View File

@ -53,13 +53,14 @@ __FBSDID("$FreeBSD$");
#include <netipx/ipx_var.h>
#include <netipx/spx.h>
extern struct domain ipxdomain;
static struct pr_usrreqs nousrreqs;
/*
* IPX protocol family: IPX, ERR, PXP, SPX, ROUTE.
*/
static struct domain ipxdomain;
static struct protosw ipxsw[] = {
{ 0, &ipxdomain, 0, 0,
0, 0, 0, 0,

View File

@ -52,10 +52,10 @@ __FBSDID("$FreeBSD$");
#include <netnatm/natm.h>
extern struct domain natmdomain;
static void natm_init(void);
static struct domain natmdomain;
static struct protosw natmsw[] = {
{ SOCK_STREAM, &natmdomain, PROTO_NATMAAL5, PR_CONNREQUIRED,
0, 0, 0, 0,