Re: Linux kernel headers violate RFC2553

Linus Torvalds (torvalds@transmeta.com)
8 Jun 2001 14:49:29 -0700


In article <20010608211247.A12925@codeblau.de>,
Felix von Leitner <leitner@fefe.de> wrote:
>Thus spake David S. Miller (davem@redhat.com):
>> > glibc works around this, but the diet libc uses the kernel headers and
>> > thus exports the wrong API to user land.
>> Don't user kernel headers for userspace.
>
>What choice do I have?
>Duplicate everything and then be out of sync when the specs change?

Yes.

Even more preferably - write user-space headers that have _only_ the
minimum amount of code in them. The kernel headers have a lot of cruft
that is kernel-only, and that means that if you compile user space using
them, your compiles will be slower than they should be.

The basic issue is that the kernel will _refuse_ to follow the
"namespace of the day" rules of C89, C99, POSIX, BSD, SuS, GNU .. the
list goes on. The kernel headers are not meant to be used in user space,
and will not have the strict namespace rules that a lot of standards
spend so much time playing with.

There aren't that many things that are actually useful in the kernel
headers anyway. Most of them (like the IPv6 stuff) are really specified
in other places in the first place.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/