Re: [PATCH] x86 byteorder.h: use __asm__/__inline__ for userspace
From: Mike Frysinger
Date: Sat Dec 27 2008 - 15:05:58 EST
On Saturday 27 December 2008 14:23:19 H. Peter Anvin wrote:
> Mike Frysinger wrote:
> > {su}{8,16,32,64} doesnt matter too much to me vs {u,}int_t{8,16,32,64}_t.
> > as long as people stop using __{su}{8,16,32,64}. using the latter
> > though does mean headers will more likely be "just usable" w/out needing
> > linux/types.h include. but then people would be forced to include
> > stdint.h or similar before a linux header ... and that sucks.
>
> That is a total non-starter. This would mean that the C library itself
> cannot use these headers without exporting additional symbols into the
> namespace, *WHICH IT IS NOT ALLOWED TO DO*.
which is already happening today you mean. grep the kernel headers and you'll
see a ton of [u]intXX_t hits.
this logic though means that the kernel should not be defining any structures
that the C library is defining (such as asm-generic/fcntl.h). such structs
should get renamed the same way as __[us]XX types.
-mike
Attachment:
signature.asc
Description: This is a digitally signed message part.