]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 307756: Define max_align_t for C11.
authorjhb <jhb@FreeBSD.org>
Mon, 28 Nov 2016 18:36:37 +0000 (18:36 +0000)
committerjhb <jhb@FreeBSD.org>
Mon, 28 Nov 2016 18:36:37 +0000 (18:36 +0000)
commitf67daeff53a890faa88f5ce727193084d3b92b90
treee76d6a084138fbf2e432a0e27af7b4bd81192bc4
parentaab078ec4f92422de4b01e7def22b32a1ef36943
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
include/stddef.h
sys/sys/_types.h