diff --git a/arch/arm/include/types.h b/arch/arm/include/types.h index eaaac738dd..043937a84b 100644 --- a/arch/arm/include/types.h +++ b/arch/arm/include/types.h @@ -81,6 +81,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/arm64/include/types.h b/arch/arm64/include/types.h index 5d78349673..a0faaa28ca 100644 --- a/arch/arm64/include/types.h +++ b/arch/arm64/include/types.h @@ -72,6 +72,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + #if defined(__SIZE_TYPE__) /* If __SIZE_TYPE__ is defined we define ssize_t based on size_t. * We simply change "unsigned" to "signed" for this single definition diff --git a/arch/avr/include/avr/types.h b/arch/avr/include/avr/types.h index 6dedd3df05..2d11975a77 100644 --- a/arch/avr/include/avr/types.h +++ b/arch/avr/include/avr/types.h @@ -73,6 +73,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A (near) size is 2 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/avr/include/avr32/types.h b/arch/avr/include/avr32/types.h index ad3be5ba95..a763ccba30 100644 --- a/arch/avr/include/avr32/types.h +++ b/arch/avr/include/avr32/types.h @@ -70,6 +70,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/hc/include/hc12/types.h b/arch/hc/include/hc12/types.h index 2a85a1a755..62b5c0beb7 100644 --- a/arch/hc/include/hc12/types.h +++ b/arch/hc/include/hc12/types.h @@ -79,6 +79,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is two bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/hc/include/hcs12/types.h b/arch/hc/include/hcs12/types.h index 28e52459b3..9dbf3d93f0 100644 --- a/arch/hc/include/hcs12/types.h +++ b/arch/hc/include/hcs12/types.h @@ -80,6 +80,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is two bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/mips/include/types.h b/arch/mips/include/types.h index de4870bbed..d08f07e099 100644 --- a/arch/mips/include/types.h +++ b/arch/mips/include/types.h @@ -70,6 +70,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/misoc/include/types.h b/arch/misoc/include/types.h index a6d27b03ac..1a14ab6025 100644 --- a/arch/misoc/include/types.h +++ b/arch/misoc/include/types.h @@ -70,6 +70,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/or1k/include/types.h b/arch/or1k/include/types.h index 30a76756ed..3a4ad630e0 100644 --- a/arch/or1k/include/types.h +++ b/arch/or1k/include/types.h @@ -73,6 +73,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/renesas/include/m16c/types.h b/arch/renesas/include/m16c/types.h index 3b2f720015..3f2947aab6 100644 --- a/arch/renesas/include/m16c/types.h +++ b/arch/renesas/include/m16c/types.h @@ -72,6 +72,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 2 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/renesas/include/rx65n/types.h b/arch/renesas/include/rx65n/types.h index d71395d52d..fb73d2400f 100644 --- a/arch/renesas/include/rx65n/types.h +++ b/arch/renesas/include/rx65n/types.h @@ -70,6 +70,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/renesas/include/sh1/types.h b/arch/renesas/include/sh1/types.h index 36c2f2bbcd..497dc0360d 100644 --- a/arch/renesas/include/sh1/types.h +++ b/arch/renesas/include/sh1/types.h @@ -70,6 +70,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/risc-v/include/types.h b/arch/risc-v/include/types.h index 29fe8d56a6..9183cf78fa 100644 --- a/arch/risc-v/include/types.h +++ b/arch/risc-v/include/types.h @@ -78,6 +78,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* Use uintreg_t for register-width integers */ #ifdef CONFIG_ARCH_RV32 diff --git a/arch/sim/include/types.h b/arch/sim/include/types.h index d347751567..5e6083b753 100644 --- a/arch/sim/include/types.h +++ b/arch/sim/include/types.h @@ -94,6 +94,18 @@ typedef unsigned short _wchar_t; typedef int _wchar_t; #endif +#ifdef _MSC_VER +typedef unsigned short _wint_t; +#else +typedef int _wint_t; +#endif + +#ifdef _MSC_VER +typedef unsigned short _wctype_t; +#else +typedef int _wctype_t; +#endif + #if defined(__SIZE_TYPE__) /* If __SIZE_TYPE__ is defined we define ssize_t based on size_t. * We simply change "unsigned" to "signed" for this single definition diff --git a/arch/sparc/include/types.h b/arch/sparc/include/types.h index 51555a9474..2da78227b7 100644 --- a/arch/sparc/include/types.h +++ b/arch/sparc/include/types.h @@ -72,6 +72,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/tricore/include/types.h b/arch/tricore/include/types.h index 0daba00006..0158e7e104 100644 --- a/arch/tricore/include/types.h +++ b/arch/tricore/include/types.h @@ -70,6 +70,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/x86/include/i486/types.h b/arch/x86/include/i486/types.h index 970cdda70d..d72d283486 100644 --- a/arch/x86/include/i486/types.h +++ b/arch/x86/include/i486/types.h @@ -71,6 +71,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/x86_64/include/intel64/types.h b/arch/x86_64/include/intel64/types.h index 8880aa37e0..f87167174c 100644 --- a/arch/x86_64/include/intel64/types.h +++ b/arch/x86_64/include/intel64/types.h @@ -71,6 +71,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + #if defined(__SIZE_TYPE__) /* If __SIZE_TYPE__ is defined we define ssize_t based on size_t. * We simply change "unsigned" to "signed" for this single definition diff --git a/arch/xtensa/include/types.h b/arch/xtensa/include/types.h index 200b46e043..2fc02b5b62 100644 --- a/arch/xtensa/include/types.h +++ b/arch/xtensa/include/types.h @@ -70,6 +70,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/z16/include/types.h b/arch/z16/include/types.h index 1b9a51c306..e2719f5705 100644 --- a/arch/z16/include/types.h +++ b/arch/z16/include/types.h @@ -66,6 +66,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 4 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/z80/include/ez80/types.h b/arch/z80/include/ez80/types.h index 734e35351f..d852729de3 100644 --- a/arch/z80/include/ez80/types.h +++ b/arch/z80/include/ez80/types.h @@ -90,6 +90,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A pointer is 2 or 3 bytes, depending upon if the ez80 is in z80 * compatibility mode or not * diff --git a/arch/z80/include/z180/types.h b/arch/z80/include/z180/types.h index 9f58ba29d0..438c82e414 100644 --- a/arch/z80/include/z180/types.h +++ b/arch/z80/include/z180/types.h @@ -78,6 +78,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 2 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/z80/include/z8/types.h b/arch/z80/include/z8/types.h index 72e3b7164d..8baf908c97 100644 --- a/arch/z80/include/z8/types.h +++ b/arch/z80/include/z8/types.h @@ -82,6 +82,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 2 bytes */ #if defined(__SIZE_TYPE__) diff --git a/arch/z80/include/z80/types.h b/arch/z80/include/z80/types.h index f8efd7ae88..bd64f657c0 100644 --- a/arch/z80/include/z80/types.h +++ b/arch/z80/include/z80/types.h @@ -78,6 +78,9 @@ typedef __WCHAR_TYPE__ _wchar_t; typedef int _wchar_t; #endif +typedef int _wint_t; +typedef int _wctype_t; + /* A size is 2 bytes */ #if defined(__SIZE_TYPE__) diff --git a/include/sys/types.h b/include/sys/types.h index a87827b5f1..a316397d89 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -192,14 +192,14 @@ typedef _wchar_t wchar_t; * An integral type capable of storing any valid value of wchar_t, or WEOF. */ -typedef int wint_t; +typedef _wint_t wint_t; /* wctype_t * A scalar type of a data object that can hold values which represent * locale-specific character classification. */ -typedef int wctype_t; +typedef _wctype_t wctype_t; #if defined(CONFIG_FS_LARGEFILE) /* Large file versions */