diff options
author | 2009-07-27 10:02:04 -0500 | |
---|---|---|
committer | 2009-07-27 14:09:15 -0500 | |
commit | bf65f53fbaaca39600017247108b0627033f2fb1 (patch) | |
tree | 4d3e8e9fd7ea2bba56a3077731ba202f130a93a4 /exec.c | |
parent | Remove useless Win32 include files and unused function in net.c. (diff) | |
download | qemu-kvm-bf65f53fbaaca39600017247108b0627033f2fb1.tar.gz qemu-kvm-bf65f53fbaaca39600017247108b0627033f2fb1.tar.bz2 qemu-kvm-bf65f53fbaaca39600017247108b0627033f2fb1.zip |
Remove setvbuf(<handle>, NULL, _IOLBF, 0) calls for Win32
On Win32 the setvbuf function requires the last parameter to be size between 2 and INT_MAX bytes, so the calls always failed. Since the whole point of the calls is to set line-buffered mode for the file handle and that's not supported on Win32 anyway, conditionally remove them.
Signed-off-by: Filip Navara <filip.navara@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1491,7 +1491,8 @@ void cpu_set_log(int log_flags) static char logfile_buf[4096]; setvbuf(logfile, logfile_buf, _IOLBF, sizeof(logfile_buf)); } -#else +#elif !defined(_WIN32) + /* Win32 doesn't support line-buffering and requires size >= 2 */ setvbuf(logfile, NULL, _IOLBF, 0); #endif log_append = 1; |