]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use DEPRECATED_SCANF macro for remaining C99-compliant scanf functions
authorGabriel F. T. Gomes <gabrielftg@linux.ibm.com>
Thu, 14 Nov 2019 12:25:14 +0000 (09:25 -0300)
committerGabriel F. T. Gomes <gabrielftg@linux.ibm.com>
Fri, 22 Nov 2019 18:29:21 +0000 (15:29 -0300)
When the commit

commit 03992356e6fedc5a5e9d32df96c1a2c79ea28a8f
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Feb 10 11:58:35 2018 -0500

    Use C99-compliant scanf under _GNU_SOURCE with modern compilers.

added the DEPRECATED_SCANF macro to select when redirections of *scanf
functions to their ISO C99 compliant versions should happen, it
accidentally missed doing it for vfwscanf, vwscanf, and vswscanf.

Tested for powerpc64le and with build-many-glibcs (i686-linux-gnu and
nios2-linux-gnu are failing with current master, and with this patch,
but I didn't see a regression).

Change-Id: I706b344a3fb50be017cdab9251d9da18a3ba8c60

include/wchar.h
libio/iovswscanf.c
wcsmbs/wchar.h

index 2cb44954fc2da9a429b38b8f97452dec8f3a0ae5..c792b3894370145849b9f36b8ca15ff6c731246e 100644 (file)
@@ -114,8 +114,6 @@ libc_hidden_proto (fputws_unlocked)
 libc_hidden_proto (putwc_unlocked)
 libc_hidden_proto (putwc)
 
-libc_hidden_proto (vswscanf)
-
 libc_hidden_proto (mbrtowc)
 libc_hidden_proto (wcrtomb)
 extern int __wcscmp (const wchar_t *__s1, const wchar_t *__s2)
@@ -237,11 +235,7 @@ 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 __vswscanf (const wchar_t *__restrict __s,
-                      const wchar_t *__restrict __format,
-                      __gnuc_va_list __arg) __THROW;
 libc_hidden_proto (__isoc99_vswscanf)
-libc_hidden_proto (__vswscanf)
 libc_hidden_proto (__isoc99_vfwscanf)
 
 /* Internal functions.  */
index b0759ec862255696c6ece7454a1a5ea8b9ac0696..3876ce7e30d59899bc3e3b1d82a739fac425ed53 100644 (file)
@@ -40,6 +40,4 @@ __vswscanf (const wchar_t *string, const wchar_t *format, va_list args)
   FILE *f = _IO_strfile_readw (&sf, &wd, string);
   return __vfwscanf_internal (f, format, args, 0);
 }
-libc_hidden_def (__vswscanf)
-ldbl_hidden_def (__vswscanf, vswscanf)
 ldbl_weak_alias (__vswscanf, vswscanf)
index 4b731ebb515c980ed3bb99907b96460b4693860b..fc62fa3e2661cbd2c196aa3ff0cd4d8b3b7c1667 100644 (file)
@@ -685,7 +685,8 @@ extern int vswscanf (const wchar_t *__restrict __s,
                     __gnuc_va_list __arg)
      __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
 
-# if !defined __USE_GNU \
+/* Same redirection as above for the v*wscanf family.  */
+# if !__GLIBC_USE (DEPRECATED_SCANF) \
      && (!defined __LDBL_COMPAT || !defined __REDIRECT) \
      && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
 #  ifdef __REDIRECT