diff options
| author | Meco Man <[email protected]> | 2021-11-07 21:40:19 -0500 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-11-07 23:41:16 -0500 |
| commit | f8388c572ef9969105b895cba3c55ba8d24efeda (patch) | |
| tree | ae71b5dace91c0217740a80eb8a7d99133f1e088 /components/libc/compilers/armlibc | |
| parent | 251e17b41ac56a877e0278394588aa6b129b66b1 (diff) | |
add RT_USING_POSIX_STDIO
Diffstat (limited to 'components/libc/compilers/armlibc')
| -rw-r--r-- | components/libc/compilers/armlibc/syscalls.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/libc/compilers/armlibc/syscalls.c b/components/libc/compilers/armlibc/syscalls.c index 755ffef1a6..62657a4b64 100644 --- a/components/libc/compilers/armlibc/syscalls.c +++ b/components/libc/compilers/armlibc/syscalls.c @@ -21,7 +21,7 @@ #include <fcntl.h> #include <unistd.h> #include <sys/stat.h> -#ifdef RT_USING_POSIX +#ifdef RT_USING_POSIX_STDIO #include "libc.h" #endif @@ -144,7 +144,7 @@ int _sys_close(FILEHANDLE fh) */ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode) { -#ifdef RT_USING_POSIX +#ifdef RT_USING_POSIX_STDIO int size; if (fh == STDIN) @@ -169,7 +169,7 @@ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode) return 0; /* error */ #else return 0; /* error */ -#endif /* RT_USING_POSIX */ +#endif /* RT_USING_POSIX_STDIO */ } /* @@ -185,7 +185,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode) if ((fh == STDOUT) || (fh == STDERR)) { -#ifdef RT_USING_POSIX +#ifdef RT_USING_POSIX_STDIO if (libc_stdio_get_console() < 0) { LOG_W("Do not invoke standard input before initializing libc"); @@ -200,7 +200,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode) } return 0; /* error */ -#endif /* RT_USING_POSIX */ +#endif /* RT_USING_POSIX_STDIO */ } else if (fh == STDIN) { @@ -325,7 +325,7 @@ int fputc(int c, FILE *f) int fgetc(FILE *f) { -#ifdef RT_USING_POSIX +#ifdef RT_USING_POSIX_STDIO char ch; if (libc_stdio_get_console() < 0) @@ -336,7 +336,7 @@ int fgetc(FILE *f) if(read(STDIN_FILENO, &ch, 1) == 1) return ch; -#endif /* RT_USING_POSIX */ +#endif /* RT_USING_POSIX_STDIO */ return 0; /* error */ } |
