Re: [patch] u64 casts

From: Jakub Jelinek
Date: Sat Feb 28 2004 - 05:45:00 EST


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