From patchwork Tue Sep 16 21:32:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 390199 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 14B02140119 for ; Wed, 17 Sep 2014 07:33:18 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=SIJscEa8xh/LuueLBsiol7rcHbEyqp7 GdBGI7N4ff+Eq2oI5bCr2YgzwMnckAJ+9OvhI5Ycvl40LLyNrJFiaJCigZbNQlFa 4QKayvec4cZL9if51xyS1stWs0mZ1054R+ao+iZyw2kBk97h2Kpn1X+z/4jmWXKC B+IdwAMIzoxw= 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:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=cJ5Y29K+Yr0oExPAY6nYRbTabOo=; b=scjQq AGNlrZtDLLrzA/XzbS1fhiw4UsoUniY59kCfrJLoKdnS588bND1t1vuZh77IRQOr +dLfoUr5DDmPdbV4YPwehVQgrAKIASCieqHLclXoT+owGu0g8j5lyON6RNTZnXR0 Hqr4bwOe4x/HJgP7QbNGkbQR6Br1uzY7lvClnc= Received: (qmail 367 invoked by alias); 16 Sep 2014 21:33:04 -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 32655 invoked by uid 89); 16 Sep 2014 21:33:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f48.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=7f8AY1uf6q/5Gqm0pwFDrcoteDN+uic/enwELs6oPvo=; b=dAOOMNQfpFwMvttiDaMQ4BlWNuxin7B53oVLJgq+SrvhRNidrYRk2drmOwIa70eBDh AGqd0YS05hlwaLnveLWEfgj0xgIYDHwxUMQ0wrTA2FFtNo5PwMv66cm+jVDHnpIVN2oK xjUk+6NjxZZ3H58AA0W/QnZUv3QIywhNCwMUdQiznrU8t1qFJWpsrcBjblexMvFpM6PT A6NytSEwuWoEARY1pHkBSotRIdpEbcjETBaZkyUhn7DteG2YcN521sKGEqflaL62eBBH 0gzsgijy3TAPeU0/NmJP8tUYqcG2fEOnryIfkladZz9QZkYbtYlleLlwAQbYZElJ08oc DwXA== X-Gm-Message-State: ALoCoQlNJ2vwf3YXIbqjy5Rh+Z+wtLjuhZzw+AS3d/2LwByisloTrvjlKShk/kPo7/2OlWroZdrJ X-Received: by 10.70.94.201 with SMTP id de9mr33791725pdb.103.1410903180270; Tue, 16 Sep 2014 14:33:00 -0700 (PDT) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH] stdlib/tst-strtod-round.c: Fix build on ARM Date: Tue, 16 Sep 2014 14:32:50 -0700 Message-Id: <1410903170-31206-2-git-send-email-will.newton@linaro.org> In-Reply-To: <1410903170-31206-1-git-send-email-will.newton@linaro.org> References: <1410903170-31206-1-git-send-email-will.newton@linaro.org> Building this test on ARM fails because the prototypes for the long double variants of the math functions are unavailable. Add an additional include guard to math.h that enables long double math function declarations if _LIBC_TEST is defined and define _LIBC_TEST in stdlib/tst-strtod-round.c. ChangeLog: 2014-09-16 Will Newton * math/math.h: Define long double math functions if _LIBC_TEST is defined. * stdlib/tst-strtod-round.c: Define _LIBC_TEST. --- math/math.h | 2 +- stdlib/tst-strtod-round.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/math/math.h b/math/math.h index 72ec2ca..dc7ab2d 100644 --- a/math/math.h +++ b/math/math.h @@ -91,7 +91,7 @@ __BEGIN_DECLS # undef _Mdouble_END_NAMESPACE # undef __MATH_PRECNAME -# if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \ +# if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC && !defined _LIBC_TEST) \ || defined __LDBL_COMPAT # ifdef __LDBL_COMPAT diff --git a/stdlib/tst-strtod-round.c b/stdlib/tst-strtod-round.c index f334b20..cbde457 100644 --- a/stdlib/tst-strtod-round.c +++ b/stdlib/tst-strtod-round.c @@ -17,6 +17,9 @@ License along with the GNU C Library; if not, see . */ +/* Defining _LIBC_TEST ensures long double math functions are + declared in the headers. */ +#define _LIBC_TEST 1 #include #include #include