summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorbernard <[email protected]>2017-10-31 10:24:11 +0800
committerbernard <[email protected]>2017-10-31 10:24:11 +0800
commitb3d872740b7f95c9e2803df298665f31b3f8990f (patch)
treee3c4e89ee96998d21235fafdc2e583240b1fe87a /components
parent47acab44699c0b90610d1d7c23f9a27cc91e2415 (diff)
[libc] Fix the typedef in minilibc.
Diffstat (limited to 'components')
-rw-r--r--components/libc/compilers/minilibc/stdint.h14
-rw-r--r--components/libc/compilers/minilibc/sys/time.h1
-rw-r--r--components/libc/compilers/minilibc/sys/types.h20
3 files changed, 17 insertions, 18 deletions
diff --git a/components/libc/compilers/minilibc/stdint.h b/components/libc/compilers/minilibc/stdint.h
index af7df16846..8733d60a03 100644
--- a/components/libc/compilers/minilibc/stdint.h
+++ b/components/libc/compilers/minilibc/stdint.h
@@ -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;
diff --git a/components/libc/compilers/minilibc/sys/time.h b/components/libc/compilers/minilibc/sys/time.h
index ada613251b..9cb330df5c 100644
--- a/components/libc/compilers/minilibc/sys/time.h
+++ b/components/libc/compilers/minilibc/sys/time.h
@@ -2,6 +2,7 @@
#define _SYS_TIME_H_
#include <sys/types.h>
+typedef long time_t;
/*
* Structure returned by gettimeofday(2) system call,
diff --git a/components/libc/compilers/minilibc/sys/types.h b/components/libc/compilers/minilibc/sys/types.h
index a6860f2aee..7f27de468f 100644
--- a/components/libc/compilers/minilibc/sys/types.h
+++ b/components/libc/compilers/minilibc/sys/types.h
@@ -1,27 +1,25 @@
#ifndef __TYPES_H__
#define __TYPES_H__
-#include <rtthread.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. */
-typedef long off_t;
-typedef __SIZE_TYPE__ size_t;
-typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
-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 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
+