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: 457310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 081471400DE for ; Thu, 2 Apr 2015 03:18:52 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=sourceware.org header.i=@sourceware.org header.b=y7skq3yB; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type; q=dns; s=default; b=mwb9o6zroUcatLqN/aUXds0jfqsor UjdGyQGokErVlMYGI6fcnxUL7vbgNeKcuU6tHFCcoQM/8viCI3EIeTLVYdwaDwDu tPht9yskpbF5YY0Fyy4+QbbMu3Y+AiKIcyCuoUZccDQMClhWla+Y+PE3KyRmbAZG sd/xRT2/VfeDRE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type; s=default; bh=wtQjv+Pp8i/m9k69x3znTEcX8SA=; b=y7s kq3yBhWKFAazvef4UnJS9MNMxgGwOCeLCoAIvUSZxHjAi1p3XOspcTDlEg4S4x3f r4p7sh8vJflCcMyeowrH+H6H3AcSAEAOTRlrpOL2ar2SacC8gWvZhZCFwH0hTgwd 7J2f14JVL7yJFoaYo9qcVBJ7SnASX/GKRF28+XMo= 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