summaryrefslogtreecommitdiff
path: root/src/ctype/wcwidth.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-08-02 21:02:34 -0400
committerRich Felker <dalias@aerifal.cx>2012-08-02 21:02:34 -0400
commitb0fc78520d7d51ab064f629e228c27d0fa5a4b82 (patch)
tree8b45b6182aff4add283d7a6dc18dfec9bacda245 /src/ctype/wcwidth.c
parent129ca6c05d9ad155b02ed9198798c5e33673f195 (diff)
downloadmusl-b0fc78520d7d51ab064f629e228c27d0fa5a4b82.tar.gz
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/wcwidth.c')
-rw-r--r--src/ctype/wcwidth.c4
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;