Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/misc Elaborate and clarify rules about #include order.
details: https://anonhg.NetBSD.org/src/rev/c2f7afdb6ae1
branches: trunk
changeset: 779919:c2f7afdb6ae1
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jun 27 22:04:02 2012 +0000
description:
Elaborate and clarify rules about #include order.
ok christos
diffstat:
share/misc/style | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (41 lines):
diff -r 5dd01ce129b2 -r c2f7afdb6ae1 share/misc/style
--- a/share/misc/style Wed Jun 27 21:35:40 2012 +0000
+++ b/share/misc/style Wed Jun 27 22:04:02 2012 +0000
@@ -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 @@
/*
* 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 @@
/*
* 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>
Home |
Main Index |
Thread Index |
Old Index