[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


================
@@ -32,11 +32,31 @@ struct FileIOResult {
   constexpr operator size_t() { return value; }
 };
 
+// ungetc handling.
+int store_ungetc_value(::FILE *stream, int c);
----------------
petrhosek wrote:

Maybe this could be call `push_ungetc_value` to be symmetric with `pop_ungetc_value`?

https://github.com/llvm/llvm-project/pull/175530


More information about the libc-commits mailing list