diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-08-02 21:02:34 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-08-02 21:02:34 -0400 |
commit | b0fc78520d7d51ab064f629e228c27d0fa5a4b82 (patch) | |
tree | 8b45b6182aff4add283d7a6dc18dfec9bacda245 /src/ctype | |
parent | 129ca6c05d9ad155b02ed9198798c5e33673f195 (diff) | |
download | musl-b0fc78520d7d51ab064f629e228c27d0fa5a4b82.tar.gz musl-b0fc78520d7d51ab064f629e228c27d0fa5a4b82.tar.bz2 musl-b0fc78520d7d51ab064f629e228c27d0fa5a4b82.tar.xz musl-b0fc78520d7d51ab064f629e228c27d0fa5a4b82.zip |
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.
Diffstat (limited to 'src/ctype')
-rw-r--r-- | src/ctype/wcwidth.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 <wctype.h> +#include <wchar.h> 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; |