mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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.
This commit is contained in:
12
math/math.h
12
math/math.h
@@ -104,7 +104,7 @@ __BEGIN_DECLS
|
||||
# endif
|
||||
#endif /* __USE_ISOC99 */
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
/* Signaling NaN macros, if supported. */
|
||||
# if __GNUC_PREREQ (3, 3)
|
||||
# define SNANF (__builtin_nansf (""))
|
||||
@@ -200,7 +200,7 @@ typedef _Float128x double_t;
|
||||
# define FP_ILOGBNAN 2147483647
|
||||
# endif
|
||||
#endif
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
# if __WORDSIZE == 32
|
||||
# define __FP_LONG_MAX 0x7fffffffL
|
||||
# else
|
||||
@@ -232,7 +232,7 @@ typedef _Float128x double_t;
|
||||
|
||||
#include <bits/fp-fast.h>
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
/* Rounding direction macros for fromfp functions. */
|
||||
enum
|
||||
{
|
||||
@@ -495,7 +495,7 @@ extern long double __REDIRECT_NTH (nexttowardl,
|
||||
#define __MATHCALL_NARROW(func, redir, nargs) \
|
||||
__MATHCALL_NARROW_NORMAL (func, nargs)
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
|
||||
# define _Mret_ float
|
||||
# define _Marg_ double
|
||||
@@ -969,7 +969,7 @@ enum
|
||||
|
||||
#endif /* Use ISO C99. */
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
# include <bits/iscanonical.h>
|
||||
|
||||
/* Return nonzero value if X is a signaling NaN. */
|
||||
@@ -1466,7 +1466,7 @@ iszero (__T __val)
|
||||
|
||||
#endif /* __FINITE_MATH_ONLY__ > 0. */
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
/* An expression whose type has the widest of the evaluation formats
|
||||
of X and Y (which are of floating-point types). */
|
||||
# if __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ > 64
|
||||
|
Reference in New Issue
Block a user