From 47235a60abfec3e05599c7146db053bac6257f69 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 12 Jan 2011 22:25:15 +0000 Subject: =?UTF-8?q?2011-01-12=20=20Ralf=20Cors=C3=A9pius=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libm/math/w_tgamma.c: Only build ifndef _DOUBLE_IS_32BITS. * libm/math/wf_tgamma.c: Map tgamma to tgammaf, ifdef _DOUBLE_IS_32BITS. --- newlib/ChangeLog | 5 +++++ newlib/libm/math/w_tgamma.c | 4 ++++ newlib/libm/math/wf_tgamma.c | 14 ++++++++++++++ 3 files changed, 23 insertions(+) (limited to 'newlib') diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 8ace534c4..c304e5f3b 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2011-01-12 Ralf Corsépius + + * libm/math/w_tgamma.c: Only build ifndef _DOUBLE_IS_32BITS. + * libm/math/wf_tgamma.c: Map tgamma to tgammaf, ifdef _DOUBLE_IS_32BITS. + 2011-01-12 Jeff Johnston * configure.host: Add noinclude variable to allow specification diff --git a/newlib/libm/math/w_tgamma.c b/newlib/libm/math/w_tgamma.c index f24a243bf..c0c011dd0 100644 --- a/newlib/libm/math/w_tgamma.c +++ b/newlib/libm/math/w_tgamma.c @@ -17,6 +17,8 @@ #include "fdlibm.h" +#ifndef _DOUBLE_IS_32BITS + #ifdef __STDC__ double tgamma(double x) #else @@ -42,3 +44,5 @@ return y; #endif } + +#endif /* defined(_DOUBLE_IS_32BITS) */ diff --git a/newlib/libm/math/wf_tgamma.c b/newlib/libm/math/wf_tgamma.c index 2b57d845f..92df39648 100644 --- a/newlib/libm/math/wf_tgamma.c +++ b/newlib/libm/math/wf_tgamma.c @@ -43,3 +43,17 @@ return y; #endif } + +#ifdef _DOUBLE_IS_32BITS + +#ifdef __STDC__ + double tgamma(double x) +#else + double tgamma(x) + double x; +#endif +{ + return (double) tgammaf((float) x); +} + +#endif /* defined(_DOUBLE_IS_32BITS) */ -- cgit v1.2.3