Blame SOURCES/compat-libstdc++33-ldbl.patch

4ac4fd
--- libstdc++33-v3/libmath/stubs.c.jj	2003-06-03 08:48:02.000000000 -0400
4ac4fd
+++ libstdc++33-v3/libmath/stubs.c	2006-08-21 09:18:10.000000000 -0400
4ac4fd
@@ -27,9 +27,29 @@
4ac4fd
    invalidate any other reasons why the executable file might be covered by
4ac4fd
    the GNU General Public License.  */
4ac4fd
 
4ac4fd
+#if defined __s390__ || defined __powerpc__
4ac4fd
+/* Lie.  */
4ac4fd
+#define __LONG_DOUBLE_128__ 1
4ac4fd
+#endif
4ac4fd
+
4ac4fd
 #include <math.h>
4ac4fd
 #include "config.h"
4ac4fd
 
4ac4fd
+#if defined __s390__ || defined __powerpc__
4ac4fd
+#undef HAVE_ATAN2L
4ac4fd
+#undef HAVE_COSHL
4ac4fd
+#undef HAVE_COSL
4ac4fd
+#undef HAVE_EXPL
4ac4fd
+#undef HAVE_LOG10L
4ac4fd
+#undef HAVE_LOGL
4ac4fd
+#undef HAVE_POWL
4ac4fd
+#undef HAVE_SINHL
4ac4fd
+#undef HAVE_SINL
4ac4fd
+#undef HAVE_SQRTL
4ac4fd
+#undef HAVE_TANHL
4ac4fd
+#undef HAVE_TANL
4ac4fd
+#endif
4ac4fd
+
4ac4fd
 /* For targets which do not have support for long double versions,
4ac4fd
    we use the crude approximation.  We'll do better later.  */
4ac4fd
 
4ac4fd
@@ -137,6 +157,12 @@ hypotl(long double x, long double y)
4ac4fd
   x /= s; y /= s;
4ac4fd
   return s * sqrtl(x * x + y * y);
4ac4fd
 }
4ac4fd
+#elif (defined __s390__ || defined __powerpc__) && defined HAVE_HYPOT
4ac4fd
+long double
4ac4fd
+hypotl(long double x, long double y)
4ac4fd
+{
4ac4fd
+  return hypot((double) x, (double) y);
4ac4fd
+}
4ac4fd
 #endif
4ac4fd
 
4ac4fd