From patchwork Thu May 11 20:53:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gabriel F. T. Gomes" X-Patchwork-Id: 761353 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 3wP51f4QZqz9s84 for ; Fri, 12 May 2017 06:53:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="A5B+kvnO"; 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:from:to:subject:date:in-reply-to:references :message-id; q=dns; s=default; b=QBwHztuooGfrZSAjuZj0KK9Z0G7RCxA 1TODO6pkfKHkrxUqwufVO84+hAj7rlvMnUuS8wKXa6lQYMb6JfqpFa3EWfo32+dj 282H+btHACY9C0Ay5su5h1MLA30j1dK0HtDgPv/QdR6MFPZ+Tz316xrv36tmcV5W hTbU5wp6Kk8M= 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:in-reply-to:references :message-id; s=default; bh=mJwVyxt5Qlr82D97Is4ZJ8yDVcE=; b=A5B+k vnOjClb7WIeMeu7H3HHIW8r7EVL/Uw9vjHvTz1QaS1NdfXQHrk5F8HyJVxM44fEf PDBLBTQayRhtSh+bUwD2Yf76gshwdx6/MXQa3T33p2IYcMT+e7tEw+bI4YfioiCK JhLyAQnKV6zIrErNL46n63YP4AFSHEE56DTHF4= Received: (qmail 15473 invoked by alias); 11 May 2017 20:53:30 -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 15370 invoked by uid 89); 11 May 2017 20:53:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=65732 X-HELO: mx0a-001b2d01.pphosted.com From: "Gabriel F. T. Gomes" To: libc-alpha@sourceware.org Subject: [PATCH v4 2/5] float128: Include math-finite.h for _Float128 Date: Thu, 11 May 2017 17:53:01 -0300 In-Reply-To: <1494535984-2826-1-git-send-email-gftg@linux.vnet.ibm.com> References: <1494535984-2826-1-git-send-email-gftg@linux.vnet.ibm.com> X-TM-AS-MML: disable x-cbid: 17051120-0028-0000-0000-000001B3A993 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17051120-0029-0000-0000-000014B3EEF6 Message-Id: <1494535984-2826-3-git-send-email-gftg@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-05-11_17:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705110111 Changes since v3: - Replace __MATH_DECLARING_FLOAT128 with __MATH_DECLARING_FLOATN. -- 8< -- All the declarations in math-finite.h are macroized by floating-point type. This patch includes it for float128 and protects the declarations of functions that need not be declared for float128. 2017-05-09 Gabriel F. T. Gomes * math/math.h: Include bits/math-finite.h for float128. (__MATH_DECLARING_FLOATN): Define to control declaration of float128 functions. * math/bits/math-finite.h (pow10): Do not declare for float128. (gamma): Likewise. (scalb): Likewise. --- math/bits/math-finite.h | 13 ++++++++----- math/math.h | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/math/bits/math-finite.h b/math/bits/math-finite.h index 29f2f2e..b07ce31 100644 --- a/math/bits/math-finite.h +++ b/math/bits/math-finite.h @@ -83,7 +83,9 @@ __MATH_REDIRCALL (exp, , (_Mdouble_)); __MATH_REDIRCALL (exp10, , (_Mdouble_)); /* pow10. */ +# if !__MATH_DECLARING_FLOATN __MATH_REDIRCALL_2 (pow10, , (_Mdouble_), exp10); +# endif #endif #ifdef __USE_ISOC99 @@ -146,7 +148,7 @@ __NTH (__REDIRFROM (lgamma, , _MSUF_) (_Mdouble_ __d)) #endif #if ((defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)) \ - && defined __extern_always_inline) + && defined __extern_always_inline) && !__MATH_DECLARING_FLOATN /* gamma. */ __extern_always_inline _Mdouble_ __NTH (__REDIRFROM (gamma, , _MSUF_) (_Mdouble_ __d)) @@ -174,10 +176,11 @@ __MATH_REDIRCALL (pow, , (_Mdouble_, _Mdouble_)); __MATH_REDIRCALL (remainder, , (_Mdouble_, _Mdouble_)); #endif -#if (__MATH_DECLARING_DOUBLE \ - && (defined __USE_MISC \ - || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))) \ - || (!defined __MATH_DECLARE_LDOUBLE && defined __USE_MISC) +#if ((__MATH_DECLARING_DOUBLE \ + && (defined __USE_MISC \ + || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))) \ + || (!defined __MATH_DECLARE_LDOUBLE && defined __USE_MISC)) \ + && !__MATH_DECLARING_FLOATN /* scalb. */ __MATH_REDIRCALL (scalb, , (_Mdouble_, _Mdouble_)); #endif diff --git a/math/math.h b/math/math.h index b0b1932..03aadc0 100644 --- a/math/math.h +++ b/math/math.h @@ -626,11 +626,13 @@ extern int matherr (struct exception *__exc); # define _Mdouble_ double # define __MATH_DECLARING_DOUBLE 1 # define __MATH_DECLARING_LDOUBLE 0 +# define __MATH_DECLARING_FLOATN 0 # define _MSUF_ # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_LDOUBLE +# undef __MATH_DECLARING_FLOATN # undef _MSUF_ /* When __USE_ISOC99 is defined, include math-finite for float and @@ -641,11 +643,13 @@ extern int matherr (struct exception *__exc); # define _Mdouble_ float # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_LDOUBLE 0 +# define __MATH_DECLARING_FLOATN 0 # define _MSUF_ f # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_LDOUBLE +# undef __MATH_DECLARING_FLOATN # undef _MSUF_ /* Include bits/math-finite.h for long double. */ @@ -653,15 +657,32 @@ extern int matherr (struct exception *__exc); # define _Mdouble_ long double # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_LDOUBLE 1 +# define __MATH_DECLARING_FLOATN 0 # define _MSUF_ l # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_LDOUBLE +# undef __MATH_DECLARING_FLOATN # undef _MSUF_ # endif # endif /* __USE_ISOC99. */ + +/* Include bits/math-finite.h for float128. */ +# if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) +# define _Mdouble_ _Float128 +# define __MATH_DECLARING_DOUBLE 0 +# define __MATH_DECLARING_LDOUBLE 0 +# define __MATH_DECLARING_FLOATN 1 +# define _MSUF_ f128 +# include +# undef _Mdouble_ +# undef __MATH_DECLARING_DOUBLE +# undef __MATH_DECLARING_LDOUBLE +# undef __MATH_DECLARING_FLOATN +# undef _MSUF_ +# endif #endif /* __FINITE_MATH_ONLY__ > 0. */ #ifdef __USE_ISOC99