summaryrefslogtreecommitdiff
path: root/include/stddef.h
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-01-06 14:36:51 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-01-06 14:36:51 +0000
commit7726e5f2de5f4afd5823b714de016ec643813e7b (patch)
tree13e0f7a3c8cdd1aaf4805bcd9d4734ec3ae7e7aa /include/stddef.h
parent3b695e1650b3e1ba09557ebf71e71e445aa88b09 (diff)
Add max_align_t.
ok millert@
Diffstat (limited to 'include/stddef.h')
-rw-r--r--include/stddef.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/stddef.h b/include/stddef.h
index 88bd55f1749..391fbc23535 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stddef.h,v 1.13 2016/09/09 18:12:37 millert Exp $ */
+/* $OpenBSD: stddef.h,v 1.14 2017/01/06 14:36:50 kettenis Exp $ */
/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */
/*-
@@ -71,4 +71,14 @@ typedef __mbstate_t mbstate_t;
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
#endif
+#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103
+#ifndef __CLANG_MAX_ALIGN_T_DEFINED
+#define __CLANG_MAX_ALIGN_T_DEFINED
+typedef struct {
+ long long __max_align_ll __aligned(__alignof__(long long));
+ long double __max_align_ld __aligned(__alignof__(long double));
+} max_align_t;
+#endif
+#endif
+
#endif /* _STDDEF_H_ */