On Monday, September 19, 2016 01:45:01 PM Ngie Cooper wrote: > > > On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer <c...@freebsd.org> wrote: > > > > Author: cem > > Date: Mon Sep 19 20:43:03 2016 > > New Revision: 305998 > > URL: https://svnweb.freebsd.org/changeset/base/305998 > > > > Log: > > Move sys/capsicum.h includes after types.h or param.h > > > > This is not actually documented or even implied in style(9). Make the > > change > > to match convention. Someone should document this convention in style(9). > > > > Reported by: jhb > > Sponsored by: EMC Dell Isilon > > Uh… yes it clearly states it in style(9). From > https://www.freebsd.org/cgi/man.cgi?query=style&sektion=9 : > Kernel include files (i.e. sys/*.h) come first; normally, include > <sys/types.h> OR <sys/param.h>, but not both. <sys/types.h> includes > <sys/cdefs.h>, and it is okay to depend on that.
It doesn't actually say that types.h/param.h has to come before other sys/*.h headers though. Normally sys/foo.h requires sys/types.h to compile hence the rule, but sys/capsicum.h gets around this by a nested include of sys/param.h (which is itself probably dubious). I do think we should explicitly add a note to style.9 though to say that types.h|param.h comes first. -- John Baldwin _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"