]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Define libc_max_align_t for internal use
authorFlorian Weimer <fweimer@redhat.com>
Thu, 2 Apr 2015 08:07:04 +0000 (10:07 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 2 Apr 2015 17:55:21 +0000 (19:55 +0200)
ChangeLog
include/libc-internal.h

index 2a7f505a105cda3a2a02b165022a29905f20dd7f..9bac2983e4ce55e16e1ff614f39f70d87e2a8a66 100644 (file)
--- 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]
index bca59a46144b736fd7a961e01478e8ef10e86805..b37388ecd7302e012fdda520145698992d6bb8e1 100644 (file)
@@ -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  */