mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-18 14:30:43 +08:00
Declare some TS 18661-4 interfaces for C2X.
C2X (current version in git, postdating the most recent public draft available as a PDF on the WG14 website) adds the interfaces from TS 18661-4, other than the reduction functions, as unconditionally required and visible in <math.h> for hosted implementations; the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro is not included in C2X at all (as the reduction functions aren't included at all, expected to end up in a version of the TS updated to be relative to C2X). This patch updates the glibc headers accordingly, following the same pattern used for 18661-1 functions. As the only 18661-4 functions currently supported are the exp10 functions that have been in glibc for a very long time, this means that in fact __GLIBC_USE (IEC_60559_FUNCS_EXT) ends up being used only to determine the definition of __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X, not yet in any headers other than bits/libc-header-start.h. (I hope to add the other 18661-4 functions to glibc at some point; the main complication is the current lack of MPFR support for many of these functions.) Tested for x86_64. * bits/libc-header-start.h (__GLIBC_USE_IEC_60559_FUNCS_EXT): Update comment. (__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X): New macro. * bits/math-finite.h [__GLIBC_USE (IEC_60559_FUNCS_EXT)]: Change to [__GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)]. * math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_FUNCS_EXT)]: Likewise.
This commit is contained in:
parent
5a3afa9738
commit
c3ce62cc0b
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2019-08-13 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* bits/libc-header-start.h (__GLIBC_USE_IEC_60559_FUNCS_EXT):
|
||||
Update comment.
|
||||
(__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X): New macro.
|
||||
* bits/math-finite.h [__GLIBC_USE (IEC_60559_FUNCS_EXT)]: Change
|
||||
to [__GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)].
|
||||
* math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_FUNCS_EXT)]:
|
||||
Likewise.
|
||||
|
||||
2019-08-13 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
* login/utmp_file.c (LOCK_FILE, LOCKING_FAILED, UNLOCK_FILE):
|
||||
|
@ -60,13 +60,21 @@
|
||||
#endif
|
||||
|
||||
/* ISO/IEC TS 18661-4:2015 defines the
|
||||
__STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */
|
||||
__STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
|
||||
functions, the symbols from this TS are enabled unconditionally in
|
||||
C2X. */
|
||||
#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
|
||||
#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X)
|
||||
# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
|
||||
#else
|
||||
# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0
|
||||
#endif
|
||||
|
||||
/* ISO/IEC TS 18661-3:2015 defines the
|
||||
__STDC_WANT_IEC_60559_TYPES_EXT__ macro. */
|
||||
|
@ -67,7 +67,7 @@ __MATH_REDIRCALL (cosh, , (_Mdouble_));
|
||||
/* exp. */
|
||||
__MATH_REDIRCALL (exp, , (_Mdouble_));
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT)
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
|
||||
/* exp10. */
|
||||
__MATH_REDIRCALL (exp10, , (_Mdouble_));
|
||||
#endif
|
||||
|
@ -109,7 +109,7 @@ __MATHCALL (log10,, (_Mdouble_ __x));
|
||||
/* Break VALUE into integral and fractional parts. */
|
||||
__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT)
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
|
||||
/* Compute exponent to base ten. */
|
||||
__MATHCALL (exp10,, (_Mdouble_ __x));
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user