glibc/include
Joseph Myers 858045ad1c Update floating-point feature test macro handling for C2X
ISO C2X has made some changes to the handling of feature test macros
related to features from the floating-point TSes, and to exactly what
such features are present in what headers, that require corresponding
changes in glibc.

* For the few features that were controlled by
  __STDC_WANT_IEC_60559_BFP_EXT__ (and the corresponding DFP macro) in
  C2X, there is now instead a new feature test macro
  __STDC_WANT_IEC_60559_EXT__ covering both binary and decimal FP.
  This controls CR_DECIMAL_DIG in <float.h> (provided by GCC; I
  implemented support for the new feature test macro for GCC 11) and
  the totalorder and payload functions in <math.h>.  C2X no longer
  says anything about __STDC_WANT_IEC_60559_BFP_EXT__ (so it's
  appropriate for that macro to continue to enable exactly the
  features from TS 18661-1).

* The SNAN macros for each floating-point type have moved to <float.h>
  (and been renamed in the process).  Thus, the copies in <math.h>
  should only be defined for __STDC_WANT_IEC_60559_BFP_EXT__, not for
  C2X.

* The fmaxmag and fminmag functions have been removed (replaced by new
  functions for the new min/max operations in IEEE 754-2019).  Thus
  those should also only be declared for
  __STDC_WANT_IEC_60559_BFP_EXT__.

* The _FloatN / _FloatNx handling for the last two points in glibc is
  trickier, since __STDC_WANT_IEC_60559_TYPES_EXT__ is still in C2X
  (the integration of TS 18661-3 as an Annex, that is, which hasn't
  yet been merged into the C standard git repository but has been
  accepted by WG14), so C2X with that macro should not declare some
  things that are declared for older standards with that macro.  The
  approach taken here is to provide the declarations (when
  __STDC_WANT_IEC_60559_TYPES_EXT__ is enabled) only when (defined
  __USE_GNU || !__GLIBC_USE (ISOC2X)), so if C2X features are enabled
  then those declarations (that are only in TS 18661-3 and not in C2X)
  will only be provided if _GNU_SOURCE is defined as well.  Thus
  _GNU_SOURCE remains a superset of the TS features as well as of C2X.

Some other somewhat related changes in C2X are not addressed here.
There's an open proposal not to include the fmin and fmax functions
for the _FloatN / _FloatNx types, given the new min/max operations,
which could be handled like the previous point if adopted.  And the
fromfp functions have been changed to return a result in floating type
rather than intmax_t / uintmax_t; my inclination there is to treat
that like that change of totalorder type (new symbol versions etc. for
the ABI change; old versions become compat symbols and are no longer
supported as an API).

