about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm-compat
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm-compat')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/Makefile88
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/Versions14
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_fscanf.c36
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_fwscanf.c36
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_scanf.c36
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_sscanf.c41
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_swscanf.c41
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vfscanf.c30
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vfwscanf.c28
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vscanf.c28
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vsscanf.c32
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vswscanf.c33
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_vwscanf.c28
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc23_wscanf.c36
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-c11.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-c2x.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-gnu11.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-scanf-binary-gnu89.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-c11.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-c2x.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-gnu11.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ibm128-wscanf-binary-gnu89.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-c11.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-c2x.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-gnu11.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-scanf-binary-gnu89.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-c11.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-c2x.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-gnu11.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm-compat/tst-ieee128-wscanf-binary-gnu89.c2
30 files changed, 537 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
index 67d476383a..d4ec41bf99 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,78 @@ 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..c0679a1153 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.38 {
+    __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..6d651a5d3f
--- /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-2023 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..f9ba69ba50
--- /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-2023 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..4a128392b8
--- /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-2023 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..9845e6a282
--- /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-2023 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..b50a2bfbca
--- /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-2023 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..876cc0c6d0
--- /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-2023 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..752b245343
--- /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-2023 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..ef36bd162f
--- /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-2023 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..5524d788a7
--- /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-2023 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..4e893f2942
--- /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-2023 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..a68239d9f0
--- /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-2023 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..f596df2a39
--- /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-2023 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>