Subject: Re: Kernel include files proposal
To: Greywolf <greywolf@starwolf.com>
From: Lennart Augustsson <lennart@mail.augustsson.net>
List: tech-kern
Date: 04/10/2001 21:33:12
Greywolf wrote:

> On Tue, 10 Apr 2001, Jaromír Dolecek wrote:
>
> # Hi,
> # I'd like to propose simple rule for installing kernel include
> # files to under /usr/include:
> #
> #          Our userland uses it or standards mandate it.
> #
> # I think it's not appropriate to install random headers
> # "just in case".
> #
> # Also, I'd like to seriously trim number of sys/dev/ headers installed
> # to under /usr/include/dev/ down. Currently, it occupies like 2.5MB and
> # most stuff (if not all) is useless for userland.
> #
> # Opinions?
>
> "Historic precedent indicates it."  BSD's include tree has always included
> an overlay of /sys/*/*.h.
>
> Whether this is symlinks or copies is implementation-dependent, however.
> We had it as copies ages ago because not everyone was allowed source
> access.  With the advent of opensource, this becomes moot.
>
> I say they should at least be symlinked in.

Sorry, but I disagree strongly with this.  It's good practise not to expose
things that should be "hidden".  That's the whole power of abstract data types.
All the internals should no be available to random userland programs.
If it is they might rely on things that will change later.  Only the parts that
are part of the "API" (I use the term loosely) should be visible.

If you want to look at the out of curiousity, use the source.  If you need to
include them in a userland program then they should be installed, otherwise not.

    -- Lennart