From 0d25c320b9298fcf63df9ceb0e3e713a49402d76 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 20 May 2005 14:00:06 +0000 Subject: stubs.c: Also implement fabsf/fabsl if not present in the system libraries. libstdc++-v3/ 2005-05-20 Jan Beulich * libmath/stubs.c: Also implement fabsf/fabsl if not present in the system libraries. From-SVN: r100013 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/libmath/stubs.c | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'libstdc++-v3') diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index efde72f..f4116a9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2005-05-20 Jan Beulich + + * libmath/stubs.c: Also implement fabsf/fabsl if not present in the + system libraries. + 2005-05-20 Paolo Carlini * include/bits/stl_algo.h (__rotate<_RandomAccessIterator>): diff --git a/libstdc++-v3/libmath/stubs.c b/libstdc++-v3/libmath/stubs.c index 797b201..bbbe0fe 100644 --- a/libstdc++-v3/libmath/stubs.c +++ b/libstdc++-v3/libmath/stubs.c @@ -34,6 +34,23 @@ we use the crude approximation. We'll do better later. */ +#ifndef HAVE_FABSF +float +fabsf(float x) +{ + return (float) fabs(x); +} +#endif + +#ifndef HAVE_FABSL +long double +fabsl(long double x) +{ + return fabs((double) x); +} +#endif + + #ifndef HAVE_ACOSF float acosf(float x) -- cgit v1.1