no need to compile net_osdep.c. simplify net_osdep.h conditions (remove

bsdi/freebsd/openbsd stuff)
This commit is contained in:
itojun 2003-05-14 22:45:02 +00:00
parent 5ebd8c7eba
commit ccc2f25972
3 changed files with 2 additions and 112 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files,v 1.611 2003/05/13 15:42:33 thorpej Exp $
# $NetBSD: files,v 1.612 2003/05/14 22:45:03 itojun Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@ -1179,7 +1179,6 @@ file net/if_tokensubr.c token needs-flag
file net/if_tun.c tun needs-flag
file net/if_vlan.c vlan needs-flag
file net/if_pppoe.c pppoe needs-flag
#file net/net_osdep.c
file net/pfil.c pfil_hooks | ipfilter
file net/ppp-deflate.c ppp & ppp_deflate
file net/ppp_tty.c ppp

View File

@ -1,90 +0,0 @@
/* $NetBSD: net_osdep.c,v 1.4 2001/12/21 02:50:02 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* 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 project 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 PROJECT 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 PROJECT 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.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: net_osdep.c,v 1.4 2001/12/21 02:50:02 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/errno.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3
#include <sys/ioctl.h>
#endif
#include <sys/time.h>
#include <sys/syslog.h>
#include <machine/cpu.h>
#include <net/if.h>
#include <net/if_types.h>
#include <net/netisr.h>
#include <net/route.h>
#include <net/bpf.h>
#if 0
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
#include <netinet/in_gif.h>
#endif /* INET */
#ifdef INET6
#ifndef INET
#include <netinet/in.h>
#endif
#include <netinet6/in6_var.h>
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#include <netinet6/in6_gif.h>
#include <netinet6/in6_ifattach.h>
#endif /* INET6 */
#endif
#if !(defined(__NetBSD__) || defined(__OpenBSD__))
const char *
if_name(ifp)
struct ifnet *ifp;
{
static char nam[IFNAMSIZ + 10]; /*enough?*/
#ifdef __bsdi__
sprintf(nam, "%s%d", ifp->if_name, ifp->if_unit);
#else
snprintf(nam, sizeof(nam), "%s%d", ifp->if_name, ifp->if_unit);
#endif
return nam;
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: net_osdep.h,v 1.7 2001/12/21 02:50:02 itojun Exp $ */
/* $NetBSD: net_osdep.h,v 1.8 2003/05/14 22:45:02 itojun Exp $ */
/* $KAME: net_osdep.h,v 1.51 2001/07/06 06:21:43 itojun Exp $ */
/*
@ -287,30 +287,11 @@
#define __NET_NET_OSDEP_H_DEFINED_
#ifdef _KERNEL
#if defined(__NetBSD__) || defined(__OpenBSD__)
#define if_name(ifp) ((ifp)->if_xname)
#else
struct ifnet;
extern char *if_name __P((struct ifnet *));
#endif
#ifdef __FreeBSD__
#define HAVE_OLD_BPF
#endif
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
#define ifa_list ifa_link
#define if_addrlist if_addrhead
#define if_list if_link
#endif
#if defined(__NetBSD__) && __NetBSD_Version__ >= 104000000
#define ovbcopy(src, dst, len) memmove((dst), (src), (len))
#endif
#if defined(__OpenBSD__) || (defined(__bsdi__) && _BSDI_VERSION >= 199802)
#define HAVE_NRL_INPCB
#endif
#endif /*_KERNEL*/
#endif /*__NET_NET_OSDEP_H_DEFINED_ */