From 37d60d970c342b7f21a173a363c8be6558ad6e6e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 2 Apr 2015 10:07:04 +0200 Subject: Define libc_max_align_t for internal use --- include/libc-internal.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/libc-internal.h b/include/libc-internal.h index bca59a4..b37388e 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -107,4 +107,13 @@ extern void __init_misc (int, char **, char **); #define DIAG_IGNORE_NEEDS_COMMENT(version, option) \ _Pragma (_DIAG_STR (GCC diagnostic ignored option)) +/* This mirrors the C11 max_align_t type provided by GCC, but it is + also available in C99 mode. The aligned attributes are required + because some ABIs have reduced alignment requirements for struct + and union members. */ +typedef struct { + long long ll __attribute__ ((__aligned__ (__alignof__ (long long)))); + long double ld __attribute__ ((__aligned__ (__alignof__ (long double)))); +} libc_max_align_t; + #endif /* _LIBC_INTERNAL */ -- cgit v1.1