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.
#ifndef __cplusplus
TYPEDEF unsigned wchar_t;
#endif
-TYPEDEF int wint_t;
+TYPEDEF unsigned wint_t;
TYPEDEF float float_t;
TYPEDEF double double_t;
TYPEDEF long wchar_t;
#endif
#endif
-TYPEDEF long wint_t;
+TYPEDEF unsigned wint_t;
#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 0
TYPEDEF float float_t;
#ifndef __cplusplus
TYPEDEF int wchar_t;
#endif
-TYPEDEF int wint_t;
+TYPEDEF unsigned wint_t;
TYPEDEF float float_t;
TYPEDEF double double_t;
#ifndef __cplusplus
TYPEDEF int wchar_t;
#endif
-TYPEDEF int wint_t;
+TYPEDEF unsigned wint_t;
TYPEDEF float float_t;
TYPEDEF double double_t;
#ifndef __cplusplus
TYPEDEF long wchar_t;
#endif
-TYPEDEF int wint_t;
+TYPEDEF unsigned wint_t;
TYPEDEF float float_t;
TYPEDEF double double_t;
#ifndef __cplusplus
TYPEDEF int wchar_t;
#endif
-TYPEDEF int wint_t;
+TYPEDEF unsigned wint_t;
#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
TYPEDEF long double float_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')
#define NULL 0L
#undef WEOF
-#define WEOF (-1)
+#define WEOF 0xffffffffU
typedef struct __mbstate_t
{
typedef const int * wctrans_t;
#undef WEOF
-#define WEOF (-1)
+#define WEOF 0xffffffffU
#undef iswdigit