add RT_USING_POSIX_STDIO

This commit is contained in:
Meco Man
2022-01-02 17:51:44 -05:00
committed by Bernard Xiong
parent 0e5dd7d1ab
commit 918ee6147c
41 changed files with 112 additions and 206 deletions

View File

@@ -18,9 +18,9 @@
#include <lwp.h>
#endif
#ifdef RT_USING_POSIX_DEVIO
#ifdef RT_USING_POSIX_STDIO
#include <libc.h>
#endif /* RT_USING_POSIX_DEVIO */
#endif /* RT_USING_POSIX_STDIO */
/* Global variables */
const struct dfs_filesystem_ops *filesystem_operation_table[DFS_FILESYSTEM_TYPES_MAX];
@@ -216,10 +216,10 @@ struct dfs_fd *fd_get(int fd)
struct dfs_fd *d;
struct dfs_fdtable *fdt;
#ifdef RT_USING_POSIX_DEVIO
#ifdef RT_USING_POSIX_STDIO
if ((0 <= fd) && (fd <= 2))
fd = libc_stdio_get_console();
#endif /* RT_USING_POSIX_DEVIO */
#endif /* RT_USING_POSIX_STDIO */
fdt = dfs_fdtable_get();
fd = fd - DFS_FD_OFFSET;