From: Rich Felker Date: Fri, 3 Aug 2012 01:02:34 +0000 (-0400) Subject: fix argument type error on wcwidth function X-Git-Tag: v0.9.3~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b0fc78520d7d51ab064f629e228c27d0fa5a4b82;p=oweals%2Fmusl.git fix argument type error on wcwidth function since the correct declaration was not visible, and since the representation of the types wchar_t and wint_t always match, a compiler would have to go out of its way to make this bug manifest, but better to fix it anyway. --- diff --git a/src/ctype/wcwidth.c b/src/ctype/wcwidth.c index ab05cfec..98f128e9 100644 --- a/src/ctype/wcwidth.c +++ b/src/ctype/wcwidth.c @@ -1,4 +1,4 @@ -#include +#include static unsigned char table[] = { #include "nonspacing.h" @@ -8,7 +8,7 @@ static unsigned char wtable[] = { #include "wide.h" }; -int wcwidth(wint_t wc) +int wcwidth(wchar_t wc) { if (wc < 0xffU) return (wc+1 & 0x7f) >= 0x21 ? 1 : wc ? -1 : 0;