Re: linux-nfs-0.4.21 for Alpha glibc

tytso@mit.edu
Wed, 31 Dec 1997 18:03:23 -0500


Date: Sat, 27 Dec 1997 22:58:30 +0000
From: Philip Blundell <Philip.Blundell@pobox.com>

The rule of thumb when writing code for glibc is to avoid including
any kernel headers - if you need definitions that are only found in
the kernel headers then you should duplicate them in your own code
(hopefully there aren't too many). This is a bit of a pain
sometimes, but it's a cleaner solution than trying to patch up all
the kernel headers to make them safe to include (which is often hard
without breaking some libc5 application along the way).

In the long run I think we will need to clean up the kernel headers,
because it duplicating definitions is really a bad idea; it's prone to
errors, and there will be quite a few which be needed for certain system
programs.

I for example have been submitting various patches to keep the ext2
kernel header files safe for inclusion in user mode programs, and while
it's a pain to do, in the long run it's much easier and much safer than
trying to the kernel definitions and the user-mode definitions in sync.

- Ted