[libc] Fix the typedef in minilibc.

This commit is contained in:
bernard 2017-10-31 10:24:11 +08:00
parent 47acab4469
commit b3d872740b
4 changed files with 21 additions and 18 deletions

View File

@ -1,14 +1,14 @@
#ifndef __STDINT_H__
#define __STDINT_H__
#include <rtthread.h>
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef rt_int8_t int8_t;
typedef rt_uint8_t uint8_t;
typedef rt_int16_t int16_t;
typedef rt_uint16_t uint16_t;
typedef rt_int32_t int32_t;
typedef rt_uint32_t uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
typedef signed long intptr_t;

View File

@ -2,6 +2,7 @@
#define _SYS_TIME_H_
#include <sys/types.h>
typedef long time_t;
/*
* Structure returned by gettimeofday(2) system call,

View File

@ -1,27 +1,25 @@
#ifndef __TYPES_H__
#define __TYPES_H__
#include <rtthread.h>
typedef long off_t;
typedef __SIZE_TYPE__ size_t;
typedef unsigned long size_t;
typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */
typedef rt_uint8_t u_char;
typedef rt_uint16_t u_short;
typedef rt_ubase_t u_int;
typedef rt_uint32_t u_long;
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef rt_time_t time_t;
typedef int mode_t;
typedef unsigned long clockid_t;
typedef int pid_t;
#ifndef NULL
#define NULL RT_NULL
#define NULL (0)
#endif
#define __u_char_defined
#endif

View File

@ -40,6 +40,10 @@
#define FD_SETSIZE DFS_FD_MAX
#endif
# ifndef FD_SETSIZE
# define FD_SETSIZE 32
# endif
# define NBBY 8 /* number of bits in a byte */
typedef long fd_mask;