mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
arch: Add _wchar_t typedef like other basic types
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
YAMAMOTO Takashi
parent
334bb9768a
commit
6357523892
@@ -66,6 +66,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ typedef double double_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A (near) size is 2 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -73,6 +73,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is two bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -74,6 +74,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is two bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -66,6 +66,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 2 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -72,6 +72,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_t;
|
typedef _uint64_t _uintmax_t;
|
||||||
|
|
||||||
|
#if defined(__WCHAR_TYPE__)
|
||||||
|
typedef __WCHAR_TYPE__ _wchar_t;
|
||||||
|
#else
|
||||||
|
typedef int _wchar_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
/* A size is 8 bytes */
|
/* A size is 8 bytes */
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,12 @@ typedef _int64_t _intmax_t;
|
|||||||
typedef _uint64_t _uintmax_t;
|
typedef _uint64_t _uintmax_t;
|
||||||
#endif
|
#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)
|
#if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32)
|
||||||
/* 64-bit build on 64-bit machine: A size is 8 bytes */
|
/* 64-bit build on 64-bit machine: A size is 8 bytes */
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -65,6 +65,12 @@ typedef unsigned long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 defined(__SIZE_TYPE__)
|
||||||
/* If __SIZE_TYPE__ is defined we define ssize_t based on size_t.
|
/* If __SIZE_TYPE__ is defined we define ssize_t based on size_t.
|
||||||
* We simply change "unsigned" to "signed" for this single definition
|
* We simply change "unsigned" to "signed" for this single definition
|
||||||
|
|||||||
@@ -64,6 +64,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -60,6 +60,12 @@ typedef unsigned int _uint32_t;
|
|||||||
typedef _int32_t _intmax_t;
|
typedef _int32_t _intmax_t;
|
||||||
typedef _uint32_t _uintmax_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 */
|
/* A size is 4 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -84,6 +84,12 @@ typedef _int32_t _intmax_t;
|
|||||||
typedef _uint32_t _uintmax_t;
|
typedef _uint32_t _uintmax_t;
|
||||||
#endif
|
#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
|
/* A pointer is 2 or 3 bytes, depending upon if the ez80 is in z80
|
||||||
* compatibility mode or not
|
* compatibility mode or not
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -72,6 +72,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 2 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -76,6 +76,12 @@ typedef unsigned long _uint32_t;
|
|||||||
typedef _int32_t _intmax_t;
|
typedef _int32_t _intmax_t;
|
||||||
typedef _uint32_t _uintmax_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 */
|
/* A size is 2 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
@@ -72,6 +72,12 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef _int64_t _intmax_t;
|
typedef _int64_t _intmax_t;
|
||||||
typedef _uint64_t _uintmax_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 */
|
/* A size is 2 bytes */
|
||||||
|
|
||||||
#if defined(__SIZE_TYPE__)
|
#if defined(__SIZE_TYPE__)
|
||||||
|
|||||||
+2
-2
@@ -161,13 +161,13 @@ typedef int16_t key_t;
|
|||||||
typedef intptr_t ptrdiff_t;
|
typedef intptr_t ptrdiff_t;
|
||||||
|
|
||||||
#if !defined(__cplusplus)
|
#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.
|
* its declaration here may cause compilation errors on some compilers.
|
||||||
*
|
*
|
||||||
* REVISIT: wchar_t belongs in stddef.h
|
* REVISIT: wchar_t belongs in stddef.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef uint16_t wchar_t;
|
typedef _wchar_t wchar_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* wint_t
|
/* wint_t
|
||||||
|
|||||||
Reference in New Issue
Block a user