[patch] Always open files in binary mode
alp at nuanti.com
Sun Feb 23 22:46:20 PST 2014
This makes a lot of sense. Supporting the Windows text mode flag only
ever caused bugs that were difficult to detect where F_Binary was
Furthermore if we do ever want to write out CRLFs, we'll want to do it
explicitly by writing out '\r\n' instead of relying on the Windows
feature given that it introduces byte offsets that break seek/fseek.
Your patch includes context for the cases where F_Binary was removed,
but what'd be more interesting is to see the raw_fd_ostream uses that
_were_ previously operating in text mode whose functionality will change
following your patch. Do you have an idea which (if any) uses are still
in text mode?
On 24/02/2014 02:25, Rafael Espíndola wrote:
> It looks like everything on windows these days can handle unix line endings.
> I tested that the llvm and clang testsuite work. I also tested that
> printing to stdout is readable with "clang -S -o - foo.c".
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
the browser experts
More information about the cfe-commits