Fix ARCMT/migrate.m on MSVC.
Solution is to set output stdout to binary mode to prevent newline conversion (\n => \r\n).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134879 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/c-arcmt-test/c-arcmt-test.c b/tools/c-arcmt-test/c-arcmt-test.c
index 19f6b8f..927292d 100644
--- a/tools/c-arcmt-test/c-arcmt-test.c
+++ b/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 @@
#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