From patchwork Wed Apr 22 12:17:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 6379 Received: (qmail 20047 invoked by alias); 22 Apr 2015 12:17:41 -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 20024 invoked by uid 89); 22 Apr 2015 12:17:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com From: "Wilco Dijkstra" To: Subject: [COMMITTED] Use __copysign rather than copysign Date: Wed, 22 Apr 2015 13:17:10 +0100 Message-ID: <000201d07cf6$423011f0$c69035d0$@com> MIME-Version: 1.0 X-MC-Unique: eQgl8Tk_TUyFrHkR7Gba7g-1 I noticed a few uses of copysign in generic GLIBC sources - these should be __copysign to avoid namespace issues and enable inlining. Directly checked in as trivial change. 2015-04-22 Wilco Dijkstra * math/k_casinh.c (__kernel_casinh): Use __copysign. * sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c (__nearbyint): Likewise. * sysdeps/ieee754/ldbl-opt/nldbl-copysign.c (copysignl): Likewise. --- math/k_casinh.c | 2 +- sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c | 2 +- sysdeps/ieee754/ldbl-opt/nldbl-copysign.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/math/k_casinh.c b/math/k_casinh.c index de04e84..cd089ab 100644 --- a/math/k_casinh.c +++ b/math/k_casinh.c @@ -199,7 +199,7 @@ __kernel_casinh (__complex__ double x, int adj) if (adj) { double t = __real__ y; - __real__ y = copysign (__imag__ y, __imag__ x); + __real__ y = __copysign (__imag__ y, __imag__ x); __imag__ y = t; } diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c index a58a620..a81e5ed 100644 --- a/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c +++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c @@ -46,7 +46,7 @@ __nearbyint(double x) double t = w-TWO52[sx]; math_opt_barrier(t); libc_fesetenv (&env); - return copysign(t, x); + return __copysign (t, x); } } else { if(j0==0x400) return x+x; /* inf or NaN */ diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c b/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c index ef23bad..045f00d 100644 --- a/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c +++ b/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c @@ -4,5 +4,5 @@ double attribute_hidden copysignl (double x, double y) { - return copysign (x, y); + return __copysign (x, y); }