Move extern decls to extern.h

This commit is contained in:
thorpej 2005-03-19 03:56:06 +00:00
parent 0fded9bea2
commit 1054956d85
4 changed files with 42 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: agr.c,v 1.1 2005/03/18 11:11:51 yamt Exp $ */
/* $NetBSD: agr.c,v 1.2 2005/03/19 03:56:06 thorpej Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: agr.c,v 1.1 2005/03/18 11:11:51 yamt Exp $");
__RCSID("$NetBSD: agr.c,v 1.2 2005/03/19 03:56:06 thorpej Exp $");
#endif /* !defined(lint) */
#include <sys/param.h>
@ -44,11 +44,9 @@ __RCSID("$NetBSD: agr.c,v 1.1 2005/03/18 11:11:51 yamt Exp $");
#include <stdlib.h>
#include <util.h>
#include "extern.h"
#include "agr.h"
extern struct ifreq ifr;
extern int s;
static int checkifname(const char *);
static void assertifname(const char *);

33
sbin/ifconfig/extern.h Normal file
View File

@ -0,0 +1,33 @@
/* $NetBSD: extern.h,v 1.1 2005/03/19 03:56:06 thorpej Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
extern struct ifreq ifr;
extern int s;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ifconfig.c,v 1.155 2005/03/19 03:53:55 thorpej Exp $ */
/* $NetBSD: ifconfig.c,v 1.156 2005/03/19 03:56:06 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@ -76,7 +76,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#if 0
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#else
__RCSID("$NetBSD: ifconfig.c,v 1.155 2005/03/19 03:53:55 thorpej Exp $");
__RCSID("$NetBSD: ifconfig.c,v 1.156 2005/03/19 03:56:06 thorpej Exp $");
#endif
#endif /* not lint */
@ -120,6 +120,7 @@ __RCSID("$NetBSD: ifconfig.c,v 1.155 2005/03/19 03:53:55 thorpej Exp $");
#include <ifaddrs.h>
#include <util.h>
#include "extern.h"
#include "agr.h"
#include "vlan.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: vlan.c,v 1.1 2005/03/19 03:53:55 thorpej Exp $ */
/* $NetBSD: vlan.c,v 1.2 2005/03/19 03:56:06 thorpej Exp $ */
/*
* Copyright (c) 1983, 1993
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: vlan.c,v 1.1 2005/03/19 03:53:55 thorpej Exp $");
__RCSID("$NetBSD: vlan.c,v 1.2 2005/03/19 03:56:06 thorpej Exp $");
#endif /* not lint */
#include <sys/param.h>
@ -47,11 +47,9 @@ __RCSID("$NetBSD: vlan.c,v 1.1 2005/03/19 03:53:55 thorpej Exp $");
#include <stdlib.h>
#include <stdio.h>
#include "extern.h"
#include "vlan.h"
extern struct ifreq ifr;
extern int s;
static u_int vlan_tag = (u_int)-1;
static int