mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 02:51:33 +08:00
[libc][keil] remove libc_stdio_read() in __MICROLIB
This commit is contained in:
parent
e3045389d0
commit
b6c2368bef
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user