diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-22 13:05:41 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-22 13:05:41 -0400 |
commit | c4dd0c98bae8e3583f68ba5b30db491055ab2322 (patch) | |
tree | 7b64cb99e6bc4cc9faff8207d8f78a5e72fb58d2 /include | |
parent | 9448b0513e2eec020fbca9c10412b83df5027a16 (diff) | |
download | musl-c4dd0c98bae8e3583f68ba5b30db491055ab2322.tar.gz musl-c4dd0c98bae8e3583f68ba5b30db491055ab2322.tar.bz2 musl-c4dd0c98bae8e3583f68ba5b30db491055ab2322.tar.xz musl-c4dd0c98bae8e3583f68ba5b30db491055ab2322.zip |
change wint_t to unsigned
aside from the obvious C++ ABI purpose for this change, it also brings
musl into alignment with the compiler's idea of the definition of
wint_t (use in -Wformat), and makes the situation less awkward on ARM,
where wchar_t is unsigned.
internal code using wint_t and WEOF was checked against this change,
and while a few cases of storing WEOF into wchar_t were found, they
all seem to operate properly with the natural conversion from unsigned
to signed.
Diffstat (limited to 'include')
-rw-r--r-- | include/stdint.h | 4 | ||||
-rw-r--r-- | include/wchar.h | 2 | ||||
-rw-r--r-- | include/wctype.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/stdint.h b/include/stdint.h index a783ad96..ad6aaead 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -78,8 +78,8 @@ typedef uint64_t uint_least64_t; #define INTMAX_MAX INT64_MAX #define UINTMAX_MAX UINT64_MAX -#define WINT_MIN INT32_MIN -#define WINT_MAX INT32_MAX +#define WINT_MIN 0 +#define WINT_MAX UINT32_MAX #if L'\0'-1 > 0 #define WCHAR_MAX (0xffffffffu+L'\0') diff --git a/include/wchar.h b/include/wchar.h index a6742e37..96cd4447 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -36,7 +36,7 @@ extern "C" { #define NULL 0L #undef WEOF -#define WEOF (-1) +#define WEOF 0xffffffffU typedef struct __mbstate_t { diff --git a/include/wctype.h b/include/wctype.h index 5640eddb..8c544f24 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -20,7 +20,7 @@ extern "C" { typedef const int * wctrans_t; #undef WEOF -#define WEOF (-1) +#define WEOF 0xffffffffU #undef iswdigit |