Subject: Re: CVS commit: src/sys/sys
To: Christoph Badura , Matthias Scheler <tron@zhadum.de>
From: Bill Studenmund <wrstuden@netbsd.org>
List: source-changes
Date: 01/05/2004 16:38:05
--5/uDoXvLw7AC5HRs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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;
> >=20
> > In that case all these are broken. I've already fixed such brokeness in=
 the
> > past and nobody ever complained.
>=20
> 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=
=20
vs. implicit includes, would have been valid choices at the start.

However our headers were designed, for better or worse, for explicit=20
includes. As such, needing explicit includes by the calling program=20
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.
>=20
> 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=20
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 documentatio=
n:
> 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.
>=20
> 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=20
specific name space issues. For instance the handling of struct iovec in=20
<unistd.h> and <sys/uio.h>. While it doesn't matter for this file, if we=20
start implicitly including headers when the documentation indicates=20
explicit including, we can stumble into making broken headers.

Take care,

Bill

--5/uDoXvLw7AC5HRs
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/+gNtWz+3JHUci9cRAs7wAJ9RblPXQK6h/ZmQ2nIabW8UpVXmCQCeIDoy
TKgQMdkUmjYjTt8SYS0GKs8=
=hl9Z
-----END PGP SIGNATURE-----

--5/uDoXvLw7AC5HRs--