4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 12:53:31 +08:00

Merge pull request #2491 from lymzzyh/size_t

[libc]fix size_t ssize_t
This commit is contained in:
Bernard Xiong 2019-03-29 08:53:21 +08:00 committed by GitHub
commit eabb04ed3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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;