Tested for x86_64 and x86.
2021-06-01 14:22:06 +00:00
..
arpa CVE-2016-10739: getaddrinfo: Fully parse IPv4 address strings [BZ #20018] 2019-01-21 21:26:03 +01:00
bits linux: Use sched_getaffinity for __get_nprocs (BZ #27645) 2021-05-07 13:54:09 -03:00
gnu Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
net Fix resolver if_* namespace (bug 17717). 2014-12-16 18:18:49 +00:00
netinet nss_files: Consolidate line parse declarations in <nss_files.h> 2020-07-21 07:33:20 +02:00
programs Enable support for GCC 11 -Wmismatched-dealloc. 2021-05-16 15:21:18 -06:00
protocols (abmon): Remove spaces. 1998-11-12 18:03:43 +00:00
rpc Handle out-of-memory case in svc_tcp.c/svc_unix.c:rendezvous_request. 2020-12-10 11:11:20 +01:00
rpcsvc Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
sys linux: Consolidate statvfs implementations 2021-02-11 08:00:41 -03:00
aio.h y2038: Convert aio_suspend to support 64 bit time 2020-11-30 14:08:44 +01:00
aliases.h Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
alloc_buffer.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloca.h Remove macros extend_alloca, extend_alloca_account [BZ #18023] 2018-06-27 19:20:37 +02:00
allocate_once.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ar.h Add missing header wrappers under include/ 2019-02-16 08:25:16 +01:00
argp-fmtstream.h Mark internal argp functions with attribute_hidden [BZ #18822] 2017-10-01 15:10:27 -07:00
argp.h ldbl-opt: Add argp_error and argp_failure (bug 23983) 2019-03-01 15:21:32 -03:00
argz.h Use libc_hidden_* for argz_next, __argz_next (bug 15105). 2018-02-15 21:00:02 +00:00
array_length.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
assert.h Introduce NO_RTLD_HIDDEN, make hurd use it instead of NO_HIDDEN 2017-10-03 01:33:38 +02:00
atomic.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
byteswap.h Update. 1998-04-10 10:52:25 +00:00
complex.h float128: Add private _Float128 declarations for libm. 2017-05-15 10:23:28 -03:00
cpio.h Add more headers to include/ for conform tests. 2014-12-11 21:41:30 +00:00
crypt.h Add include/crypt.h. 2016-10-28 22:40:16 -04:00
ctype.h Use libc_hidden_* for tolower, toupper (bug 15105). 2018-02-23 13:54:53 +00:00
des.h Update. 1998-03-24 10:39:42 +00:00
dirent.h hurd: keep only required PLTs in ld.so 2020-11-11 02:36:22 +01:00
dlfcn.h dlfcn: dlerror needs to call free from the base namespace [BZ #24773] 2021-04-21 19:49:51 +02:00
dso_handle.h Mark __dso_handle as hidden [BZ #18822] 2017-09-26 16:53:44 -07:00
elf.h elf: Refuse to dlopen PIE objects [BZ #24323] 2019-06-18 16:42:10 +02:00
endian.h Update. 2001-03-30 05:34:59 +00:00
envz.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
err.h ldbl-128ibm-compat: PLT redirects for using ldbl redirects internally 2020-03-25 14:34:23 -05:00
errno.h Remove tls.h inclusion from internal errno.h 2020-11-13 12:59:19 -03:00
error.h ldbl-opt: Add error and error_at_line (bug 23984) 2019-03-01 15:26:36 -03:00
execinfo.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
fcntl.h Fix Linux fcntl OFD locks for non-LFS architectures (BZ#20251) 2018-06-26 13:22:53 -03:00
features.h Update floating-point feature test macro handling for C2X 2021-06-01 14:22:06 +00:00
fenv.h Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h. 2018-09-04 19:52:06 +00:00
file_change_detection.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
filename.h Import filename.h from gnulib 2021-01-05 11:33:16 -03:00
float.h Make totalorder and totalordermag functions take pointer arguments. 2019-08-15 15:18:34 +00:00
fmtmsg.h Add more headers to include/ for conform tests. 2014-12-11 21:41:30 +00:00
fnmatch.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
fpu_control.h Hide internal __setfpucw function [BZ #18822] 2017-10-01 17:52:15 -07:00
fstab.h Add missing header wrappers under include/ 2019-02-16 08:25:16 +01:00
fts.h Add missing header wrappers under include/ 2019-02-16 08:25:16 +01:00
ftw.h Update. 1997-06-21 02:59:26 +00:00
gconv.h Update. 1997-11-18 02:50:07 +00:00
getopt_int.h Update. 2004-03-09 10:36:53 +00:00
getopt.h getopt: remove USE_NONOPTION_FLAGS 2017-04-07 07:45:53 -04:00
glob.h Hide internal __glob64 function [BZ #18822] 2017-10-01 18:02:10 -07:00
gmp.h Mark internal gmp functions with attribute_hidden [BZ #18822] 2017-10-01 15:15:30 -07:00
gnu-versions.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
grp-merge.h NSS: Implement group merging support. 2016-04-29 22:18:21 -04:00
grp.h nss_files: Consolidate line parse declarations in <nss_files.h> 2020-07-21 07:33:20 +02:00
gshadow.h nss_files: Consolidate line parse declarations in <nss_files.h> 2020-07-21 07:33:20 +02:00
iconv.h Update. 1999-08-21 00:38:15 +00:00
idx.h Import idx.h from gnulib 2021-01-05 11:33:16 -03:00
ifaddrs.h hurd: Fix getifaddrs' and freeifaddrs' symbol exposition 2017-09-28 01:05:18 +02:00
ifreq.h Hide internal __ifreq function [BZ #18822] 2017-10-01 17:35:46 -07:00
ifunc-impl-list.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
inline-hashtab.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
intprops.h Sync intprops.h with gnulib 2021-01-04 08:42:04 -03:00
inttypes.h Make strtoimax, strtoumax, wcstoimax, wcstoumax into aliases 2020-12-08 18:15:27 +00:00
langinfo.h Add first fixes for conformtest for POSIX2008 2012-02-26 21:32:56 -05:00
lastlog.h Add missing header wrappers under include/ 2019-02-16 08:25:16 +01:00
libc-diag.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-internal.h nptl: Move pthread_create, thrd_create into libc 2021-05-21 22:35:00 +02:00
libc-pointer-arith.h Add cast_to_pointer to cast an integer to void * pointer 2021-05-22 05:09:15 -07:00
libc-symbols.h Set the retain attribute on _elf_set_element if CC supports [BZ #27492] 2021-04-16 11:26:39 -07:00
libgen.h Update. 1997-06-21 02:59:26 +00:00
libintl.h Document the internal _ and N_ macros 2020-05-06 17:35:40 +02:00
limits.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
link.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
list_t.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
list.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locale.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
loop_unroll.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
malloc.h malloc: Move MTAG_MMAP_FLAGS definition 2021-03-26 11:03:06 +00:00
math-narrow-eval.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math.h float128: use builtin_signbitf128 always 2020-05-04 13:18:45 -05:00
mcheck.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
memory.h Update. 1997-06-21 02:59:26 +00:00
mntent.h Hide internal __hasmntopt function [BZ #18822] 2017-10-01 17:37:42 -07:00
monetary.h Rename __LONG_DOUBLE_USES_FLOAT128 to __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 2020-04-30 08:52:08 -05:00
mqueue.h y2038: linux: Provide __mq_timedreceive_time64 implementation 2020-04-06 23:05:11 +02:00
netdb.h y2038: Convert gai_suspend to support 64 bit time 2020-12-04 10:04:38 +01:00
netgroup.h Update. 1997-06-21 02:59:26 +00:00
nl_types.h Update. 1997-12-22 20:53:38 +00:00
nss_files.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss.h nss: Export nscd hash function as __nss_hash [BZ #22459] 2017-11-23 14:08:11 +01:00
nsswitch.h Update. 1997-06-21 02:59:26 +00:00
obstack.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
plural-exp.h Hide internal __gettextparse function [BZ #18822] 2017-10-01 17:31:05 -07:00
poll.h Update. 2000-08-21 16:02:48 +00:00
printf.h Rename __LONG_DOUBLE_USES_FLOAT128 to __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 2020-04-30 08:52:08 -05:00
pthread.h nptl: Move pthread_barrier_init into libc 2021-05-06 15:56:37 +02:00
pty.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
pwd.h nss_files: Consolidate line parse declarations in <nss_files.h> 2020-07-21 07:33:20 +02:00
random-bits.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
re_comp.h Add missing header wrappers under include/ 2019-02-16 08:25:16 +01:00
regex.h Hide internal regex functions [BZ #18822] 2017-10-01 15:53:15 -07:00
regexp.h Add missing header wrappers under include/ 2019-02-16 08:25:16 +01:00
register-atfork.h posix: Consolidate register-atfork 2021-03-12 10:19:22 -03:00
resolv.h Obsolete p_secstodate. 2017-11-22 22:21:10 +00:00
rounding-mode.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rtld-malloc.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sched.h Add hidden prototypes for __sched_getparam, __sched_getscheduler 2020-02-20 08:57:01 +01:00
scratch_buffer.h malloc: Add scratch_buffer_dupfree 2021-01-05 11:33:16 -03:00
search.h misc: Add twalk_r function 2019-05-02 11:42:51 +02:00
set-hooks.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setjmp.h nptl: Move __pthread_unwind_next into libc 2021-04-21 19:49:50 +02:00
sgtty.h Update. 1997-06-21 02:59:26 +00:00
shadow.h nss_files: Consolidate line parse declarations in <nss_files.h> 2020-07-21 07:33:20 +02:00
shlib-compat.h Add OTHER_SHLIB_COMPAT 2021-03-26 13:36:16 -03:00
shm-directory.h nptl: Move sem_close, sem_open into libc 2021-05-05 17:19:38 +02:00
signal.h hurd: keep only required PLTs in ld.so 2020-11-11 02:36:22 +01:00
spawn.h posix: Use posix_spawn for wordexp 2019-10-09 17:48:41 -03:00
stab.h Update. 1997-06-21 02:59:26 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stap-probe.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stdc-predef.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stdint.h Move inttypes.h and stdint.h to stdlib. 2019-03-13 09:42:09 -04:00
stdio_ext.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
stdio.h libio: Remove __libc_readline_unlocked 2020-07-21 07:34:50 +02:00
stdlib.h nptl: Move sem_close, sem_open into libc 2021-05-05 17:19:38 +02:00
string.h string: Enable __FORTIFY_LEVEL=3 2020-12-31 16:55:21 +05:30
strings.h Update. 1997-06-21 02:59:26 +00:00
struct___timeb64.h time: Add 64-bit time_t support for ftime 2020-10-27 09:54:50 -03:00
struct___timespec64.h y2038: include: Move struct __timespec64 definition to a separate file 2020-04-06 23:05:11 +02:00
struct___timeval64.h y2038: include: Move struct __timeval64 definition to a separate file 2020-05-05 19:36:25 +02:00
stubs-prologue.h * sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional 2002-10-11 10:52:20 +00:00
syscall.h Update. 1997-06-21 02:59:26 +00:00
sysexits.h Update. 1997-06-21 02:59:26 +00:00
syslog.h Update. 1997-06-21 02:59:26 +00:00
tar.h Update. 1997-06-21 02:59:26 +00:00
termios.h Hide internal __tcgetattr function [BZ #18822] 2017-10-01 17:48:24 -07:00
tgmath.h Update. 1998-09-06 23:45:24 +00:00
time.h Add C2X timespec_getres 2021-05-17 20:55:21 +00:00
ttyent.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
uchar.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
ucontext.h Update. 1999-10-12 18:17:41 +00:00
ulimit.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
unistd.h hurd: Add execveat 2021-05-18 09:36:00 +00:00
utime.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
utmp.h Mark internal utmp functions with attribute_hidden [BZ #18822] 2017-10-01 15:51:56 -07:00
values.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
verify.h posix: Sync regex with gnulib 2019-11-06 09:20:52 -03:00
wait.h Add missing header wrappers under include/ 2019-02-16 08:25:16 +01:00
wchar.h Rename __LONG_DOUBLE_USES_FLOAT128 to __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 2020-04-30 08:52:08 -05:00
wctype.h Remove __need macros from stdio.h and wchar.h. 2017-06-08 13:58:17 -04:00
wordexp.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00