Conventions for system headers

David Schultz das at FreeBSD.ORG
Sun May 6 21:11:17 UTC 2007


On Sat, May 05, 2007, Maciej Sobczak wrote:
> Hi (this is my first post to this list),
> 
> The C99 standard defines the following requirement (7.1.2/4):
> 
> "Standard headers may be included in any order [...]"
> 
[...]
[...]
> I would like to propose a campaign of bringing all FreeBSD system 
> headers in line with the guarantee that C99 provides for its standard 
> headers, for the benefit and convenience of both developers and port 
> maintainers.

Which headers did you have in mind? This sounds like a laudable
goal, but I'd try to limit it to headers where the requisite
changes won't be too obscene. For example, a lot of the networking
headers have sensible and standard dependencies. (POSIX says that
they may include certain headers that they depend on, but we
don't, often resulting in a compile-time error; maybe that should
be changed.)  Generally try to avoid namespace pollution unless
there's a good rationale for it. For instance, if you need
<sys/types.h>, we have a <sys/_types.h> that provides the same
definitions, but with internal names that won't conflict with
application names.


More information about the freebsd-standards mailing list