summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-12-05 13:16:39 +0800
committerGitHub <[email protected]>2021-12-05 13:16:39 +0800
commit36d51542565800d503ad204d882e4b1dd3fcfe7d (patch)
treedebed47f95688577bcbde7846fd9892e9283668e /components/libc/compilers/dlib
parent04535363844d30971edca03f643fc92ba2cd40a7 (diff)
parent1040f4a3479b3751a7ad5d5383b62d602fccabed (diff)
Merge pull request #5320 from mysterywolf/pse-master
[POSIX] move PSE branch to master
Diffstat (limited to 'components/libc/compilers/dlib')
-rw-r--r--components/libc/compilers/dlib/syscall_read.c8
-rw-r--r--components/libc/compilers/dlib/syscall_write.c4
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>