diff options
| author | Francois Pichet <pichet2000@gmail.com> | 2011-07-10 19:48:34 +0000 |
|---|---|---|
| committer | Francois Pichet <pichet2000@gmail.com> | 2011-07-10 19:48:34 +0000 |
| commit | 9a22177c3ec80c42c5c9f7e4eba49428ecf2606a (patch) | |
| tree | 0a9c207b0486ce3ebb7276369ce8d72abc0b7655 | |
| parent | 45ba8543990752e43b18825109ee4b5d2524f6a1 (diff) | |
| download | bcm5719-llvm-9a22177c3ec80c42c5c9f7e4eba49428ecf2606a.tar.gz bcm5719-llvm-9a22177c3ec80c42c5c9f7e4eba49428ecf2606a.zip | |
Fix ARCMT/migrate.m on MSVC.
Solution is to set output stdout to binary mode to prevent newline conversion (\n => \r\n).
llvm-svn: 134879
| -rw-r--r-- | clang/tools/c-arcmt-test/c-arcmt-test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/tools/c-arcmt-test/c-arcmt-test.c b/clang/tools/c-arcmt-test/c-arcmt-test.c index 19f6b8f30cd..927292d039d 100644 --- a/clang/tools/c-arcmt-test/c-arcmt-test.c +++ b/clang/tools/c-arcmt-test/c-arcmt-test.c @@ -4,6 +4,10 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> +#if defined(_WIN32) +#include <io.h> +#include <fcntl.h> +#endif static int print_remappings(const char *path) { CMTRemap remap; @@ -73,6 +77,7 @@ int main(int argc, const char **argv) { #if defined(_WIN32) if (getenv("LIBCLANG_LOGGING") == NULL) putenv("LIBCLANG_LOGGING=1"); + _setmode( _fileno(stdout), _O_BINARY ); #else setenv("LIBCLANG_LOGGING", "1", /*overwrite=*/0); #endif |

