diff options
author | Evan Martin <martine@danga.com> | 2011-12-02 05:53:00 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-12-02 05:53:00 (GMT) |
commit | 0742527a9269043ec3ec0d1d4c90f5b8b5fa573a (patch) | |
tree | ee1fd32cc0074e114298fbacfe8ec5fd7100c51d /src | |
parent | ed53e89795ade2ff069a189b7c88ad153f9ee400 (diff) | |
download | Ninja-0742527a9269043ec3ec0d1d4c90f5b8b5fa573a.zip Ninja-0742527a9269043ec3ec0d1d4c90f5b8b5fa573a.tar.gz Ninja-0742527a9269043ec3ec0d1d4c90f5b8b5fa573a.tar.bz2 |
windows: don't buffer stdout
Diffstat (limited to 'src')
-rw-r--r-- | src/build.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/build.cc b/src/build.cc index 1686eed..ae6ebbb 100644 --- a/src/build.cc +++ b/src/build.cc @@ -70,6 +70,11 @@ BuildStatus::BuildStatus(const BuildConfig& config) smart_terminal_ = isatty(1) && term && string(term) != "dumb"; #else smart_terminal_ = false; + // Disable output buffer. It'd be nice to use line buffering but + // MSDN says: "For some systems, [_IOLBF] provides line + // buffering. However, for Win32, the behavior is the same as _IOFBF + // - Full Buffering." + setvbuf(stdout, NULL, _IONBF, 0); #endif // Don't do anything fancy in verbose mode. |