[libc-commits] [libc] [libc] Add getc, ungetc, fflush to enable libc++ iostream on baremetal (PR #175530)

Volodymyr Turanskyy via libc-commits libc-commits at lists.llvm.org
Wed Feb 11 07:13:24 PST 2026


================
@@ -32,11 +32,34 @@ struct FileIOResult {
   constexpr operator size_t() { return value; }
 };
 
+// ungetc handling.
+int push_ungetc_value(::FILE *stream, int c);
+bool pop_ungetc_value(::FILE *stream, unsigned char &out);
+namespace internal {
+int ungetc_internal(int c, ::FILE *stream);
+} // namespace internal
----------------
voltur01 wrote:

Thank you for the hint - namespace removed!

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


More information about the libc-commits mailing list