[PATCH 1/2] fix conflicting types (wint_t)
Corinna Vinschen
vinschen@redhat.com
Wed Jul 24 07:22:00 GMT 2019
On Jul 23 21:15, uchan0+newlib@gmail.com wrote:
> From: uchan-nos <uchan0@gmail.com>
>
> ---
> newlib/libc/string/wcwidth.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/newlib/libc/string/wcwidth.c b/newlib/libc/string/wcwidth.c
> index 62e76edc3..a4b520bbe 100644
> --- a/newlib/libc/string/wcwidth.c
> +++ b/newlib/libc/string/wcwidth.c
> @@ -225,10 +225,16 @@ __wcwidth (const wint_t ucs)
> #endif /* _MB_CAPABLE */
> }
>
> +#ifdef __CYGWIN__
> +#define WCHAR_TYPE wint_t
> +#else
> +#define WCHAR_TYPE wchar_t
> +#endif
> +
> int
> -wcwidth (const wint_t wc)
> +wcwidth (const WCHAR_TYPE wc)
> {
> - wint_t wi = wc;
> + WCHAR_TYPE wi = wc;
This is incorrect. _jp2uc() as well as __wcwidth always take a wint_t
argument.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20190724/76141d72/attachment.sig>
More information about the Newlib
mailing list