From 8c9500c7f0d7dd6880a72b3640866b0353b58b19 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 10 Oct 2013 14:39:30 +0200 Subject: [PATCH 1/1] Once again, Linux does not follow the real way of doing things. The default buffering mode for output streams seems different on Windows (lines don't mix in the same order between stdout and stderr). Use unbuffered mode, since line buffer mode is not supported on these systems. See http://msdn.microsoft.com/en-us/library/86cebhfs%28v=vs.71%29.aspx _IOLBF For some systems, this provides line buffering. However, for Win32, the behavior is the same as _IOFBF - Full Buffering." Let's wait for the cdash to confirm that it works... --- teshsuite/simdag/platforms/basic_parsing_test.c | 7 ++++++- teshsuite/simdag/platforms/flatifier.c | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/teshsuite/simdag/platforms/basic_parsing_test.c b/teshsuite/simdag/platforms/basic_parsing_test.c index 660d1fbe1e..aaffd2e333 100644 --- a/teshsuite/simdag/platforms/basic_parsing_test.c +++ b/teshsuite/simdag/platforms/basic_parsing_test.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2012. The SimGrid Team. +/* Copyright (c) 2008-2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -23,7 +23,12 @@ int main(int argc, char **argv) int route_size, i, j, k; int list_size; +#ifdef _XBT_WIN32 + setbuf(stderr, NULL); + setbuf(stdout, NULL); +#else setvbuf(stdout, NULL, _IOLBF, 0); +#endif SD_init(&argc, argv); diff --git a/teshsuite/simdag/platforms/flatifier.c b/teshsuite/simdag/platforms/flatifier.c index f523ce6abc..46ae1b4dfc 100644 --- a/teshsuite/simdag/platforms/flatifier.c +++ b/teshsuite/simdag/platforms/flatifier.c @@ -104,7 +104,12 @@ int main(int argc, char **argv) const SD_link_t *links; xbt_os_timer_t parse_time = xbt_os_timer_new(); +#ifdef _XBT_WIN32 + setbuf(stderr, NULL); + setbuf(stdout, NULL); +#else setvbuf(stdout, NULL, _IOLBF, 0); +#endif SD_init(&argc, argv); -- 2.20.1