From owner-svn-src-all@FreeBSD.ORG Sat Jan 8 11:47:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7BEC10656C7; Sat, 8 Jan 2011 11:47:55 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A59778FC1B; Sat, 8 Jan 2011 11:47:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p08BltfR090991; Sat, 8 Jan 2011 11:47:55 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p08BltfD090985; Sat, 8 Jan 2011 11:47:55 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201101081147.p08BltfD090985@svn.freebsd.org> From: Tijl Coosemans Date: Sat, 8 Jan 2011 11:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217146 - in head/sys: arm/include i386/include mips/include powerpc/include sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jan 2011 11:47:55 -0000 Author: tijl Date: Sat Jan 8 11:47:55 2011 New Revision: 217146 URL: http://svn.freebsd.org/changeset/base/217146 Log: 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) Modified: head/sys/arm/include/_types.h head/sys/i386/include/_types.h head/sys/mips/include/_types.h head/sys/powerpc/include/_types.h head/sys/sys/cdefs.h Modified: head/sys/arm/include/_types.h ============================================================================== --- head/sys/arm/include/_types.h Sat Jan 8 11:13:34 2011 (r217145) +++ head/sys/arm/include/_types.h Sat Jan 8 11:47:55 2011 (r217146) @@ -52,16 +52,16 @@ typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; - -#ifdef __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 /* * Standard type definitions. Modified: head/sys/i386/include/_types.h ============================================================================== --- head/sys/i386/include/_types.h Sat Jan 8 11:13:34 2011 (r217145) +++ head/sys/i386/include/_types.h Sat Jan 8 11:47:55 2011 (r217146) @@ -54,21 +54,16 @@ typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; - -#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 /* * Standard type definitions. Modified: head/sys/mips/include/_types.h ============================================================================== --- head/sys/mips/include/_types.h Sat Jan 8 11:13:34 2011 (r217145) +++ head/sys/mips/include/_types.h Sat Jan 8 11:47:55 2011 (r217146) @@ -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. Modified: head/sys/powerpc/include/_types.h ============================================================================== --- head/sys/powerpc/include/_types.h Sat Jan 8 11:13:34 2011 (r217145) +++ head/sys/powerpc/include/_types.h Sat Jan 8 11:47:55 2011 (r217146) @@ -52,29 +52,20 @@ typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; - #ifdef __powerpc64__ - 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 -/* LONGLONG */ -typedef long long __int64_t; +#ifndef lint +__extension__ +#endif /* LONGLONG */ -typedef unsigned long long __uint64_t; +typedef long long __int64_t; +#ifndef lint +__extension__ #endif - +/* LONGLONG */ +typedef unsigned long long __uint64_t; #endif /* Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sat Jan 8 11:13:34 2011 (r217145) +++ head/sys/sys/cdefs.h Sat Jan 8 11:47:55 2011 (r217146) @@ -62,8 +62,6 @@ #define __GNUCLIKE___OFFSETOF 1 #define __GNUCLIKE___SECTION 1 -#define __GNUCLIKE_ATTRIBUTE_MODE_DI 1 - #ifndef __INTEL_COMPILER # define __GNUCLIKE_CTOR_SECTION_HANDLING 1 #endif