From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id D57273858C3A; Tue, 8 Nov 2022 20:41:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D57273858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667940093; bh=4KJrG0Zu3blAJ1fAx1yJJn4LEckxActtaRYFRIyWVMY=; h=From:To:Subject:Date:From; b=lyJaoNDLq+VOsisJ4rJZrPqGPiKy7gUk/oqG4G4TnrP7OqIT3X2Tvc28yE13UINGj hHvwX8Xdl73dLQ4YoQE7ZVbIn5U9Mu2XRfN8G5Pv6jsUbqVZO7wRX9Aabhuw9i8qIS 9aEQkbuh+09WlqJrtUK1bsjtRZSH0IemxBM0jjdo= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Thomas Schwinge To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Generally make all 'long double complex' methods available in X-Act-Checkin: newlib-cygwin X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/master X-Git-Oldrev: 8c68a8a4898f2607bf940716dbce5654f10c481b X-Git-Newrev: 67459ce679f42ef81faaeb2401593105d6fbbf5d Message-Id: <20221108204133.D57273858C3A@sourceware.org> Date: Tue, 8 Nov 2022 20:41:33 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D67459ce679f= 42ef81faaeb2401593105d6fbbf5d commit 67459ce679f42ef81faaeb2401593105d6fbbf5d Author: Thomas Schwinge Date: Wed Oct 5 22:11:41 2022 +0200 Generally make all 'long double complex' methods available in =20 ..., not just '#if defined(__CYGWIN__)'. (Exception: 'clog10l' which c= urrently indeed is for Cygwin only.) =20 This completes 2017-07-05 commit be3ca3947402827aa52709e677369bc7ad30aa= 1d "Fixed warnings for some long double complex methods" after Aditya Upad= hyay's work on importing "Long double complex methods" from NetBSD. =20 For example, this changes GCC/nvptx libgfortran 'configure' output as f= ollows: =20 [...] checking for ccosf... yes checking for ccos... yes checking for ccosl... [-no-]{+yes+} [...] =20 ..., and correspondingly GCC/nvptx 'nvptx-none/libgfortran/config.h' as follows: =20 [...] /* Define to 1 if you have the `ccosl' function. */ -/* #undef HAVE_CCOSL */ +#define HAVE_CCOSL 1 [...] =20 Similarly for 'ccoshl', 'cexpl', 'cpowl', 'csinl', 'csinhl', 'ctanl', '= ctanhl', 'cacoshl', 'cacosl', 'casinhl', 'catanhl'. ('conjl', 'cprojl' are not currently being used in libgfortran.) =20 This in turn simplifies GCC/nvptx 'libgfortran/intrinsics/c99_functions= .c' compilation such that this files doesn't have to provide its own "Implementation of various C99 functions" for those, when in fact they'= re available in newlib libm. Diff: --- newlib/libc/include/complex.h | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/newlib/libc/include/complex.h b/newlib/libc/include/complex.h index 0a3ea97ed..ad3028e4c 100644 --- a/newlib/libc/include/complex.h +++ b/newlib/libc/include/complex.h @@ -20,6 +20,7 @@ __BEGIN_DECLS /* 7.3.5.1 The cacos functions */ double complex cacos(double complex); float complex cacosf(float complex); +long double complex cacosl(long double complex); =20 /* 7.3.5.2 The casin functions */ double complex casin(double complex); @@ -34,44 +35,54 @@ long double complex catanl(long double complex); /* 7.3.5.1 The ccos functions */ double complex ccos(double complex); float complex ccosf(float complex); +long double complex ccosl(long double complex); =20 /* 7.3.5.1 The csin functions */ double complex csin(double complex); float complex csinf(float complex); +long double complex csinl(long double complex); =20 /* 7.3.5.1 The ctan functions */ double complex ctan(double complex); float complex ctanf(float complex); +long double complex ctanl(long double complex); =20 /* 7.3.6 Hyperbolic functions */ /* 7.3.6.1 The cacosh functions */ double complex cacosh(double complex); float complex cacoshf(float complex); +long double complex cacoshl(long double complex); =20 /* 7.3.6.2 The casinh functions */ double complex casinh(double complex); float complex casinhf(float complex); +long double complex casinhl(long double complex); =20 /* 7.3.6.3 The catanh functions */ double complex catanh(double complex); float complex catanhf(float complex); +long double complex catanhl(long double complex); =20 /* 7.3.6.4 The ccosh functions */ double complex ccosh(double complex); float complex ccoshf(float complex); +long double complex ccoshl(long double complex); =20 /* 7.3.6.5 The csinh functions */ double complex csinh(double complex); float complex csinhf(float complex); +long double complex csinhl(long double complex); =20 /* 7.3.6.6 The ctanh functions */ double complex ctanh(double complex); float complex ctanhf(float complex); +long double complex ctanhl(long double complex); =20 /* 7.3.7 Exponential and logarithmic functions */ /* 7.3.7.1 The cexp functions */ double complex cexp(double complex); float complex cexpf(float complex); +long double complex cexpl(long double complex); =20 /* 7.3.7.2 The clog functions */ double complex clog(double complex); @@ -93,6 +104,7 @@ float cabsf(float complex) ; /* 7.3.8.2 The cpow functions */ double complex cpow(double complex, double complex); float complex cpowf(float complex, float complex); +long double complex cpowl(long double complex, long double complex); =20 /* 7.3.8.3 The csqrt functions */ double complex csqrt(double complex); @@ -113,10 +125,12 @@ long double cimagl(long double complex); /* 7.3.9.3 The conj functions */ double complex conj(double complex); float complex conjf(float complex); +long double complex conjl(long double complex); =20 /* 7.3.9.4 The cproj functions */ double complex cproj(double complex); float complex cprojf(float complex); +long double complex cprojl(long double complex); =20 /* 7.3.9.5 The creal functions */ double creal(double complex); @@ -126,27 +140,10 @@ long double creall(long double complex); #if __GNU_VISIBLE double complex clog10(double complex); float complex clog10f(float complex); -#endif - -#if defined(__CYGWIN__) -long double complex cacosl(long double complex); -long double complex ccosl(long double complex); -long double complex csinl(long double complex); -long double complex ctanl(long double complex); -long double complex cacoshl(long double complex); -long double complex casinhl(long double complex); -long double complex catanhl(long double complex); -long double complex ccoshl(long double complex); -long double complex csinhl(long double complex); -long double complex ctanhl(long double complex); -long double complex cexpl(long double complex); -long double complex cpowl(long double complex, long double complex); -long double complex conjl(long double complex); -long double complex cprojl(long double complex); -#if __GNU_VISIBLE +# if defined(__CYGWIN__) long double complex clog10l(long double complex); +# endif #endif -#endif /* __CYGWIN__ */ =20 __END_DECLS