diff options
| author | guo <[email protected]> | 2021-11-29 10:51:43 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-29 10:51:43 +0800 |
| commit | 4e9744c0acd093efd6fb1da1216d918521d14015 (patch) | |
| tree | 084b7a54eebb1ad0574111a429d24b51bc9f6271 /components/libc/compilers/dlib | |
| parent | 3bc5ffb495a34ee6235e493375770ef2bb4457d3 (diff) | |
| parent | 7c789d4b11c13e45ab1d2a858c68dabb022eb07c (diff) | |
Merge pull request #5302 from mysterywolf/posix
[PSE分支] 新增 RT_USING_POSIX_DEVIO
Diffstat (limited to 'components/libc/compilers/dlib')
| -rw-r--r-- | components/libc/compilers/dlib/syscall_read.c | 8 | ||||
| -rw-r--r-- | components/libc/compilers/dlib/syscall_write.c | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/components/libc/compilers/dlib/syscall_read.c b/components/libc/compilers/dlib/syscall_read.c index 469ea7c1dd..62bc05d243 100644 --- a/components/libc/compilers/dlib/syscall_read.c +++ b/components/libc/compilers/dlib/syscall_read.c @@ -11,9 +11,9 @@ #include <rtthread.h> #include <LowLevelIOInterface.h> #include <unistd.h> -#ifdef RT_USING_POSIX_STDIO +#ifdef RT_USING_POSIX_DEVIO #include "libc.h" -#endif +#endif /* RT_USING_POSIX_DEVIO */ #define DBG_TAG "dlib.syscall_read" #define DBG_LVL DBG_INFO @@ -39,7 +39,7 @@ size_t __read(int handle, unsigned char *buf, size_t len) if (handle == _LLIO_STDIN) { -#ifdef RT_USING_POSIX_STDIO +#ifdef RT_USING_POSIX_DEVIO if (libc_stdio_get_console() < 0) { LOG_W("Do not invoke standard input before initializing libc"); @@ -48,7 +48,7 @@ size_t __read(int handle, unsigned char *buf, size_t len) return read(STDIN_FILENO, buf, len); /* return the length of the data read */ #else return _LLIO_ERROR; -#endif /* RT_USING_POSIX_STDIO */ +#endif /* RT_USING_POSIX_DEVIO */ } else if ((handle == _LLIO_STDOUT) || (handle == _LLIO_STDERR)) { diff --git a/components/libc/compilers/dlib/syscall_write.c b/components/libc/compilers/dlib/syscall_write.c index d5ede3e59e..2bc5863d8a 100644 --- a/components/libc/compilers/dlib/syscall_write.c +++ b/components/libc/compilers/dlib/syscall_write.c @@ -11,10 +11,6 @@ #include <rtthread.h> #include <LowLevelIOInterface.h> #include <unistd.h> -#ifdef RT_USING_POSIX_STDIO -#include "libc.h" -#endif - #define DBG_TAG "dlib.syscall_write" #define DBG_LVL DBG_INFO #include <rtdbg.h> |
