Re: [patch] u64 casts

Jakub Jelinek
2004-02-28T10:43:05Z

On Fri, Feb 27, 2004 at 05:16:53PM -0500, Albert Cahalan wrote:
> Supposing that this is the case, you may get warnings.

It wouldn't be just about warnings if somebody uses current kernel
headers for /usr/include/linux and /usr/include/asm.
Think about C++ name mangling, there it matters a lot of
a type is long long or just long, although they are the same size.

It is true that (hopefully) most of the distributions use separate
modified kernel headers and glibc uses only very few kernel headers
in its headers, but there are certainly many apps in the wild
who #include <linux/*> or #include <asm/*> and I'm afraid still some
people use newest kernel headers for userland stuff.

So if you want to change that, I'd suggest to
#ifdef __KERNEL__
typedef unsigned long long __u64;
#else
typedef unsigned long __u64; /* Provided it has been defined that way before */
#endif

Jakub