summaryrefslogtreecommitdiffstats
path: root/src/deps_log.h
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2020-08-03 10:48:17 (GMT)
committerGitHub <noreply@github.com>2020-08-03 10:48:17 (GMT)
commit00968321d6ace10b6798855cab7620dc6a5620fd (patch)
tree0eb1152dc7c28de4936a4661da15580e6e6947a1 /src/deps_log.h
parent086a9b2f8833fd45f2119596f74f90b9f7e2cdf5 (diff)
parentcc79afbc0510b7320d35fb481f0f200dec92cb43 (diff)
downloadNinja-00968321d6ace10b6798855cab7620dc6a5620fd.zip
Ninja-00968321d6ace10b6798855cab7620dc6a5620fd.tar.gz
Ninja-00968321d6ace10b6798855cab7620dc6a5620fd.tar.bz2
Merge pull request #1780 from jhasse/delay-open
Delay actually opening log files until the first write, fix #1724
Diffstat (limited to 'src/deps_log.h')
-rw-r--r--src/deps_log.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/deps_log.h b/src/deps_log.h
index e7974a1..c4ada8b 100644
--- a/src/deps_log.h
+++ b/src/deps_log.h
@@ -110,8 +110,13 @@ struct DepsLog {
// Write a node name record, assigning it an id.
bool RecordId(Node* node);
+ /// Should be called before using file_. When false is returned, errno will
+ /// be set.
+ bool OpenForWriteIfNeeded();
+
bool needs_recompaction_;
FILE* file_;
+ std::string file_path_;
/// Maps id -> Node.
vector<Node*> nodes_;