diff --git a/components/libc/compilers/armlibc/sys/types.h b/components/libc/compilers/armlibc/sys/types.h index 4c76dfc42944bec1b8b694652185f07879d9ff1c..001ace4dd28e5b132486bed253cfea66ff17a3ff 100644 --- a/components/libc/compilers/armlibc/sys/types.h +++ b/components/libc/compilers/armlibc/sys/types.h @@ -15,6 +15,10 @@ typedef rt_int32_t clockid_t; typedef rt_int32_t key_t; /* Used for interprocess communication. */ typedef rt_int32_t pid_t; /* Used for process IDs and process group IDs. */ -typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ +#ifndef ARCH_CPU_64BIT +typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */ +#else +typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */ +#endif #endif diff --git a/components/libc/compilers/dlib/sys/types.h b/components/libc/compilers/dlib/sys/types.h index 4c76dfc42944bec1b8b694652185f07879d9ff1c..001ace4dd28e5b132486bed253cfea66ff17a3ff 100644 --- a/components/libc/compilers/dlib/sys/types.h +++ b/components/libc/compilers/dlib/sys/types.h @@ -15,6 +15,10 @@ typedef rt_int32_t clockid_t; typedef rt_int32_t key_t; /* Used for interprocess communication. */ typedef rt_int32_t pid_t; /* Used for process IDs and process group IDs. */ -typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ +#ifndef ARCH_CPU_64BIT +typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */ +#else +typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */ +#endif #endif diff --git a/components/libc/compilers/minilibc/sys/types.h b/components/libc/compilers/minilibc/sys/types.h index 0c00a79d1e8c9ed4d716f2eac69fd397045473d9..d3abc6bb388e1c41088c943f20716eebfd63d038 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 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;