arch: Customize the typedef of size_t instead of intptr_t

To ensure size_t same as toolchain definition in the first place and rename CXX_NEWLONG to ARCH_SIZET_LONG.  The change also check whether __SIZE_TYPE__ exist before CONFIG_ARCH_SIZET_LONG so our definition can align with toolchain(gcc/clang) definition automatically.
This commit is contained in:
Xiang Xiao
2020-02-17 20:19:25 +08:00
committed by Gregory Nutt
parent e7d44ee16e
commit e7d9260014
46 changed files with 413 additions and 136 deletions
+3 -7
View File
@@ -139,14 +139,10 @@ typedef int16_t ssize_t;
typedef uint16_t rsize_t;
#else /* CONFIG_SMALL_MEMORY */
/* As a general rule, the size of size_t should be the same as the size of
* uintptr_t: 32-bits on a machine with 32-bit addressing but 64-bits on a
* machine with 64-bit addressing.
*/
typedef uintptr_t size_t;
typedef intptr_t ssize_t;
typedef uintptr_t rsize_t;
typedef _size_t size_t;
typedef _ssize_t ssize_t;
typedef _size_t rsize_t;
#endif /* CONFIG_SMALL_MEMORY */