Directly log to log file

This commit is contained in:
topjohnwu
2020-12-03 20:15:18 -08:00
parent 797ba4fbf4
commit f152e8c33d
6 changed files with 87 additions and 52 deletions

View File

@@ -23,7 +23,7 @@ static int strm_close(void *v) {
}
sFILE make_stream_fp(stream_ptr &&strm) {
sFILE fp(funopen(strm.release(), strm_read, strm_write, strm_seek, strm_close), fclose);
auto fp = make_file(funopen(strm.release(), strm_read, strm_write, strm_seek, strm_close));
setbuf(fp.get(), nullptr);
return fp;
}