Message ID | gerrit.1574346742000.I706b344a3fb50be017cdab9251d9da18a3ba8c60@gnutoolchain-gerrit.osci.io |
---|---|
State | New |
Headers | show |
Series | [review] Use DEPRECATED_SCANF macro for remaining C99-compliant scanf functions | expand |
Florian Weimer has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/698 ...................................................................... Patch Set 1: Code-Review+1 (1 comment) | --- wcsmbs/wchar.h | +++ wcsmbs/wchar.h | @@ -680,18 +680,18 @@ extern int vwscanf (const wchar_t *__restrict __format, | __gnuc_va_list __arg) | /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; | /* Read formatted input from S into argument list ARG. */ | extern int vswscanf (const wchar_t *__restrict __s, | const wchar_t *__restrict __format, | __gnuc_va_list __arg) | __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; | | -# if !defined __USE_GNU \ | +# if !__GLIBC_USE (DEPRECATED_SCANF) \ PS1, Line 688: Maybe reference fwscanf above here in a comment? | && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ | && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) | # ifdef __REDIRECT | extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s, | const wchar_t *__restrict __format, | __gnuc_va_list __arg), __isoc99_vfwscanf) | /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; | extern int __REDIRECT (vwscanf, (const wchar_t *__restrict __format, | __gnuc_va_list __arg), __isoc99_vwscanf)
Gabriel F. T. Gomes has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/698 ...................................................................... Patch Set 1: (1 comment) | --- wcsmbs/wchar.h | +++ wcsmbs/wchar.h | @@ -680,18 +680,18 @@ extern int vwscanf (const wchar_t *__restrict __format, | __gnuc_va_list __arg) | /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; | /* Read formatted input from S into argument list ARG. */ | extern int vswscanf (const wchar_t *__restrict __s, | const wchar_t *__restrict __format, | __gnuc_va_list __arg) | __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; | | -# if !defined __USE_GNU \ | +# if !__GLIBC_USE (DEPRECATED_SCANF) \ PS1, Line 688: For consistency with stdio.h, I'll add the following message: /* Same redirection as above for the v*wscanf family. */ | && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ | && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) | # ifdef __REDIRECT | extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s, | const wchar_t *__restrict __format, | __gnuc_va_list __arg), __isoc99_vfwscanf) | /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; | extern int __REDIRECT (vwscanf, (const wchar_t *__restrict __format, | __gnuc_va_list __arg), __isoc99_vwscanf)
Florian Weimer has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/698 ...................................................................... Patch Set 2: Code-Review+2
diff --git a/include/wchar.h b/include/wchar.h index 2cb4495..c792b38 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -114,8 +114,6 @@ 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_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. */ diff --git a/libio/iovswscanf.c b/libio/iovswscanf.c index b0759ec..3876ce7 100644 --- a/libio/iovswscanf.c +++ b/libio/iovswscanf.c @@ -40,6 +40,4 @@ 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) diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index 4b731eb..3ba9488 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -685,7 +685,7 @@ __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; -# if !defined __USE_GNU \ +# if !__GLIBC_USE (DEPRECATED_SCANF) \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) # ifdef __REDIRECT