summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2015-04-02 10:07:04 +0200
committerFlorian Weimer <fweimer@redhat.com>2015-04-02 19:55:21 +0200
commit37d60d970c342b7f21a173a363c8be6558ad6e6e (patch)
tree0ddd5469e71091ac033a1f64678a756c95c0e52c
parentb763f6ae859ecea70a5dacb8ad45c71d5f667e2e (diff)
downloadglibc-37d60d970c342b7f21a173a363c8be6558ad6e6e.tar.gz
Define libc_max_align_t for internal use
-rw-r--r--ChangeLog4
-rw-r--r--include/libc-internal.h9
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a7f505a10..9bac2983e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-02 Florian Weimer <fweimer@redhat.com>
+
+ * include/libc-internal.h (libc_max_align_t): Define.
+
2015-04-02 Andreas Schwab <schwab@suse.de>
[BZ #16850]
diff --git a/include/libc-internal.h b/include/libc-internal.h
index bca59a4614..b37388ecd7 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 */