summaryrefslogtreecommitdiff
path: root/components/libc/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'components/libc/compilers')
-rw-r--r--components/libc/compilers/armlibc/stubs.c6
-rw-r--r--components/libc/compilers/dlib/syscall_read.c2
-rw-r--r--components/libc/compilers/dlib/syscall_write.c2
-rw-r--r--components/libc/compilers/newlib/libc.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/components/libc/compilers/armlibc/stubs.c b/components/libc/compilers/armlibc/stubs.c
index 719665b78e..74ca5fd1f6 100644
--- a/components/libc/compilers/armlibc/stubs.c
+++ b/components/libc/compilers/armlibc/stubs.c
@@ -153,7 +153,7 @@ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode)
if (fh == STDIN)
{
-#ifdef RT_USING_POSIX_STDIN
+#ifdef RT_USING_POSIX
size = libc_stdio_read(buf, len);
return len - size;
#else
@@ -192,7 +192,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
#ifndef RT_USING_CONSOLE
return 0;
#else
-#ifdef RT_USING_POSIX_STDIN
+#ifdef RT_USING_POSIX
size = libc_stdio_write(buf, len);
return len - size;
#else
@@ -319,7 +319,7 @@ int fgetc(FILE *f)
{
char ch;
-#ifdef RT_USING_POSIX_STDIN
+#ifdef RT_USING_POSIX
if (libc_stdio_read(&ch, 1) == 1)
return ch;
#endif
diff --git a/components/libc/compilers/dlib/syscall_read.c b/components/libc/compilers/dlib/syscall_read.c
index 9dcaa9df65..e7e99629d7 100644
--- a/components/libc/compilers/dlib/syscall_read.c
+++ b/components/libc/compilers/dlib/syscall_read.c
@@ -38,7 +38,7 @@ size_t __read(int handle, unsigned char *buf, size_t len)
if (handle == _LLIO_STDIN)
{
-#ifdef RT_USING_POSIX_STDIN
+#ifdef RT_USING_POSIX
return libc_stdio_read(buf, len);
#else
return _LLIO_ERROR;
diff --git a/components/libc/compilers/dlib/syscall_write.c b/components/libc/compilers/dlib/syscall_write.c
index e2cb04000b..79d702339a 100644
--- a/components/libc/compilers/dlib/syscall_write.c
+++ b/components/libc/compilers/dlib/syscall_write.c
@@ -43,7 +43,7 @@ size_t __write(int handle, const unsigned char *buf, size_t len)
return _LLIO_ERROR;
#else
-#ifdef RT_USING_POSIX_STDIN
+#ifdef RT_USING_POSIX
return libc_stdio_write((void*)buf, len);
#else
rt_device_t console_device;
diff --git a/components/libc/compilers/newlib/libc.c b/components/libc/compilers/newlib/libc.c
index c06ded705e..f8fbbb5e8f 100644
--- a/components/libc/compilers/newlib/libc.c
+++ b/components/libc/compilers/newlib/libc.c
@@ -43,7 +43,7 @@ int libc_system_init(void)
dev_console = rt_console_get_device();
if (dev_console)
{
- #if defined(RT_USING_DFS_DEVFS) && defined(RT_USING_POSIX_STDIN)
+ #if defined(RT_USING_POSIX)
libc_stdio_set_console(dev_console->parent.name, O_RDWR);
#else
libc_stdio_set_console(dev_console->parent.name, O_WRONLY);