Module Name: src
Committed By: riastradh
Date: Wed Jun 27 22:04:02 UTC 2012
Modified Files:
src/share/misc: style
Log Message:
Elaborate and clarify rules about #include order.
ok christos
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/share/misc/style
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/misc/style
diff -u src/share/misc/style:1.49 src/share/misc/style:1.50
--- src/share/misc/style:1.49 Thu Sep 1 09:33:01 2011
+++ src/share/misc/style Wed Jun 27 22:04:02 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: style,v 1.49 2011/09/01 09:33:01 christos Exp $ */
+/* $NetBSD: style,v 1.50 2012/06/27 22:04:02 riastradh Exp $ */
/*
* The revision control tag appears first, with a blank line after it.
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: style,v 1.49 2011/09/01 09:33:01 christos Exp $");
+__RCSID("$NetBSD: style,v 1.50 2012/06/27 22:04:02 riastradh Exp $");
/*
* VERY important single-line comments look like this.
@@ -77,7 +77,12 @@ __RCSID("$NetBSD: style,v 1.49 2011/09/0
/*
* Kernel include files come first.
*/
-#include <sys/types.h> /* Non-local includes in brackets. */
+#include <sys/param.h> /* <sys/param.h> first, */
+#include <sys/types.h> /* <sys/types.h> next, */
+#include <sys/ioctl.h> /* and then the rest, */
+#include <sys/socket.h> /* sorted lexicographically. */
+#include <sys/stat.h>
+#include <sys/wait.h> /* Non-local includes in brackets. */
/*
* If it's a network program, put the network include files next.
@@ -91,7 +96,7 @@ __RCSID("$NetBSD: style,v 1.49 2011/09/0
/*
* Then there's a blank line, followed by the /usr include files.
- * The /usr include files should be sorted!
+ * The /usr include files should be sorted lexicographically!
*/
#include <assert.h>
#include <errno.h>