From 8a38307e2cce628017e9eb7153ae7a2430a3d9ef Mon Sep 17 00:00:00 2001 From: bernard Date: Tue, 17 Oct 2017 22:27:06 +0800 Subject: [libc] Add RT_USING_POSIX macro. 1. Add macro check in rtdebug.h; 2. Use RT_USING_POSIX for poll/select, stdin etc. 3. Split dfs_posix.h to dfs_posix.h, dfs_poll.h and dfs_select.h; --- components/libc/compilers/armlibc/stubs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'components/libc/compilers/armlibc') 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 -- cgit v1.3.1