aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf_cu_to_module.cc
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-08-27 18:50:59 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-08-27 18:50:59 +0000
commit8ca54e486c2b1df72a6eebc0dcb43ef7847cd428 (patch)
tree834cbce6423104c26027b27183368c2bf1fec816 /src/common/dwarf_cu_to_module.cc
parentAdding sytax setting to proto file (diff)
downloadbreakpad-8ca54e486c2b1df72a6eebc0dcb43ef7847cd428.tar.xz
Use <inttypes.h> macros for formatting fixed-width types.
Review URL: http://breakpad.appspot.com/162002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@676 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/dwarf_cu_to_module.cc')
-rw-r--r--src/common/dwarf_cu_to_module.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc
index 9b538283..fb54ee16 100644
--- a/src/common/dwarf_cu_to_module.cc
+++ b/src/common/dwarf_cu_to_module.cc
@@ -31,9 +31,15 @@
// Implement the DwarfCUToModule class; see dwarf_cu_to_module.h.
+// For <inttypes.h> PRI* macros, before anything else might #include it.
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif /* __STDC_FORMAT_MACROS */
+
#include "common/dwarf_cu_to_module.h"
#include <assert.h>
+#include <inttypes.h>
#include <algorithm>
#include <set>
@@ -532,7 +538,7 @@ void DwarfCUToModule::WarningReporter::UncoveredLine(const Module::Line &line) {
if (!uncovered_warnings_enabled_)
return;
UncoveredHeading();
- fprintf(stderr, " line%s: %s:%d at 0x%llx\n",
+ fprintf(stderr, " line%s: %s:%d at 0x%" PRIx64 "\n",
(line.size == 0 ? " (zero-length)" : ""),
line.file->name.c_str(), line.number, line.address);
}