mlibc
mlibc copied to clipboard
implement `freopen` for `mem_file`
For this, the definition of FILE would need to change. A proposed solution is to typedef it to void *, while having it actually be a unique_ptr<abstract_file> underneath. This would allow us to switch a mem_file out for a fd_file when freopening a mem_file-based stream.
Broken out from #837.