Subject: Re: missing #include ?
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: D'Arcy J.M. Cain <darcy@NetBSD.org>
List: tech-userlevel
Date: 12/10/2006 13:51:11
On Sun, 10 Dec 2006 13:22:55 -0500 (EST)
der Mouse <mouse@Rodents.Montreal.QC.CA> wrote:
> In my opinion, yes.  I've discussed this on various NetBSD lists at
> least three times, and my opinion appears to be in enough of a minority
> that every time I bring up such header-file bugs (for that's what I
> consider them), I'm told they're not bugs and will not be fixed.
> 
> I would love to see this change. :-)

Maybe this time the change will happen.  Here is a proposed change.
Can we find out what the concensus is?

Index: style
===================================================================
RCS file: /cvsroot/src/share/misc/style,v
retrieving revision 1.38
diff -u -p -u -r1.38 style
--- style       2 Nov 2006 22:44:41 -0000       1.38
+++ style       10 Dec 2006 18:49:04 -0000
@@ -64,6 +64,12 @@ __RCSID("$NetBSD: style,v 1.38 2006/11/0
  */

 /*
+ * If a header file requires structures, defines, typedefs, etc. from
+ * another header file it should include that header file and not
depend
+ * on the including file for that header including both.
+ */
+
+/*
  * Kernel include files come first.
  */
 #include <sys/types.h>         /* Non-local includes in brackets. */

-- 
D'Arcy J.M. Cain <darcy@NetBSD.org>
http://www.NetBSD.org/