summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/contrib/altq/altq/altq_cbq.c14
-rw-r--r--sys/contrib/altq/altq/altq_cdnr.c4
-rw-r--r--sys/contrib/altq/altq/altq_hfsc.c8
-rw-r--r--sys/contrib/altq/altq/altq_priq.c8
-rw-r--r--sys/contrib/altq/altq/altq_red.c2
-rw-r--r--sys/contrib/altq/altq/altq_rio.c2
-rw-r--r--sys/contrib/altq/altq/altq_rmclass.c4
-rw-r--r--sys/contrib/altq/altq/altq_subr.c13
-rw-r--r--sys/contrib/altq/altq/altq_var.h4
-rw-r--r--sys/contrib/altq/altq/if_altq.h6
10 files changed, 8 insertions, 57 deletions
diff --git a/sys/contrib/altq/altq/altq_cbq.c b/sys/contrib/altq/altq/altq_cbq.c
index ca035de..da12cf8 100644
--- a/sys/contrib/altq/altq/altq_cbq.c
+++ b/sys/contrib/altq/altq/altq_cbq.c
@@ -33,12 +33,10 @@
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include "opt_altq.h"
-#if (__FreeBSD__ != 2)
#include "opt_inet.h"
#ifdef __FreeBSD__
#include "opt_inet6.h"
#endif
-#endif
#endif /* __FreeBSD__ || __NetBSD__ */
#ifdef ALTQ_CBQ /* cbq is enabled by ALTQ_CBQ option in opt_altq.h */
@@ -508,14 +506,8 @@ cbq_enqueue(struct ifaltq *ifq, struct mbuf *m, struct altq_pktattr *pktattr)
/* grab class set by classifier */
if ((m->m_flags & M_PKTHDR) == 0) {
/* should not happen */
-#if defined(__NetBSD__) || defined(__OpenBSD__)\
- || (defined(__FreeBSD__) && __FreeBSD_version >= 501113)
printf("altq: packet for %s does not have pkthdr\n",
ifq->altq_ifp->if_xname);
-#else
- printf("altq: packet for %s%d does not have pkthdr\n",
- ifq->altq_ifp->if_name, ifq->altq_ifp->if_unit);
-#endif
m_freem(m);
return (ENOBUFS);
}
@@ -1027,13 +1019,7 @@ cbqclose(dev, flag, fmt, p)
while (cbq_list) {
ifp = cbq_list->ifnp.ifq_->altq_ifp;
-#if defined(__NetBSD__) || defined(__OpenBSD__)\
- || (defined(__FreeBSD__) && __FreeBSD_version >= 501113)
sprintf(iface.cbq_ifacename, "%s", ifp->if_xname);
-#else
- sprintf(iface.cbq_ifacename,
- "%s%d", ifp->if_name, ifp->if_unit);
-#endif
err = cbq_ifdetach(&iface);
if (err != 0 && error == 0)
error = err;
diff --git a/sys/contrib/altq/altq/altq_cdnr.c b/sys/contrib/altq/altq/altq_cdnr.c
index b4f9065..fca7041 100644
--- a/sys/contrib/altq/altq/altq_cdnr.c
+++ b/sys/contrib/altq/altq/altq_cdnr.c
@@ -1,5 +1,5 @@
/* $FreeBSD$ */
-/* $KAME: altq_cdnr.c,v 1.14 2003/09/05 22:40:36 itojun Exp $ */
+/* $KAME: altq_cdnr.c,v 1.15 2005/04/13 03:44:24 suz Exp $ */
/*
* Copyright (C) 1999-2002
@@ -29,12 +29,10 @@
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include "opt_altq.h"
-#if (__FreeBSD__ != 2)
#include "opt_inet.h"
#ifdef __FreeBSD__
#include "opt_inet6.h"
#endif
-#endif
#endif /* __FreeBSD__ || __NetBSD__ */
#include <sys/param.h>
diff --git a/sys/contrib/altq/altq/altq_hfsc.c b/sys/contrib/altq/altq/altq_hfsc.c
index fa8bad1..bf4f39c 100644
--- a/sys/contrib/altq/altq/altq_hfsc.c
+++ b/sys/contrib/altq/altq/altq_hfsc.c
@@ -44,12 +44,10 @@
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include "opt_altq.h"
-#if (__FreeBSD__ != 2)
#include "opt_inet.h"
#ifdef __FreeBSD__
#include "opt_inet6.h"
#endif
-#endif
#endif /* __FreeBSD__ || __NetBSD__ */
#ifdef ALTQ_HFSC /* hfsc is enabled by ALTQ_HFSC option in opt_altq.h */
@@ -698,14 +696,8 @@ hfsc_enqueue(struct ifaltq *ifq, struct mbuf *m, struct altq_pktattr *pktattr)
/* grab class set by classifier */
if ((m->m_flags & M_PKTHDR) == 0) {
/* should not happen */
-#if defined(__NetBSD__) || defined(__OpenBSD__)\
- || (defined(__FreeBSD__) && __FreeBSD_version >= 501113)
printf("altq: packet for %s does not have pkthdr\n",
ifq->altq_ifp->if_xname);
-#else
- printf("altq: packet for %s%d does not have pkthdr\n",
- ifq->altq_ifp->if_name, ifq->altq_ifp->if_unit);
-#endif
m_freem(m);
return (ENOBUFS);
}
diff --git a/sys/contrib/altq/altq/altq_priq.c b/sys/contrib/altq/altq/altq_priq.c
index ce9bdbc..770d4bf 100644
--- a/sys/contrib/altq/altq/altq_priq.c
+++ b/sys/contrib/altq/altq/altq_priq.c
@@ -31,12 +31,10 @@
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include "opt_altq.h"
-#if (__FreeBSD__ != 2)
#include "opt_inet.h"
#ifdef __FreeBSD__
#include "opt_inet6.h"
#endif
-#endif
#endif /* __FreeBSD__ || __NetBSD__ */
#ifdef ALTQ_PRIQ /* priq is enabled by ALTQ_PRIQ option in opt_altq.h */
@@ -469,14 +467,8 @@ priq_enqueue(struct ifaltq *ifq, struct mbuf *m, struct altq_pktattr *pktattr)
/* grab class set by classifier */
if ((m->m_flags & M_PKTHDR) == 0) {
/* should not happen */
-#if defined(__NetBSD__) || defined(__OpenBSD__)\
- || (defined(__FreeBSD__) && __FreeBSD_version >= 501113)
printf("altq: packet for %s does not have pkthdr\n",
ifq->altq_ifp->if_xname);
-#else
- printf("altq: packet for %s%d does not have pkthdr\n",
- ifq->altq_ifp->if_name, ifq->altq_ifp->if_unit);
-#endif
m_freem(m);
return (ENOBUFS);
}
diff --git a/sys/contrib/altq/altq/altq_red.c b/sys/contrib/altq/altq/altq_red.c
index 2804cee..cd216bd 100644
--- a/sys/contrib/altq/altq/altq_red.c
+++ b/sys/contrib/altq/altq/altq_red.c
@@ -62,12 +62,10 @@
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include "opt_altq.h"
-#if (__FreeBSD__ != 2)
#include "opt_inet.h"
#ifdef __FreeBSD__
#include "opt_inet6.h"
#endif
-#endif
#endif /* __FreeBSD__ || __NetBSD__ */
#ifdef ALTQ_RED /* red is enabled by ALTQ_RED option in opt_altq.h */
diff --git a/sys/contrib/altq/altq/altq_rio.c b/sys/contrib/altq/altq/altq_rio.c
index 09599c2..f80d766 100644
--- a/sys/contrib/altq/altq/altq_rio.c
+++ b/sys/contrib/altq/altq/altq_rio.c
@@ -61,12 +61,10 @@
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include "opt_altq.h"
-#if (__FreeBSD__ != 2)
#include "opt_inet.h"
#ifdef __FreeBSD__
#include "opt_inet6.h"
#endif
-#endif
#endif /* __FreeBSD__ || __NetBSD__ */
#ifdef ALTQ_RIO /* rio is enabled by ALTQ_RIO option in opt_altq.h */
diff --git a/sys/contrib/altq/altq/altq_rmclass.c b/sys/contrib/altq/altq/altq_rmclass.c
index 94c53f1..79fc68b 100644
--- a/sys/contrib/altq/altq/altq_rmclass.c
+++ b/sys/contrib/altq/altq/altq_rmclass.c
@@ -1,5 +1,5 @@
/* $FreeBSD$ */
-/* $KAME: altq_rmclass.c,v 1.18 2003/11/06 06:32:53 kjc Exp $ */
+/* $KAME: altq_rmclass.c,v 1.19 2005/04/13 03:44:25 suz Exp $ */
/*
* Copyright (c) 1991-1997 Regents of the University of California.
@@ -41,12 +41,10 @@
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include "opt_altq.h"
-#if (__FreeBSD__ != 2)
#include "opt_inet.h"
#ifdef __FreeBSD__
#include "opt_inet6.h"
#endif
-#endif
#endif /* __FreeBSD__ || __NetBSD__ */
#ifdef ALTQ_CBQ /* cbq is enabled by ALTQ_CBQ option in opt_altq.h */
diff --git a/sys/contrib/altq/altq/altq_subr.c b/sys/contrib/altq/altq/altq_subr.c
index edacc0d..9db095b 100644
--- a/sys/contrib/altq/altq/altq_subr.c
+++ b/sys/contrib/altq/altq/altq_subr.c
@@ -72,9 +72,6 @@
/* machine dependent clock related includes */
#ifdef __FreeBSD__
-#if __FreeBSD__ < 3
-#include "opt_cpu.h" /* for FreeBSD-2.2.8 to get i586_ctr_freq */
-#endif
#include <sys/bus.h>
#include <sys/cpu.h>
#include <sys/eventhandler.h>
@@ -449,7 +446,7 @@ static void
tbr_timeout(arg)
void *arg;
{
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
VNET_ITERATOR_DECL(vnet_iter);
#endif
struct ifnet *ifp;
@@ -461,7 +458,7 @@ tbr_timeout(arg)
#else
s = splimp();
#endif
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
IFNET_RLOCK_NOSLEEP();
VNET_LIST_RLOCK_NOSLEEP();
VNET_FOREACH(vnet_iter) {
@@ -477,7 +474,7 @@ tbr_timeout(arg)
ifp->if_start != NULL)
(*ifp->if_start)(ifp);
}
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
CURVNET_RESTORE();
}
VNET_LIST_RUNLOCK_NOSLEEP();
@@ -985,11 +982,7 @@ init_machclk(void)
*/
#ifdef __i386__
#ifdef __FreeBSD__
-#if (__FreeBSD_version > 300000)
machclk_freq = tsc_freq;
-#else
- machclk_freq = i586_ctr_freq;
-#endif
#elif defined(__NetBSD__)
machclk_freq = (u_int32_t)cpu_tsc_freq;
#elif defined(__OpenBSD__) && (defined(I586_CPU) || defined(I686_CPU))
diff --git a/sys/contrib/altq/altq/altq_var.h b/sys/contrib/altq/altq/altq_var.h
index 4c4fc29..956ee16 100644
--- a/sys/contrib/altq/altq/altq_var.h
+++ b/sys/contrib/altq/altq/altq_var.h
@@ -141,11 +141,7 @@ extern u_int64_t read_machclk(void);
* misc stuff for compatibility
*/
/* ioctl cmd type */
-#if defined(__FreeBSD__) && (__FreeBSD__ < 3)
-typedef int ioctlcmd_t;
-#else
typedef u_long ioctlcmd_t;
-#endif
/*
* queue macros:
diff --git a/sys/contrib/altq/altq/if_altq.h b/sys/contrib/altq/altq/if_altq.h
index 0676e40..9524c45 100644
--- a/sys/contrib/altq/altq/if_altq.h
+++ b/sys/contrib/altq/altq/if_altq.h
@@ -1,5 +1,5 @@
/* $FreeBSD$ */
-/* $KAME: if_altq.h,v 1.11 2003/07/10 12:07:50 kjc Exp $ */
+/* $KAME: if_altq.h,v 1.12 2005/04/13 03:44:25 suz Exp $ */
/*
* Copyright (C) 1997-2003
@@ -29,7 +29,7 @@
#ifndef _ALTQ_IF_ALTQ_H_
#define _ALTQ_IF_ALTQ_H_
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
#include <sys/lock.h> /* XXX */
#include <sys/mutex.h> /* XXX */
#include <sys/event.h> /* XXX */
@@ -51,7 +51,7 @@ struct ifaltq {
int ifq_len;
int ifq_maxlen;
int ifq_drops;
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
struct mtx ifq_mtx;
#endif
OpenPOWER on IntegriCloud