未验证 提交 0211f2fc 编写于 作者: G guo 提交者: GitHub

Merge pull request #5161 from mysterywolf/libc

[libc][keil] remove libc_stdio_read() in __MICROLIB
......@@ -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.
先完成此消息的编辑!
想要评论请 注册