From 61d89c0b21ee8ee88c291bd781b885c9ff0d6245 Mon Sep 17 00:00:00 2001 From: tijl Date: Sat, 8 Jan 2011 11:47:55 +0000 Subject: 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/mips/include/_types.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'sys/mips') diff --git a/sys/mips/include/_types.h b/sys/mips/include/_types.h index 1fd760f..1c4af49 100644 --- a/sys/mips/include/_types.h +++ b/sys/mips/include/_types.h @@ -53,26 +53,21 @@ typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; - #ifdef __mips_n64 typedef long __int64_t; typedef unsigned long __uint64_t; #else -#if defined(lint) -/* LONGLONG */ -typedef long long __int64_t; -/* LONGLONG */ -typedef unsigned long long __uint64_t; -#elif defined(__GNUCLIKE_ATTRIBUTE_MODE_DI) -typedef int __attribute__((__mode__(__DI__))) __int64_t; -typedef unsigned int __attribute__((__mode__(__DI__))) __uint64_t; -#else +#ifndef lint +__extension__ +#endif /* LONGLONG */ typedef long long __int64_t; +#ifndef lint +__extension__ +#endif /* LONGLONG */ typedef unsigned long long __uint64_t; #endif -#endif /* * Standard type definitions. -- cgit v1.1