Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 30 Apr 2014 22:23:01 +0200
From: Pawel Dziepak <>
Cc: Pawel Dziepak <>
Subject: [PATCH] add definition of max_align_t to stddef.h

max_align_t is an object type with the strictest alignment supported by
the implementation in all contexts. An union is used to "choose" the greater
of the two greatest scalar types: long long and long double.

Signed-off-by: Pawel Dziepak <>
 include/ | 2 ++
 include/stddef.h      | 1 +
 2 files changed, 3 insertions(+)

diff --git a/include/ b/include/
index c4ca5d5..ec3873f 100644
--- a/include/
+++ b/include/
@@ -18,6 +18,8 @@ TYPEDEF unsigned _Int64 uint64_t;
 TYPEDEF unsigned _Int64 u_int64_t;
 TYPEDEF unsigned _Int64 uintmax_t;
+TYPEDEF union { long double ld; long long ll; } max_align_t;
 TYPEDEF unsigned mode_t;
 TYPEDEF unsigned _Reg nlink_t;
 TYPEDEF _Int64 off_t;
diff --git a/include/stddef.h b/include/stddef.h
index 0a32919..cab34d9 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -7,6 +7,7 @@
 #define NULL ((void*)0)
+#define __NEED_max_align_t
 #define __NEED_ptrdiff_t
 #define __NEED_size_t
 #define __NEED_wchar_t

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.