Skip to content

Commit

Permalink
Define libc_max_align_t for internal use
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Weimer committed Apr 2, 2015
1 parent b763f6a commit 37d60d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
9 changes: 9 additions & 0 deletions include/libc-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 37d60d9

Please sign in to comment.