about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-09-30 15:08:08 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-09-30 15:08:08 +0000
commit8278d50ce7f48dc5af68fac850192c7666661cd4 (patch)
tree25279c22bd871dc4926d4baa4894d451806402e2
parentd61ef7352b0026d9eeaf457dbfbb2e3fd8401e92 (diff)
downloadglibc-8278d50ce7f48dc5af68fac850192c7666661cd4.tar.gz
glibc-8278d50ce7f48dc5af68fac850192c7666661cd4.tar.xz
glibc-8278d50ce7f48dc5af68fac850192c7666661cd4.zip
Fix ldbl-128ibm iscanonical for -mlong-double-64.
This patch fixes the ldbl-128ibm version of the iscanonical macro not
to use __iscanonicall when long double = double (-mlong-double-64).

Tested for powerpc.

	* sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
	[__NO_LONG_DOUBLE_MATH] (__iscanonicall): Do not declare.
	[__NO_LONG_DOUBLE_MATH] (iscanonical): Define to evaluate to 1.
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h6
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 86f4557abc..c61990d521 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-09-30  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
+	[__NO_LONG_DOUBLE_MATH] (__iscanonicall): Do not declare.
+	[__NO_LONG_DOUBLE_MATH] (iscanonical): Define to evaluate to 1.
+
 2016-09-30  Carlos O'Donell  <carlos@redhat.com>
 
 	[BZ #20292]
diff --git a/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h b/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
index cbc79ae8da..c7b7c63f95 100644
--- a/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
+++ b/sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h
@@ -20,6 +20,9 @@
 # error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
 #endif
 
+#ifdef __NO_LONG_DOUBLE_MATH
+# define iscanonical(x) ((void) (__typeof (x)) (x), 1)
+#else
 extern int __iscanonicall (long double __x)
      __THROW __attribute__ ((__const__));
 
@@ -29,7 +32,8 @@ extern int __iscanonicall (long double __x)
    conversion, before being discarded; in IBM long double, there are
    encodings that are not consistently handled as corresponding to any
    particular value of the type, and we return 0 for those.  */
-#define iscanonical(x)				\
+# define iscanonical(x)				\
   (sizeof (x) == sizeof (long double)		\
    ? __iscanonicall (x)				\
    : ((void) (__typeof (x)) (x), 1))
+#endif