]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 307756: Define max_align_t for C11.
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 28 Nov 2016 18:36:37 +0000 (18:36 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 28 Nov 2016 18:36:37 +0000 (18:36 +0000)
commite7650ff7a9f7e19cbceff53ff8e723c2e1838b0b
tree5805d4bdf966b4bf80bcc265eddcfae3c253daaa
parent842181a4c79859e2519adb8eca392db46b79554d
MFC 307756: 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 <sys/_types.h> that matches the GCC and
clang definition that is mapped to max_align_t in <stddef.h>.

PR: 210890

git-svn-id: svn://svn.freebsd.org/base/stable/10@309258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
include/stddef.h
sys/sys/_types.h