Date: Sat, 1 Aug 2015 21:34:02 -0700 From: John-Mark Gurney <jmg@funkthat.com> To: Bruce Evans <brde@optusnet.com.au> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r286168 - head/sys/net Message-ID: <20150802043402.GP78154@funkthat.com> In-Reply-To: <20150802133842.N894@besplex.bde.org> References: <201508020015.t720Fr6R018929@repo.freebsd.org> <20150802133842.N894@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote this message on Sun, Aug 02, 2015 at 14:10 +1000:
> On Sun, 2 Aug 2015, John-Mark Gurney wrote:
>
> > Log:
> > convert to C11's _Static_assert, and pull in sys/cdefs.h for
> > compatibility w/ older non-C11 compilers...
>
> This include is bogus. <net/pfkeyv2.h> already depends on the includer
> including other headers that include <sys/cdefs.h>. Mainly <sys/types.h>.
> <sys/types.h> defined massive namespace pollution that includes everything
> in <sys/cdefs.h>. It includes <sys/cdefs.h> an infinite number of times
> via recursion, except the recursion is stopped by anti-reinclude guards.
> Th recursion makes the static number of nested includes of <sys/cdefs.h>
> hard to count.
I'll test w/o sys/cdefs.h and if it compiles, I'll remove it...
> Also, this is a kernel header. All kernel headers depend on the includer
Except it isn't just a kernel header as we found out, otherwise
CTASSERT would have been perfectly fine... It defines an API between
kernel and userland for adding and changing the kernel SA/SP
database... See sbin/setkey and lib/libipsec...
[comments about kernel only headers deleted]
> If an application wants to abuse a kernel header, then it must fake
> the kernel environment for it. I don't know much about this header,
> but it is not documented in any man page so it can do anything.
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150802043402.GP78154>
