summaryrefslogtreecommitdiff
path: root/m4/stdalign.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/stdalign.m4')
-rw-r--r--m4/stdalign.m44
1 files changed, 3 insertions, 1 deletions
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index 8dcb634d55b..e22d7f78c06 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -13,7 +13,8 @@ AC_DEFUN([gl_STDALIGN_H],
[gl_cv_header_working_stdalign_h],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[#include <stdalign.h>
+ [[#include <stdint.h>
+ #include <stdalign.h>
#include <stddef.h>
/* Test that alignof yields a result consistent with offsetof.
@@ -32,6 +33,7 @@ AC_DEFUN([gl_STDALIGN_H],
/* Test _Alignas only on platforms where gnulib can help. */
#if \
((defined __cplusplus && 201103 <= __cplusplus) \
+ || (__TINYC__ && defined __attribute__) \
|| (defined __APPLE__ && defined __MACH__ \
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
: __GNUC__) \