summaryrefslogtreecommitdiffstats
path: root/vl.c
diff options
context:
space:
mode:
authorFilip Navara <filip.navara@gmail.com>2009-07-27 10:02:04 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-27 14:09:15 -0500
commitbf65f53fbaaca39600017247108b0627033f2fb1 (patch)
tree4d3e8e9fd7ea2bba56a3077731ba202f130a93a4 /vl.c
parent8fde6546fbe5a63df584819b1279086030e410a9 (diff)
downloadhqemu-bf65f53fbaaca39600017247108b0627033f2fb1.zip
hqemu-bf65f53fbaaca39600017247108b0627033f2fb1.tar.gz
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 'vl.c')
-rw-r--r--vl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index bdf2fe8..198523e 100644
--- a/vl.c
+++ b/vl.c
@@ -5755,7 +5755,10 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
+#ifndef _WIN32
+ /* Win32 doesn't support line-buffering and requires size >= 2 */
setvbuf(stdout, NULL, _IOLBF, 0);
+#endif
init_timers();
if (init_timer_alarm() < 0) {
OpenPOWER on IntegriCloud