]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
On 32 bit architectures define (u)int64_t as (unsigned) long long instead
authortijl <tijl@FreeBSD.org>
Sat, 8 Jan 2011 11:47:55 +0000 (11:47 +0000)
committertijl <tijl@FreeBSD.org>
Sat, 8 Jan 2011 11:47:55 +0000 (11:47 +0000)
commit61d89c0b21ee8ee88c291bd781b885c9ff0d6245
treeb3ae794e20e8dfd11eb0ed255f66db6b6d3a1ac0
parentaf03e997bad671908fbc09a2cabaf5b32eda911f
On 32 bit architectures define (u)int64_t as (unsigned) long long instead
of (unsigned) int __attribute__((__mode__(__DI__))). This aligns better
with macros such as (U)INT64_C, (U)INT64_MAX, etc. which assume (u)int64_t
has type (unsigned) long long.

The mode attribute was used because long long wasn't standardised until
C99. Nowadays compilers should support long long and use of the mode
attribute is discouraged according to GCC Internals documentation.

The type definition has to be marked with __extension__ to support
compilation with "-std=c89 -pedantic".

Discussed with: bde
Approved by: kib (mentor)
sys/arm/include/_types.h
sys/i386/include/_types.h
sys/mips/include/_types.h
sys/powerpc/include/_types.h
sys/sys/cdefs.h