about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-11-04 15:43:57 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-11-04 15:43:57 +0000
commit1484e65736f4cab27e5051e0f06be8470e69af82 (patch)
tree2661e8c53b60acf5d5685e2402b2e94cdeb8c649 /include
parentcd3e2ac55e6848bc725a20978a4c2a7ab766bd86 (diff)
downloadglibc-1484e65736f4cab27e5051e0f06be8470e69af82.tar.gz
glibc-1484e65736f4cab27e5051e0f06be8470e69af82.tar.xz
glibc-1484e65736f4cab27e5051e0f06be8470e69af82.zip
Define __STDC_IEC_559* based on __GCC_IEC_559*.
Diffstat (limited to 'include')
-rw-r--r--include/stdc-predef.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/include/stdc-predef.h b/include/stdc-predef.h
index b9c9967d9d..f8cb2cb97a 100644
--- a/include/stdc-predef.h
+++ b/include/stdc-predef.h
@@ -26,9 +26,28 @@
    explicitly includes a system header.  GCC knows the name of this
    header in order to preinclude it.  */
 
-/* We do support the IEC 559 math functionality, real and complex.  */
-#define __STDC_IEC_559__		1
-#define __STDC_IEC_559_COMPLEX__	1
+/* glibc's intent is to support the IEC 559 math functionality, real
+   and complex.  If the GCC (4.9 and later) predefined macros
+   specifying compiler intent are available, use them to determine
+   whether the overall intent is to support these features; otherwise,
+   presume an older compiler has intent to support these features and
+   define these macros by default.  */
+
+#ifdef __GCC_IEC_559
+# if __GCC_IEC_559 > 0
+#  define __STDC_IEC_559__		1
+# endif
+#else
+# define __STDC_IEC_559__		1
+#endif
+
+#ifdef __GCC_IEC_559_COMPLEX
+# if __GCC_IEC_559_COMPLEX > 0
+#  define __STDC_IEC_559_COMPLEX__	1
+# endif
+#else
+# define __STDC_IEC_559_COMPLEX__	1
+#endif
 
 /* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) /
    Unicode 6.0.  */