Files
esp-idf/components
Ivan Grokhotkov 3d91e6d993 newlib: implement _fstat_r stub for console
When CONFIG_VFS_SUPPORT_IO is disabled, _read_r and _write_r
implementations in syscalls.c are used to provide console I/O via
esp_rom_uart_tx_one_char/esp_rom_uart_rx_one_char.

When newlib opens a (FILE*) stream, it calls fstat to check if the
underlying file is character-oriented. In this case, it configures the
stream to use line buffering. Otherwise (or if fstat fails) the stream
is opened as block buffered.

Since fstat wasn't provided, stdin/stdout/stderr streams got opened in
block buffered mode. For console, we need line buffered output so that
the stream buffer is flushed each time a complete line (ending with
'\n') is sent to stdout or stderr.

Fix by implementing _fstat_r stub, setting st->st_mdoe=S_IFCHR.
2021-12-21 01:25:49 +00:00
..
2021-09-21 16:31:21 +08:00
2021-11-25 10:22:41 +08:00
2021-11-02 16:24:18 +01:00
2020-12-25 15:46:36 +08:00
2021-10-29 14:37:23 +08:00
2021-11-02 16:24:18 +01:00