diff mbox

[v3,2/2] Add support for testing __STDC_WANT_IEC_60559_TYPES_EXT__

Message ID 1494267740-25356-1-git-send-email-gftg@linux.vnet.ibm.com
State New
Headers show

Commit Message

Gabriel F. T. Gomes May 8, 2017, 6:22 p.m. UTC
From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>

Changes since v2:

  - Fix year in the comments in bits/libc-header-start.h.
  - Add description to include/features.h and manual/creature.texi.

-- 8< --
This macro is defined by TS 18661-3 for supporting the _FloatN and
_FloatNx types, as well as the functions suffixed with fN.

2017-02-23  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>

	* bits/libc-header-start.h:
	(__GLIBC_USE_IEC_60559_TYPES_EXT): New macro.
---
 bits/libc-header-start.h | 9 +++++++++
 include/features.h       | 2 ++
 manual/creature.texi     | 9 +++++++++
 3 files changed, 20 insertions(+)

Comments

Joseph Myers May 8, 2017, 9:13 p.m. UTC | #1
On Mon, 8 May 2017, Gabriel F. T. Gomes wrote:

> From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>
> 
> Changes since v2:
> 
>   - Fix year in the comments in bits/libc-header-start.h.
>   - Add description to include/features.h and manual/creature.texi.
> 
> -- 8< --
> This macro is defined by TS 18661-3 for supporting the _FloatN and
> _FloatNx types, as well as the functions suffixed with fN.
> 
> 2017-02-23  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
> 
> 	* bits/libc-header-start.h:
> 	(__GLIBC_USE_IEC_60559_TYPES_EXT): New macro.

This patch is OK with an updated ChangeLog entry (reflecting all the files 
changed).
Gabriel F. T. Gomes May 9, 2017, 2:55 p.m. UTC | #2
On Mon, 8 May 2017 21:13:02 +0000
Joseph Myers <joseph@codesourcery.com> wrote:

> On Mon, 8 May 2017, Gabriel F. T. Gomes wrote:
> >
> > 2017-02-23  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
> > 
> > 	* bits/libc-header-start.h:
> > 	(__GLIBC_USE_IEC_60559_TYPES_EXT): New macro.  
> 
> This patch is OK with an updated ChangeLog entry (reflecting all the
> files changed).

Thanks.  Pushed with updated ChangeLog entry as 4fc12f0eda59.
diff mbox

Patch

diff --git a/bits/libc-header-start.h b/bits/libc-header-start.h
index 860225d..0ce16e2 100644
--- a/bits/libc-header-start.h
+++ b/bits/libc-header-start.h
@@ -59,3 +59,12 @@ 
 #else
 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
 #endif
+
+/* ISO/IEC TS 18661-3:2015 defines the
+   __STDC_WANT_IEC_60559_TYPES_EXT__ macro.  */
+#undef __GLIBC_USE_IEC_60559_TYPES_EXT
+#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__
+# define __GLIBC_USE_IEC_60559_TYPES_EXT 1
+#else
+# define __GLIBC_USE_IEC_60559_TYPES_EXT 0
+#endif
diff --git a/include/features.h b/include/features.h
index 7de4089..972cbd2 100644
--- a/include/features.h
+++ b/include/features.h
@@ -30,6 +30,8 @@ 
 			Extensions to ISO C11 from TS 18661-1:2014.
    __STDC_WANT_IEC_60559_FUNCS_EXT__
 			Extensions to ISO C11 from TS 18661-4:2015.
+   __STDC_WANT_IEC_60559_TYPES_EXT__
+			Extensions to ISO C11 from TS 18661-3:2015.
 
    _POSIX_SOURCE	IEEE Std 1003.1.
    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
diff --git a/manual/creature.texi b/manual/creature.texi
index 5048886..23218bb 100644
--- a/manual/creature.texi
+++ b/manual/creature.texi
@@ -192,6 +192,15 @@  enabled.  Only some of the features from this TS are supported by
 @end defvr
 
 @comment (none)
+@comment ISO
+@defvr Macro __STDC_WANT_IEC_60559_TYPES_EXT__
+If you define this macro, features from ISO/IEC TS 18661-3:2015
+(Floating-point extensions for C: Interchange and extended types) 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