This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.24-30-g412cb26


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  412cb261b0d66ef5251d7d1c8276b5c522d943b7 (commit)
      from  71b480444799983c2dc4f512671c47f78d99ac13 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=412cb261b0d66ef5251d7d1c8276b5c522d943b7

commit 412cb261b0d66ef5251d7d1c8276b5c522d943b7
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Aug 3 22:21:37 2016 +0000

    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].

diff --git a/ChangeLog b/ChangeLog
index 954af37..ac692dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2016-08-03  Joseph Myers  <joseph@codesourcery.com>
 
+	* 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].
+
 	* manual/arith.texi (nextup): Fix typo in last change.
 
 2016-08-03  Zack Weinberg  <zackw@panix.com>
diff --git a/NEWS b/NEWS
index 25c771d..fe9ff1c 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,11 @@ Version 2.25
   from that TS.  Note that most features from that TS are not supported by
   the GNU C Library.
 
+* The feature test macro __STDC_WANT_IEC_60559_FUNCS_EXT__, from ISO/IEC TS
+  18661-4:2015, is supported to enable declarations of functions and macros
+  from that TS.  Note that most features from that TS are not supported by
+  the GNU C Library.
+
 * The inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated.  This
   means that in a future release, the macros â??majorâ??, â??minorâ??, and â??makedevâ??
   will only be available from <sys/sysmacros.h>.
diff --git a/bits/libc-header-start.h b/bits/libc-header-start.h
index 6a58505..ee6a876 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
diff --git a/include/features.h b/include/features.h
index 554c5c8..650d4c5 100644
--- a/include/features.h
+++ b/include/features.h
@@ -26,6 +26,8 @@
    _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
    __STDC_WANT_LIB_EXT2__ Extensions to ISO C99 from TR 27431-2:2010.
    __STDC_WANT_IEC_60559_BFP_EXT__ Extensions to ISO C11 from TS 18661-1:2014.
+   __STDC_WANT_IEC_60559_FUNCS_EXT__ Extensions to ISO C11 from
+			TS 18661-4:2015.
    _POSIX_SOURCE	IEEE Std 1003.1.
    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
 			if >=199309L, add IEEE Std 1003.1b-1993;
diff --git a/manual/creature.texi b/manual/creature.texi
index 61b17ce..257f871 100644
--- a/manual/creature.texi
+++ b/manual/creature.texi
@@ -183,6 +183,15 @@ are enabled.  Only some of the features from this TS are supported by
 @end defvr
 
 @comment (none)
+@comment ISO
+@defvr Macro __STDC_WANT_IEC_60559_FUNCS_EXT__
+If you define this macro, features from ISO/IEC TS 18661-4:2015
+(Floating-point extensions for C: Supplementary functions) are
+enabled.  Only some of the features from this TS are supported by
+@theglibc{}.
+@end defvr
+
+@comment (none)
 @comment GNU
 @defvr Macro _GNU_SOURCE
 If you define this macro, everything is included: @w{ISO C89}, @w{ISO
diff --git a/manual/math.texi b/manual/math.texi
index 5c9f7b9..d689820 100644
--- a/manual/math.texi
+++ b/manual/math.texi
@@ -480,13 +480,13 @@ Mathematically, @code{exp2 (x)} is the same as @code{exp (x * log (2))}.
 @end deftypefun
 
 @comment math.h
-@comment GNU
+@comment ISO
 @deftypefun double exp10 (double @var{x})
 @comment math.h
-@comment GNU
+@comment ISO
 @deftypefunx float exp10f (float @var{x})
 @comment math.h
-@comment GNU
+@comment ISO
 @deftypefunx {long double} exp10l (long double @var{x})
 @comment math.h
 @comment GNU
@@ -501,7 +501,8 @@ Mathematically, @code{exp2 (x)} is the same as @code{exp (x * log (2))}.
 These functions compute @code{10} raised to the power @var{x}.
 Mathematically, @code{exp10 (x)} is the same as @code{exp (x * log (10))}.
 
-These functions are GNU extensions.  The name @code{exp10} is
+The @code{exp10} functions are from TS 18661-4:2015; the @code{pow10}
+names are GNU extensions.  The name @code{exp10} is
 preferred, since it is analogous to @code{exp} and @code{exp2}.
 @end deftypefun
 
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index e1c0521..951a3d0 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -115,9 +115,11 @@ __MATHCALL (log10,, (_Mdouble_ __x));
 __MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
 _Mdouble_END_NAMESPACE
 
-#ifdef __USE_GNU
-/* A function missing in all standards: compute exponent to base ten.  */
+#if __GLIBC_USE (IEC_60559_FUNCS_EXT)
+/* Compute exponent to base ten.  */
 __MATHCALL (exp10,, (_Mdouble_ __x));
+#endif
+#ifdef __USE_GNU
 /* Another name occasionally used.  */
 __MATHCALL (pow10,, (_Mdouble_ __x));
 #endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |   12 ++++++++++++
 NEWS                     |    5 +++++
 bits/libc-header-start.h |    9 +++++++++
 include/features.h       |    2 ++
 manual/creature.texi     |    9 +++++++++
 manual/math.texi         |    9 +++++----
 math/bits/mathcalls.h    |    6 ++++--
 7 files changed, 46 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]