aboutsummaryrefslogtreecommitdiffstats
path: root/include/stdalign.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/stdalign.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/stdalign.h b/include/stdalign.h
index bce8f5d..b247b2c 100644
--- a/include/stdalign.h
+++ b/include/stdalign.h
@@ -20,13 +20,16 @@
#include <slibc/version.h>
+#include <slibc/features.h>
+
+
/**
* Specify the alignment of a variable.
*
* @param type The type whose alignment shall be used.
*/
-#if __STDC_VERSION__ < 201112L && defined(__GNUC__)
+#if !defined(__C11__) && defined(__GNUC__)
# define _Alignas(type) __attribute__((__aligned__(type)))
#endif
#define alignas(type) _Alignas(type)
@@ -38,7 +41,7 @@
* @param type The type.
* @return The alignment of the type.
*/
-#if __STDC_VERSION__ < 201112L && defined(__GNUC__)
+#if !defined(__C11__) && defined(__GNUC__)
# define _Alignof(type) __alignof__(type)
#endif
#define alignof(type) _Alignof(type)