about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/stdio.h29
-rw-r--r--include/wchar.h16
2 files changed, 43 insertions, 2 deletions
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 ea7888f605..fafe7c8e9b 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -288,8 +288,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,