diff options
author | Joseph Myers <joseph@codesourcery.com> | 2019-08-13 11:28:51 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2019-08-13 11:28:51 +0000 |
commit | 0175c9e9be5f0b2000859666b6e1ef3696f1123b (patch) | |
tree | cd1d126fea3fdb2091d1054c5cfe1640bb4620e3 /bits | |
parent | a8c2fa984a42b43be06898a09a59a660131f91cd (diff) | |
download | glibc-0175c9e9be5f0b2000859666b6e1ef3696f1123b.zip glibc-0175c9e9be5f0b2000859666b6e1ef3696f1123b.tar.gz glibc-0175c9e9be5f0b2000859666b6e1ef3696f1123b.tar.bz2 |
Declare most TS 18661-1 interfaces for C2X.
C2X adds the interfaces from TS 18661-1, and all except a handful in
Annex F are unconditionally visible in C2X rather than only visible
when __STDC_WANT_IEC_60559_BFP_EXT__ is defined. This patch updates
glibc headers accordingly: most uses of __GLIBC_USE
(IEC_60559_BFP_EXT) are changed to a new __GLIBC_USE
(IEC_60559_BFP_EXT_C2X). (Regarding totalorder and totalordermag, the
type-generic macros in tgmath.h will go away when the functions are
changed to take pointer arguments.)
* bits/libc-header-start.h (__GLIBC_USE_IEC_60559_BFP_EXT): Update
comment.
(__GLIBC_USE_IEC_60559_BFP_EXT_C2X): New macro.
* bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]: Change to
[__GLIBC_USE (IEC_60559_BFP_EXT_C2X)].
* include/limits.h [__GLIBC_USE (IEC_60559_BFP_EXT)]: Likewise.
* math/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]: Likewise.
* math/math.h [__GLIBC_USE (IEC_60559_BFP_EXT)]: Likewise.
* stdlib/bits/stdlib-ldbl.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* stdlib/stdint.h [__GLIBC_USE (IEC_60559_BFP_EXT)]: Likewise.
* stdlib/stdlib.h [__GLIBC_USE (IEC_60559_BFP_EXT)]: Likewise.
* sysdeps/aarch64/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/alpha/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/arm/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/csky/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/hppa/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/ia64/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/m68k/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/microblaze/bits/fenv.h [__GLIBC_USE
(IEC_60559_BFP_EXT)]: Likewise.
* sysdeps/mips/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/nios2/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/powerpc/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/riscv/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/s390/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/sh/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/sparc/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* sysdeps/x86/fpu/bits/fenv.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise.
* math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)]:
Likewise, except for totalorder, totalordermag, getpayload,
setpayload and setpayloadsig.
* math/tgmath.h [__GLIBC_USE (IEC_60559_BFP_EXT)]: Likewise,
except for totalorder and totalordermag.
Diffstat (limited to 'bits')
-rw-r--r-- | bits/fenv.h | 2 | ||||
-rw-r--r-- | bits/libc-header-start.h | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/bits/fenv.h b/bits/fenv.h index c7ba575..d4870bf 100644 --- a/bits/fenv.h +++ b/bits/fenv.h @@ -54,7 +54,7 @@ fenv_t; /* If the default argument is used we use this value. */ #define FE_DFL_ENV ((const fenv_t *) -1l) -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned int femode_t; diff --git a/bits/libc-header-start.h b/bits/libc-header-start.h index 72efab2..f2acc53 100644 --- a/bits/libc-header-start.h +++ b/bits/libc-header-start.h @@ -43,13 +43,21 @@ #endif /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ - macro. */ + macro. Most but not all symbols enabled by that macro in TS + 18661-1 are enabled unconditionally in C2X; the symbols in Annex F + still require that macro in C2X. */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif +#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X +#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X) +# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1 +#else +# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0 +#endif /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */ |