diff options
| author | aozima <[email protected]> | 2020-10-09 15:17:27 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2020-10-09 15:17:27 +0800 |
| commit | 05777266b9dffe30df0bef15b35b710f6de21710 (patch) | |
| tree | 6453a68327fd2d7ffb3dcbf788bd5f6d8b209528 /include/libc | |
| parent | 79fd12842beeee5a653ba6f4bc2f08b21be7697a (diff) | |
| parent | aeff91b2a7fc846cf3724c01c28fbd7327bd2bac (diff) | |
Merge remote-tracking branch 'remotes/gitee/master' into gitee_master
Diffstat (limited to 'include/libc')
| -rw-r--r-- | include/libc/libc_errno.h | 4 | ||||
| -rw-r--r-- | include/libc/libc_fcntl.h | 6 | ||||
| -rw-r--r-- | include/libc/libc_fdset.h | 6 | ||||
| -rw-r--r-- | include/libc/libc_ioctl.h | 4 | ||||
| -rw-r--r-- | include/libc/libc_limits.h | 25 | ||||
| -rw-r--r-- | include/libc/libc_signal.h | 5 | ||||
| -rw-r--r-- | include/libc/libc_stat.h | 2 | ||||
| -rw-r--r-- | include/libc/libc_stdio.h | 22 |
8 files changed, 55 insertions, 19 deletions
diff --git a/include/libc/libc_errno.h b/include/libc/libc_errno.h index 0f3bc7635a..00c1f733d3 100644 --- a/include/libc/libc_errno.h +++ b/include/libc/libc_errno.h @@ -13,7 +13,7 @@ #include <rtconfig.h> -#if defined(RT_USING_NEWLIB) || defined(_WIN32) +#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ ) /* use errno.h file in toolchains */ #include <errno.h> #endif @@ -45,7 +45,7 @@ defined in armcc/errno.h #define ERROR_BASE_NO 0 #endif -#if !defined(RT_USING_NEWLIB) && !defined(_WIN32) +#if !defined(RT_USING_NEWLIB) && !defined(_WIN32) && !defined(__GNUC__ ) #define EPERM (ERROR_BASE_NO + 1) #define ENOENT (ERROR_BASE_NO + 2) diff --git a/include/libc/libc_fcntl.h b/include/libc/libc_fcntl.h index 1b7c69b1f4..39740b7d85 100644 --- a/include/libc/libc_fcntl.h +++ b/include/libc/libc_fcntl.h @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : libc_fcntl.h * * Change Logs: * Date Author Notes @@ -16,7 +12,7 @@ #ifndef LIBC_FCNTL_H__ #define LIBC_FCNTL_H__ -#if defined(RT_USING_NEWLIB) || defined(_WIN32) +#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ ) #include <fcntl.h> #ifndef O_NONBLOCK diff --git a/include/libc/libc_fdset.h b/include/libc/libc_fdset.h index ecd965cd22..4a778b51c1 100644 --- a/include/libc/libc_fdset.h +++ b/include/libc/libc_fdset.h @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : libc_errno.h * * Change Logs: * Date Author Notes @@ -17,7 +13,7 @@ #include <rtconfig.h> -#if defined(RT_USING_NEWLIB) || defined(_WIN32) +#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ ) #include <sys/types.h> #if defined(HAVE_SYS_SELECT_H) #include <sys/select.h> diff --git a/include/libc/libc_ioctl.h b/include/libc/libc_ioctl.h index ef5a5257a8..42a21a2cea 100644 --- a/include/libc/libc_ioctl.h +++ b/include/libc/libc_ioctl.h @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : libc_ioctl.h * * Change Logs: * Date Author Notes diff --git a/include/libc/libc_limits.h b/include/libc/libc_limits.h new file mode 100644 index 0000000000..b8368160df --- /dev/null +++ b/include/libc/libc_limits.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2020-09-05 Meco Manthe first version + */ + +#ifndef LIBC_LIMITS_H__ +#define LIBC_LIMITS_H__ + +#include <limits.h> +#include <rtconfig.h> + +#ifdef RT_USING_POSIX + +#ifndef SSIZE_MAX +# define SSIZE_MAX LONG_MAX +#endif + +#endif + +#endif diff --git a/include/libc/libc_signal.h b/include/libc/libc_signal.h index 898fe13f43..539685de3e 100644 --- a/include/libc/libc_signal.h +++ b/include/libc/libc_signal.h @@ -15,6 +15,7 @@ extern "C" { #endif +#include <stdint.h> #ifdef HAVE_CCONFIG_H #include <cconfig.h> #endif @@ -46,8 +47,8 @@ struct sigevent #ifndef HAVE_SIGINFO struct siginfo { - rt_uint16_t si_signo; - rt_uint16_t si_code; + uint16_t si_signo; + uint16_t si_code; union sigval si_value; }; diff --git a/include/libc/libc_stat.h b/include/libc/libc_stat.h index 9079d1ef15..9388688572 100644 --- a/include/libc/libc_stat.h +++ b/include/libc/libc_stat.h @@ -9,7 +9,7 @@ #include <rtconfig.h> -#if defined(RT_USING_NEWLIB) +#if defined(RT_USING_NEWLIB) || defined( __GNUC__ ) /* use header file of newlib */ #include <sys/stat.h> diff --git a/include/libc/libc_stdio.h b/include/libc/libc_stdio.h new file mode 100644 index 0000000000..85ba509852 --- /dev/null +++ b/include/libc/libc_stdio.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2020-09-05 Meco Manthe first version + */ + +#ifndef LIBC_STDIO_H__ +#define LIBC_STDIO_H__ + +#include <rtconfig.h> + +#ifdef RT_USING_POSIX_GETLINE + +#include <posix_getline.h> + +#endif + +#endif |
