glibc/string
Joseph Myers e535fb910c Define C23 header version macros
C23 defines library macros __STDC_VERSION_<header>_H__ to indicate
that a header has support for new / changed features from C23.  Now
that all the required library features are implemented in glibc,
define these macros.  I'm not sure this is sufficiently much of a
user-visible feature to be worth a mention in NEWS.

Tested for x86_64.

There are various optional C23 features we don't yet have, of which I
might look at the Annex H ones (floating-point encoding conversion
functions and _Float16 functions) next.

* Optional time bases TIME_MONOTONIC, TIME_ACTIVE, TIME_THREAD_ACTIVE.
  See
  <https://sourceware.org/pipermail/libc-alpha/2023-June/149264.html>
  - we need to review / update that patch.  (I think patch 2/2,
  inventing new names for all the nonstandard CLOCK_* supported by the
  Linux kernel, is rather more dubious.)

* Updating conform/ tests for C23.

* Defining the rounding mode macro FE_TONEARESTFROMZERO for RISC-V (as
  far as I know, the only architecture supported by glibc that has
  hardware support for this rounding mode for binary floating point)
  and supporting it throughout glibc and its tests (especially the
  string/numeric conversions in both directions that explicitly handle
  each possible rounding mode, and various tests that do likewise).

* Annex H floating-point encoding conversion functions.  (It's not
  entirely clear which are optional even given support for Annex H;
  there's some wording applied inconsistently about only being
  required when non-arithmetic interchange formats are supported; see
  the comments I raised on the WG14 reflector on 23 Oct 2025.)

* _Float16 functions (and other header and testcase support for this
  type).

* Decimal floating-point support.

* Fully supporting __int128 and unsigned __int128 as integer types
  wider than intmax_t, as permitted by C23.  Would need doing in
  coordination with GCC, see GCC bug 113887 for more discussion of
  what's involved.
2025-11-27 19:32:49 +00:00
..
bits Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
Depend
Makefile Enable --enable-fortify-source with clang 2025-11-21 13:13:11 -03:00
Versions Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
_strerror.c
argz-addsep.c
argz-append.c
argz-count.c
argz-create.c
argz-ctsep.c
argz-delete.c
argz-extract.c
argz-insert.c
argz-next.c
argz-replace.c
argz-stringify.c
argz.h
basename.c
bcopy.c
bug-envz1.c
bug-strcoll1.c
bug-strcoll2.c
bug-strncat1.c
bug-strpbrk1.c
bug-strspn1.c
bug-strtok1.c
byteswap.h
bzero.c
endian.h
envz.c
envz.h
explicit_bzero.c
ffs.c
ffsll.c
inl-tester.c
memccpy.c
memchr.c
memcmp.c
memcmpeq.c
memcpy.c
memfrob.c
memmem.c
memmove.c
memory.h
mempcpy.c
memrchr.c
memset.c
memset_explicit.c Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
noinl-tester.c
rawmemchr.c
sigabbrev_np.c
sigdescr_np.c
stpcpy.c
stpncpy.c
str-two-way.h
stratcliff.c
strcasecmp.c
strcasecmp_l.c
strcasestr.c
strcat.c
strchr.c
strchrnul.c
strcmp.c
strcoll.c
strcoll_l.c Suppress -Wmaybe-uninitialized only for gcc 2025-10-21 09:24:05 -03:00
strcpy.c
strcspn.c
strdup.c
strerror.c Remove <libc-tsd.h> 2025-05-16 19:53:09 +02:00
strerror_l.c
strerrordesc_np.c
strerrorname_np.c
strfry.c
string-inlines.c
string.h Define C23 header version macros 2025-11-27 19:32:49 +00:00
strings.h
strlcat.c
strlcpy.c
strlen.c
strncase.c
strncase_l.c
strncat.c
strncmp.c
strncpy.c
strndup.c
strnlen.c
strpbrk.c
strrchr.c
strsep.c
strsignal.c
strspn.c
strstr.c
strtok.c
strtok_r.c
strverscmp.c
strxfrm.c
strxfrm_l.c
swab.c
test-Xncmp-nonarray.c
test-Xnlen-nonarray.c
test-bcopy.c
test-bzero.c
test-endian-file-scope.c
test-endian-sign-conversion.c
test-endian-types.c
test-explicit_bzero.c
test-ffs.c
test-memccpy.c
test-memchr.c
test-memcmp.c
test-memcmpeq.c
test-memcpy-large.c
test-memcpy-support.h
test-memcpy.c
test-memmem.c
test-memmove.c
test-mempcpy.c
test-memrchr.c
test-memset.c Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
test-memset_explicit.c Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
test-memswap.c
test-rawmemchr.c
test-sig_np.c
test-stpcpy.c
test-stpncpy.c
test-strcasecmp.c
test-strcasestr.c
test-strcat.c
test-strchr.c
test-strchrnul.c
test-strcmp.c
test-strcpy.c
test-strcspn.c
test-strdup.c
test-strerror-errno.c
test-string.h
test-strlen.c
test-strncasecmp.c
test-strncat.c
test-strncmp-nonarray.c
test-strncmp.c
test-strncpy.c
test-strndup.c
test-strnlen-nonarray.c
test-strnlen.c Implement C23 const-preserving standard library macros 2025-11-20 19:31:04 +00:00
test-strpbrk.c
test-strrchr.c
test-strspn.c
test-strstr.c
testcopy.c
tester.c
tst-bswap.c
tst-cmp.c
tst-const.c Implement C23 const-preserving standard library macros 2025-11-20 19:31:04 +00:00
tst-endian.c
tst-inlcall.c
tst-memmove-overflow.c
tst-strcoll-overflow.c
tst-strerror-fail.c
tst-strerror.c
tst-strfry.c
tst-strlcat.c
tst-strlcat2.c
tst-strlcpy.c
tst-strlcpy2.c
tst-strlen.c
tst-strsignal.c
tst-strtok.c
tst-strtok_r.c
tst-strxfrm.c
tst-strxfrm2.c
tst-svc.c
tst-svc.expect
tst-svc.input
tst-svc2.c
tst-xbzero-opt.c Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
tst-xmemset-opt.c Implement C23 memset_explicit (bug 32378) 2025-10-01 15:14:09 +00:00
wordcopy.c Suppress -Wmaybe-uninitialized only for gcc 2025-10-21 09:24:05 -03:00
xpg-strerror.c