[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
Thu Feb 12 01:28:16 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);
+LIBC_INLINE int ungetc_internal(int c, ::FILE *stream) {
+ return push_ungetc_value(stream, c);
+}
----------------
voltur01 wrote:
Indeed, updated - thank you for the reviews and support in bringing this to conclusion!
https://github.com/llvm/llvm-project/pull/175530
More information about the libc-commits
mailing list