Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
From: Andreas Gruenbacher
Date: Mon Aug 30 2010 - 07:04:25 EST
On Monday 30 August 2010 06:21:56 David Miller wrote:
> From: Andreas Gruenbacher <agruen@xxxxxxx>
> Date: Mon, 30 Aug 2010 03:26:29 +0200
>
> > On Saturday 28 August 2010 01:51:53 Eric Paris wrote:
> >> I liked this version until I realized that userspace doesn't have
> >> aligned_u64 as a valid type.
> >
> > This looks like an error in include/linux/types.h. The aligned types
> > should probably not be defined inside #ifdef __KERNEL__.
>
> You can't do this, as it would pollute the POSIX namespace.
Good point.
> If we want a version of this type visible to userspace, it needs to,
> for example, have double underscores prepended to the type name just
> as we do for things like __u16 and __u32.
How about something like this?
Thanks,
Andreas
~