From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id D92D83856DCC; Fri, 29 Apr 2022 14:00:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D92D83856DCC Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Remove wchar-ldbl.h X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 6c40ba52d40950d9bfb9b04e641c9bf21a980e7b X-Git-Newrev: 24106f786c1c5c388b2754f44a6069ba7a4e55c8 Message-Id: <20220429140037.D92D83856DCC@sourceware.org> Date: Fri, 29 Apr 2022 14:00:37 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2022 14:00:38 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=24106f786c1c5c388b2754f44a6069ba7a4e55c8 commit 24106f786c1c5c388b2754f44a6069ba7a4e55c8 Author: Adhemerval Zanella Date: Fri Feb 25 11:02:21 2022 -0300 Remove wchar-ldbl.h The functions which require different alias to long double depending of the ABI now uses a set os macros that defines the expected alias on the function prototype, instead of redefine them using the __LDBL_REDIR_DEC macros. A new macro, __REDIRECT_LDBL128, is used for function where only the binary128 alias is required. Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. Diff: --- include/bits/wchar-ldbl.h | 1 - misc/sys/cdefs.h | 13 +++ wcsmbs/Makefile | 2 +- wcsmbs/bits/wchar-ldbl.h | 91 ------------------ wcsmbs/bits/wchar2.h | 70 +++++++------- wcsmbs/wchar.h | 229 +++++++++++++++++++++++++++------------------- 6 files changed, 183 insertions(+), 223 deletions(-) diff --git a/include/bits/wchar-ldbl.h b/include/bits/wchar-ldbl.h deleted file mode 100644 index 29baa2f4d5..0000000000 --- a/include/bits/wchar-ldbl.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 422ca351f2..419a09a3a7 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -567,16 +567,26 @@ # ifdef __REDIRECT # define __REDIRECT_LDBL(name, proto, ieee128, compat) \ __REDIRECT_LDBL1 (name, , , proto, ieee128) +# define __REDIRECT_LDBL128(name, proto) \ + __REDIRECT_LDBL1 (name, , , proto, __##name##ieee128) # ifdef __cplusplus # define __REDIRECT_LDBL_NTH(name, proto, ieee128, compat) \ __REDIRECT_LDBL1 (name, __THROW, , proto, ieee128) +# define __REDIRECT_LDBL128_NTH(name, proto) \ + __REDIRECT_LDBL1 (name, __THROW, , proto, __##name##ieee128) # define __REDIRECT_LDBL_NTHNL(name, proto, ieee128, compat) \ __REDIRECT_LDBL1 (name, __THROWNL, , proto, ieee128) +# define __REDIRECT_LDBL128_NTHNL(name, proto) \ + __REDIRECT_LDBL1 (name, __THROWNL, , proto, __##name##ieee128) # else # define __REDIRECT_LDBL_NTH(name, proto, ieee128, compat) \ __REDIRECT_LDBL1 (name, , __THROW, proto, ieee128) +# define __REDIRECT_LDBL128_NTH(name, proto) \ + __REDIRECT_LDBL1 (name, , __THROW, proto, __##name##ieee128) # define __REDIRECT_LDBL_NTHNL(name, proto, ieee128, compat) \ __REDIRECT_LDBL1 (name, , __THROWNL, proto, ieee128) +# define __REDIRECT_LDBL128_NTHNL(name, proto) \ + __REDIRECT_LDBL1 (name, , __THROWNL, proto, __##name##ieee128) # endif /* __cplusplus */ # else _Static_assert (0, "IEEE 128-bits long double requires redirection on this platform"); @@ -606,6 +616,9 @@ _Static_assert (0, "Compat long double requires redirection on this platform"); # define __REDIRECT_LDBL(name, proto, ieee128, compat) name proto # define __REDIRECT_LDBL_NTH(name, proto, ieee128, compat) name proto __THROW # define __REDIRECT_LDBL_NTHNL(name, proto, ieee128, compat) name proto __THROWNL +# define __REDIRECT_LDBL128(name, proto) name proto +# define __REDIRECT_LDBL128_NTH(name, proto) name proto __THROW +# define __REDIRECT_LDBL128_NTHNL(name, proto) name proto __THROWNL #endif #if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile index df9a85f4a9..b67202526d 100644 --- a/wcsmbs/Makefile +++ b/wcsmbs/Makefile @@ -22,7 +22,7 @@ subdir := wcsmbs include ../Makeconfig -headers := wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h \ +headers := wchar.h bits/wchar.h bits/wchar2.h uchar.h \ bits/types/__mbstate_t.h bits/types/mbstate_t.h bits/types/wint_t.h routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \ diff --git a/wcsmbs/bits/wchar-ldbl.h b/wcsmbs/bits/wchar-ldbl.h deleted file mode 100644 index f0d8506f83..0000000000 --- a/wcsmbs/bits/wchar-ldbl.h +++ /dev/null @@ -1,91 +0,0 @@ -/* -mlong-double-64 compatibility mode for functions. - Copyright (C) 2006-2022 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 - . */ - -#ifndef _WCHAR_H -# error "Never include directly; use instead." -#endif - -#if defined __USE_ISOC95 || defined __USE_UNIX98 -__LDBL_REDIR_DECL (fwprintf); -__LDBL_REDIR_DECL (wprintf); -__LDBL_REDIR_DECL (swprintf); -__LDBL_REDIR_DECL (vfwprintf); -__LDBL_REDIR_DECL (vwprintf); -__LDBL_REDIR_DECL (vswprintf); -# if !__GLIBC_USE (DEPRECATED_SCANF) -# if defined __LDBL_COMPAT -__LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc99_fwscanf) -__LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf) -__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf) -# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 -__LDBL_REDIR1_DECL (fwscanf, __isoc99_fwscanfieee128) -__LDBL_REDIR1_DECL (wscanf, __isoc99_wscanfieee128) -__LDBL_REDIR1_DECL (swscanf, __isoc99_swscanfieee128) -# else -# error bits/stdlib-ldbl.h included when no ldbl redirections are required. -# endif -# else -__LDBL_REDIR_DECL (fwscanf); -__LDBL_REDIR_DECL (wscanf); -__LDBL_REDIR_DECL (swscanf); -# endif -#endif - -#ifdef __USE_ISOC99 -# ifdef __LDBL_COMPAT -__LDBL_REDIR1_DECL (wcstold, wcstod); -# else -__LDBL_REDIR1_DECL (wcstold, __wcstoieee128) -# endif -# if !__GLIBC_USE (DEPRECATED_SCANF) -# if defined __LDBL_COMPAT -__LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf) -__LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf) -__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf) -# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 -__LDBL_REDIR1_DECL (vfwscanf, __isoc99_vfwscanfieee128) -__LDBL_REDIR1_DECL (vwscanf, __isoc99_vwscanfieee128) -__LDBL_REDIR1_DECL (vswscanf, __isoc99_vswscanfieee128) -# else -# error bits/stdlib-ldbl.h included when no ldbl redirections are required. -# endif -# else -__LDBL_REDIR_DECL (vfwscanf); -__LDBL_REDIR_DECL (vwscanf); -__LDBL_REDIR_DECL (vswscanf); -# endif -#endif - -#ifdef __USE_GNU -# ifdef __LDBL_COMPAT -__LDBL_REDIR1_DECL (wcstold_l, wcstod_l); -# else -__LDBL_REDIR1_DECL (wcstold_l, __wcstoieee128_l) -# endif -#endif - -#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function -__LDBL_REDIR2_DECL (swprintf_chk) -__LDBL_REDIR2_DECL (vswprintf_chk) -# if __USE_FORTIFY_LEVEL > 1 -__LDBL_REDIR2_DECL (fwprintf_chk) -__LDBL_REDIR2_DECL (wprintf_chk) -__LDBL_REDIR2_DECL (vfwprintf_chk) -__LDBL_REDIR2_DECL (vwprintf_chk) -# endif -#endif diff --git a/wcsmbs/bits/wchar2.h b/wcsmbs/bits/wchar2.h index f2dca7711a..548deeedbf 100644 --- a/wcsmbs/bits/wchar2.h +++ b/wcsmbs/bits/wchar2.h @@ -227,19 +227,18 @@ __NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, return __wcsncat_alias (__dest, __src, __n); } - -extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, - int __flag, size_t __s_len, - const wchar_t *__restrict __format, ...) - __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */; - -extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, - const wchar_t *__restrict __fmt, ...) -#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 - __asm__ (__ASMNAME ("swprintf")) -#endif - ; - +extern int __REDIRECT_LDBL_NTH (__swprintf_chk, (wchar_t *__restrict __s, + size_t __n, + int __flag, size_t __s_len, + const wchar_t *__restrict __format, + ...), + __swprintf_chkieee128, __nldbl___swprintf_chk); +extern int __REDIRECT_LDBL_NTH (__vswprintf_chk, (wchar_t *__restrict __s, + size_t __n, + int __flag, size_t __s_len, + const wchar_t *__restrict __format, + __gnuc_va_list __arg), + __vswprintf_chkieee128, __nldbl___vswprintf_chk); #ifdef __va_arg_pack __fortify_function int @@ -250,7 +249,7 @@ __NTH (swprintf (wchar_t *__restrict __s, size_t __n, if (sz != (size_t) -1 || __USE_FORTIFY_LEVEL > 1) return __swprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, sz / sizeof (wchar_t), __fmt, __va_arg_pack ()); - return __swprintf_alias (__s, __n, __fmt, __va_arg_pack ()); + return swprintf (__s, __n, __fmt, __va_arg_pack ()); } #elif !defined __cplusplus /* XXX We might want to have support in gcc for swprintf. */ @@ -261,20 +260,6 @@ __NTH (swprintf (wchar_t *__restrict __s, size_t __n, : swprintf (s, n, __VA_ARGS__)) #endif -extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, - int __flag, size_t __s_len, - const wchar_t *__restrict __format, - __gnuc_va_list __arg) - __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */; - -extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, - const wchar_t *__restrict __fmt, - __gnuc_va_list __ap) -#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 - __asm__ (__ASMNAME ("vswprintf")) -#endif - ; - __fortify_function int __NTH (vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap)) @@ -283,21 +268,30 @@ __NTH (vswprintf (wchar_t *__restrict __s, size_t __n, if (sz != (size_t) -1 || __USE_FORTIFY_LEVEL > 1) return __vswprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, sz / sizeof (wchar_t), __fmt, __ap); - return __vswprintf_alias (__s, __n, __fmt, __ap); + return vswprintf (__s, __n, __fmt, __ap); } #if __USE_FORTIFY_LEVEL > 1 -extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, - const wchar_t *__restrict __format, ...); -extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format, - ...); -extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, - const wchar_t *__restrict __format, - __gnuc_va_list __ap); -extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format, - __gnuc_va_list __ap); +extern int __REDIRECT_LDBL (__fwprintf_chk, (__FILE *__restrict __stream, + int __flag, + const wchar_t *__restrict __format, + ...), + __fwprintf_chkieee128, __nldbl___fwprintf_chk); +extern int __REDIRECT_LDBL (__wprintf_chk, (int __flag, + const wchar_t *__restrict __format, + ...), + __wprintf_chkieee128, __nldbl___wprintf_chk); +extern int __REDIRECT_LDBL (__vfwprintf_chk, (__FILE *__restrict __stream, + int __flag, + const wchar_t *__restrict __format, + __gnuc_va_list __ap), + __vfwprintf_chkieee128, __nldbl___vfwprintf_chk); +extern int __REDIRECT_LDBL (__vwprintf_chk, (int __flag, + const wchar_t *__restrict __format, + __gnuc_va_list __ap), + __vwprintf_chkieee128, __nldbl___vwprintf_chk); # ifdef __va_arg_pack __fortify_function int diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index 5d6a40853d..27406d0edb 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -382,8 +382,10 @@ extern double wcstod (const wchar_t *__restrict __nptr, /* Likewise for `float' and `long double' sizes of floating-point numbers. */ extern float wcstof (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -extern long double wcstold (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) __THROW; +extern long double __REDIRECT_LDBL_NTH (wcstold, + (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr), + __wcstoieee128, wcstod); #endif /* C99 */ /* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */ @@ -498,9 +500,12 @@ extern float wcstof_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; -extern long double wcstold_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - locale_t __loc) __THROW; + +extern long double __REDIRECT_LDBL_NTH (wcstold_l, + (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc), + __wcstoieee128_l, wcstod_l); # if __HAVE_FLOAT16 extern _Float16 wcstof16_l (const wchar_t *__restrict __nptr, @@ -587,73 +592,61 @@ extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW /* Select orientation for stream. */ extern int fwide (__FILE *__fp, int __mode) __THROW; - /* Write formatted output to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int fwprintf (__FILE *__restrict __stream, - const wchar_t *__restrict __format, ...) +extern int __REDIRECT_LDBL128 (fwprintf, (__FILE *__restrict __stream, + const wchar_t *__restrict __format, + ...)) /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int wprintf (const wchar_t *__restrict __format, ...) +extern int __REDIRECT_LDBL128 (wprintf, (const wchar_t *__restrict __format, ...)) /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */; /* Write formatted output of at most N characters to S. */ -extern int swprintf (wchar_t *__restrict __s, size_t __n, - const wchar_t *__restrict __format, ...) - __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */; +extern int __REDIRECT_LDBL128_NTH (swprintf, (wchar_t *__restrict __s, size_t __n, + const wchar_t *__restrict __format, + ...)) + /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */; /* Write formatted output to S from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vfwprintf (__FILE *__restrict __s, - const wchar_t *__restrict __format, - __gnuc_va_list __arg) +extern int __REDIRECT_LDBL128 (vfwprintf, (__FILE *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg)) /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */; /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vwprintf (const wchar_t *__restrict __format, - __gnuc_va_list __arg) +extern int __REDIRECT_LDBL128 (vwprintf, (const wchar_t *__restrict __format, + __gnuc_va_list __arg)) /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */; /* Write formatted output of at most N character to S from argument list ARG. */ -extern int vswprintf (wchar_t *__restrict __s, size_t __n, - const wchar_t *__restrict __format, - __gnuc_va_list __arg) - __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; - - -/* Read formatted input from STREAM. - - This function is a possible cancellation point and therefore not - marked with __THROW. */ -extern int fwscanf (__FILE *__restrict __stream, - const wchar_t *__restrict __format, ...) - /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; -/* Read formatted input from stdin. - - This function is a possible cancellation point and therefore not - marked with __THROW. */ -extern int wscanf (const wchar_t *__restrict __format, ...) - /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; -/* Read formatted input from S. */ -extern int swscanf (const wchar_t *__restrict __s, - const wchar_t *__restrict __format, ...) - __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; - -/* For historical reasons, the C99-compliant versions of the scanf - functions are at alternative names. When __LDBL_COMPAT or - __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in - bits/wchar-ldbl.h. */ -#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \ - && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 -# ifdef __REDIRECT +extern int __REDIRECT_LDBL128_NTH (vswprintf, (wchar_t *__restrict __s, size_t __n, + const wchar_t *__restrict __format, + __gnuc_va_list __arg)) + /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; + +# if !__GLIBC_USE (DEPRECATED_SCANF) +# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 || defined __LDBL_COMPAT +extern int __REDIRECT_LDBL (fwscanf, (__FILE *__restrict __stream, + const wchar_t *__restrict __format, ...), + __isoc99_fwscanfieee128, __nldbl___isoc99_fwscanf); +extern int __REDIRECT_LDBL (wscanf, (const wchar_t *__restrict __format, ...), + __isoc99_wscanfieee128,__nldbl___isoc99_wscanf); +extern int __REDIRECT_LDBL_NTH (swscanf, (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + ...), + __isoc99_swscanfieee128, __nldbl___isoc99_swscanf); +# else +# ifdef __REDIRECT extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...), __isoc99_fwscanf) @@ -665,72 +658,129 @@ extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...), __isoc99_swscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; -# else +# else extern int __isoc99_fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...); extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...); extern int __isoc99_swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) __THROW; -# define fwscanf __isoc99_fwscanf -# define wscanf __isoc99_wscanf -# define swscanf __isoc99_swscanf +# define fwscanf __isoc99_fwscanf +# define wscanf __isoc99_wscanf +# define swscanf __isoc99_swscanf +# endif /* __REDIRECT */ +# endif +# else +# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 || defined __LDBL_COMPAT +extern int __REDIRECT_LDBL (fwscanf, (__FILE *__restrict __stream, + const wchar_t *__restrict __format, ...), + __fwscanfieee128, __nldbl_fwscanf); +extern int __REDIRECT_LDBL (wscanf, (const wchar_t *__restrict __format, ...), + __wscanfieee128,__nldbl_wscanf); +extern int __REDIRECT_LDBL_NTH (swscanf, (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + ...), + __swscanfieee128, __nldbl_swscanf); +# else +/* Read formatted input from STREAM. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int fwscanf (__FILE *__restrict __stream, + const wchar_t *__restrict __format, ...) + /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; +/* Read formatted input from stdin. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int wscanf (const wchar_t *__restrict __format, ...) + /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; +/* Read formatted input from S. */ +extern int swscanf (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, ...) + __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; # endif # endif #endif /* Use ISO C95, C99 and Unix98. */ #ifdef __USE_ISOC99 +# if !__GLIBC_USE (DEPRECATED_SCANF) +# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 || defined __LDBL_COMPAT +extern int __REDIRECT_LDBL (vfwscanf, (__FILE *__restrict __stream, + const wchar_t *__restrict __format, + __gnuc_va_list __arg), + __isoc99_vfwscanfieee128, __nldbl___isoc99_vfwscanf); +extern int __REDIRECT_LDBL (vwscanf, (const wchar_t *__restrict __format, + __gnuc_va_list __arg), + __isoc99_vwscanfieee128, __nldbl___isoc99_vwscanf); +extern int __REDIRECT_LDBL_NTH (vswscanf, (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg), + __isoc99_vswscanfieee128, + __nldbl___isoc99_vswscanf); +# else +# 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) + /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; +extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg), __isoc99_vswscanf) + /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; +# else +extern int __isoc99_vfwscanf (__FILE *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg); +extern int __isoc99_vwscanf (const wchar_t *__restrict __format, + __gnuc_va_list __arg); +extern int __isoc99_vswscanf (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg) __THROW; +# define vfwscanf __isoc99_vfwscanf +# define vwscanf __isoc99_vwscanf +# define vswscanf __isoc99_vswscanf +# endif /* __REDIRECT */ +# endif +# else +# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 || defined __LDBL_COMPAT +extern int __REDIRECT_LDBL (vfwscanf, (__FILE *__restrict __stream, + const wchar_t *__restrict __format, + __gnuc_va_list __arg), + __vfwscanfieee128, __nldbl_vfwscanf); +extern int __REDIRECT_LDBL (vwscanf, (const wchar_t *__restrict __format, + __gnuc_va_list __arg), + __vwscanfieee128, __nldbl_vwscanf); +extern int __REDIRECT_LDBL_NTH (vswscanf, (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg), + __vswscanfieee128, + __nldbl_vswscanf); +# else /* Read formatted input from S into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwscanf (__FILE *__restrict __s, - const wchar_t *__restrict __format, - __gnuc_va_list __arg) + const wchar_t *__restrict __format, + __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; /* Read formatted input from stdin into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vwscanf (const wchar_t *__restrict __format, - __gnuc_va_list __arg) + __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) + const wchar_t *__restrict __format, + __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; - -/* 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) \ - && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 -# 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) - /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; -extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s, - const wchar_t *__restrict __format, - __gnuc_va_list __arg), __isoc99_vswscanf) - /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; -# else -extern int __isoc99_vfwscanf (__FILE *__restrict __s, - const wchar_t *__restrict __format, - __gnuc_va_list __arg); -extern int __isoc99_vwscanf (const wchar_t *__restrict __format, - __gnuc_va_list __arg); -extern int __isoc99_vswscanf (const wchar_t *__restrict __s, - const wchar_t *__restrict __format, - __gnuc_va_list __arg) __THROW; -# define vfwscanf __isoc99_vfwscanf -# define vwscanf __isoc99_vwscanf -# define vswscanf __isoc99_vswscanf # endif # endif @@ -867,11 +917,6 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, # include #endif -#include -#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 -# include -#endif - __END_DECLS #endif /* wchar.h */