Re: [PATCH 01/24] types: create <asm-generic/int-*.h>

From: Linus Torvalds
Date: Fri Apr 25 2008 - 15:11:53 EST




On Fri, 25 Apr 2008, Matthew Wilcox wrote:
>
> So ... given all this, why do we define s64 to be 'long' on some
> architectures and 'long long' on others?

Historical reasons, mainly. Once we start using one type for things like
loff_t, it ends up getting encoded in user header files, and we're then
basically forced to continue to use that particular type. Some of them end
literally being embedded in the compiler itself (ie __builtin_size_t etc
end up being known by compiler built-ins).

But yes, we could probably try to standardize the internal kernel s64/u64
types that don't end up spreading anywhere else.

Of course, part of the worry is probably that people thought that maybe
"long long" would some day be 128-bit on a 64-bit architecture.

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