[cfe-commits] r134879 - /cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c
Francois Pichet
pichet2000 at gmail.com
Sun Jul 10 12:48:34 PDT 2011
Author: fpichet
Date: Sun Jul 10 14:48:34 2011
New Revision: 134879
URL: http://llvm.org/viewvc/llvm-project?rev=134879&view=rev
Log:
Fix ARCMT/migrate.m on MSVC.
Solution is to set output stdout to binary mode to prevent newline conversion (\n => \r\n).
Modified:
cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c
Modified: cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c?rev=134879&r1=134878&r2=134879&view=diff
==============================================================================
--- cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c (original)
+++ cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c Sun Jul 10 14:48:34 2011
@@ -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
More information about the cfe-commits
mailing list