From owner-svn-src-head@freebsd.org Sat Oct 22 00:06:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D15BBC1C50F; Sat, 22 Oct 2016 00:06:44 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 907ADE3A; Sat, 22 Oct 2016 00:06:44 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 3318B5A9F27; Sat, 22 Oct 2016 00:00:56 +0000 (UTC) Date: Sat, 22 Oct 2016 00:00:56 +0000 From: Brooks Davis To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r307756 - in head: include sys/sys Message-ID: <20161022000056.GC95989@spindle.one-eyed-alien.net> References: <201610212350.u9LNo2PT031675@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline In-Reply-To: <201610212350.u9LNo2PT031675@repo.freebsd.org> User-Agent: Mutt/1.7.0 (2016-08-17) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2016 00:06:44 -0000 --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 21, 2016 at 11:50:02PM +0000, John Baldwin wrote: > Author: jhb > Date: Fri Oct 21 23:50:02 2016 > New Revision: 307756 > URL: https://svnweb.freebsd.org/changeset/base/307756 >=20 > Log: > Define max_align_t for C11. > =20 > libc++'s stddef.h includes an existing definition of max_align_t for > C++11, but it is only defined for C++, not for C. In addition, GCC and > clang both define an alternate version of max_align_t that uses a > union of multiple types rather than a plain long double as in libc++. > This adds a __max_align_t to that matches the GCC and > clang definition that is mapped to max_align_t in . > =20 > PR: 210890 > Reviewed by: dim > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D8194 >=20 > Modified: > head/include/stddef.h > head/sys/sys/_types.h >=20 > Modified: head/include/stddef.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/include/stddef.h Fri Oct 21 21:55:50 2016 (r307755) > +++ head/include/stddef.h Fri Oct 21 23:50:02 2016 (r307756) > @@ -62,6 +62,14 @@ typedef ___wchar_t wchar_t; > #endif > #endif > =20 > +#if __STDC_VERSION__ >=3D 201112L || __cplusplus >=3D 201103L > +#ifndef __CLANG_MAX_ALIGN_T_DEFINED > +typedef __max_align_t max_align_t; > +#define __CLANG_MAX_ALIGN_T_DEFINED > +#define __GCC_MAX_ALIGN_T > +#endif > +#endif > + > #define offsetof(type, member) __offsetof(type, member) > =20 > #endif /* _STDDEF_H_ */ >=20 > Modified: head/sys/sys/_types.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/_types.h Fri Oct 21 21:55:50 2016 (r307755) > +++ head/sys/sys/_types.h Fri Oct 21 23:50:02 2016 (r307756) > @@ -100,6 +100,11 @@ typedef __uint_least32_t __char32_t; > #define _CHAR32_T_DECLARED > #endif > =20 > +typedef struct { Should this be union per the commit message? Ideally I'd add a void * as well since that will support systems like CHERI where pointers are the largest type. -- Brooks > + long long __max_align1 __aligned(_Alignof(long long)); > + long double __max_align2 __aligned(_Alignof(long double)); > +} __max_align_t; > + > typedef __uint32_t __dev_t; /* device number */ > =20 > typedef __uint32_t __fixpt_t; /* fixed point number */ >=20 --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYCqw3AAoJEKzQXbSebgfAFIYH/2VgcVD8iQ3ZJl1tvwQ1kkGr 6B1SfJbQGYWflM+I9kK640vKr7pLgVDtVuiNVFIbp4046b/i2Sj8c0T9Cx+epKw9 0YHI+7GeT67JHFX5YBQFuzTBkyIiYGFPGy8uh5bkN56iUJmS9Swx1ncgVz2zG3jA RnM2f3i+lr1PoD6aycPiWAuL/ppQy4XL9I8rSzi5DxQZKPQiO1J5sizEYhGi7zip tofEKf1eb5ofqNDVjnBNyyrYa3KYqjXIYFEdWe0qv9eM1d17ENL9wa1VpJegx5Eb 2x9HlLO0v9l/OEYSDLLQrNvyL84tus7obA1drki5qEEjkZvZuQwrU6+uNNi+CLc= =5rhX -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7--