diff --git a/arch/arm/include/types.h b/arch/arm/include/types.h index eaaac738ddf..043937a84b5 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 5d783496736..a0faaa28ca0 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 6dedd3df05f..2d11975a77e 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 ad3be5ba959..a763ccba301 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 2a85a1a755f..62b5c0beb7b 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 28e52459b3f..9dbf3d93f02 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 de4870bbed9..d08f07e0994 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 a6d27b03ac7..1a14ab6025f 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 30a76756ed3..3a4ad630e0e 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 3b2f720015b..3f2947aab64 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 d71395d52d1..fb73d2400ff 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 36c2f2bbcd2..497dc0360d2 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 29fe8d56a62..9183cf78fa4 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 d3477515679..5e6083b753a 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 51555a9474f..2da78227b7b 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 0daba000062..0158e7e1041 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 970cdda70d7..d72d2834863 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 8880aa37e0d..f87167174ca 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 200b46e043f..2fc02b5b621 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 1b9a51c306d..e2719f57057 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 734e35351f3..d852729de3c 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 9f58ba29d03..438c82e414d 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 72e3b7164d7..8baf908c97d 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 f8efd7ae883..bd64f657c09 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 a87827b5f19..a316397d89b 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 */