Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/altq pull only "opt_altq_enabled.h" in if_altq.h, and in...



details:   https://anonhg.NetBSD.org/src/rev/c0eaf7f8baa6
branches:  trunk
changeset: 536828:c0eaf7f8baa6
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Sep 22 20:09:15 2002 +0000

description:
pull only "opt_altq_enabled.h" in if_altq.h, and include altqconf.h
explicitly in single file which implicitly needed it (altq_conf.c)

this avoids pulling in implicit dependency on <sys/conf.h> to every
file including <net/if.h> (which includes <altq/if_altq.h> to get altq
related structures)

diffstat:

 sys/altq/altq_conf.c |  5 +++--
 sys/altq/altqconf.h  |  7 +++++--
 sys/altq/if_altq.h   |  6 +++---
 3 files changed, 11 insertions(+), 7 deletions(-)

diffs (67 lines):

diff -r 344baa41ef96 -r c0eaf7f8baa6 sys/altq/altq_conf.c
--- a/sys/altq/altq_conf.c      Sun Sep 22 19:35:22 2002 +0000
+++ b/sys/altq/altq_conf.c      Sun Sep 22 20:09:15 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: altq_conf.c,v 1.8 2002/09/07 11:56:33 gehenna Exp $    */
+/*     $NetBSD: altq_conf.c,v 1.9 2002/09/22 20:09:15 jdolecek Exp $   */
 /*     $KAME: altq_conf.c,v 1.13 2002/01/29 10:16:01 kjc Exp $ */
 
 /*
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_conf.c,v 1.8 2002/09/07 11:56:33 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_conf.c,v 1.9 2002/09/22 20:09:15 jdolecek Exp $");
 
 #if defined(__FreeBSD__) || defined(__NetBSD__)
 #include "opt_altq.h"
@@ -55,6 +55,7 @@
 #include <net/if.h>
 
 #include <altq/altq.h>
+#include <altq/altqconf.h>
 #include <altq/altq_conf.h>
 
 #ifdef ALTQ_CBQ
diff -r 344baa41ef96 -r c0eaf7f8baa6 sys/altq/altqconf.h
--- a/sys/altq/altqconf.h       Sun Sep 22 19:35:22 2002 +0000
+++ b/sys/altq/altqconf.h       Sun Sep 22 20:09:15 2002 +0000
@@ -1,7 +1,10 @@
-/*     $NetBSD: altqconf.h,v 1.3 2002/09/06 13:18:43 gehenna Exp $     */
+/*     $NetBSD: altqconf.h,v 1.4 2002/09/22 20:09:15 jdolecek Exp $    */
+
+#ifdef _KERNEL
 
 #if defined(_KERNEL_OPT)
 #include "opt_altq_enabled.h"
+#endif
 
 #include <sys/conf.h>
 
@@ -11,4 +14,4 @@
 #define        NALTQ   0
 #endif
 
-#endif /* _KERNEL_OPT */
+#endif /* _KERNEL */
diff -r 344baa41ef96 -r c0eaf7f8baa6 sys/altq/if_altq.h
--- a/sys/altq/if_altq.h        Sun Sep 22 19:35:22 2002 +0000
+++ b/sys/altq/if_altq.h        Sun Sep 22 20:09:15 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_altq.h,v 1.7 2002/03/05 04:12:57 itojun Exp $       */
+/*     $NetBSD: if_altq.h,v 1.8 2002/09/22 20:09:15 jdolecek Exp $     */
 /*     $KAME: if_altq.h,v 1.7 2002/02/19 06:37:39 kjc Exp $    */
 
 /*
@@ -29,8 +29,8 @@
 #ifndef _ALTQ_IF_ALTQ_H_
 #define        _ALTQ_IF_ALTQ_H_
 
-#ifdef _KERNEL
-#include <altq/altqconf.h>
+#if defined(_KERNEL_OPT)
+#include "opt_altq_enabled.h"
 #endif
 
 struct altq_pktattr; struct tb_regulator; struct top_cdnr;



Home | Main Index | Thread Index | Old Index