提交 b6c2368b 编写于 作者: mysterywolf's avatar mysterywolf

[libc][keil] remove libc_stdio_read() in __MICROLIB

上级 e3045389
......@@ -336,7 +336,13 @@ int fgetc(FILE *f)
#ifdef RT_USING_POSIX
char ch;
if (libc_stdio_read(&ch, 1) == 1)
if (libc_stdio_get_console() < 0)
{
LOG_W("Do not invoke standard output before initializing libc");
return -1;
}
if(read(STDIN_FILENO, &ch, 1) == 1)
return ch;
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册