diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2011-01-13 01:25:15 +0300 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2011-01-13 01:25:15 +0300 |
commit | 47235a60abfec3e05599c7146db053bac6257f69 (patch) | |
tree | efd5cf9fdbfffa1410445fc7e676d3ad54327b12 /newlib/libm | |
parent | 0597fe0adc39d0d2c34f70cfc9bd47c35107ebe1 (diff) |
2011-01-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* libm/math/w_tgamma.c: Only build ifndef _DOUBLE_IS_32BITS.
* libm/math/wf_tgamma.c: Map tgamma to tgammaf, ifdef _DOUBLE_IS_32BITS.
Diffstat (limited to 'newlib/libm')
-rw-r--r-- | newlib/libm/math/w_tgamma.c | 4 | ||||
-rw-r--r-- | newlib/libm/math/wf_tgamma.c | 14 |
2 files changed, 18 insertions, 0 deletions
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) */ |