Date: 8 Jan 1997 02:20:36 GMT From: peter@spinner.DIALix.COM (Peter Wemm) To: freebsd-hackers@freebsd.org Subject: Re: #include file xref philosophy Message-ID: <5av09k$67a$1@haywire.DIALix.COM> References: <199701072241.JAA17826@profane.iq.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <Mutt.19970108011911.j@uriah.heep.sax.de>, j@uriah.heep.sax.de (J Wunsch) writes: > As Julian Assange wrote: > >> What is the -current philosophy on intra #include file dependencies? >> >> Is there any reason for not following the posix line and having >> include files resolve all their own dependencies? I'm talking about >> things like <dirent.h> needing the code that includes it, include >> <sys/types.h> before hand. > > IIRC, Bruce once mentioned that Posix allows it to require the > inclusion of <sys/types.h> (xor another <sys/something.h> which i > eventually forgot) before other things. > > Either way, the corresponding man pages should at least mention the > required include files, so your complaint about ``magical knowledge'' > would not be true. As I understand it, POSIX allows for a system to require <sys/types.h> to be a prerequisite for other include files, Bruce knows more about more than I do. However, the SVIDIII, X/Open XPG (4+), Spec 1170, Single-Unix spec, and the whatever-it-is-called-this-month line of standards apparently require the standard headers to be self sufficient. I believe NetBSD/OpenBSD/Linux comply with this, I remember NetBSD committing the missing <sys/types.h> includes some time back. Cheers, -Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5av09k$67a$1>