From ca26f4513b62f94c13a1bbc487014e306a5a8ebe Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 24 May 2018 19:11:08 +0200 Subject: Define the C11 type max_align_t (#115) The definition is similar to that of gcc, however since we don't support long doubles out of the box and long doubles are doubles in compat mode we can directly define max_align_t to be long long. Bug 23380 --- runtime/include/stddef.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'runtime') diff --git a/runtime/include/stddef.h b/runtime/include/stddef.h index 452497c3..6056db62 100644 --- a/runtime/include/stddef.h +++ b/runtime/include/stddef.h @@ -117,4 +117,13 @@ typedef signed int wchar_t; #define offsetof(ty,member) (__builtin_offsetof(ty,member)) #endif +#ifdef _STDDEF_H +/* Type whose alignment is supported in every context and is at least + as great as that of any standard type not using alignment + specifiers. Since we do not support long double per default the type + with the maximum alignment supported in every context is long long. +*/ +typedef long long max_align_t; +#endif + #endif -- cgit