summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/build_log.cc4
-rw-r--r--src/win32port.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/build_log.cc b/src/build_log.cc
index 86b660f..02a9fb5 100644
--- a/src/build_log.cc
+++ b/src/build_log.cc
@@ -296,7 +296,7 @@ bool BuildLog::Load(const string& path, string* err) {
entry->restat_mtime = restat_mtime;
if (log_version >= 5) {
char c = *end; *end = '\0';
- entry->command_hash = (uint64_t)strtoull(start, NULL, 10);
+ entry->command_hash = (uint64_t)strtoull(start, NULL, 16);
*end = c;
} else {
entry->command_hash = LogEntry::HashCommand(StringPiece(start,
@@ -332,7 +332,7 @@ BuildLog::LogEntry* BuildLog::LookupByOutput(const string& path) {
}
void BuildLog::WriteEntry(FILE* f, const LogEntry& entry) {
- fprintf(f, "%d\t%d\t%d\t%s\t%" PRIu64 "\n",
+ fprintf(f, "%d\t%d\t%d\t%s\t%" PRIx64 "\n",
entry.start_time, entry.end_time, entry.restat_mtime,
entry.output.c_str(), entry.command_hash);
}
diff --git a/src/win32port.h b/src/win32port.h
index 1cc8d12..8b42b38 100644
--- a/src/win32port.h
+++ b/src/win32port.h
@@ -23,6 +23,7 @@ typedef unsigned long long uint64_t;
// printf format specifier for uint64_t, from C99.
#ifndef PRIu64
#define PRIu64 "I64u"
+#define PRIx64 "I64x"
#endif
#endif // NINJA_WIN32PORT_H_