Re: using kernel headers in libc headers

From: Chris Friesen
Date: Mon Nov 30 2009 - 12:44:28 EST


On 11/30/2009 11:01 AM, H. Peter Anvin wrote:

> A better way is to factor out subsets; if <linux/sched.h> has too many
> things, we can break out the POSIX parts into <linux/sched_posix.h> or
> (certainly better if we have more than one of these)
> <linux/sched/posix.h> which can also be included by <linux/sched.h>.
>
> glibc can then choose to include or not include <linux/sched/posix.h>
> depending on its configuration. The configuration macros remain a glibc
> internal detail.

Yes, absolutely. Personally I find it much easier to open a separate
header file than to read code that is littered with #ifdefs.

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