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

Re: /usr/include/linux and /usr/include/asm?



>I would have thought that someone would have figured out by now that
>/usr/include/linux (at the very least) should reflect the status of the
>kernel so that kernel-specific stuff can be done and that NOTHING in the
>library or in the include files associated with that library should depend
>upon the kernel-specific files.
>
>It's not the symlinks, it's the contents of /usr/include/*.h that's the
>problem.


They are the problem, but they cannot be fixed.  Since the GNU C library
is portable to various kernels and hardware platforms, it has to get
its information about the underlying system from somewhere.

Back when we had our very own private C library, we could get away with
not separating the user-visible stuff from the kernel-only stuff.
But when we start using portable libraries, we have to worry about
what is used by normal programmers, and what is used only inside
the kernel.

find /usr/include -type f | xargs grep 'include.*<linux'

Most of the files that include stuff in /usr/include/linux are in the
/usr/incldue/sys subdir, with a few network realted ones also
hangin arond.  The others seem to be individual cases. 
Of all the files in /usr/include/*.h, only a couple reference 
/usr/include/linux/...

Carl


Reply to: