mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 10:46:28 +08:00
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:
+3
-7
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user