summaryrefslogtreecommitdiffstats
path: root/src/deps_log.h
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2017-04-21 03:10:56 (GMT)
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2017-09-16 07:54:11 (GMT)
commitbf4fb03e4b266e7f75f88664b6a941d20650046b (patch)
tree1b1e26f0359d561cdf9b05469550b84a91a223a8 /src/deps_log.h
parenteb6cea27f23c0674cea47871f281aaffb8a8efc3 (diff)
downloadNinja-bf4fb03e4b266e7f75f88664b6a941d20650046b.zip
Ninja-bf4fb03e4b266e7f75f88664b6a941d20650046b.tar.gz
Ninja-bf4fb03e4b266e7f75f88664b6a941d20650046b.tar.bz2
Use 64-bit-alignment-safe timestamp reading.
Read and write the timestamp as two separate 32-bit integers in a fixed order to prevent any issues with alignment or byte order.
Diffstat (limited to 'src/deps_log.h')
-rw-r--r--src/deps_log.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/deps_log.h b/src/deps_log.h
index 793af07..b1aa361 100644
--- a/src/deps_log.h
+++ b/src/deps_log.h
@@ -57,8 +57,9 @@ struct State;
/// one's complement of the expected index of the record (to detect
/// concurrent writes of multiple ninja processes to the log).
/// dependency records are an array of 4-byte integers
-/// [output path id, output path mtime (8-byte int), input path id,
-/// input path id...]
+/// [output path id,
+/// output path mtime (lower 4 bytes), output path mtime (upper 8 bytes),
+/// input path id, input path id...]
/// (The mtime is compared against the on-disk output path mtime
/// to verify the stored data is up-to-date.)
/// If two records reference the same output the latter one in the file