touch up 64bit build cleanliness

Some of the types being used happened to work on 32bit systems because
size_t is pretty much an unsigned int.  But with a 64bit system, we see: In member function
  'virtual bool KernelCollector::LoadParameters()': error: cannot convert 'size_t*' to 'unsigned int*'
  for argument '2' to 'bool LoadValue(FilePath, unsigned int*)'

This is easy to fix by using the correct type in LoadValue().

Next up, we get a failure due to the assumption that int64 can be
displayed using the lld format string.  But on 64bit systems, this
doesn't work: In member function
  'void CrashCollector::WriteCrashMetaData(const FilePath&, const std::string&, const std::string&)': error:
  format '%lld' expects type 'long long int', but argument 6 has type 'int64'

This takes a little bit more magic to make work.  Since printf itself
does not provide a printf string to handle "64bit" types, use the macros
that POSIX provides in inttypes.h.  The printf string is a little uglier,
but now should work for all targets.

TEST=`emerge-amd64-generic crash-reporter` now works
TEST=`emerge-x86-generic crash-reporter` still works
TEST=build+booting x86-alex still works

Change-Id: I8401f2ad932223085dfbe54541590e9b65297783
Reviewed-by: Ken Mixter <>
Tested-by: Mike Frysinger <>
Commit-Ready: Mike Frysinger <>
Reviewed-by: Michael Krebs <>
2 files changed
tree: 28b4545f436eee58b48aa8607a195876e8e39f4b
  1. crash_reporter/