|
@@ -1603,8 +1603,10 @@ void cpu_set_log(int log_flags)
|
|
|
static char logfile_buf[4096];
|
|
|
setvbuf(logfile, logfile_buf, _IOLBF, sizeof(logfile_buf));
|
|
|
}
|
|
|
-#elif !defined(_WIN32)
|
|
|
- /* Win32 doesn't support line-buffering and requires size >= 2 */
|
|
|
+#elif defined(_WIN32)
|
|
|
+ /* Win32 doesn't support line-buffering, so use unbuffered output. */
|
|
|
+ setvbuf(logfile, NULL, _IONBF, 0);
|
|
|
+#else
|
|
|
setvbuf(logfile, NULL, _IOLBF, 0);
|
|
|
#endif
|
|
|
log_append = 1;
|