about summary refs log tree commit diff
path: root/bits/libc-header-start.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-08-03 22:21:37 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-08-03 22:21:37 +0000
commit412cb261b0d66ef5251d7d1c8276b5c522d943b7 (patch)
treea1761d0c902d348f6a8c00c7a155dee2c3cd026d /bits/libc-header-start.h
parent71b480444799983c2dc4f512671c47f78d99ac13 (diff)
downloadglibc-412cb261b0d66ef5251d7d1c8276b5c522d943b7.tar.gz
glibc-412cb261b0d66ef5251d7d1c8276b5c522d943b7.tar.xz
glibc-412cb261b0d66ef5251d7d1c8276b5c522d943b7.zip
Support __STDC_WANT_IEC_60559_FUNCS_EXT__ feature test macro.
This patch implements support for the
__STDC_WANT_IEC_60559_FUNCS_EXT__ feature test macro, following the
__GLIBC_USE approach used for other ISO C feature test macros.
Currently this only affects the exp10 functions (which glibc has had
for a long time).

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	* bits/libc-header-start.h (__GLIBC_USE_IEC_60559_FUNCS_EXT): New
	macro.
	* include/features.h (__STDC_WANT_IEC_60559_FUNCS_EXT__):
	Document.
	* manual/creature.texi (__STDC_WANT_IEC_60559_FUNCS_EXT__):
	Document macro.
	* manual/math.texi (exp10): Document as ISO from TS 18661-4:2015.
	(exp10f): Likewise.
	(exp10l): Likewise.
	* math/bits/mathcalls.h (exp10): Declare if
	[__GLIBC_USE (IEC_60559_FUNCS_EXT)], not [__USE_GNU].
Diffstat (limited to 'bits/libc-header-start.h')
-rw-r--r--bits/libc-header-start.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/bits/libc-header-start.h b/bits/libc-header-start.h
index 6a5850526c..ee6a876d82 100644
--- a/bits/libc-header-start.h
+++ b/bits/libc-header-start.h
@@ -50,3 +50,12 @@
 #else
 # define __GLIBC_USE_IEC_60559_BFP_EXT 0
 #endif
+
+/* ISO/IEC TS 18661-4:2015 defines the
+   __STDC_WANT_IEC_60559_FUNCS_EXT__ macro.  */
+#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
+#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__
+# define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
+#else
+# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
+#endif