Date: Wed, 28 Oct 2020 21:09:57 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367118 - head/share/man/man9 Message-ID: <202010282109.09SL9voh037160@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Oct 28 21:09:56 2020 New Revision: 367118 URL: https://svnweb.freebsd.org/changeset/base/367118 Log: Note that sys/systm.h is special too If you need / want to includerd sys/systm.h, it has to be just after param.h/types.h. Document this existing practice. Not all kernel files include systm.h, but when you do, it should be done out of order. Reviewed by: vangyzen, kib, emaste Differential Review: https://reviews.freebsd.org/D26981 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Wed Oct 28 21:06:17 2020 (r367117) +++ head/share/man/man9/style.9 Wed Oct 28 21:09:56 2020 (r367118) @@ -25,7 +25,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd July 16, 2020 +.Dd October 28, 2020 .Dt STYLE 9 .Os .Sh NAME @@ -156,9 +156,13 @@ includes .In sys/types.h ; do not include both. .Pc +Next, include +.In sys/systm.h , +if needed. The remaining kernel headers should be sorted alphabetically. .Bd -literal #include <sys/types.h> /* Non-local includes in angle brackets. */ +#include <sys/systm.h> #include <sys/endian.h> #include <sys/lock.h> #include <sys/queue.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010282109.09SL9voh037160>