From patchwork Mon Mar 13 21:01:59 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: 738425 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 3vhr1m4Q0Pz9s2G for ; Tue, 14 Mar 2017 08:03:24 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="s5IZ0w+3"; 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:message-id:in-reply-to :references; q=dns; s=default; b=yLZcpiaoj4eOznWJoJOdqhOKWwaI9dY r8/uReYqWvfa+uD7HEUuaKk/snka9LSrjmXFST+r+ylk0wDcJQqsDFwDjX5j9L2o U0VhP3MEj81xIm2XebN4h32NQ658glMDFsanONlel+BUGniv0+vq4CDrbSijRslj sEdSnlVB17qY= 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=+vmncTPrJSwldEtdyN0byfBWYQ0=; b=s5IZ0 w+3kKjfHe+0bAVWXeLFHbyh5+LkdhAHXslxufob2vrMhxCXnSNlBfP3uVp4obBf2 U2CoaDsMYTqGyb8UtL8SclJP/ixe13gDs1vrcP/5+J19y254DC3EYKA156AK0rr9 /y9K8Z8P9m9Y7IudBoZsYo4A6EF8J8F4Rjnu3E= Received: (qmail 78712 invoked by alias); 13 Mar 2017 21:02:25 -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 78665 invoked by uid 89); 13 Mar 2017 21:02:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail.gftg.com.br From: "Gabriel F. T. Gomes" To: libc-alpha@sourceware.org Subject: [PATCH 4/4] Macroize inclusion of math-finite.h (part 4) Date: Mon, 13 Mar 2017 18:01:59 -0300 Message-Id: <1489438919-4009-5-git-send-email-gftg@linux.vnet.ibm.com> In-Reply-To: <1489438919-4009-1-git-send-email-gftg@linux.vnet.ibm.com> References: <1489438919-4009-1-git-send-email-gftg@linux.vnet.ibm.com> --- math/bits/math-finite.h | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/math/bits/math-finite.h b/math/bits/math-finite.h index 1b5a243..c01c5c2 100644 --- a/math/bits/math-finite.h +++ b/math/bits/math-finite.h @@ -203,33 +203,16 @@ __MATH_REDIRCALL (sqrt, , (_Mdouble_)); #if defined __USE_ISOC99 && defined __extern_always_inline /* tgamma. */ -extern double __gamma_r_finite (double, int *); -__extern_always_inline double __NTH (tgamma (double __d)) -{ - int __local_signgam = 0; - double __res = __gamma_r_finite (__d, &__local_signgam); - return __local_signgam < 0 ? -__res : __res; -} -extern float __gammaf_r_finite (float, int *); -__extern_always_inline float __NTH (tgammaf (float __d)) -{ - int __local_signgam = 0; - float __res = __gammaf_r_finite (__d, &__local_signgam); - return __local_signgam < 0 ? -__res : __res; -} -# ifdef __MATH_DECLARE_LDOUBLE -extern long double __gammal_r_finite (long double, int *); -__extern_always_inline long double __NTH (tgammal (long double __d)) +extern _Mdouble_ +__REDIRFROM (__gamma, _r_finite, _MSUF_) (_Mdouble_, int *); + +__extern_always_inline _Mdouble_ +__NTH (__REDIRFROM (tgamma, , _MSUF_) (_Mdouble_ __d)) { int __local_signgam = 0; -# ifdef __NO_LONG_DOUBLE_MATH - long double __res = __gamma_r_finite (__d, &__local_signgam); -# else - long double __res = __gammal_r_finite (__d, &__local_signgam); -# endif + _Mdouble_ __res = __REDIRTO (gamma, _r, _MSUF_) (__d, &__local_signgam); return __local_signgam < 0 ? -__res : __res; } -# endif #endif #undef __REDIRFROM