Re: Recent changes to sysctl.h breaks glibc

From: H. Peter Anvin (hpa@zytor.com)
Date: Tue May 20 2003 - 12:06:56 EST


Chris Friesen wrote:
> Riley Williams wrote:
>
>> First, is there anything in include/asm that is actually needed
>> outside the kernel itself? There shouldn't be, and if there is,
>> it needs to be moved to a header under include/linux that is
>> included in the relevant include/asm file.
>
> It's handy for stuff like getting high res timestamps without having to
> ifdef the case of building on different architechtures. Also, there are
> files under include/linux which end up including asm stuff in turn.
>
>> The basic rule would be that external software can make free
>> use of headers under include/linux but should never make any
>> use whatsoever of headers under include/kernel or include/asm
>> for any reason.
>
>
> What if the include/linux files themselves make use of the asm files?
>

No, not acceptable.

The thing is, trying to redefine the old namespaces is hopeless at this
point. Hence the proposed new namespace <linux/abi/*.h> ...
<linux/abi/arch/*.h> would be my preference for an arch-specific
subnamespace.

Thus the rule is:

a) <linux/abi/*> files MUST NOT include files outside <linux/abi/*>

b) <linux/*.h> and <asm/*.h> are legacy namespaces. They should be
considered to be completely different in kernel and userspace -- in
effect, glibc will eventually ship with its own set of these headers.

c) <linux/abi/*> files should be clean for inclusion from either kernel
or userspace.

        -hpa

-
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/



This archive was generated by hypermail 2b29 : Fri May 23 2003 - 22:00:41 EST