martine/ninja — pull request #610 by rnk (2013-07-02 06:08:12+00:00)
Title: Use fwrite to print whatever the subcommand wrote

Subcommands can write things like UTF-16, which some terminals can
understand. printf() will interpret the null bytes as the end of the
string.

In particular, MSVC's assert() will print wide characters by default,
and I can't find a way to disable it, leading to clang assertion
failures looking like:
FAILED: ...clang.exe ...
Aninja: build stopped: subcommand failed.

With this fix, I get the desired:
FAILED: ...clang.exe ...
Assertion failed: SymbolMap...
ninja: build stopped: subcommand failed.