Re: [RFC] Splitting out kernel<=>userspace ABI headers

From: H. Peter Anvin
Date: Sat Sep 03 2005 - 00:23:22 EST


Erik Andersen wrote:

I assume you are worried about the stuff under asm that ends up
being included by nearly every header file in the world. Of
course asm must use double-underscore types. But the thing is,
the vast majority of the kernel headers live under
linux/include/linux/ and do not use double-underscore types, they
use kernel specific, non-underscored types such as s8, u32, etc.
My copy of IEEE 1003.1 and my copy of ISO/IEC 9899:1999 both fail
to prohibit using the shiny new ISO C99 type for the various
#include <linux/*> header files, which is what I was suggesting.

The world would be so much nicer a place if user space were free
to #include linux/* header files rather than keeping a
per-project private copy of all kernel structs of interest. And
where these kernel headers would #include stdint.h and define
their stucts in terms of ISO C99 types. I see nothing at all in
the standards preventing such a change,


Exportable types need to be double-underscore types, because the header files in user space that would include them can generally not include <stdint.h>.

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