From patchwork Wed Apr 1 16:18:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 5966 Received: (qmail 72876 invoked by alias); 1 Apr 2015 16:18:45 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 72862 invoked by uid 89); 1 Apr 2015 16:18:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Message-ID: <551C1A60.4080507@redhat.com> Date: Wed, 01 Apr 2015 18:18:40 +0200 From: Florian Weimer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: GNU C Library Subject: [PATCH] Define libc_max_align_t This came out of the scratch_buffer discussion. As far as I can tell, this is exactly what GCC uses; I could not find a target-specific definition there. From a521ad17ef640ff077eccd997defb4779d7040c3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 1 Apr 2015 18:14:50 +0200 Subject: [PATCH] Define libc_max_align_t for internal use --- ChangeLog | 4 ++++ include/libc-internal.h | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3e8df42..cc4daeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-04-01 Florian Weimer + + * include/libc-internal.h (libc_max_align_t): Define. + 2015-03-31 H.J. Lu [BZ #18185] diff --git a/include/libc-internal.h b/include/libc-internal.h index bca59a4..9ddf409 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -107,4 +107,11 @@ 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. */ +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 */ -- 2.1.0