From owner-svn-src-all@freebsd.org Thu Oct 6 01:52:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C79B8AF60E2; Thu, 6 Oct 2016 01:52:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7890EAED; Thu, 6 Oct 2016 01:52:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u961q0fn024991; Thu, 6 Oct 2016 01:52:00 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u961q0J5024972; Thu, 6 Oct 2016 01:52:00 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201610060152.u961q0J5024972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 6 Oct 2016 01:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306748 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 01:52:01 -0000 Author: cem Date: Thu Oct 6 01:52:00 2016 New Revision: 306748 URL: https://svnweb.freebsd.org/changeset/base/306748 Log: style(9): Some additional clarification Prompted by an email from bde@. Reviewed by: emaste, imp (earlier version) With input from: wblock Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D7983 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Thu Oct 6 01:14:10 2016 (r306747) +++ head/share/man/man9/style.9 Thu Oct 6 01:52:00 2016 (r306748) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd December 5, 2015 +.Dd October 5, 2016 .Dt STYLE 9 .Os .Sh NAME @@ -114,20 +114,28 @@ static char sccsid[] = "@(#)style 1.14 ( __FBSDID("$FreeBSD$"); .Ed .Pp -Leave another blank line before the header files. +Leave one blank line before the header files. .Pp -Kernel include files (i.e.\& -.Pa sys/*.h ) -come first sorted alphabetically where possible. -Include -.In sys/types.h -OR -.In sys/param.h , -but not both and include it first. +Kernel include files +.Pa ( sys/*.h ) +come first. +If +.In sys/cdefs.h +is needed for +.Fn __FBSDID , +include it first. +If either .In sys/types.h +or +.In sys/param.h +is needed, include it before other include files. +.Po +.In sys/param.h includes -.In sys/cdefs.h , -and it is okay to depend on that. +.In sys/types.h ; +do not include both. +.Pc +The remaining kernel headers should be sorted alphabetically. .Bd -literal #include /* Non-local includes in angle brackets. */ #include @@ -144,9 +152,9 @@ For a network program, put the network i #include .Ed .Pp -Do not use files in +Do not include files from .Pa /usr/include -for files in the kernel. +in the kernel. .Pp Leave a blank line before the next group, the .Pa /usr/include @@ -166,7 +174,7 @@ in the local directory. #include .Ed .Pp -Leave another blank line before the user include files. +Leave another blank line before the local include files. .Bd -literal #include "pathnames.h" /* Local includes in double quotes. */ .Ed