diff options
| author | Wayne Lin <[email protected]> | 2022-01-10 12:36:11 +0800 |
|---|---|---|
| committer | Wayne Lin <[email protected]> | 2022-01-10 12:36:11 +0800 |
| commit | 715eecd3eb6cfbbc95aba4fdf932db2e1a7698fb (patch) | |
| tree | 111003eb53eaa4a789729792a622d2abfd602031 /components/libc/posix/io | |
| parent | 6d2a7d00db2808f26b96efaebfa3aa18b6fd47b8 (diff) | |
| parent | 5206f6504018d1e1978e1c547f6a5b782d505be5 (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread into nuvoton
# Conflicts:
# bsp/nuvoton/nk-980iot/.config
# bsp/nuvoton/nk-n9h30/.config
# bsp/nuvoton/nk-rtu980/.config
# bsp/nuvoton/numaker-iot-m487/.config
# bsp/nuvoton/numaker-m2354/.config
# bsp/nuvoton/numaker-pfm-m487/.config
Diffstat (limited to 'components/libc/posix/io')
| -rw-r--r-- | components/libc/posix/io/SConscript | 2 | ||||
| -rw-r--r-- | components/libc/posix/io/libc.c | 9 | ||||
| -rw-r--r-- | components/libc/posix/io/libc.h | 5 | ||||
| -rw-r--r-- | components/libc/posix/io/poll/poll.c | 1 | ||||
| -rw-r--r-- | components/libc/posix/io/poll/poll.h | 1 | ||||
| -rw-r--r-- | components/libc/posix/io/select.c | 1 | ||||
| -rw-r--r-- | components/libc/posix/io/termios/termios.c | 1 | ||||
| -rw-r--r-- | components/libc/posix/io/termios/termios.h | 1 |
8 files changed, 14 insertions, 7 deletions
diff --git a/components/libc/posix/io/SConscript b/components/libc/posix/io/SConscript index 0771ec67be..bb45211ec0 100644 --- a/components/libc/posix/io/SConscript +++ b/components/libc/posix/io/SConscript @@ -10,7 +10,7 @@ group = [] flag = False -if GetDepend('RT_USING_POSIX_DEVIO'): +if GetDepend('RT_USING_POSIX_STDIO'): src += ['libc.c'] flag = True diff --git a/components/libc/posix/io/libc.c b/components/libc/posix/io/libc.c index 4bb647c16b..e57749f1da 100644 --- a/components/libc/posix/io/libc.c +++ b/components/libc/posix/io/libc.c @@ -7,6 +7,7 @@ * Date Author Notes * 2017/10/15 bernard the first version */ + #include <rtthread.h> #include <stdio.h> #include <stdlib.h> @@ -20,7 +21,7 @@ int libc_system_init(void) { -#ifdef RT_USING_POSIX_DEVIO +#ifdef RT_USING_POSIX_STDIO rt_device_t dev_console; dev_console = rt_console_get_device(); @@ -28,12 +29,12 @@ int libc_system_init(void) { libc_stdio_set_console(dev_console->parent.name, O_RDWR); } -#endif /* RT_USING_POSIX_DEVIO */ +#endif /* RT_USING_POSIX_STDIO */ return 0; } INIT_COMPONENT_EXPORT(libc_system_init); -#if defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_NEWLIB) +#if defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB) #define STDIO_DEVICE_NAME_MAX 32 static FILE* std_console = NULL; int libc_stdio_set_console(const char* device_name, int mode) @@ -134,4 +135,4 @@ int libc_stdio_set_console(const char* device_name, int mode) int libc_stdio_get_console(void) { return std_fd; } -#endif /* defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_NEWLIB) */ +#endif /* defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB) */ diff --git a/components/libc/posix/io/libc.h b/components/libc/posix/io/libc.h index b019267926..6b5dfd1fcc 100644 --- a/components/libc/posix/io/libc.h +++ b/components/libc/posix/io/libc.h @@ -7,6 +7,7 @@ * Date Author Notes * 2017/10/15 bernard the first version */ + #ifndef __RTT_LIBC_H__ #define __RTT_LIBC_H__ @@ -17,10 +18,10 @@ extern "C" { #endif int libc_system_init(void); -#ifdef RT_USING_POSIX_DEVIO +#ifdef RT_USING_POSIX_STDIO int libc_stdio_get_console(void); int libc_stdio_set_console(const char* device_name, int mode); -#endif /* RT_USING_POSIX_DEVIO */ +#endif /* RT_USING_POSIX_STDIO */ #ifdef __cplusplus } diff --git a/components/libc/posix/io/poll/poll.c b/components/libc/posix/io/poll/poll.c index a1500ba109..3c5940b8d3 100644 --- a/components/libc/posix/io/poll/poll.c +++ b/components/libc/posix/io/poll/poll.c @@ -8,6 +8,7 @@ * 2016-12-28 Bernard first version * 2018-03-09 Bernard Add protection for pt->triggered. */ + #include <stdint.h> #include <rthw.h> #include <rtthread.h> diff --git a/components/libc/posix/io/poll/poll.h b/components/libc/posix/io/poll/poll.h index aea73d6eaf..0fccd48b0d 100644 --- a/components/libc/posix/io/poll/poll.h +++ b/components/libc/posix/io/poll/poll.h @@ -7,6 +7,7 @@ * Date Author Notes * 2021-09-11 Meco Man First version */ + #ifndef __POLL_H__ #define __POLL_H__ diff --git a/components/libc/posix/io/select.c b/components/libc/posix/io/select.c index 55d320e921..bac63258a5 100644 --- a/components/libc/posix/io/select.c +++ b/components/libc/posix/io/select.c @@ -7,6 +7,7 @@ * Date Author Notes * 2016-12-28 Bernard first version */ + #include <rtthread.h> #include <poll.h> #include <sys/select.h> diff --git a/components/libc/posix/io/termios/termios.c b/components/libc/posix/io/termios/termios.c index d7d869d67f..44e0e80853 100644 --- a/components/libc/posix/io/termios/termios.c +++ b/components/libc/posix/io/termios/termios.c @@ -7,6 +7,7 @@ * Date Author Notes * 2017/08/30 Bernard The first version */ + #include <stdlib.h> #include <string.h> #include <dfs_posix.h> diff --git a/components/libc/posix/io/termios/termios.h b/components/libc/posix/io/termios/termios.h index b647fa0728..27f2db85b0 100644 --- a/components/libc/posix/io/termios/termios.h +++ b/components/libc/posix/io/termios/termios.h @@ -7,6 +7,7 @@ * Date Author Notes * 2017/08/30 Bernard The first version */ + #ifndef __TERMIOS_H__ #define __TERMIOS_H__ |
