C2x scanf binary constant handling

Joseph Myers joseph@codesourcery.com
Thu Dec 22 15:31:03 GMT 2022


This patch is relative to a tree with
<https://sourceware.org/pipermail/libc-alpha/2022-December/144235.html>
(pending review) applied.

C2x adds binary integer constants starting with 0b or 0B, and supports
those constants for the %i scanf format (in addition to the %b format,
which isn't yet implemented for scanf in glibc).  Implement that scanf
support for glibc.

As with the strtol support, this is incompatible with previous C
standard versions, in that such an input string starting with 0b or 0B
was previously required to be parsed as 0 (with the rest of the input
potentially matching subsequent parts of the scanf format string).
Thus this patch adds 12 new __isoc23_* functions per long double
format (12, 24 or 36 depending on how many long double formats the
glibc configuration supports), with appropriate header redirection
support (generally very closely following that for the __isoc99_*
scanf functions - note that __GLIBC_USE (DEPRECATED_SCANF) takes
precedence over __GLIBC_USE (C2X_STRTOL), so the case of GNU
extensions to C89 continues to get old-style GNU %a and does not get
this new feature).  The function names would remain as __isoc23_* even
if C2x ends up published in 2024 rather than 2023.

When scanf %b support is added, I think it will be appropriate for all
versions of scanf to follow C2x rules for inputs to the %b format
(given that there are no compatibility concerns for a new format).

Tested for x86_64 (full glibc testsuite), powerpc (32-bit) and
powerpc64le (stdio-common/ and wcsmbs/ tests), and with
build-many-glibcs.py.

diff --git a/NEWS b/NEWS
index 75b69169b6..a83c4d8091 100644
--- a/NEWS
+++ b/NEWS
@@ -19,7 +19,10 @@ Major new features:
   input: strtol, strtoll, strtoul, strtoull, strtol_l, strtoll_l,
   strtoul_l, strtoull_l, strtoimax, strtoumax, strtoq, strtouq, wcstol,
   wcstoll, wcstoul, wcstoull, wcstol_l, wcstoll_l, wcstoul_l,
-  wcstoull_l, wcstoimax, wcstoumax, wcstoq, wcstouq.
+  wcstoull_l, wcstoimax, wcstoumax, wcstoq, wcstouq.  Similarly, the
+  following functions support binary integers prefixed by 0b or 0B as
+  input to the %i format: fscanf, scanf, sscanf, vscanf, vsscanf,
+  vfscanf, fwscanf, wscanf, swscanf, vfwscanf, vwscanf, vswscanf.
 
 Deprecated and removed features, and other changes affecting compatibility:
 
diff --git a/include/stdio.h b/include/stdio.h
index c3e772ad9a..da47d1ce99 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -94,18 +94,34 @@ extern int __isoc99_vscanf (const char *__restrict __format,
 extern int __isoc99_vsscanf (const char *__restrict __s,
 			     const char *__restrict __format,
 			     __gnuc_va_list __arg) __THROW;
+extern int __isoc23_fscanf (FILE *__restrict __stream,
+			    const char *__restrict __format, ...) __wur;
+extern int __isoc23_scanf (const char *__restrict __format, ...) __wur;
+extern int __isoc23_sscanf (const char *__restrict __s,
+			    const char *__restrict __format, ...) __THROW;
+extern int __isoc23_vfscanf (FILE *__restrict __s,
+			     const char *__restrict __format,
+			     __gnuc_va_list __arg) __wur;
+extern int __isoc23_vscanf (const char *__restrict __format,
+			    __gnuc_va_list __arg) __wur;
+extern int __isoc23_vsscanf (const char *__restrict __s,
+			     const char *__restrict __format,
+			     __gnuc_va_list __arg) __THROW;
 
 libc_hidden_proto (__isoc99_sscanf)
 libc_hidden_proto (__isoc99_vsscanf)
 libc_hidden_proto (__isoc99_vfscanf)
+libc_hidden_proto (__isoc23_sscanf)
+libc_hidden_proto (__isoc23_vsscanf)
+libc_hidden_proto (__isoc23_vfscanf)
 
-/* Internal uses of sscanf should call the C99-compliant version.
+/* Internal uses of sscanf should call the C2X-compliant version.
    Unfortunately, symbol redirection is not transitive, so the
    __REDIRECT in the public header does not link up with the above
    libc_hidden_proto.  Bridge the gap with a macro.  */
 #  if !__GLIBC_USE (DEPRECATED_SCANF)
 #   undef sscanf
-#   define sscanf __isoc99_sscanf
+#   define sscanf __isoc23_sscanf
 #  endif
 
 #  if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1  && IS_IN (libc)
@@ -114,12 +130,21 @@ libc_hidden_proto (__isoc99_vfscanf)
 extern __typeof (__isoc99_sscanf) ___ieee128_isoc99_sscanf __THROW;
 extern __typeof (__isoc99_vsscanf) ___ieee128_isoc99_vsscanf __THROW;
 extern __typeof (__isoc99_vfscanf) ___ieee128_isoc99_vfscanf __THROW;
+extern __typeof (__isoc23_sscanf) ___ieee128_isoc23_sscanf __THROW;
+extern __typeof (__isoc23_vsscanf) ___ieee128_isoc23_vsscanf __THROW;
+extern __typeof (__isoc23_vfscanf) ___ieee128_isoc23_vfscanf __THROW;
 libc_hidden_proto (___ieee128_isoc99_sscanf)
 libc_hidden_proto (___ieee128_isoc99_vsscanf)
 libc_hidden_proto (___ieee128_isoc99_vfscanf)
+libc_hidden_proto (___ieee128_isoc23_sscanf)
+libc_hidden_proto (___ieee128_isoc23_vsscanf)
+libc_hidden_proto (___ieee128_isoc23_vfscanf)
 #define __isoc99_sscanf ___ieee128_isoc99_sscanf
 #define __isoc99_vsscanf ___ieee128_isoc99_vsscanf
 #define __isoc99_vfscanf ___ieee128_isoc99_vfscanf
+#define __isoc23_sscanf ___ieee128_isoc23_sscanf
+#define __isoc23_vsscanf ___ieee128_isoc23_vsscanf
+#define __isoc23_vfscanf ___ieee128_isoc23_vfscanf
 #  endif
 
 /* Prototypes for compatibility functions.  */
diff --git a/include/wchar.h b/include/wchar.h
index 5fa821ac3f..6fb8b60537 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -287,8 +287,24 @@ extern int __isoc99_vwscanf (const wchar_t *__restrict __format,
 extern int __isoc99_vswscanf (const wchar_t *__restrict __s,
 			      const wchar_t *__restrict __format,
 			      __gnuc_va_list __arg) __THROW;
+extern int __isoc23_fwscanf (__FILE *__restrict __stream,
+			     const wchar_t *__restrict __format, ...);
+extern int __isoc23_wscanf (const wchar_t *__restrict __format, ...);
+extern int __isoc23_swscanf (const wchar_t *__restrict __s,
+			     const wchar_t *__restrict __format, ...)
+     __THROW;
+extern int __isoc23_vfwscanf (__FILE *__restrict __s,
+			      const wchar_t *__restrict __format,
+			      __gnuc_va_list __arg);
+extern int __isoc23_vwscanf (const wchar_t *__restrict __format,
+			     __gnuc_va_list __arg);
+extern int __isoc23_vswscanf (const wchar_t *__restrict __s,
+			      const wchar_t *__restrict __format,
+			      __gnuc_va_list __arg) __THROW;
 libc_hidden_proto (__isoc99_vswscanf)
 libc_hidden_proto (__isoc99_vfwscanf)
+libc_hidden_proto (__isoc23_vswscanf)
+libc_hidden_proto (__isoc23_vfwscanf)
 
 /* Internal functions.  */
 extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len,
diff --git a/libio/bits/stdio-ldbl.h b/libio/bits/stdio-ldbl.h
index 6b63394b50..84ddfe973d 100644
--- a/libio/bits/stdio-ldbl.h
+++ b/libio/bits/stdio-ldbl.h
@@ -28,13 +28,25 @@ __LDBL_REDIR_DECL (vprintf)
 __LDBL_REDIR_DECL (vsprintf)
 #if !__GLIBC_USE (DEPRECATED_SCANF)
 # if defined __LDBL_COMPAT
+#  if __GLIBC_USE (C2X_STRTOL)
+__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc23_fscanf)
+__LDBL_REDIR1_DECL (scanf, __nldbl___isoc23_scanf)
+__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc23_sscanf)
+#  else
 __LDBL_REDIR1_DECL (fscanf, __nldbl___isoc99_fscanf)
 __LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf)
 __LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf)
+#  endif
 # elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+#  if __GLIBC_USE (C2X_STRTOL)
+__LDBL_REDIR1_DECL (fscanf, __isoc23_fscanfieee128)
+__LDBL_REDIR1_DECL (scanf, __isoc23_scanfieee128)
+__LDBL_REDIR1_DECL (sscanf, __isoc23_sscanfieee128)
+#  else
 __LDBL_REDIR1_DECL (fscanf, __isoc99_fscanfieee128)
 __LDBL_REDIR1_DECL (scanf, __isoc99_scanfieee128)
 __LDBL_REDIR1_DECL (sscanf, __isoc99_sscanfieee128)
+#  endif
 # else
 #  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
 # endif
@@ -52,13 +64,25 @@ __LDBL_REDIR_DECL (vsnprintf)
 #ifdef	__USE_ISOC99
 # if !__GLIBC_USE (DEPRECATED_SCANF)
 #  if defined __LDBL_COMPAT
+#   if __GLIBC_USE (C2X_STRTOL)
+__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc23_vfscanf)
+__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc23_vscanf)
+__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc23_vsscanf)
+#   else
 __LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc99_vfscanf)
 __LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf)
 __LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf)
+#   endif
 #  elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+#   if __GLIBC_USE (C2X_STRTOL)
+__LDBL_REDIR1_DECL (vfscanf, __isoc23_vfscanfieee128)
+__LDBL_REDIR1_DECL (vscanf, __isoc23_vscanfieee128)
+__LDBL_REDIR1_DECL (vsscanf, __isoc23_vsscanfieee128)
+#   else
 __LDBL_REDIR1_DECL (vfscanf, __isoc99_vfscanfieee128)
 __LDBL_REDIR1_DECL (vscanf, __isoc99_vscanfieee128)
 __LDBL_REDIR1_DECL (vsscanf, __isoc99_vsscanfieee128)
+#   endif
 #  else
 #   error bits/stdlib-ldbl.h included when no ldbl redirections are required.
 #  endif
diff --git a/libio/libioP.h b/libio/libioP.h
index 3a5498bd65..d041654d82 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -781,6 +781,9 @@ extern off64_t _IO_seekpos_unlocked (FILE *, off64_t, int)
    functions use.  When the flag is set to zero, automatic allocation is
    enabled.
 
+   SCANF_ISOC23_BIN_CST, when set to one, indicates the %i accepts
+   binary constants starting 0b or 0B.
+
    SCANF_LDBL_USES_FLOAT128 is used on platforms where the long double
    format used to be different from the IEC 60559 double format *and*
    also different from the Quadruple 128-bits IEC 60559 format (such as
@@ -793,7 +796,8 @@ extern off64_t _IO_seekpos_unlocked (FILE *, off64_t, int)
    as the previous format on that platform.  */
 #define SCANF_LDBL_IS_DBL		0x0001
 #define SCANF_ISOC99_A			0x0002
-#define SCANF_LDBL_USES_FLOAT128	0x0004
+#define SCANF_ISOC23_BIN_CST		0x0004
+#define SCANF_LDBL_USES_FLOAT128	0x0008
 
 extern int __vfscanf_internal (FILE *fp, const char *format, va_list argp,
 			       unsigned int flags)
diff --git a/libio/stdio.h b/libio/stdio.h
index 0e0f16b464..4d01249e46 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -430,7 +430,28 @@ extern int sscanf (const char *__restrict __s,
 #include <bits/floatn.h>
 #if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
     && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
-# ifdef __REDIRECT
+# if __GLIBC_USE (C2X_STRTOL)
+#  ifdef __REDIRECT
+extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
+				const char *__restrict __format, ...),
+		       __isoc23_fscanf) __wur;
+extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
+		       __isoc23_scanf) __wur;
+extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s,
+				    const char *__restrict __format, ...),
+			   __isoc23_sscanf);
+#  else
+extern int __isoc23_fscanf (FILE *__restrict __stream,
+			    const char *__restrict __format, ...) __wur;
+extern int __isoc23_scanf (const char *__restrict __format, ...) __wur;
+extern int __isoc23_sscanf (const char *__restrict __s,
+			    const char *__restrict __format, ...) __THROW;
+#   define fscanf __isoc23_fscanf
+#   define scanf __isoc23_scanf
+#   define sscanf __isoc23_sscanf
+#  endif
+# else
+#  ifdef __REDIRECT
 extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
 				const char *__restrict __format, ...),
 		       __isoc99_fscanf) __wur;
