summaryrefslogtreecommitdiff
path: root/components/libc/compilers/minilibc
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-03-29 08:53:21 +0800
committerGitHub <[email protected]>2019-03-29 08:53:21 +0800
commiteabb04ed3de48e2fd8bdef6067b34607cff34deb (patch)
treec252f786bfcccfc3f8e51249d08e47334c1cb6e2 /components/libc/compilers/minilibc
parent437b0da91ec22b4feeb17b5fc9d53a35e179bd49 (diff)
parent6b7335a36f644b79972da39f8e60ebe7d78d9acd (diff)
Merge pull request #2491 from lymzzyh/size_t
[libc]fix size_t ssize_t
Diffstat (limited to 'components/libc/compilers/minilibc')
-rw-r--r--components/libc/compilers/minilibc/sys/types.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/components/libc/compilers/minilibc/sys/types.h b/components/libc/compilers/minilibc/sys/types.h
index 0c00a79d1e..d3abc6bb38 100644
--- a/components/libc/compilers/minilibc/sys/types.h
+++ b/components/libc/compilers/minilibc/sys/types.h
@@ -8,10 +8,17 @@
*/
#ifndef __TYPES_H__
#define __TYPES_H__
+#include <rtconfig.h>
typedef long off_t;
-typedef unsigned long size_t;
-typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */
+
+#ifndef ARCH_CPU_64BIT
+typedef unsigned int size_t;
+typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */
+#else
+typedef long unsigned int size_t;
+typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */
+#endif
typedef unsigned char u_char;
typedef unsigned short u_short;