summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.h
diff options
context:
space:
mode:
authorMat Sutcliffe <oktal3700@gmail.com>2016-06-16 14:38:22 +0100
committerMat Sutcliffe <oktal3700@gmail.com>2016-06-16 22:46:54 +0000
commit23bce6b169ca14ff72b672965ed5f89424c2d8fe (patch)
tree76558206009c5af4de4f07ea7c93b0aa1338e03a /qmake/generators/makefile.h
parent1e147f446a098bf17c27e744a22e535a9e21c061 (diff)
qmake: Fix missing newlines in generated vcxproj files
A bug in the Windows C Runtime causes text mode pipes to drop newlines sometimes. This bug was hidden because of another bug in rcc which caused newlines to be redundantly duplicated. When the latter bug was fixed (commit 53d5811b) the former bug was exposed, causing invalid vcxproj files to be generated. The Windows bug is described here: https://connect.microsoft.com/VisualStudio/feedback/details/1902345 The workaround is to avoid text mode, and do the conversion of "\r\n" to "\n" ourselves (which we were already doing anyway). Change-Id: I792599a4cd7822f109fa921f02207fb1b144b1d1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'qmake/generators/makefile.h')
-rw-r--r--qmake/generators/makefile.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 19ff5d57a3..e121f4fb14 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -46,9 +46,11 @@ QT_BEGIN_NAMESPACE
#ifdef Q_OS_WIN32
#define QT_POPEN _popen
+#define QT_POPEN_READ "rb"
#define QT_PCLOSE _pclose
#else
#define QT_POPEN popen
+#define QT_POPEN_READ "r"
#define QT_PCLOSE pclose
#endif