FreeBSD Bugzilla – Attachment 172467 Details for
Bug 210890
[exp-run] Define max_align_t for C11 and C++11 in stddef.h
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
max_align_t.patch
max_align_t.patch (text/plain), 980 bytes, created by
John Baldwin
on 2016-07-13 16:40:36 UTC
(
hide
)
Description:
max_align_t.patch
Filename:
MIME Type:
Creator:
John Baldwin
Created:
2016-07-13 16:40:36 UTC
Size:
980 bytes
patch
obsolete
>diff --git a/include/stddef.h b/include/stddef.h >index 7898da2..5da0be7 100644 >--- a/include/stddef.h >+++ b/include/stddef.h >@@ -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_DEFINED >+#endif >+#endif >+ > #define offsetof(type, member) __offsetof(type, member) > > #endif /* _STDDEF_H_ */ >diff --git a/sys/sys/_types.h b/sys/sys/_types.h >index ecc1c7e..8736651 100644 >--- a/sys/sys/_types.h >+++ b/sys/sys/_types.h >@@ -100,6 +100,11 @@ typedef __uint_least32_t __char32_t; > #define _CHAR32_T_DECLARED > #endif > >+typedef struct { >+ long long __max_align1 __aligned(_Alignof(long long)); >+ long double __max_align2 __aligned(_Alignof(long double)); >+} __max_align_t; >+ > typedef __uint32_t __dev_t; /* device number */ > > typedef __uint32_t __fixpt_t; /* fixed point number */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210890
:
172194
| 172467