[libc-commits] [libc] [libc] Add getc, ungetc, fflush to enable libc++ iostream on baremetal (PR #175530)
Petr Hosek via libc-commits
libc-commits at lists.llvm.org
Tue Feb 10 00:56:13 PST 2026
https://github.com/petrhosek commented:
The idea I had was to introduce a new embedding API to manage the external state akin to:
```
struct __llvm_libc_stdio_buffer *__llvm_libc_stdio_buffer(void *cookie);
```
We could use this API to allocate the `ungetc` buffer for each stream.
That's a larger change that should be done separately though and should be probably consider as a follow up/part of the stdio redesign that's currently being worked on.
https://github.com/llvm/llvm-project/pull/175530
More information about the libc-commits
mailing list