@@ -439,15 +460,16 @@ extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
 extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s,
 				    const char *__restrict __format, ...),
 			   __isoc99_sscanf);
-# else
+#  else
 extern int __isoc99_fscanf (FILE *__restrict __stream,
 			    const char *__restrict __format, ...) __wur;
 extern int __isoc99_scanf (const char *__restrict __format, ...) __wur;
 extern int __isoc99_sscanf (const char *__restrict __s,
 			    const char *__restrict __format, ...) __THROW;
-#  define fscanf __isoc99_fscanf
-#  define scanf __isoc99_scanf
-#  define sscanf __isoc99_sscanf
+#   define fscanf __isoc99_fscanf
+#   define scanf __isoc99_scanf
+#   define sscanf __isoc99_sscanf
+#  endif
 # endif
 #endif
 
@@ -474,7 +496,37 @@ extern int vsscanf (const char *__restrict __s,
 
 /* Same redirection as above for the v*scanf family.  */
 # if !__GLIBC_USE (DEPRECATED_SCANF)
-#  if defined __REDIRECT && !defined __LDBL_COMPAT \
+#  if __GLIBC_USE (C2X_STRTOL)
+#   if defined __REDIRECT && !defined __LDBL_COMPAT	\
+      && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
+extern int __REDIRECT (vfscanf,
+		       (FILE *__restrict __s,
+			const char *__restrict __format, __gnuc_va_list __arg),
+		       __isoc23_vfscanf)
+     __attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
+extern int __REDIRECT (vscanf, (const char *__restrict __format,
+				__gnuc_va_list __arg), __isoc23_vscanf)
+     __attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
+extern int __REDIRECT_NTH (vsscanf,
+			   (const char *__restrict __s,
+			    const char *__restrict __format,
+			    __gnuc_va_list __arg), __isoc23_vsscanf)
+     __attribute__ ((__format__ (__scanf__, 2, 0)));
+#   elif !defined __REDIRECT
+extern int __isoc23_vfscanf (FILE *__restrict __s,
+			     const char *__restrict __format,
+			     __gnuc_va_list __arg) __wur;
+extern int __isoc23_vscanf (const char *__restrict __format,
+			    __gnuc_va_list __arg) __wur;
+extern int __isoc23_vsscanf (const char *__restrict __s,
+			     const char *__restrict __format,
+			     __gnuc_va_list __arg) __THROW;
+#    define vfscanf __isoc23_vfscanf
+#    define vscanf __isoc23_vscanf
+#    define vsscanf __isoc23_vsscanf
+#   endif
+#  else
+#   if defined __REDIRECT && !defined __LDBL_COMPAT	\
       && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
 extern int __REDIRECT (vfscanf,
 		       (FILE *__restrict __s,
@@ -489,7 +541,7 @@ extern int __REDIRECT_NTH (vsscanf,
 			    const char *__restrict __format,
 			    __gnuc_va_list __arg), __isoc99_vsscanf)
      __attribute__ ((__format__ (__scanf__, 2, 0)));
-#  elif !defined __REDIRECT
+#   elif !defined __REDIRECT
 extern int __isoc99_vfscanf (FILE *__restrict __s,
 			     const char *__restrict __format,
 			     __gnuc_va_list __arg) __wur;
@@ -498,9 +550,10 @@ extern int __isoc99_vscanf (const char *__restrict __format,
 extern int __isoc99_vsscanf (const char *__restrict __s,
 			     const char *__restrict __format,
 			     __gnuc_va_list __arg) __THROW;
-#   define vfscanf __isoc99_vfscanf
-#   define vscanf __isoc99_vscanf
-#   define vsscanf __isoc99_vsscanf
+#    define vfscanf __isoc99_vfscanf
+#    define vscanf __isoc99_vscanf
+#    define vsscanf __isoc99_vsscanf
+#   endif
 #  endif
 # endif
 #endif /* Use ISO C9x.  */
diff --git a/manual/stdio.texi b/manual/stdio.texi
index f6319a4b8a..a738237d85 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -3623,7 +3623,8 @@ constant.  The syntax that is recognized is the same as that for the
 @code{strtol} function (@pxref{Parsing of Integers}) with the value
 @code{0} for the @var{base} argument.  (You can print integers in this
 syntax with @code{printf} by using the @samp{#} flag character with the
-@samp{%x}, @samp{%o}, or @samp{%d} conversion.  @xref{Integer Conversions}.)
+@samp{%x}, @samp{%o}, @samp{%b}, or @samp{%d} conversion.
+@xref{Integer Conversions}.)
 
 For example, any of the strings @samp{10}, @samp{0xa}, or @samp{012}
 could be read in as integers under the @samp{%i} conversion.  Each of
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index 3e0c574ca5..89433dfa5f 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -47,6 +47,12 @@ routines := \
   isoc99_vfscanf \
   isoc99_vscanf \
   isoc99_vsscanf \
+  isoc23_fscanf \
+  isoc23_scanf \
+  isoc23_sscanf \
+  isoc23_vfscanf \
+  isoc23_vscanf \
+  isoc23_vsscanf \
   itoa-digits \
   itoa-udigits \
   itowa-digits \
@@ -211,6 +217,10 @@ tests := \
   tst-put-error \
   tst-renameat2 \
   tst-rndseek \
+  tst-scanf-binary-c11 \
+  tst-scanf-binary-c2x \
+  tst-scanf-binary-gnu11 \
+  tst-scanf-binary-gnu89 \
   tst-scanf-round \
   tst-setvbuf1 \
   tst-sprintf \
@@ -408,6 +418,10 @@ CFLAGS-isoc99_vfscanf.c += -fexceptions
 CFLAGS-isoc99_vscanf.c += -fexceptions
 CFLAGS-isoc99_fscanf.c += -fexceptions
 CFLAGS-isoc99_scanf.c += -fexceptions
+CFLAGS-isoc23_vfscanf.c += -fexceptions
+CFLAGS-isoc23_vscanf.c += -fexceptions
+CFLAGS-isoc23_fscanf.c += -fexceptions
+CFLAGS-isoc23_scanf.c += -fexceptions
 
 CFLAGS-dprintf.c += $(config-cflags-wno-ignored-attributes)
 
@@ -433,6 +447,14 @@ CFLAGS-tst-bz11319-fortify2.c += -D_FORTIFY_SOURCE=2
 
 CFLAGS-tst-memstream-string.c += -fno-builtin-fprintf
 
+# Some versions of GCC supported for building glibc do not support -std=c2x, so
+# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# the test as needed.
+CFLAGS-tst-scanf-binary-c11.c += -std=c11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-scanf-binary-c2x.c += -std=c11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-scanf-binary-gnu11.c += -std=gnu11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-scanf-binary-gnu89.c += -std=gnu89 -DOBJPFX=\"$(objpfx)\"
+
 CPPFLAGS += $(libio-mtsafe)
 
 $(objpfx)tst-setvbuf1.out: /dev/null $(objpfx)tst-setvbuf1
diff --git a/stdio-common/Versions b/stdio-common/Versions
index 522f302198..5bcdf428c4 100644
--- a/stdio-common/Versions
+++ b/stdio-common/Versions
@@ -63,6 +63,10 @@ libc {
   GLIBC_2.29 {
     # SHLIB_COMPAT(GLIBC_2_0, GLIBC_2_29) used in iovfscanf.c etc.
   }
+  GLIBC_2.37 {
+    __isoc23_scanf; __isoc23_vscanf; __isoc23_fscanf; __isoc23_vfscanf;
+    __isoc23_sscanf; __isoc23_vsscanf;
+  }
   GLIBC_PRIVATE {
     # global variables
     _itoa_lower_digits;
diff --git a/stdio-common/isoc23_fscanf.c b/stdio-common/isoc23_fscanf.c
new file mode 100644
index 0000000000..a240528fb7
--- /dev/null
+++ b/stdio-common/isoc23_fscanf.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libioP.h>
+#include <stdarg.h>
+#include <stdio.h>
+
+/* Read formatted input from STREAM according to the format string FORMAT.  */
+int
+__isoc23_fscanf (FILE *stream, const char *format, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, format);
+  done = __vfscanf_internal (stream, format, arg,
+			     SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+  va_end (arg);
+
+  return done;
+}
diff --git a/stdio-common/isoc23_scanf.c b/stdio-common/isoc23_scanf.c
new file mode 100644
index 0000000000..d45393b08c
--- /dev/null
+++ b/stdio-common/isoc23_scanf.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <libioP.h>
+
+/* Read formatted input from stdin according to the format string FORMAT.  */
+int
+__isoc23_scanf (const char *format, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, format);
+  done = __vfscanf_internal (stdin, format, arg,
+			     SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+  va_end (arg);
+
+  return done;
+}
diff --git a/stdio-common/isoc23_sscanf.c b/stdio-common/isoc23_sscanf.c
new file mode 100644
index 0000000000..4ec780ed47
--- /dev/null
+++ b/stdio-common/isoc23_sscanf.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <libio/strfile.h>
+
+/* Read formatted input from S, according to the format string FORMAT.  */
+int
+__isoc23_sscanf (const char *s, const char *format, ...)
+{
+  va_list arg;
+  int done;
+  _IO_strfile sf;
+  FILE *f = _IO_strfile_read (&sf, s);
+
+  va_start (arg, format);
+  done = __vfscanf_internal (f, format, arg,
+			     SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+  va_end (arg);
+
+  return done;
+}
+libc_hidden_def (__isoc23_sscanf)
diff --git a/stdio-common/isoc23_vfscanf.c b/stdio-common/isoc23_vfscanf.c
new file mode 100644
index 0000000000..a61e9f8e06
--- /dev/null
+++ b/stdio-common/isoc23_vfscanf.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libioP.h>
+#include <stdio.h>
+
+/* Read formatted input from STREAM according to the format string FORMAT.  */
+int
+__isoc23_vfscanf (FILE *stream, const char *format, va_list args)
+{
+  return __vfscanf_internal (stream, format, args,
+			     SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+}
+libc_hidden_def (__isoc23_vfscanf)
diff --git a/stdio-common/isoc23_vscanf.c b/stdio-common/isoc23_vscanf.c
new file mode 100644
index 0000000000..a2fbb91327
--- /dev/null
+++ b/stdio-common/isoc23_vscanf.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libioP.h>
+#include <stdio.h>
+
+/* Read formatted input from STDIN according to the format string FORMAT.  */
+int
+__isoc23_vscanf (const char *format, va_list args)
+{
+  return __vfscanf_internal (stdin, format, args,
+			     SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+}
diff --git a/stdio-common/isoc23_vsscanf.c b/stdio-common/isoc23_vsscanf.c
new file mode 100644
index 0000000000..6140b4a80b
--- /dev/null
+++ b/stdio-common/isoc23_vsscanf.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1993-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libio/strfile.h>
+
+int
+__isoc23_vsscanf (const char *string, const char *format, va_list args)
+{
+  _IO_strfile sf;
+  FILE *f = _IO_strfile_read (&sf, string);
+  return __vfscanf_internal (f, format, args,
+			     SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+}
+libc_hidden_def (__isoc23_vsscanf)
diff --git a/stdio-common/tst-scanf-binary-c11.c b/stdio-common/tst-scanf-binary-c11.c
new file mode 100644
index 0000000000..b48d7e77b5
--- /dev/null
+++ b/stdio-common/tst-scanf-binary-c11.c
@@ -0,0 +1,28 @@
+/* Test scanf functions with C2X binary integers (narrow strings,
+   no extensions to C11).
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#undef _GNU_SOURCE
+
+#define CHAR char
+#define FNW
+#define L_(C) C
+#define TEST_C2X 0
+#define STD "c11"
+
+#include <tst-scanf-binary-main.c>
diff --git a/stdio-common/tst-scanf-binary-c2x.c b/stdio-common/tst-scanf-binary-c2x.c
new file mode 100644
index 0000000000..e6e1d021db
--- /dev/null
+++ b/stdio-common/tst-scanf-binary-c2x.c
@@ -0,0 +1,31 @@
+/* Test scanf functions with C2X binary integers (narrow strings,
+   no extensions).
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* Some versions of GCC supported for building glibc do not support
+   -std=c2x.  */
+#undef _GNU_SOURCE
+#define _ISOC2X_SOURCE
+
+#define CHAR char
+#define FNW
+#define L_(C) C
+#define TEST_C2X 1
+#define STD "c2x"
+
+#include <tst-scanf-binary-main.c>
diff --git a/stdio-common/tst-scanf-binary-gnu11.c b/stdio-common/tst-scanf-binary-gnu11.c
new file mode 100644
index 0000000000..83cdea4279
--- /dev/null
+++ b/stdio-common/tst-scanf-binary-gnu11.c
@@ -0,0 +1,26 @@
+/* Test scanf functions with C2X binary integers (narrow strings,
+   GNU extensions to C11).
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define CHAR char
+#define FNW
+#define L_(C) C
+#define TEST_C2X 1
+#define STD "gnu11"
+
+#include <tst-scanf-binary-main.c>
diff --git a/stdio-common/tst-scanf-binary-gnu89.c b/stdio-common/tst-scanf-binary-gnu89.c
new file mode 100644
index 0000000000..e2bfdc3a97
--- /dev/null
+++ b/stdio-common/tst-scanf-binary-gnu89.c
@@ -0,0 +1,26 @@
+/* Test scanf functions with C2X binary integers (narrow strings,
+   GNU extensions to C89).
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define CHAR char
+#define FNW
+#define L_(C) C
+#define TEST_C2X 0
+#define STD "gnu89"
+
+#include <tst-scanf-binary-main.c>
diff --git a/stdio-common/tst-scanf-binary-main.c b/stdio-common/tst-scanf-binary-main.c
new file mode 100644
index 0000000000..30af7a141e
--- /dev/null
+++ b/stdio-common/tst-scanf-binary-main.c
@@ -0,0 +1,208 @@
+/* Test scanf functions with C2X binary integers.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+
+#include <support/check.h>
+
+#define CONCAT_(X, Y, Z) X ## Y ## Z
+#define CONCAT(X, Y, Z) CONCAT_ (X, Y, Z)
+#define FNX(FN1, FN2) CONCAT (FN1, FNW, FN2)
+#ifndef STDX
+# define STDX ""
+#endif
+
+#define INFILE OBJPFX "/tst-" STDX "scanf-binary-" STD "-in"
+
+static int
+wrap_vfscanf (FILE *fp, const CHAR *format, ...)
+{
+  va_list ap;
+  va_start (ap, format);
+  int ret = FNX (vf, scanf) (fp, format, ap);
+  va_end (ap);
+  return ret;
+}
+
+static int
+wrap_vscanf (const CHAR *format, ...)
+{
+  va_list ap;
+  va_start (ap, format);
+  int ret = FNX (v, scanf) (format, ap);
+  va_end (ap);
+  return ret;
+}
+
+static int
+wrap_vsscanf (const CHAR *s, const CHAR *format, ...)
+{
+  va_list ap;
+  va_start (ap, format);
+  int ret = FNX (vs, scanf) (s, format, ap);
+  va_end (ap);
+  return ret;
+}
+
+static void
+one_check (const CHAR *s, int expected, char expected_c)
+{
+  int ret;
+  FILE *fp;
+  int ret_i;
+  long int ret_l;
+  long long int ret_ll;
+  char ret_c;
+  fp = fopen (INFILE, "w");
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = FNX (fput, s) (s, fp);
+  TEST_VERIFY_EXIT (0 <= ret);
+  ret = fclose (fp);
+  TEST_VERIFY_EXIT (ret == 0);
+
+  if (!TEST_C2X)
+    {
+      expected = 0;
+      expected_c = s[0] == L_('-') ? s[2] : s[1];
+    }
+
+  ret = FNX (s, scanf) (s, L_("%i %c"), &ret_i, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_i, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  fp = fopen (INFILE, "r");
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = FNX (f, scanf) (fp, L_("%i %c"), &ret_i, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_i, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  ret = fclose (fp);
+  TEST_VERIFY_EXIT (ret == 0);
+  fp = freopen (INFILE, "r", stdin);
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = FNX (, scanf) (L_("%i %c"), &ret_i, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_i, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  ret = wrap_vsscanf (s, L_("%i %c"), &ret_i, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_i, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  fp = fopen (INFILE, "r");
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = wrap_vfscanf (fp, L_("%i %c"), &ret_i, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_i, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  ret = fclose (fp);
+  TEST_VERIFY_EXIT (ret == 0);
+  fp = freopen (INFILE, "r", stdin);
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = wrap_vscanf (L_("%i %c"), &ret_i, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_i, expected);
+  TEST_COMPARE (ret_c, expected_c);
+
+  ret = FNX (s, scanf) (s, L_("%li %c"), &ret_l, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_l, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  fp = fopen (INFILE, "r");
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = FNX (f, scanf) (fp, L_("%li %c"), &ret_l, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_l, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  ret = fclose (fp);
+  TEST_VERIFY_EXIT (ret == 0);
+  fp = freopen (INFILE, "r", stdin);
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = FNX (, scanf) (L_("%li %c"), &ret_l, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_l, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  ret = wrap_vsscanf (s, L_("%li %c"), &ret_l, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_l, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  fp = fopen (INFILE, "r");
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = wrap_vfscanf (fp, L_("%li %c"), &ret_l, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_l, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  ret = fclose (fp);
+  TEST_VERIFY_EXIT (ret == 0);
+  fp = freopen (INFILE, "r", stdin);
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = wrap_vscanf (L_("%li %c"), &ret_l, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_l, expected);
+  TEST_COMPARE (ret_c, expected_c);
+
+  ret = FNX (s, scanf) (s, L_("%lli %c"), &ret_ll, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_ll, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  fp = fopen (INFILE, "r");
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = FNX (f, scanf) (fp, L_("%lli %c"), &ret_ll, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_ll, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  ret = fclose (fp);
+  TEST_VERIFY_EXIT (ret == 0);
+  fp = freopen (INFILE, "r", stdin);
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = FNX (, scanf) (L_("%lli %c"), &ret_ll, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_ll, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  ret = wrap_vsscanf (s, L_("%lli %c"), &ret_ll, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_ll, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  fp = fopen (INFILE, "r");
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = wrap_vfscanf (fp, L_("%lli %c"), &ret_ll, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_ll, expected);
+  TEST_COMPARE (ret_c, expected_c);
+  ret = fclose (fp);
+  TEST_VERIFY_EXIT (ret == 0);
+  fp = freopen (INFILE, "r", stdin);
+  TEST_VERIFY_EXIT (fp != NULL);
+  ret = wrap_vscanf (L_("%lli %c"), &ret_ll, &ret_c);
+  TEST_COMPARE (ret, 2);
+  TEST_COMPARE (ret_ll, expected);
+  TEST_COMPARE (ret_c, expected_c);
+}
+
+static int
+do_test (void)
+{
+  one_check (L_("0b101 x"), 5, 'x');
+  one_check (L_("0B101 x"), 5, 'x');
+  one_check (L_("-0b11111 y"), -31, 'y');
+  one_check (L_("-0B11111 y"), -31, 'y');
+  return 0;
+}
+
+#include <support/test-driver.c>
diff --git a/stdio-common/vfscanf-internal.c b/stdio-common/vfscanf-internal.c
index 2ad34050f3..7f8ee653c3 100644
--- a/stdio-common/vfscanf-internal.c
+++ b/stdio-common/vfscanf-internal.c
@@ -1428,6 +1428,16 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr,
 		      c = inchar ();
 		    }
 		}
+	      else if ((mode_flags & SCANF_ISOC23_BIN_CST) != 0
+		       && base == 0
+		       && width != 0
+		       && TOLOWER (c) == L_('b'))
+		{
+		  base = 2;
+		  if (width > 0)
+		    --width;
+		  c = inchar ();
+		}
 	      else if (base == 0)
 		base = 8;
 	    }
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
index 67d476383a..4b047d608d 100644
--- a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
@@ -24,7 +24,13 @@ ldbl-extra-routines += isoc99_fwscanf \
 		       isoc99_wscanf \
 		       isoc99_vfwscanf \
 		       isoc99_vswscanf \
-		       isoc99_vwscanf
+		       isoc99_vwscanf \
+		       isoc23_fwscanf \
+		       isoc23_swscanf \
+		       isoc23_wscanf \
+		       isoc23_vfwscanf \
+		       isoc23_vswscanf \
+		       isoc23_vwscanf
 
 tests-internal += test-wcstold-ibm128 test-wcstold-ieee128
 CFLAGS-test-wcstold-ieee128.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi
@@ -53,7 +59,13 @@ ldbl-extra-routines += printf_size \
 		       isoc99_sscanf \
 		       isoc99_vfscanf \
 		       isoc99_vscanf \
-		       isoc99_vsscanf
+		       isoc99_vsscanf \
+		       isoc23_fscanf \
+		       isoc23_scanf \
+		       isoc23_sscanf \
+		       isoc23_vfscanf \
+		       isoc23_vscanf \
+		       isoc23_vsscanf
 
 # Printing long double values with IEEE binary128 format reuses part
 # of the internal float128 implementation (__printf_fp, __printf_fphex,
@@ -306,6 +318,70 @@ CFLAGS-test-ldouble-compat_totalorder.c += -mabi=ibmlongdouble
 CFLAGS-test-ldouble-compat_totalordermag.c += -mabi=ibmlongdouble
 endif
 
+ifeq ($(subdir), stdio-common)
+tests += tst-ibm128-scanf-binary-c11 tst-ibm128-scanf-binary-c2x \
+	 tst-ibm128-scanf-binary-gnu11 tst-ibm128-scanf-binary-gnu89 \
+	 tst-ieee128-scanf-binary-c11 tst-ieee128-scanf-binary-c2x \
+	 tst-ieee128-scanf-binary-gnu11 tst-ieee128-scanf-binary-gnu89
+
+# Some versions of GCC supported for building glibc do not support -std=c2x, so
+# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# the test as needed.
+CFLAGS-tst-ibm128-scanf-binary-c11.c += -mabi=ibmlongdouble -Wno-psabi \
+					-std=c11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ibm128-scanf-binary-c2x.c += -mabi=ibmlongdouble -Wno-psabi \
+					-std=c11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ibm128-scanf-binary-gnu11.c += -mabi=ibmlongdouble -Wno-psabi \
+					  -std=gnu11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ibm128-scanf-binary-gnu89.c += -mabi=ibmlongdouble -Wno-psabi \
+					  -std=gnu89 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ieee128-scanf-binary-c11.c += -mfloat128 -mabi=ieeelongdouble \
+					 -Wno-psabi -std=c11 \
+					 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ieee128-scanf-binary-c2x.c += -mfloat128 -mabi=ieeelongdouble \
+					 -Wno-psabi -std=c11 \
+					 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ieee128-scanf-binary-gnu11.c += -mfloat128 -mabi=ieeelongdouble \
+					   -Wno-psabi -std=gnu11 \
+					   -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ieee128-scanf-binary-gnu89.c += -mfloat128 -mabi=ieeelongdouble \
+					   -Wno-psabi -std=gnu89 \
+					   -DOBJPFX=\"$(objpfx)\"
+
+endif
+
+ifeq ($(subdir), wcsmbs)
+tests += tst-ibm128-wscanf-binary-c11 tst-ibm128-wscanf-binary-c2x \
+	 tst-ibm128-wscanf-binary-gnu11 tst-ibm128-wscanf-binary-gnu89 \
+	 tst-ieee128-wscanf-binary-c11 tst-ieee128-wscanf-binary-c2x \
+	 tst-ieee128-wscanf-binary-gnu11 tst-ieee128-wscanf-binary-gnu89
+
+# Some versions of GCC supported for building glibc do not support -std=c2x, so
+# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# the test as needed.
+CFLAGS-tst-ibm128-wscanf-binary-c11.c += -mabi=ibmlongdouble -Wno-psabi \
+					 -std=c11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ibm128-wscanf-binary-c2x.c += -mabi=ibmlongdouble -Wno-psabi \
+					 -std=c11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ibm128-wscanf-binary-gnu11.c += -mabi=ibmlongdouble -Wno-psabi \
+					   -std=gnu11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ibm128-wscanf-binary-gnu89.c += -mabi=ibmlongdouble -Wno-psabi \
+					   -std=gnu89 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ieee128-wscanf-binary-c11.c += -mfloat128 -mabi=ieeelongdouble \
+					  -Wno-psabi -std=c11 \
+					  -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ieee128-wscanf-binary-c2x.c += -mfloat128 -mabi=ieeelongdouble \
+					  -Wno-psabi -std=c11 \
+					  -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ieee128-wscanf-binary-gnu11.c += -mfloat128 -mabi=ieeelongdouble \
+					    -Wno-psabi -std=gnu11 \
+					    -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-ieee128-wscanf-binary-gnu89.c += -mfloat128 -mabi=ieeelongdouble \
+					    -Wno-psabi -std=gnu89 \
+					    -DOBJPFX=\"$(objpfx)\"
+
+endif
+
 # Add IEEE binary128 files as make targets.
 routines += $(foreach r,$(ldbl-extra-routines),ieee128-$(r))
 
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Versions b/sysdeps/ieee754/ldbl-128ibm-compat/Versions
index d4ffd3762b..e641eb6421 100644
--- a/sysdeps/ieee754/ldbl-128ibm-compat/Versions
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/Versions
@@ -258,4 +258,18 @@ libc {
     __qecvtieee128_r;
     __qfcvtieee128_r;
   }
+  GLIBC_2.37 {
+    __isoc23_fscanfieee128;
+    __isoc23_scanfieee128;
+    __isoc23_sscanfieee128;
+    __isoc23_vfscanfieee128;
+    __isoc23_vscanfieee128;
+    __isoc23_vsscanfieee128;
+    __isoc23_fwscanfieee128;
+    __isoc23_swscanfieee128;
+    __isoc23_wscanfieee128;
+    __isoc23_vfwscanfieee128;
+    __isoc23_vswscanfieee128;
+    __isoc23_vwscanfieee128;
+  }
 }
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_fscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_fscanf.c
new file mode 100644
index 0000000000..28cd89134c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_fscanf.c
@@ -0,0 +1,36 @@
+/* Wrapper for __isoc23_fscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <libio/libioP.h>
+
+extern int
+___ieee128_isoc23_fscanf (FILE *fp, const char *format, ...)
+{
+  va_list arg;
+  int done;
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+
+  va_start (arg, format);
+  done = __vfscanf_internal (fp, format, arg, mode_flags);
+  va_end (arg);
+
+  return done;
+}
+strong_alias (___ieee128_isoc23_fscanf, __isoc23_fscanfieee128)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_fwscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_fwscanf.c
new file mode 100644
index 0000000000..2dc90bdeca
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_fwscanf.c
@@ -0,0 +1,36 @@
+/* Wrapper for __isoc23_fwscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <libioP.h>
+
+extern int
+___ieee128_isoc23_fwscanf (FILE *fp, const wchar_t *format, ...)
+{
+  va_list ap;
+  int done;
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+
+  va_start (ap, format);
+  done = __vfwscanf_internal (fp, format, ap, mode_flags);
+  va_end (ap);
+
+  return done;
+}
+strong_alias (___ieee128_isoc23_fwscanf, __isoc23_fwscanfieee128)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_scanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_scanf.c
new file mode 100644
index 0000000000..6972200804
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_scanf.c
@@ -0,0 +1,36 @@
+/* Wrapper for __isoc23_scanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <libio/libioP.h>
+
+extern int
+___ieee128_isoc23_scanf (const char *format, ...)
+{
+  va_list arg;
+  int done;
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+
+  va_start (arg, format);
+  done = __vfscanf_internal (stdin, format, arg, mode_flags);
+  va_end (arg);
+
+  return done;
+}
+strong_alias (___ieee128_isoc23_scanf, __isoc23_scanfieee128)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_sscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_sscanf.c
new file mode 100644
index 0000000000..ebabe4c048
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_sscanf.c
@@ -0,0 +1,41 @@
+/* Wrapper for __isoc23_sscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <strfile.h>
+#include <libioP.h>
+
+extern int
+___ieee128_isoc23_sscanf (const char *string, const char *format, ...)
+{
+  va_list arg;
+  int done;
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+
+  _IO_strfile sf;
+  FILE *fp = _IO_strfile_read (&sf, string);
+
+  va_start (arg, format);
+  done = __vfscanf_internal (fp, format, arg, mode_flags);
+  va_end (arg);
+
+  return done;
+}
+strong_alias (___ieee128_isoc23_sscanf, __isoc23_sscanfieee128)
+hidden_def (___ieee128_isoc23_sscanf)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_swscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_swscanf.c
new file mode 100644
index 0000000000..223f1252bb
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_swscanf.c
@@ -0,0 +1,41 @@
+/* Wrapper for __isoc23_swscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <strfile.h>
+#include <libioP.h>
+
+extern int
+___ieee128_isoc23_swscanf (const wchar_t *string, const wchar_t *format, ...)
+{
+  va_list ap;
+  int done;
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+
+  _IO_strfile sf;
+  struct _IO_wide_data wd;
+  FILE *fp = _IO_strfile_readw (&sf, &wd, string);
+
+  va_start (ap, format);
+  done = __vfwscanf_internal (fp, format, ap, mode_flags);
+  va_end (ap);
+
+  return done;
+}
+strong_alias (___ieee128_isoc23_swscanf, __isoc23_swscanfieee128)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vfscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vfscanf.c
new file mode 100644
index 0000000000..40d65a5e56
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vfscanf.c
@@ -0,0 +1,30 @@
+/* Wrapper for __isoc23_vfscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libio/libioP.h>
+#include <stdio.h>
+
+extern int
+___ieee128_isoc23_vfscanf (FILE *fp, const char *format, va_list ap)
+{
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+  return __vfscanf_internal (fp, format, ap, mode_flags);
+}
+strong_alias (___ieee128_isoc23_vfscanf, __isoc23_vfscanfieee128)
+hidden_def (___ieee128_isoc23_vfscanf)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vfwscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vfwscanf.c
new file mode 100644
index 0000000000..911b3e4030
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vfwscanf.c
@@ -0,0 +1,28 @@
+/* Wrapper for __isoc23_vfwscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libioP.h>
+
+extern int
+___ieee128_isoc23_vfwscanf (FILE *fp, const wchar_t *format, va_list ap)
+{
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+  return __vfwscanf_internal (fp, format, ap, mode_flags);
+}
+strong_alias (___ieee128_isoc23_vfwscanf, __isoc23_vfwscanfieee128)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vscanf.c
new file mode 100644
index 0000000000..adc7205f41
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vscanf.c
@@ -0,0 +1,28 @@
+/* Wrapper for __isoc23_vscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libio/libioP.h>
+
+extern int
+___ieee128_isoc23_vscanf (const char *format, va_list ap)
+{
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+  return __vfscanf_internal (stdin, format, ap, mode_flags);
+}
+strong_alias (___ieee128_isoc23_vscanf, __isoc23_vscanfieee128)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vsscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vsscanf.c
new file mode 100644
index 0000000000..a21cd4c8a4
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vsscanf.c
@@ -0,0 +1,32 @@
+/* Wrapper for __isoc23_vsscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <strfile.h>
+#include <libioP.h>
+
+extern int
+___ieee128_isoc23_vsscanf (const char *string, const char *format, va_list ap)
+{
+  _IO_strfile sf;
+  FILE *fp = _IO_strfile_read (&sf, string);
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+  return __vfscanf_internal (fp, format, ap, mode_flags);
+}
+strong_alias (___ieee128_isoc23_vsscanf, __isoc23_vsscanfieee128)
+hidden_def (___ieee128_isoc23_vsscanf)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vswscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vswscanf.c
new file mode 100644
index 0000000000..41db3ba043
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vswscanf.c
@@ -0,0 +1,33 @@
+/* Wrapper for __isoc23_vswscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libioP.h>
+#include <wchar.h>
+#include <strfile.h>
+
+extern int
+___ieee128_isoc23_vswscanf (wchar_t *string, const wchar_t *format, va_list ap)
+{
+  _IO_strfile sf;
+  struct _IO_wide_data wd;
+  FILE *fp = _IO_strfile_readw (&sf, &wd, string);
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+  return __vfwscanf_internal (fp, format, ap, mode_flags);
+}
+strong_alias (___ieee128_isoc23_vswscanf, __isoc23_vswscanfieee128)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vwscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vwscanf.c
new file mode 100644
index 0000000000..214b8297a7
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vwscanf.c
@@ -0,0 +1,28 @@
+/* Wrapper for __isoc23_vwscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libioP.h>
+
+extern int
+___ieee128_isoc23_vwscanf (const wchar_t *format, va_list ap)
+{
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+  return __vfwscanf_internal (stdin, format, ap, mode_flags);
+}
+strong_alias (___ieee128_isoc23_vwscanf, __isoc23_vwscanfieee128)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_wscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_wscanf.c
new file mode 100644
index 0000000000..fa0af9e085
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_wscanf.c
@@ -0,0 +1,36 @@
+/* Wrapper for __isoc23_wscanf.  IEEE128 version.
+   Copyright (C) 2019-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <libioP.h>
+
+extern int
+___ieee128_isoc23_wscanf (const wchar_t *format, ...)
+{
+  va_list ap;
+  int done;
+  int mode_flags =
+    SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST | SCANF_LDBL_USES_FLOAT128;
+
+  va_start (ap, format);
+  done = __vfwscanf_internal (stdin, format, ap, mode_flags);
+  va_end (ap);
+
+  return done;
+}
+strong_alias (___ieee128_isoc23_wscanf, __isoc23_wscanfieee128)
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-c11.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-c11.c
new file mode 100644
index 0000000000..31706beee6
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-c11.c
@@ -0,0 +1,2 @@
+#define STDX "ibm128-"
+#include <tst-scanf-binary-c11.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-c2x.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-c2x.c
new file mode 100644
index 0000000000..f8bb2e4be3
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-c2x.c
@@ -0,0 +1,2 @@
+#define STDX "ibm128-"
+#include <tst-scanf-binary-c2x.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-gnu11.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-gnu11.c
new file mode 100644
index 0000000000..074aeee208
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-gnu11.c
@@ -0,0 +1,2 @@
+#define STDX "ibm128-"
+#include <tst-scanf-binary-gnu11.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-gnu89.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-gnu89.c
new file mode 100644
index 0000000000..6091b33cb6
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-gnu89.c
@@ -0,0 +1,2 @@
+#define STDX "ibm128-"
+#include <tst-scanf-binary-gnu89.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-c11.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-c11.c
new file mode 100644
index 0000000000..4885a8e265
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-c11.c
@@ -0,0 +1,2 @@
+#define STDX "ibm128-"
+#include <tst-wscanf-binary-c11.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-c2x.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-c2x.c
new file mode 100644
index 0000000000..bf0c3da75e
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-c2x.c
@@ -0,0 +1,2 @@
+#define STDX "ibm128-"
+#include <tst-wscanf-binary-c2x.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-gnu11.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-gnu11.c
new file mode 100644
index 0000000000..49ae257fbd
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-gnu11.c
@@ -0,0 +1,2 @@
+#define STDX "ibm128-"
+#include <tst-wscanf-binary-gnu11.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-gnu89.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-gnu89.c
new file mode 100644
index 0000000000..a76be283be
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-gnu89.c
@@ -0,0 +1,2 @@
+#define STDX "ibm128-"
+#include <tst-wscanf-binary-gnu89.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-c11.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-c11.c
new file mode 100644
index 0000000000..2570fcad5c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-c11.c
@@ -0,0 +1,2 @@
+#define STDX "ieee128-"
+#include <tst-scanf-binary-c11.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-c2x.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-c2x.c
new file mode 100644
index 0000000000..d09c21394c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-c2x.c
@@ -0,0 +1,2 @@
+#define STDX "ieee128-"
+#include <tst-scanf-binary-c2x.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-gnu11.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-gnu11.c
new file mode 100644
index 0000000000..4e08b6417f
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-gnu11.c
@@ -0,0 +1,2 @@
+#define STDX "ieee128-"
+#include <tst-scanf-binary-gnu11.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-gnu89.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-gnu89.c
new file mode 100644
index 0000000000..a917b3bfef
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-gnu89.c
@@ -0,0 +1,2 @@
+#define STDX "ieee128-"
+#include <tst-scanf-binary-gnu89.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-c11.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-c11.c
new file mode 100644
index 0000000000..a6a6bae1cd
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-c11.c
@@ -0,0 +1,2 @@
+#define STDX "ieee128-"
+#include <tst-wscanf-binary-c11.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-c2x.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-c2x.c
new file mode 100644
index 0000000000..7e2d27c6d2
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-c2x.c
@@ -0,0 +1,2 @@
+#define STDX "ieee128-"
+#include <tst-wscanf-binary-c2x.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-gnu11.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-gnu11.c
new file mode 100644
index 0000000000..d81d2d7136
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-gnu11.c
@@ -0,0 +1,2 @@
+#define STDX "ieee128-"
+#include <tst-wscanf-binary-gnu11.c>
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-gnu89.c b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-gnu89.c
new file mode 100644
index 0000000000..f405923e0f
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-gnu89.c
@@ -0,0 +1,2 @@
+#define STDX "ieee128-"
+#include <tst-wscanf-binary-gnu89.c>
diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile
index 1d01846476..fec804808c 100644
--- a/sysdeps/ieee754/ldbl-opt/Makefile
+++ b/sysdeps/ieee754/ldbl-opt/Makefile
@@ -42,6 +42,10 @@ libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \
 		 isoc99_vscanf isoc99_vfscanf isoc99_vsscanf \
 		 isoc99_wscanf isoc99_fwscanf isoc99_swscanf \
 		 isoc99_vwscanf isoc99_vfwscanf isoc99_vswscanf \
+		 isoc23_scanf isoc23_fscanf isoc23_sscanf \
+		 isoc23_vscanf isoc23_vfscanf isoc23_vsscanf \
+		 isoc23_wscanf isoc23_fwscanf isoc23_swscanf \
+		 isoc23_vwscanf isoc23_vfwscanf isoc23_vswscanf \
 		 nextup nextdown totalorder totalordermag getpayload \
 		 canonicalize setpayload setpayloadsig llogb fmaxmag fminmag \
 		 roundeven fromfp ufromfp fromfpx ufromfpx fadd dadd \
@@ -221,3 +225,39 @@ $(objpfx)tst-nldbl-error.c: tst-ldbl-error.c
 CFLAGS-tst-nldbl-warn.c += -mlong-double-64
 CFLAGS-tst-nldbl-error.c += -mlong-double-64
 endif
+
+ifeq ($(subdir), stdio-common)
+tests += tst-nldbl-scanf-binary-c11 tst-nldbl-scanf-binary-c2x \
+	 tst-nldbl-scanf-binary-gnu11 tst-nldbl-scanf-binary-gnu89
+
+# Some versions of GCC supported for building glibc do not support -std=c2x, so
+# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# the test as needed.
+CFLAGS-tst-nldbl-scanf-binary-c11.c += -mlong-double-64 -std=c11 \
+				       -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-nldbl-scanf-binary-c2x.c += -mlong-double-64 -std=c11 \
+				       -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-nldbl-scanf-binary-gnu11.c += -mlong-double-64 -std=gnu11 \
+					 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-nldbl-scanf-binary-gnu89.c += -mlong-double-64 -std=gnu89 \
+					 -DOBJPFX=\"$(objpfx)\"
+
+endif
+
+ifeq ($(subdir), wcsmbs)
+tests += tst-nldbl-wscanf-binary-c11 tst-nldbl-wscanf-binary-c2x \
+	 tst-nldbl-wscanf-binary-gnu11 tst-nldbl-wscanf-binary-gnu89
+
+# Some versions of GCC supported for building glibc do not support -std=c2x, so
+# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# the test as needed.
+CFLAGS-tst-nldbl-wscanf-binary-c11.c += -mlong-double-64 -std=c11 \
+					-DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-nldbl-wscanf-binary-c2x.c += -mlong-double-64 -std=c11 \
+					-DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-nldbl-wscanf-binary-gnu11.c += -mlong-double-64 -std=gnu11 \
+					  -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-nldbl-wscanf-binary-gnu89.c += -mlong-double-64 -std=gnu89 \
+					  -DOBJPFX=\"$(objpfx)\"
+
+endif
diff --git a/sysdeps/ieee754/ldbl-opt/Versions b/sysdeps/ieee754/ldbl-opt/Versions
index 21a2db6888..cf8ed185e1 100644
--- a/sysdeps/ieee754/ldbl-opt/Versions
+++ b/sysdeps/ieee754/ldbl-opt/Versions
@@ -84,6 +84,14 @@ libc {
     __nldbl_err; __nldbl_verr; __nldbl_errx; __nldbl_verrx;
     __nldbl_error; __nldbl_error_at_line;
   }
+  GLIBC_2.37 {
+    __nldbl___isoc23_scanf; __nldbl___isoc23_fscanf;
+    __nldbl___isoc23_sscanf; __nldbl___isoc23_vscanf;
+    __nldbl___isoc23_vfscanf; __nldbl___isoc23_vsscanf;
+    __nldbl___isoc23_wscanf; __nldbl___isoc23_fwscanf;
+    __nldbl___isoc23_swscanf; __nldbl___isoc23_vwscanf;
+    __nldbl___isoc23_vfwscanf; __nldbl___isoc23_vswscanf;
+  }
 }
 libm {
   NLDBL_VERSION {
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
index 2b1261acc7..a1ccf2dfaa 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
@@ -45,6 +45,10 @@ libc_hidden_proto (__nldbl___isoc99_vsscanf)
 libc_hidden_proto (__nldbl___isoc99_vfscanf)
 libc_hidden_proto (__nldbl___isoc99_vswscanf)
 libc_hidden_proto (__nldbl___isoc99_vfwscanf)
+libc_hidden_proto (__nldbl___isoc23_vsscanf)
+libc_hidden_proto (__nldbl___isoc23_vfscanf)
+libc_hidden_proto (__nldbl___isoc23_vswscanf)
+libc_hidden_proto (__nldbl___isoc23_vfwscanf)
 
 /* Compatibility with IEEE double as long double.
    IEEE quad long double is used by default for most programs, so
@@ -992,6 +996,172 @@ __nldbl___isoc99_wscanf (const wchar_t *fmt, ...)
   return ret;
 }
 
+int
+attribute_compat_text_section
+__nldbl___isoc23_vfscanf (FILE *s, const char *fmt, va_list ap)
+{
+  return __vfscanf_internal (s, fmt, ap,
+			     SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			     | SCANF_ISOC23_BIN_CST);
+}
+libc_hidden_def (__nldbl___isoc23_vfscanf)
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_sscanf (const char *s, const char *fmt, ...)
+{
+  _IO_strfile sf;
+  FILE *f = _IO_strfile_read (&sf, s);
+  va_list ap;
+  int ret;
+
+  va_start (ap, fmt);
+  ret = __vfscanf_internal (f, fmt, ap,
+			    SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			    | SCANF_ISOC23_BIN_CST);
+  va_end (ap);
+
+  return ret;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_vsscanf (const char *s, const char *fmt, va_list ap)
+{
+  _IO_strfile sf;
+  FILE *f = _IO_strfile_read (&sf, s);
+
+  return __vfscanf_internal (f, fmt, ap,
+			     SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			     | SCANF_ISOC23_BIN_CST);
+}
+libc_hidden_def (__nldbl___isoc23_vsscanf)
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_vscanf (const char *fmt, va_list ap)
+{
+  return __vfscanf_internal (stdin, fmt, ap,
+			     SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			     | SCANF_ISOC23_BIN_CST);
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_fscanf (FILE *s, const char *fmt, ...)
+{
+  va_list ap;
+  int ret;
+
+  va_start (ap, fmt);
+  ret = __vfscanf_internal (s, fmt, ap,
+			    SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			    | SCANF_ISOC23_BIN_CST);
+  va_end (ap);
+
+  return ret;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_scanf (const char *fmt, ...)
+{
+  va_list ap;
+  int ret;
+
+  va_start (ap, fmt);
+  ret = __vfscanf_internal (stdin, fmt, ap,
+			    SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			    | SCANF_ISOC23_BIN_CST);
+  va_end (ap);
+
+  return ret;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+{
+  return __vfwscanf_internal (s, fmt, ap,
+			      SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			      | SCANF_ISOC23_BIN_CST);
+}
+libc_hidden_def (__nldbl___isoc23_vfwscanf)
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_swscanf (const wchar_t *s, const wchar_t *fmt, ...)
+{
+  _IO_strfile sf;
+  struct _IO_wide_data wd;
+  FILE *f = _IO_strfile_readw (&sf, &wd, s);
+  va_list ap;
+  int ret;
+
+  va_start (ap, fmt);
+  ret = __vfwscanf_internal (f, fmt, ap,
+			     SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			     | SCANF_ISOC23_BIN_CST);
+  va_end (ap);
+
+  return ret;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_vswscanf (const wchar_t *s, const wchar_t *fmt, va_list ap)
+{
+  _IO_strfile sf;
+  struct _IO_wide_data wd;
+  FILE *f = _IO_strfile_readw (&sf, &wd, s);
+
+  return __vfwscanf_internal (f, fmt, ap,
+			      SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			      | SCANF_ISOC23_BIN_CST);
+}
+libc_hidden_def (__nldbl___isoc23_vswscanf)
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_vwscanf (const wchar_t *fmt, va_list ap)
+{
+  return __vfwscanf_internal (stdin, fmt, ap,
+			      SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			      | SCANF_ISOC23_BIN_CST);
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_fwscanf (FILE *s, const wchar_t *fmt, ...)
+{
+  va_list ap;
+  int ret;
+
+  va_start (ap, fmt);
+  ret = __vfwscanf_internal (s, fmt, ap,
+			     SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			     | SCANF_ISOC23_BIN_CST);
+  va_end (ap);
+
+  return ret;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc23_wscanf (const wchar_t *fmt, ...)
+{
+  va_list ap;
+  int ret;
+
+  va_start (ap, fmt);
+  ret = __vfwscanf_internal (stdin, fmt, ap,
+			     SCANF_LDBL_IS_DBL | SCANF_ISOC99_A
+			     | SCANF_ISOC23_BIN_CST);
+  va_end (ap);
+
+  return ret;
+}
+
 void
 __nldbl_argp_error (const struct argp_state *state, const char *fmt, ...)
 {
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
index 0a1b437349..4082a46f52 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
@@ -78,6 +78,18 @@ NLDBL_DECL (__isoc99_swscanf);
 NLDBL_DECL (__isoc99_vwscanf);
 NLDBL_DECL (__isoc99_vfwscanf);
 NLDBL_DECL (__isoc99_vswscanf);
+NLDBL_DECL (__isoc23_scanf);
+NLDBL_DECL (__isoc23_fscanf);
+NLDBL_DECL (__isoc23_sscanf);
+NLDBL_DECL (__isoc23_vscanf);
+NLDBL_DECL (__isoc23_vfscanf);
+NLDBL_DECL (__isoc23_vsscanf);
+NLDBL_DECL (__isoc23_wscanf);
+NLDBL_DECL (__isoc23_fwscanf);
+NLDBL_DECL (__isoc23_swscanf);
+NLDBL_DECL (__isoc23_vwscanf);
+NLDBL_DECL (__isoc23_vfwscanf);
+NLDBL_DECL (__isoc23_vswscanf);
 NLDBL_DECL (argp_error);
 NLDBL_DECL (argp_failure);
 NLDBL_DECL (warn);
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fscanf.c
new file mode 100644
index 0000000000..7b5a0565f7
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_fscanf (FILE *stream, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___isoc23_vfscanf (stream, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fwscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fwscanf.c
new file mode 100644
index 0000000000..4ecb340143
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fwscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_fwscanf (FILE *stream, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___isoc23_vfwscanf (stream, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_scanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_scanf.c
new file mode 100644
index 0000000000..90ea10c115
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_scanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_scanf (const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___isoc23_vfscanf (stdin, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_sscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_sscanf.c
new file mode 100644
index 0000000000..64124e479c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_sscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_sscanf (const char *s, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___isoc23_vsscanf (s, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_swscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_swscanf.c
new file mode 100644
index 0000000000..da84c318b2
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_swscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_swscanf (const wchar_t *s, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___isoc23_vswscanf (s, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfscanf.c
new file mode 100644
index 0000000000..671aa63ec6
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_vfscanf (FILE *s, const char *fmt, va_list ap)
+{
+  return __nldbl___isoc23_vfscanf (s, fmt, ap);
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfwscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfwscanf.c
new file mode 100644
index 0000000000..b069522cd1
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfwscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+{
+  return __nldbl___isoc23_vfwscanf (s, fmt, ap);
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vscanf.c
new file mode 100644
index 0000000000..f2256f210f
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_vscanf (const char *fmt, va_list ap)
+{
+  return __nldbl___isoc23_vfscanf (stdin, fmt, ap);
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vsscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vsscanf.c
new file mode 100644
index 0000000000..96ce46b317
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vsscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_vsscanf (const char *string, const char *fmt, va_list ap)
+{
+  return __nldbl___isoc23_vsscanf (string, fmt, ap);
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vswscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vswscanf.c
new file mode 100644
index 0000000000..0819b55a2c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vswscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_vswscanf (const wchar_t *string, const wchar_t *fmt, va_list ap)
+{
+  return __nldbl___isoc23_vswscanf (string, fmt, ap);
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vwscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vwscanf.c
new file mode 100644
index 0000000000..f92876ec27
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vwscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_vwscanf (const wchar_t *fmt, va_list ap)
+{
+  return __nldbl___isoc23_vfwscanf (stdin, fmt, ap);
+}
diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_wscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_wscanf.c
new file mode 100644
index 0000000000..cece258845
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/nldbl-isoc23_wscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc23_wscanf (const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___isoc23_vfwscanf (stdin, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
diff --git a/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c11.c b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c11.c
new file mode 100644
index 0000000000..f5bc396fcc
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c11.c
@@ -0,0 +1,2 @@
+#define STDX "nldbl-"
+#include <tst-scanf-binary-c11.c>
diff --git a/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c2x.c b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c2x.c
new file mode 100644
index 0000000000..4e0cf7570f
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c2x.c
@@ -0,0 +1,2 @@
+#define STDX "nldbl-"
+#include <tst-scanf-binary-c2x.c>
diff --git a/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu11.c b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu11.c
new file mode 100644
index 0000000000..10e228e98a
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu11.c
@@ -0,0 +1,2 @@
+#define STDX "nldbl-"
+#include <tst-scanf-binary-gnu11.c>
diff --git a/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu89.c b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu89.c
new file mode 100644
index 0000000000..c5da04b644
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu89.c
@@ -0,0 +1,2 @@
+#define STDX "nldbl-"
+#include <tst-scanf-binary-gnu89.c>
diff --git a/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c11.c b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c11.c
new file mode 100644
index 0000000000..0e66e97cf7
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c11.c
@@ -0,0 +1,2 @@
+#define STDX "nldbl-"
+#include <tst-wscanf-binary-c11.c>
diff --git a/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c2x.c b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c2x.c
new file mode 100644
index 0000000000..7637aab0d4
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c2x.c
@@ -0,0 +1,2 @@
+#define STDX "nldbl-"
+#include <tst-wscanf-binary-c2x.c>
diff --git a/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu11.c b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu11.c
new file mode 100644
index 0000000000..106ec38bce
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu11.c
@@ -0,0 +1,2 @@
+#define STDX "nldbl-"
+#include <tst-wscanf-binary-gnu11.c>
diff --git a/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu89.c b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu89.c
new file mode 100644
index 0000000000..61a15619d2
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu89.c
@@ -0,0 +1,2 @@
+#define STDX "nldbl-"
+#include <tst-wscanf-binary-gnu89.c>
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 340d330352..62d3e1b479 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -2294,6 +2294,10 @@ GLIBC_2.36 arc4random_buf F
 GLIBC_2.36 arc4random_uniform F
 GLIBC_2.36 c8rtomb F
 GLIBC_2.36 mbrtoc8 F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2304,6 +2308,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2314,6 +2325,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 0b7d5bfd0a..61ce2485b9 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2633,6 +2633,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2643,6 +2647,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2653,3 +2664,4 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 70f8f457f3..4e57c79b9d 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2730,6 +2730,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2740,6 +2744,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2750,6 +2761,19 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
+GLIBC_2.37 __nldbl___isoc23_fscanf F
+GLIBC_2.37 __nldbl___isoc23_fwscanf F
+GLIBC_2.37 __nldbl___isoc23_scanf F
+GLIBC_2.37 __nldbl___isoc23_sscanf F
+GLIBC_2.37 __nldbl___isoc23_swscanf F
+GLIBC_2.37 __nldbl___isoc23_vfscanf F
+GLIBC_2.37 __nldbl___isoc23_vfwscanf F
+GLIBC_2.37 __nldbl___isoc23_vscanf F
+GLIBC_2.37 __nldbl___isoc23_vsscanf F
+GLIBC_2.37 __nldbl___isoc23_vswscanf F
+GLIBC_2.37 __nldbl___isoc23_vwscanf F
+GLIBC_2.37 __nldbl___isoc23_wscanf F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
index 5ecb023dcf..7c7233ba31 100644
--- a/sysdeps/unix/sysv/linux/arc/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -2394,6 +2394,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2404,6 +2408,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2414,3 +2425,4 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 84b380c8e5..daacc59195 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -513,6 +513,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -523,6 +527,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -533,6 +544,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index a32367ffb3..3e0560cc80 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -510,6 +510,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -520,6 +524,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -530,6 +541,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 915e490b43..f6653c986e 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2669,6 +2669,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2679,6 +2683,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2689,4 +2700,5 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 51241bae74..98dbed4658 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2618,6 +2618,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2628,6 +2632,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2638,6 +2649,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 79f1435daa..354e604649 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2802,6 +2802,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2812,6 +2816,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2822,6 +2833,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index d4ebdf48d3..55c4e5ac6b 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -2568,6 +2568,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2578,6 +2582,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2588,6 +2599,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
index acc324b44e..66587021af 100644
--- a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
@@ -2154,6 +2154,10 @@ GLIBC_2.36 wprintf F
 GLIBC_2.36 write F
 GLIBC_2.36 writev F
 GLIBC_2.36 wscanf F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2164,6 +2168,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2174,3 +2185,4 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 7ecf9323e8..8248a363d3 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -514,6 +514,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -524,6 +528,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -534,6 +545,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0x98
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 3ef3564853..044fb55d50 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2745,6 +2745,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2755,6 +2759,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2765,6 +2776,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 251981d9bb..caa0695ce3 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2718,6 +2718,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2728,6 +2732,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2738,4 +2749,5 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index 577cd189cb..0fd5a90e76 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2715,6 +2715,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2725,6 +2729,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2735,4 +2746,5 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 3feb978017..9e3ba20e5e 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2710,6 +2710,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2720,6 +2724,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2730,6 +2741,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 32f6411658..8fbab8a13f 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2708,6 +2708,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2718,6 +2722,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2728,6 +2739,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index cc8329c0d8..15c06ee4b1 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2716,6 +2716,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2726,6 +2730,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2736,6 +2747,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 6cac0c3c4d..a4405adf24 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2619,6 +2619,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2629,6 +2633,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2639,6 +2650,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index 923eae8e9e..1b1a12e272 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2757,6 +2757,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2767,6 +2771,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2777,4 +2788,5 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
diff --git a/sysdeps/unix/sysv/linux/or1k/libc.abilist b/sysdeps/unix/sysv/linux/or1k/libc.abilist
index da607a3cc0..4a695f7fb2 100644
--- a/sysdeps/unix/sysv/linux/or1k/libc.abilist
+++ b/sysdeps/unix/sysv/linux/or1k/libc.abilist
@@ -2140,6 +2140,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2150,6 +2154,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2160,3 +2171,4 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index bf4be05150..a2c25c594b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2772,6 +2772,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2782,6 +2786,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2792,6 +2803,19 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
+GLIBC_2.37 __nldbl___isoc23_fscanf F
+GLIBC_2.37 __nldbl___isoc23_fwscanf F
+GLIBC_2.37 __nldbl___isoc23_scanf F
+GLIBC_2.37 __nldbl___isoc23_sscanf F
+GLIBC_2.37 __nldbl___isoc23_swscanf F
+GLIBC_2.37 __nldbl___isoc23_vfscanf F
+GLIBC_2.37 __nldbl___isoc23_vfwscanf F
+GLIBC_2.37 __nldbl___isoc23_vscanf F
+GLIBC_2.37 __nldbl___isoc23_vsscanf F
+GLIBC_2.37 __nldbl___isoc23_vswscanf F
+GLIBC_2.37 __nldbl___isoc23_vwscanf F
+GLIBC_2.37 __nldbl___isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index a5e1f40c79..a7742ace0a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2805,6 +2805,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2815,6 +2819,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2825,6 +2836,19 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
+GLIBC_2.37 __nldbl___isoc23_fscanf F
+GLIBC_2.37 __nldbl___isoc23_fwscanf F
+GLIBC_2.37 __nldbl___isoc23_scanf F
+GLIBC_2.37 __nldbl___isoc23_sscanf F
+GLIBC_2.37 __nldbl___isoc23_swscanf F
+GLIBC_2.37 __nldbl___isoc23_vfscanf F
+GLIBC_2.37 __nldbl___isoc23_vfwscanf F
+GLIBC_2.37 __nldbl___isoc23_vscanf F
+GLIBC_2.37 __nldbl___isoc23_vsscanf F
+GLIBC_2.37 __nldbl___isoc23_vswscanf F
+GLIBC_2.37 __nldbl___isoc23_vwscanf F
+GLIBC_2.37 __nldbl___isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 25938d48ad..d6af90fba9 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2527,6 +2527,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2537,6 +2541,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2547,6 +2558,19 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
+GLIBC_2.37 __nldbl___isoc23_fscanf F
+GLIBC_2.37 __nldbl___isoc23_fwscanf F
+GLIBC_2.37 __nldbl___isoc23_scanf F
+GLIBC_2.37 __nldbl___isoc23_sscanf F
+GLIBC_2.37 __nldbl___isoc23_swscanf F
+GLIBC_2.37 __nldbl___isoc23_vfscanf F
+GLIBC_2.37 __nldbl___isoc23_vfwscanf F
+GLIBC_2.37 __nldbl___isoc23_vscanf F
+GLIBC_2.37 __nldbl___isoc23_vsscanf F
+GLIBC_2.37 __nldbl___isoc23_vswscanf F
+GLIBC_2.37 __nldbl___isoc23_vwscanf F
+GLIBC_2.37 __nldbl___isoc23_wscanf F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index 98666d8293..5e3b6bbe6b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2829,6 +2829,14 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fscanfieee128 F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_fwscanfieee128 F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_scanfieee128 F
+GLIBC_2.37 __isoc23_sscanf F
+GLIBC_2.37 __isoc23_sscanfieee128 F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2839,6 +2847,20 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_swscanfieee128 F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfscanfieee128 F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vfwscanfieee128 F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vscanfieee128 F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vsscanfieee128 F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vswscanfieee128 F
+GLIBC_2.37 __isoc23_vwscanf F
+GLIBC_2.37 __isoc23_vwscanfieee128 F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2849,3 +2871,17 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
+GLIBC_2.37 __isoc23_wscanfieee128 F
+GLIBC_2.37 __nldbl___isoc23_fscanf F
+GLIBC_2.37 __nldbl___isoc23_fwscanf F
+GLIBC_2.37 __nldbl___isoc23_scanf F
+GLIBC_2.37 __nldbl___isoc23_sscanf F
+GLIBC_2.37 __nldbl___isoc23_swscanf F
+GLIBC_2.37 __nldbl___isoc23_vfscanf F
+GLIBC_2.37 __nldbl___isoc23_vfwscanf F
+GLIBC_2.37 __nldbl___isoc23_vscanf F
+GLIBC_2.37 __nldbl___isoc23_vsscanf F
+GLIBC_2.37 __nldbl___isoc23_vswscanf F
+GLIBC_2.37 __nldbl___isoc23_vwscanf F
+GLIBC_2.37 __nldbl___isoc23_wscanf F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index 96e503b850..fed2fb662c 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -2396,6 +2396,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2406,6 +2410,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2416,3 +2427,4 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index 13d9b2414b..62c8169281 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2596,6 +2596,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2606,6 +2610,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2616,3 +2627,4 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index a38ff8cdd3..5a3f50f4dc 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2770,6 +2770,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2780,6 +2784,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2790,6 +2801,19 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
+GLIBC_2.37 __nldbl___isoc23_fscanf F
+GLIBC_2.37 __nldbl___isoc23_fwscanf F
+GLIBC_2.37 __nldbl___isoc23_scanf F
+GLIBC_2.37 __nldbl___isoc23_sscanf F
+GLIBC_2.37 __nldbl___isoc23_swscanf F
+GLIBC_2.37 __nldbl___isoc23_vfscanf F
+GLIBC_2.37 __nldbl___isoc23_vfwscanf F
+GLIBC_2.37 __nldbl___isoc23_vscanf F
+GLIBC_2.37 __nldbl___isoc23_vsscanf F
+GLIBC_2.37 __nldbl___isoc23_vswscanf F
+GLIBC_2.37 __nldbl___isoc23_vwscanf F
+GLIBC_2.37 __nldbl___isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index cf4e85e4e5..9d30e660cd 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2564,6 +2564,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2574,6 +2578,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2584,6 +2595,19 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
+GLIBC_2.37 __nldbl___isoc23_fscanf F
+GLIBC_2.37 __nldbl___isoc23_fwscanf F
+GLIBC_2.37 __nldbl___isoc23_scanf F
+GLIBC_2.37 __nldbl___isoc23_sscanf F
+GLIBC_2.37 __nldbl___isoc23_swscanf F
+GLIBC_2.37 __nldbl___isoc23_vfscanf F
+GLIBC_2.37 __nldbl___isoc23_vfwscanf F
+GLIBC_2.37 __nldbl___isoc23_vscanf F
+GLIBC_2.37 __nldbl___isoc23_vsscanf F
+GLIBC_2.37 __nldbl___isoc23_vswscanf F
+GLIBC_2.37 __nldbl___isoc23_vwscanf F
+GLIBC_2.37 __nldbl___isoc23_wscanf F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index cd4ed8377b..0641b23937 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2625,6 +2625,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2635,6 +2639,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2645,6 +2656,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 27cb9532b9..78c4df5043 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2622,6 +2622,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2632,6 +2636,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2642,6 +2653,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index 4bfb40d957..e61cfa10b9 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2765,6 +2765,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2775,6 +2779,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2785,6 +2796,19 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
+GLIBC_2.37 __nldbl___isoc23_fscanf F
+GLIBC_2.37 __nldbl___isoc23_fwscanf F
+GLIBC_2.37 __nldbl___isoc23_scanf F
+GLIBC_2.37 __nldbl___isoc23_sscanf F
+GLIBC_2.37 __nldbl___isoc23_swscanf F
+GLIBC_2.37 __nldbl___isoc23_vfscanf F
+GLIBC_2.37 __nldbl___isoc23_vfwscanf F
+GLIBC_2.37 __nldbl___isoc23_vscanf F
+GLIBC_2.37 __nldbl___isoc23_vsscanf F
+GLIBC_2.37 __nldbl___isoc23_vswscanf F
+GLIBC_2.37 __nldbl___isoc23_vwscanf F
+GLIBC_2.37 __nldbl___isoc23_wscanf F
 GLIBC_2.37 __ppoll64_chk F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 36d2262766..76a192fae8 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2591,6 +2591,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2601,6 +2605,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2611,6 +2622,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index e86bc7cbd4..94cc527aa0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2542,6 +2542,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2552,6 +2556,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2562,6 +2573,7 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index ee95b6a2b6..dc7617bca0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2648,6 +2648,10 @@ GLIBC_2.36 pidfd_open F
 GLIBC_2.36 pidfd_send_signal F
 GLIBC_2.36 process_madvise F
 GLIBC_2.36 process_mrelease F
+GLIBC_2.37 __isoc23_fscanf F
+GLIBC_2.37 __isoc23_fwscanf F
+GLIBC_2.37 __isoc23_scanf F
+GLIBC_2.37 __isoc23_sscanf F
 GLIBC_2.37 __isoc23_strtoimax F
 GLIBC_2.37 __isoc23_strtol F
 GLIBC_2.37 __isoc23_strtol_l F
@@ -2658,6 +2662,13 @@ GLIBC_2.37 __isoc23_strtoul_l F
 GLIBC_2.37 __isoc23_strtoull F
 GLIBC_2.37 __isoc23_strtoull_l F
 GLIBC_2.37 __isoc23_strtoumax F
+GLIBC_2.37 __isoc23_swscanf F
+GLIBC_2.37 __isoc23_vfscanf F
+GLIBC_2.37 __isoc23_vfwscanf F
+GLIBC_2.37 __isoc23_vscanf F
+GLIBC_2.37 __isoc23_vsscanf F
+GLIBC_2.37 __isoc23_vswscanf F
+GLIBC_2.37 __isoc23_vwscanf F
 GLIBC_2.37 __isoc23_wcstoimax F
 GLIBC_2.37 __isoc23_wcstol F
 GLIBC_2.37 __isoc23_wcstol_l F
@@ -2668,3 +2679,4 @@ GLIBC_2.37 __isoc23_wcstoul_l F
 GLIBC_2.37 __isoc23_wcstoull F
 GLIBC_2.37 __isoc23_wcstoull_l F
 GLIBC_2.37 __isoc23_wcstoumax F
+GLIBC_2.37 __isoc23_wscanf F
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
index 6fd0cf5b84..2416059f19 100644
--- a/wcsmbs/Makefile
+++ b/wcsmbs/Makefile
@@ -43,6 +43,8 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
 	    wcsmbsload mbsrtowcs_l \
 	    isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \
 	    isoc99_swscanf isoc99_vswscanf \
+	    isoc23_wscanf isoc23_vwscanf isoc23_fwscanf isoc23_vfwscanf \
+	    isoc23_swscanf isoc23_vswscanf \
 	    mbrtoc8 c8rtomb mbrtoc16 c16rtomb mbrtoc32 c32rtomb
 
 strop-tests :=  wcscmp wcsncmp wmemcmp wcslen wcschr wcsrchr wcscpy wcsnlen \
@@ -56,7 +58,9 @@ tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
 	 test-mbrtoc8 test-c8rtomb \
 	 $(addprefix test-,$(strop-tests)) tst-mbstowcs \
 	 tst-wprintf-binary tst-wcstol-binary-c11 tst-wcstol-binary-c2x \
-	 tst-wcstol-binary-gnu11 tst-wcstol-binary-gnu2x
+	 tst-wcstol-binary-gnu11 tst-wcstol-binary-gnu2x \
+	 tst-wscanf-binary-c11 tst-wscanf-binary-c2x tst-wscanf-binary-gnu11 \
+	 tst-wscanf-binary-gnu89
 
 include ../Rules
 
@@ -115,6 +119,10 @@ CFLAGS-isoc99_wscanf.c += -fexceptions
 CFLAGS-isoc99_fwscanf.c += -fexceptions
 CFLAGS-isoc99_vwscanf.c += -fexceptions
 CFLAGS-isoc99_vfwscanf.c += -fexceptions
+CFLAGS-isoc23_wscanf.c += -fexceptions
+CFLAGS-isoc23_fwscanf.c += -fexceptions
+CFLAGS-isoc23_vwscanf.c += -fexceptions
+CFLAGS-isoc23_vfwscanf.c += -fexceptions
 
 CPPFLAGS += $(libio-mtsafe)
 
@@ -131,3 +139,7 @@ CFLAGS-tst-wcstol-binary-c11.c += -std=c11
 CFLAGS-tst-wcstol-binary-c2x.c += -std=c11
 CFLAGS-tst-wcstol-binary-gnu11.c += -std=gnu11
 CFLAGS-tst-wcstol-binary-gnu2x.c += -std=gnu11
+CFLAGS-tst-wscanf-binary-c11.c += -std=c11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-wscanf-binary-c2x.c += -std=c11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-wscanf-binary-gnu11.c += -std=gnu11 -DOBJPFX=\"$(objpfx)\"
+CFLAGS-tst-wscanf-binary-gnu89.c += -std=gnu89 -DOBJPFX=\"$(objpfx)\"
diff --git a/wcsmbs/Versions b/wcsmbs/Versions
index 90c730abde..68b55e74e8 100644
--- a/wcsmbs/Versions
+++ b/wcsmbs/Versions
@@ -55,5 +55,7 @@ libc {
   GLIBC_2.37 {
     __isoc23_wcstol; __isoc23_wcstoll; __isoc23_wcstoul; __isoc23_wcstoull;
     __isoc23_wcstoimax; __isoc23_wcstoumax;
+    __isoc23_fwscanf; __isoc23_swscanf; __isoc23_vfwscanf; __isoc23_vswscanf;
+    __isoc23_vwscanf; __isoc23_wscanf;
   }
 }
diff --git a/wcsmbs/bits/wchar-ldbl.h b/wcsmbs/bits/wchar-ldbl.h
index f0d8506f83..4d242b71e1 100644
--- a/wcsmbs/bits/wchar-ldbl.h
+++ b/wcsmbs/bits/wchar-ldbl.h
@@ -29,13 +29,25 @@ __LDBL_REDIR_DECL (vwprintf);
 __LDBL_REDIR_DECL (vswprintf);
 # if !__GLIBC_USE (DEPRECATED_SCANF)
 #  if defined __LDBL_COMPAT
+#   if __GLIBC_USE (C2X_STRTOL)
+__LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc23_fwscanf)
+__LDBL_REDIR1_DECL (wscanf, __nldbl___isoc23_wscanf)
+__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc23_swscanf)
+#   else
 __LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc99_fwscanf)
 __LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf)
 __LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)
+#   endif
 #  elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+#   if __GLIBC_USE (C2X_STRTOL)
+__LDBL_REDIR1_DECL (fwscanf, __isoc23_fwscanfieee128)
+__LDBL_REDIR1_DECL (wscanf, __isoc23_wscanfieee128)
+__LDBL_REDIR1_DECL (swscanf, __isoc23_swscanfieee128)
+#   else
 __LDBL_REDIR1_DECL (fwscanf, __isoc99_fwscanfieee128)
 __LDBL_REDIR1_DECL (wscanf, __isoc99_wscanfieee128)
 __LDBL_REDIR1_DECL (swscanf, __isoc99_swscanfieee128)
+#   endif
 #  else
 #   error bits/stdlib-ldbl.h included when no ldbl redirections are required.
 #  endif
@@ -54,13 +66,25 @@ __LDBL_REDIR1_DECL (wcstold, __wcstoieee128)
 # endif
 # if !__GLIBC_USE (DEPRECATED_SCANF)
 #  if defined __LDBL_COMPAT
+#   if __GLIBC_USE (C2X_STRTOL)
+__LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc23_vfwscanf)
+__LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc23_vwscanf)
+__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc23_vswscanf)
+#   else
 __LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf)
 __LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf)
 __LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)
+#   endif
 #  elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+#   if __GLIBC_USE (C2X_STRTOL)
+__LDBL_REDIR1_DECL (vfwscanf, __isoc23_vfwscanfieee128)
+__LDBL_REDIR1_DECL (vwscanf, __isoc23_vwscanfieee128)
+__LDBL_REDIR1_DECL (vswscanf, __isoc23_vswscanfieee128)
+#   else
 __LDBL_REDIR1_DECL (vfwscanf, __isoc99_vfwscanfieee128)
 __LDBL_REDIR1_DECL (vwscanf, __isoc99_vwscanfieee128)
 __LDBL_REDIR1_DECL (vswscanf, __isoc99_vswscanfieee128)
+#   endif
 #  else
 #   error bits/stdlib-ldbl.h included when no ldbl redirections are required.
 #  endif
diff --git a/wcsmbs/isoc23_fwscanf.c b/wcsmbs/isoc23_fwscanf.c
new file mode 100644
index 0000000000..6ad1498480
--- /dev/null
+++ b/wcsmbs/isoc23_fwscanf.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libioP.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+
+/* Read formatted input from STREAM according to the format string FORMAT.  */
+int
+__isoc23_fwscanf (FILE *stream, const wchar_t *format, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, format);
+  done = __vfwscanf_internal (stream, format, arg,
+			      SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+  va_end (arg);
+
+  return done;
+}
diff --git a/wcsmbs/isoc23_swscanf.c b/wcsmbs/isoc23_swscanf.c
new file mode 100644
index 0000000000..41aaa88b3a
--- /dev/null
+++ b/wcsmbs/isoc23_swscanf.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <libio/strfile.h>
+
+/* Read formatted input from S, according to the format string FORMAT.  */
+
+int
+__isoc23_swscanf (const wchar_t *s, const wchar_t *format, ...)
+{
+  va_list arg;
+  int done;
+  _IO_strfile sf;
+  struct _IO_wide_data wd;
+  FILE *f = _IO_strfile_readw (&sf, &wd, s);
+
+  va_start (arg, format);
+  done = __vfwscanf_internal (f, format, arg,
+			      SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+  va_end (arg);
+
+  return done;
+}
diff --git a/wcsmbs/isoc23_vfwscanf.c b/wcsmbs/isoc23_vfwscanf.c
new file mode 100644
index 0000000000..b8d3a66080
--- /dev/null
+++ b/wcsmbs/isoc23_vfwscanf.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libioP.h>
+#include <stdio.h>
+#include <wchar.h>
+
+/* Read formatted input from STREAM according to the format string FORMAT.  */
+int
+__isoc23_vfwscanf (FILE *stream, const wchar_t *format, va_list args)
+{
+  return __vfwscanf_internal (stream, format, args,
+			      SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+}
+libc_hidden_def (__isoc23_vfwscanf)
diff --git a/wcsmbs/isoc23_vswscanf.c b/wcsmbs/isoc23_vswscanf.c
new file mode 100644
index 0000000000..bcde625cc1
--- /dev/null
+++ b/wcsmbs/isoc23_vswscanf.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1993-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <wchar.h>
+#include <libio/strfile.h>
+
+int
+__isoc23_vswscanf (const wchar_t *string, const wchar_t *format, va_list args)
+{
+  _IO_strfile sf;
+  struct _IO_wide_data wd;
+  FILE *f = _IO_strfile_readw (&sf, &wd, string);
+  return __vfwscanf_internal (f, format, args,
+			      SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+}
+libc_hidden_def (__isoc23_vswscanf)
diff --git a/wcsmbs/isoc23_vwscanf.c b/wcsmbs/isoc23_vwscanf.c
new file mode 100644
index 0000000000..8a038f47c6
--- /dev/null
+++ b/wcsmbs/isoc23_vwscanf.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <libioP.h>
+#include <stdio.h>
+#include <wchar.h>
+
+/* Read formatted input from STDIN according to the format string FORMAT.  */
+int
+__isoc23_vwscanf (const wchar_t *format, va_list args)
+{
+  return __vfwscanf_internal (stdin, format, args,
+			      SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+}
diff --git a/wcsmbs/isoc23_wscanf.c b/wcsmbs/isoc23_wscanf.c
new file mode 100644
index 0000000000..d97b3e5d98
--- /dev/null
+++ b/wcsmbs/isoc23_wscanf.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <libioP.h>
+#include <wchar.h>
+
+
+/* Read formatted input from stdin according to the format string FORMAT.  */
+int
+__isoc23_wscanf (const wchar_t *format, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, format);
+  done = __vfwscanf_internal (stdin, format, arg,
+			      SCANF_ISOC99_A | SCANF_ISOC23_BIN_CST);
+  va_end (arg);
+
+  return done;
+}
diff --git a/wcsmbs/tst-wscanf-binary-c11.c b/wcsmbs/tst-wscanf-binary-c11.c
new file mode 100644
index 0000000000..4a1b8e2280
--- /dev/null
+++ b/wcsmbs/tst-wscanf-binary-c11.c
@@ -0,0 +1,28 @@
+/* Test wscanf functions with C2X binary integers (wide strings,
+   no extensions to C11).
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#undef _GNU_SOURCE
+
+#define CHAR wchar_t
+#define FNW w
+#define L_(C) L ## C
+#define TEST_C2X 0
+#define STD "c11"
+
+#include "../stdio-common/tst-scanf-binary-main.c"
diff --git a/wcsmbs/tst-wscanf-binary-c2x.c b/wcsmbs/tst-wscanf-binary-c2x.c
new file mode 100644
index 0000000000..80e34e5b69
--- /dev/null
+++ b/wcsmbs/tst-wscanf-binary-c2x.c
@@ -0,0 +1,31 @@
+/* Test wscanf functions with C2X binary integers (wide strings,
+   no extensions).
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* Some versions of GCC supported for building glibc do not support
+   -std=c2x.  */
+#undef _GNU_SOURCE
+#define _ISOC2X_SOURCE
+
+#define CHAR wchar_t
+#define FNW w
+#define L_(C) L ## C
+#define TEST_C2X 1
+#define STD "c2x"
+
+#include "../stdio-common/tst-scanf-binary-main.c"
diff --git a/wcsmbs/tst-wscanf-binary-gnu11.c b/wcsmbs/tst-wscanf-binary-gnu11.c
new file mode 100644
index 0000000000..fbf589b130
--- /dev/null
+++ b/wcsmbs/tst-wscanf-binary-gnu11.c
@@ -0,0 +1,26 @@
+/* Test wscanf functions with C2X binary integers (wide strings,
+   GNU extensions to C11).
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define CHAR wchar_t
+#define FNW w
+#define L_(C) L ## C
+#define TEST_C2X 1
+#define STD "gnu11"
+
+#include "../stdio-common/tst-scanf-binary-main.c"
diff --git a/wcsmbs/tst-wscanf-binary-gnu89.c b/wcsmbs/tst-wscanf-binary-gnu89.c
new file mode 100644
index 0000000000..b740d4841f
--- /dev/null
+++ b/wcsmbs/tst-wscanf-binary-gnu89.c
@@ -0,0 +1,26 @@
+/* Test wscanf functions with C2X binary integers (wide strings,
+   GNU extensions to C89).
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define CHAR wchar_t
+#define FNW w
+#define L_(C) L ## C
+#define TEST_C2X 0
+#define STD "gnu89"
+
+#include "../stdio-common/tst-scanf-binary-main.c"
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 44d493a56c..3d1822f6f5 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -762,9 +762,34 @@ extern int swscanf (const wchar_t *__restrict __s,
    functions are at alternative names.  When __LDBL_COMPAT or
    __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in
    bits/wchar-ldbl.h.  */
-#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
+# if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
      && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
-#  ifdef __REDIRECT
+#  if __GLIBC_USE (C2X_STRTOL)
+#   ifdef __REDIRECT
+extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
+				 const wchar_t *__restrict __format, ...),
+		       __isoc23_fwscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
+extern int __REDIRECT (wscanf, (const wchar_t *__restrict __format, ...),
+		       __isoc23_wscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
+extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s,
+				     const wchar_t *__restrict __format,
+				     ...), __isoc23_swscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
+#   else
+extern int __isoc23_fwscanf (__FILE *__restrict __stream,
+			     const wchar_t *__restrict __format, ...);
+extern int __isoc23_wscanf (const wchar_t *__restrict __format, ...);
+extern int __isoc23_swscanf (const wchar_t *__restrict __s,
+			     const wchar_t *__restrict __format, ...)
+     __THROW;
+#    define fwscanf __isoc23_fwscanf
+#    define wscanf __isoc23_wscanf
+#    define swscanf __isoc23_swscanf
+#   endif
+#  else
+#   ifdef __REDIRECT
 extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
 				 const wchar_t *__restrict __format, ...),
 		       __isoc99_fwscanf)
@@ -776,16 +801,17 @@ extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s,
 				     const wchar_t *__restrict __format,
 				     ...), __isoc99_swscanf)
      /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
-#  else
+#   else
 extern int __isoc99_fwscanf (__FILE *__restrict __stream,
 			     const wchar_t *__restrict __format, ...);
 extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...);
 extern int __isoc99_swscanf (const wchar_t *__restrict __s,
 			     const wchar_t *__restrict __format, ...)
      __THROW;
-#   define fwscanf __isoc99_fwscanf
-#   define wscanf __isoc99_wscanf
-#   define swscanf __isoc99_swscanf
+#    define fwscanf __isoc99_fwscanf
+#    define wscanf __isoc99_wscanf
+#    define swscanf __isoc99_swscanf
+#   endif
 #  endif
 # endif
 
@@ -818,7 +844,34 @@ extern int vswscanf (const wchar_t *__restrict __s,
      && (!defined __LDBL_COMPAT || !defined __REDIRECT) \
      && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) \
      && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
-#  ifdef __REDIRECT
+#  if __GLIBC_USE (C2X_STRTOL)
+#   ifdef __REDIRECT
+extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
+				  const wchar_t *__restrict __format,
+				  __gnuc_va_list __arg), __isoc23_vfwscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
+extern int __REDIRECT (vwscanf, (const wchar_t *__restrict __format,
+				 __gnuc_va_list __arg), __isoc23_vwscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
+extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s,
+				      const wchar_t *__restrict __format,
+				      __gnuc_va_list __arg), __isoc23_vswscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
+#   else
+extern int __isoc23_vfwscanf (__FILE *__restrict __s,
+			      const wchar_t *__restrict __format,
+			      __gnuc_va_list __arg);
+extern int __isoc23_vwscanf (const wchar_t *__restrict __format,
+			     __gnuc_va_list __arg);
+extern int __isoc23_vswscanf (const wchar_t *__restrict __s,
+			      const wchar_t *__restrict __format,
+			      __gnuc_va_list __arg) __THROW;
+#    define vfwscanf __isoc23_vfwscanf
+#    define vwscanf __isoc23_vwscanf
+#    define vswscanf __isoc23_vswscanf
+#   endif
+#  else
+#   ifdef __REDIRECT
 extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
 				  const wchar_t *__restrict __format,
 				  __gnuc_va_list __arg), __isoc99_vfwscanf)
@@ -830,7 +883,7 @@ extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s,
 				      const wchar_t *__restrict __format,
 				      __gnuc_va_list __arg), __isoc99_vswscanf)
      /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
-#  else
+#   else
 extern int __isoc99_vfwscanf (__FILE *__restrict __s,
 			      const wchar_t *__restrict __format,
 			      __gnuc_va_list __arg);
@@ -839,9 +892,10 @@ extern int __isoc99_vwscanf (const wchar_t *__restrict __format,
 extern int __isoc99_vswscanf (const wchar_t *__restrict __s,
 			      const wchar_t *__restrict __format,
 			      __gnuc_va_list __arg) __THROW;
-#   define vfwscanf __isoc99_vfwscanf
-#   define vwscanf __isoc99_vwscanf
-#   define vswscanf __isoc99_vswscanf
+#    define vfwscanf __isoc99_vfwscanf
+#    define vwscanf __isoc99_vwscanf
+#    define vswscanf __isoc99_vswscanf
+#   endif
 #  endif
 # endif
 

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Libc-alpha mailing list