[lkml]   [2002]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Header files and the kernel ABI
Andreas Dilger wrote:
> I had thought on this briefly in the past, and my take would be for these
> ABI definition files to live directly in /usr/include/linux for user space
> (just as glibc puts its own sanitized copy of the kernel headers there)
> and the appropriate ABI headers are included as needed from the kernel.

Given no legacy, I would agree with this, but I think it would imply bad
legacy both on the kernel and the libc (it's not just glibc, either) side.

> The kernel side would be something like <linux/scsi.h> includes
> <linux/abi/scsi.h> or whatever, but in the future this can be included
> directly as needed throughout the kernel. The existing kernel
> <linux/*.h> headers would also have extra kernel-specific data in them.
> The same could be done with the user-space headers, but I think that
> is missing the point that the linux/abi/*.h headers should define _all_
> of the abi, so we may as well just use that directly.

Except now the paths are gratuitously different between kernel
programming and non-kernel programming, and we create a much harder
migration problem. I'd rather leave the linux/* namespace to the
user-space libc to do whatever backwards compatibility cruft they may
consider necessary, for example, <linux/io.h> might #include <sys/io.h>
since some user space apps bogusly included the former name. Leaving
that namespace available for backwards compatibility hacks avoids those
kinds of problems.

> Essentially "all" this would mean is that we take the existing headers,
> remove everything which is inside #ifdef __KERNEL__ (and all of the
> other kernel-specific non-abi headers that are included) and we are
> done. The kernel header now holds only things that were inside the
> #ifdef __KERNEL__ (or should have been), and #include <linux/abi/foo.h>.



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:27    [W:0.135 / U:9.548 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site