]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix ldbl-128ibm iscanonical for -mlong-double-64.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 30 Sep 2016 15:08:08 +0000 (15:08 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 30 Sep 2016 15:08:08 +0000 (15:08 +0000)
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.

ChangeLog
sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h

index 86f4557abca4ad37021e482a3d7c3bbbe5b1a3ed..c61990d521449a157df3b08e8a2836099cca533c 100644 (file)
--- 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]
index cbc79ae8dabaae87caf4d7b44138525b6d90d866..c7b7c63f954b4d48c420234fbd8098cf1e124574 100644 (file)
@@ -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