summaryrefslogtreecommitdiffstats
path: root/src/depfile_parser.in.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-05-01 03:46:12 (GMT)
committerNico Weber <nicolasweber@gmx.de>2014-05-01 03:46:12 (GMT)
commitc2b7e472ee5db11a65d113a2d7e11668b9e4608f (patch)
treea2d62cf1a328ad9beb4d2ead48cb90d83014d627 /src/depfile_parser.in.cc
parent6c9a54649d4eec45f58e117612a34a2c214a0214 (diff)
downloadNinja-c2b7e472ee5db11a65d113a2d7e11668b9e4608f.zip
Ninja-c2b7e472ee5db11a65d113a2d7e11668b9e4608f.tar.gz
Ninja-c2b7e472ee5db11a65d113a2d7e11668b9e4608f.tar.bz2
Accept \r\n line endings in depfiles.
Fixes #752.
Diffstat (limited to 'src/depfile_parser.in.cc')
-rw-r--r--src/depfile_parser.in.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/depfile_parser.in.cc b/src/depfile_parser.in.cc
index 8bb6d84..ba77079 100644
--- a/src/depfile_parser.in.cc
+++ b/src/depfile_parser.in.cc
@@ -67,7 +67,7 @@ bool DepfileParser::Parse(string* content, string* err) {
*out++ = '$';
continue;
}
- '\\' [^\000\n] {
+ '\\' [^\000\r\n] {
// Let backslash before other characters through verbatim.
*out++ = '\\';
*out++ = yych;
@@ -108,7 +108,7 @@ bool DepfileParser::Parse(string* content, string* err) {
} else if (!out_.str_) {
out_ = StringPiece(filename, len);
} else if (out_ != StringPiece(filename, len)) {
- *err = "depfile has multiple output paths.";
+ *err = "depfile has multiple output paths";
return false;
}
}