arch: Add _wchar_t typedef like other basic types

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2021-11-01 12:40:51 +08:00 committed by YAMAMOTO Takashi
parent 334bb9768a
commit 6357523892
22 changed files with 128 additions and 2 deletions

View File

@ -66,6 +66,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -67,6 +67,12 @@ typedef double double_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A (near) size is 2 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -73,6 +73,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is two bytes */
#if defined(__SIZE_TYPE__)

View File

@ -74,6 +74,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is two bytes */
#if defined(__SIZE_TYPE__)

View File

@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -67,6 +67,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -66,6 +66,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 2 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -72,6 +72,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
#ifdef __LP64__
/* A size is 8 bytes */

View File

@ -86,6 +86,12 @@ typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#endif
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
#if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32)
/* 64-bit build on 64-bit machine: A size is 8 bytes */

View File

@ -65,6 +65,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -65,6 +65,12 @@ typedef unsigned long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_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

View File

@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -60,6 +60,12 @@ typedef unsigned int _uint32_t;
typedef _int32_t _intmax_t;
typedef _uint32_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 4 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -84,6 +84,12 @@ typedef _int32_t _intmax_t;
typedef _uint32_t _uintmax_t;
#endif
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A pointer is 2 or 3 bytes, depending upon if the ez80 is in z80
* compatibility mode or not
*

View File

@ -72,6 +72,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 2 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -76,6 +76,12 @@ typedef unsigned long _uint32_t;
typedef _int32_t _intmax_t;
typedef _uint32_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 2 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -72,6 +72,12 @@ typedef unsigned long long _uint64_t;
typedef _int64_t _intmax_t;
typedef _uint64_t _uintmax_t;
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ _wchar_t;
#else
typedef int _wchar_t;
#endif
/* A size is 2 bytes */
#if defined(__SIZE_TYPE__)

View File

@ -161,13 +161,13 @@ typedef int16_t key_t;
typedef intptr_t ptrdiff_t;
#if !defined(__cplusplus)
/* Wide, 16-bit character types. wchar_t is a built-in type in C++ and
/* Wide character types. wchar_t is a built-in type in C++ and
* its declaration here may cause compilation errors on some compilers.
*
* REVISIT: wchar_t belongs in stddef.h
*/
typedef uint16_t wchar_t;
typedef _wchar_t wchar_t;
#endif
/* wint_t