stubs.c: Also implement fabsf/fabsl if not present in the system libraries.
authorJan Beulich <jbeulich@novell.com>
Fri, 20 May 2005 14:00:06 +0000 (14:00 +0000)
committerJan Beulich <jbeulich@gcc.gnu.org>
Fri, 20 May 2005 14:00:06 +0000 (14:00 +0000)
libstdc++-v3/
2005-05-20  Jan Beulich  <jbeulich@novell.com>

* libmath/stubs.c: Also implement fabsf/fabsl if not present in the
system libraries.

From-SVN: r100013

libstdc++-v3/ChangeLog
libstdc++-v3/libmath/stubs.c

index efde72f2bd57cb78f3718cb031a55d55c43e5f37..f4116a9eca71958dba2410df1437e88069ad1f22 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-20  Jan Beulich  <jbeulich@novell.com>
+
+       * libmath/stubs.c: Also implement fabsf/fabsl if not present in the
+       system libraries.
+
 2005-05-20  Paolo Carlini  <pcarlini@suse.de>
 
        * include/bits/stl_algo.h (__rotate<_RandomAccessIterator>):
index 797b2017fb0627608ce8c4395d56b43c07d2a787..bbbe0fe3d1693ec4bb80a7b1345b26d361358b93 100644 (file)
    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)