From 0b38e1d69f03d3977d7ae7926c1efeb461a8a971 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 8 Feb 2021 23:18:34 +0100 Subject: [PATCH] stddef: Fix test-stddef compilation error on MidnightBSD/x86. * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, rpl_max_align_t, max_align_t): Don't ignore HAVE_MAX_ALIGN_T if the compiler is clang. --- ChangeLog | 6 ++++++ lib/stddef.in.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 56608437c7..e6d8469eeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-02-08 Bruno Haible + + stddef: Fix test-stddef compilation error on MidnightBSD/x86. + * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, rpl_max_align_t, max_align_t): + Don't ignore HAVE_MAX_ALIGN_T if the compiler is clang. + 2021-02-08 Bruno Haible Document non-standard prototypes on MidnightBSD. diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 5d3e087b44..638589274f 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -109,7 +109,7 @@ typedef long max_align_t; && defined __cplusplus # include #else -# if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) +# if ! (@HAVE_MAX_ALIGN_T@ || (defined _GCC_MAX_ALIGN_T && !defined __clang__)) # if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, -- 2.39.5