From owner-svn-src-all@freebsd.org Mon Oct 24 17:07:03 2016 Return-Path: Delivered-To: svn-src-all@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 D3AC3C1FF21; Mon, 24 Oct 2016 17:07:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAB75124B; Mon, 24 Oct 2016 17:07:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 99B9510AF7C; Mon, 24 Oct 2016 13:07:02 -0400 (EDT) From: John Baldwin To: Brooks Davis 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 Date: Mon, 24 Oct 2016 09:10:33 -0700 Message-ID: <5535792.BsRA60PV1C@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20161022000056.GC95989@spindle.one-eyed-alien.net> References: <201610212350.u9LNo2PT031675@repo.freebsd.org> <20161022000056.GC95989@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 24 Oct 2016 13:07:02 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Mon, 24 Oct 2016 17:07:03 -0000 On Saturday, October 22, 2016 12:00:56 AM Brooks Davis wrote: > 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 > > > > Log: > > Define max_align_t for C11. > > > > 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 . > > > > PR: 210890 > > Reviewed by: dim > > MFC after: 1 month > > Differential Revision: https://reviews.freebsd.org/D8194 > > > > Modified: > > head/include/stddef.h > > head/sys/sys/_types.h > > > > Modified: head/include/stddef.h > > ============================================================================== > > --- 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 > > > > +#if __STDC_VERSION__ >= 201112L || __cplusplus >= 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) > > > > #endif /* _STDDEF_H_ */ > > > > Modified: head/sys/sys/_types.h > > ============================================================================== > > --- 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 > > > > +typedef struct { > > Should this be union per the commit message? Dimitry's response is correct of course. I think my brain had "fixed" this when I read it to be a union instead of a struct since a struct seems so obviously wrong. -- John Baldwin