]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use C11 *_DECIMAL_DIG macros in libm-test.inc.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 28 Oct 2015 17:12:20 +0000 (17:12 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 28 Oct 2015 17:12:20 +0000 (17:12 +0000)
Now that we build with -std=gnu11, we can use C11 <float.h> macros
such as FLT_DECIMAL_DIG instead of the GCC predefines such as
__FLT_DECIMAL_DIG__ that are used internally in <float.h>.  This patch
makes libm-test.inc do so.

Tested for x86_64 and x86.

* math/libm-test.inc (TYPE_DECIMAL_DIG): Use LDBL_DECIMAL_DIG,
DBL_DECIMAL_DIG and FLT_DECIMAL_DIG instead of __DECIMAL_DIG__,
__DBL_DECIMAL_DIG__ and __FLT_DECIMAL_DIG__.

ChangeLog
math/libm-test.inc

index 76f23fc16f843828fa041fbdb59fc914bba1256c..b647bed2e9a06107e467deb4d0c727e8ba09d69d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-28  Joseph Myers  <joseph@codesourcery.com>
+
+       * math/libm-test.inc (TYPE_DECIMAL_DIG): Use LDBL_DECIMAL_DIG,
+       DBL_DECIMAL_DIG and FLT_DECIMAL_DIG instead of __DECIMAL_DIG__,
+       __DBL_DECIMAL_DIG__ and __FLT_DECIMAL_DIG__.
+
 2015-10-28  Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>
 
        * sysdeps/powerpc/libc-tls.c: New file. Provides __tls_get_addr () in
index 239587dc6a0c7f94686c477f4104e02a5f406e29..6cce5fcae47507fc42160aa5c8c7fbf7865d3a13 100644 (file)
@@ -345,12 +345,12 @@ static FLOAT max_valid_error;
    hex digit, in the case of TYPE_HEX_DIG).  When used with printf
    formats where the precision counts only digits after the point, 1
    is subtracted from these values. */
-#define TYPE_DECIMAL_DIG CHOOSE (__DECIMAL_DIG__,      \
-                                __DBL_DECIMAL_DIG__,   \
-                                __FLT_DECIMAL_DIG__,   \
-                                __DECIMAL_DIG__,       \
-                                __DBL_DECIMAL_DIG__,   \
-                                __FLT_DECIMAL_DIG__)
+#define TYPE_DECIMAL_DIG CHOOSE (LDBL_DECIMAL_DIG,     \
+                                DBL_DECIMAL_DIG,       \
+                                FLT_DECIMAL_DIG,       \
+                                LDBL_DECIMAL_DIG,      \
+                                DBL_DECIMAL_DIG,       \
+                                FLT_DECIMAL_DIG)
 #define TYPE_HEX_DIG ((MANT_DIG + 7) / 4)
 
 /* Compare KEY (a string, with the name of a function) with ULP (a