summaryrefslogtreecommitdiffstats
path: root/src/build_log.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-01-23 19:28:38 (GMT)
committerEvan Martin <martine@danga.com>2011-01-23 19:28:38 (GMT)
commit4d463b48b8feb0691719a520d7ab825ece377a52 (patch)
tree50793e50ffd934bf7dbdb950b1d5676d3e044b2f /src/build_log.h
parent6d7b2a515b2bba60ed272c633235bb17fe1eef4e (diff)
downloadNinja-4d463b48b8feb0691719a520d7ab825ece377a52.zip
Ninja-4d463b48b8feb0691719a520d7ab825ece377a52.tar.gz
Ninja-4d463b48b8feb0691719a520d7ab825ece377a52.tar.bz2
recompact log files
Diffstat (limited to 'src/build_log.h')
-rw-r--r--src/build_log.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/build_log.h b/src/build_log.h
index 2442f70..265f378 100644
--- a/src/build_log.h
+++ b/src/build_log.h
@@ -33,7 +33,14 @@ struct BuildLog {
// Lookup a previously-run command by its output path.
LogEntry* LookupByOutput(const string& path);
+ // Serialize an entry into a log file.
+ void WriteEntry(FILE* f, const LogEntry& entry);
+
+ // Rewrite the known log entries, throwing away old data.
+ bool Recompact(const string& path, string* err);
+
typedef map<string, LogEntry*> Log;
Log log_;
FILE* log_file_;
+ bool needs_recompaction_;
};