From 357641decc1494f7f6da52ffb6d8d02c0e70342d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 22 May 2012 21:06:47 +0000 Subject: [PATCH] Explicitly flushed bjam's standard output after printing out '...patience...' lines. Without a fflush() call these lines may get buffered and displayed all at once only after the first actual target has been built. It seems that Visual C++ compiler's runtime does not use line buffering for its standard output stream if given a pipe as its standard output (encountered with bjam compiled using msvc 10 and run by piping its output through the Cygwin tee utility). [SVN r78545] --- v2/engine/headers.c | 3 +++ v2/engine/make.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/v2/engine/headers.c b/v2/engine/headers.c index 7e0144016..945689eb6 100644 --- a/v2/engine/headers.c +++ b/v2/engine/headers.c @@ -137,7 +137,10 @@ headers1( static int count = 0; ++count; if ( ((count == 100) || !( count % 1000 )) && DEBUG_MAKE ) + { printf("...patience...\n"); + fflush(stdout); + } #endif /* the following regexp is used to detect cases where a */ diff --git a/v2/engine/make.c b/v2/engine/make.c index a4120b384..f38d271d0 100644 --- a/v2/engine/make.c +++ b/v2/engine/make.c @@ -714,7 +714,10 @@ void make0 ++counts->targets; #else if ( !( ++counts->targets % 1000 ) && DEBUG_MAKE ) + { printf( "...patience...\n" ); + fflush(stdout); + } #endif if ( fate == T_FATE_ISTMP )