Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/sys



On Sun, Jan 04, 2004 at 05:43:12PM +0100, Christoph Badura wrote:
> On Sun, Jan 04, 2004 at 01:45:33PM +0100, Matthias Scheler wrote:
> > On Sun, Jan 04, 2004 at 01:34:22PM +0100, Klaus Klein wrote:
> > > Those are strong words being used in a weak argument.  There are
> > > several instances of such headers available in NetBSD;
> > 
> > In that case all these are broken. I've already fixed such brokeness in the
> > past and nobody ever complained.
> 
> They are only "broken" because you declare them "broken" for no technical
> reason.

I think this is the key of the disagreement. Both ideas, explicit includes 
vs. implicit includes, would have been valid choices at the start.

However our headers were designed, for better or worse, for explicit 
includes. As such, needing explicit includes by the calling program 
doesn't seem "broken." It's a choice, not a flaw.

> Maybe your other "fixes" have escaped me in the past.  Or maybe I didn't
> have time to complain.  Could be either.  I don't check every commit for
> reasonable ness.
> 
> However, your change is not in line with project policy with regard to
> header files.  If you want to change the policy, the CVS repository is
> not the right place to do it.

Agreed. The repository isn't where we should be having style 
disagreements.

> > It is bad enough that C's primitive and lousy scheme to provide external
> > declarations and functions doesn't handle such things automatically
> > like e.g. Modula II's module concept. But declaring this brokeness
> > a feature is just sheer madness.

[snip]

> Also the interface isn't broken "by design" as you claim.  The design is
> as simple as they get.  In order to use the interface you have to follow
> two trivial, linear steps which are clearly explained in the documentation:
> 1) you #include <sys/param.h>
> 2) you #include <sys/sysctl.h>
> There is no ambiguity and if you follow the steps you get repeatable,
> deterministic behaviour.
> 
> OTOH, only following half the recipe and relying on sheer luck to get
> the program to even compile, is obviously broken.

Also, other files and routines need the multiple-include dance to handle 
specific name space issues. For instance the handling of struct iovec in 
<unistd.h> and <sys/uio.h>. While it doesn't matter for this file, if we 
start implicitly including headers when the documentation indicates 
explicit including, we can stumble into making broken headers.

Take care,

Bill

Attachment: pgpft7xpuRawS.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index