From dee2bea048b688b643a9a3b44b26ca9f7a706fe8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 2 Mar 2023 19:10:37 +0000 Subject: C2x scanf binary constant handling 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). The first version was also tested for powerpc (32-bit) and powerpc64le (stdio-common/ and wcsmbs/ tests), and with build-many-glibcs.py. --- sysdeps/ieee754/ldbl-opt/Makefile | 44 ++++++ sysdeps/ieee754/ldbl-opt/Versions | 14 ++ sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 170 +++++++++++++++++++++ sysdeps/ieee754/ldbl-opt/nldbl-compat.h | 12 ++ sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fscanf.c | 15 ++ sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fwscanf.c | 15 ++ sysdeps/ieee754/ldbl-opt/nldbl-isoc23_scanf.c | 15 ++ sysdeps/ieee754/ldbl-opt/nldbl-isoc23_sscanf.c | 15 ++ sysdeps/ieee754/ldbl-opt/nldbl-isoc23_swscanf.c | 15 ++ sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfscanf.c | 8 + sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfwscanf.c | 8 + sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vscanf.c | 8 + sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vsscanf.c | 8 + sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vswscanf.c | 8 + sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vwscanf.c | 8 + sysdeps/ieee754/ldbl-opt/nldbl-isoc23_wscanf.c | 15 ++ .../ieee754/ldbl-opt/tst-nldbl-scanf-binary-c11.c | 2 + .../ieee754/ldbl-opt/tst-nldbl-scanf-binary-c2x.c | 2 + .../ldbl-opt/tst-nldbl-scanf-binary-gnu11.c | 2 + .../ldbl-opt/tst-nldbl-scanf-binary-gnu89.c | 2 + .../ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c11.c | 2 + .../ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c2x.c | 2 + .../ldbl-opt/tst-nldbl-wscanf-binary-gnu11.c | 2 + .../ldbl-opt/tst-nldbl-wscanf-binary-gnu89.c | 2 + 24 files changed, 394 insertions(+) create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_fwscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_scanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_sscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_swscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vfwscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vsscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vswscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_vwscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/nldbl-isoc23_wscanf.c create mode 100644 sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c11.c create mode 100644 sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c2x.c create mode 100644 sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu11.c create mode 100644 sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu89.c create mode 100644 sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c11.c create mode 100644 sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c2x.c create mode 100644 sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu11.c create mode 100644 sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu89.c (limited to 'sysdeps/ieee754/ldbl-opt') diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile index 1d01846..5b72474 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,43 @@ $(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 21a2db6..5345f1c 100644 --- a/sysdeps/ieee754/ldbl-opt/Versions +++ b/sysdeps/ieee754/ldbl-opt/Versions @@ -84,6 +84,20 @@ libc { __nldbl_err; __nldbl_verr; __nldbl_errx; __nldbl_verrx; __nldbl_error; __nldbl_error_at_line; } + GLIBC_2.38 { + __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 c654ebe..22112c5 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 7309e8a..d514442 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 0000000..7b5a056 --- /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 0000000..4ecb340 --- /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 0000000..90ea10c --- /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 0000000..64124e4 --- /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 0000000..da84c31 --- /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 0000000..671aa63 --- /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 0000000..b069522 --- /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 0000000..f2256f2 --- /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 0000000..96ce46b --- /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 0000000..0819b55 --- /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 0000000..f92876e --- /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 0000000..cece258 --- /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 0000000..f5bc396 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c11.c @@ -0,0 +1,2 @@ +#define STDX "nldbl-" +#include 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 0000000..4e0cf75 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-c2x.c @@ -0,0 +1,2 @@ +#define STDX "nldbl-" +#include 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 0000000..10e228e --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu11.c @@ -0,0 +1,2 @@ +#define STDX "nldbl-" +#include 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 0000000..c5da04b --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-scanf-binary-gnu89.c @@ -0,0 +1,2 @@ +#define STDX "nldbl-" +#include 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 0000000..0e66e97 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c11.c @@ -0,0 +1,2 @@ +#define STDX "nldbl-" +#include 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 0000000..7637aab --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-c2x.c @@ -0,0 +1,2 @@ +#define STDX "nldbl-" +#include 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 0000000..106ec38 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu11.c @@ -0,0 +1,2 @@ +#define STDX "nldbl-" +#include 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 0000000..61a1561 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/tst-nldbl-wscanf-binary-gnu89.c @@ -0,0 +1,2 @@ +#define STDX "nldbl-" +#include -- cgit v1.1