From bf65f53fbaaca39600017247108b0627033f2fb1 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 27 Jul 2009 10:02:04 -0500 Subject: Remove setvbuf(, 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 Signed-off-by: Anthony Liguori --- vl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vl.c') 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) { -- cgit v1.1