summaryrefslogtreecommitdiffstats
path: root/src/ninja_jumble.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninja_jumble.cc')
-rw-r--r--src/ninja_jumble.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ninja_jumble.cc b/src/ninja_jumble.cc
index a935c21..fd2ee18 100644
--- a/src/ninja_jumble.cc
+++ b/src/ninja_jumble.cc
@@ -24,6 +24,7 @@
#include "build_log.h"
#include "graph.h"
+#include "util.h"
int ReadFile(const string& path, string* contents, string* err) {
FILE* f = fopen(path.c_str(), "r");
@@ -53,7 +54,7 @@ int RealDiskInterface::Stat(const string& path) {
if (errno == ENOENT) {
return 0;
} else {
- fprintf(stderr, "stat(%s): %s\n", path.c_str(), strerror(errno));
+ Error("stat(%s): %s", path.c_str(), strerror(errno));
return -1;
}
}
@@ -100,7 +101,7 @@ string RealDiskInterface::ReadFile(const string& path, string* err) {
bool RealDiskInterface::MakeDir(const string& path) {
if (mkdir(path.c_str(), 0777) < 0) {
- fprintf(stderr, "mkdir(%s): %s\n", path.c_str(), strerror(errno));
+ Error("mkdir(%s): %s", path.c_str(), strerror(errno));
return false;
}
return true;
@@ -115,8 +116,6 @@ FileStat* StatCache::GetFile(const string& path) {
return file;
}
-#include <stdio.h>
-
void StatCache::Dump() {
for (Paths::iterator i = paths_.begin(); i != paths_.end(); ++i) {
FileStat* file = i->second;
@@ -178,8 +177,8 @@ void State::AddOut(Edge* edge, const string& path) {
Node* node = GetNode(path);
edge->outputs_.push_back(node);
if (node->in_edge_) {
- fprintf(stderr, "WARNING: multiple rules generate %s. "
- "build will not be correct; continuing anyway\n", path.c_str());
+ Error("WARNING: multiple rules generate %s. "
+ "build will not be correct; continuing anyway", path.c_str());
}
node->in_edge_ = edge;
}