[LLVMdev] Binary output to cout on Windows
Reid Spencer
reid at x10sys.com
Tue May 23 11:28:53 PDT 2006
On Tue, 2006-05-23 at 13:12 -0500, Chris Lattner wrote:
> Reid is the guru here, but I'll inject my opinion. I think that this
> should be a method somewhere in the System library. Given that, you
> should change llvm-as.cpp (and all other tools with similar issues) from:
>
> } else { // Specified stdout
> // FIXME: cout is not binary!
> Out = &std::cout;
> }
>
> To:
>
> } else { // Specified stdout
> sys::ChangeStandardStreamToBinary(std::cout);
> Out = &std::cout;
> }
>
> ... where "ChangeStandardStreamToBinary" is something that Reid likes. :)
>
> The implementation of ChangeStandardStreamToBinary would do the code above
> in the win32 case, and would be a noop in the unix case. This is just one
> way to do it, I defer to Reid for what the "right" way to do it is :)
>
Looks like we're on the same page here.
Reid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060523/a94d821e/attachment.sig>
More information about the llvm-dev
mailing list