From owner-svn-src-all@FreeBSD.ORG Fri Dec 16 09:33:32 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 774BB106564A; Fri, 16 Dec 2011 09:33:32 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay007.isp.belgacom.be (mailrelay007.isp.belgacom.be [195.238.6.173]) by mx1.freebsd.org (Postfix) with ESMTP id 698D08FC15; Fri, 16 Dec 2011 09:33:30 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EAMML605bsSQU/2dsb2JhbABDhQymR4EGgXIBAQUjBC8jEAsUBCoCAjkeBogPBqcWkWGDeYZ1gRYEpyI Received: from 20.36-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.36.20]) by relay.skynet.be with ESMTP; 16 Dec 2011 10:23:23 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id pBG9NMAO002625; Fri, 16 Dec 2011 10:23:22 +0100 (CET) (envelope-from tijl@coosemans.org) From: Tijl Coosemans To: Ed Schouten Date: Fri, 16 Dec 2011 10:23:13 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.0-RC2; KDE/4.7.3; i386; ; ) References: <201112160822.pBG8MODA092847@svn.freebsd.org> In-Reply-To: <201112160822.pBG8MODA092847@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart11035629.YiQgftS358"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit Message-Id: <201112161023.20013.tijl@coosemans.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228562 - head/sys/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: Fri, 16 Dec 2011 09:33:32 -0000 --nextPart11035629.YiQgftS358 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Friday 16 December 2011 09:22:24 Ed Schouten wrote: > Author: ed > Date: Fri Dec 16 08:22:23 2011 > New Revision: 228562 > URL: http://svn.freebsd.org/changeset/base/228562 >=20 > Log: > Process a lot of feedback from bde@ on : > =20 > - Add __alignof() for non-GCC and GCC < 2.95. > - Simply implement the C1X keywords on top of the existing __macros. > - Add struct __hack to _Static_assert to require consumers to add a > semicolon. > - Add an extra underscore to __assert_ to allow it to be combined with > locally defined versions of CTASSERT in the tree. > - Add proper casts to __offsetof() to make it work for cases where > sizeof(size_t) !=3D sizeof(uintptr_t). > - Globally replace size_t and uintptr_t by __size_t and __uintptr_t. > This removes the dependency on / . Practically > any header file ends up including somehow. > - Change argument names of macros to match with the rest of the file. > =20 > MFC after: 3 months >=20 > Modified: > head/sys/sys/cdefs.h >=20 > Modified: head/sys/sys/cdefs.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/cdefs.h Fri Dec 16 02:09:51 2011 (r228561) > +++ head/sys/sys/cdefs.h Fri Dec 16 08:22:23 2011 (r228562) > @@ -363,10 +360,11 @@ > #define __offsetof(type, field) __builtin_offsetof(type, field) > #else > #ifndef __cplusplus > -#define __offsetof(type, field) ((size_t)(&((type *)0)->field)) > +#define __offsetof(type, field) \ > + ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->member)) s/member/field/ > #else > #define __offsetof(type, field) \ > - (__offsetof__ (reinterpret_cast \ > + (__offsetof__ (reinterpret_cast <__size_t> \ > (&reinterpret_cast \ > (static_cast (0)->field)))) > #endif --nextPart11035629.YiQgftS358 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk7rDgcACgkQfoCS2CCgtisaiwD6AkKrIEWAoDWVgFfob6VS4Zvy sKJTTmW0dzg5Uyawl28A/jaY6lmEIv97hz3dQPMRiZfztppaS+DOQbAThQUOEpRB =bNE0 -----END PGP SIGNATURE----- --nextPart11035629.YiQgftS358--