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:
kernel_collector.cc: In member function
'virtual bool KernelCollector::LoadParameters()':
kernel_collector.cc:141: 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
crash_collector.cc: In member function
'void CrashCollector::WriteCrashMetaData(const FilePath&, const std::string&, const std::string&)':
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
Reviewed-by: Ken Mixter <email@example.com>
Tested-by: Mike Frysinger <firstname.lastname@example.org>
Commit-Ready: Mike Frysinger <email@example.com>
Reviewed-by: Michael Krebs <firstname.lastname@example.org>
2 files changed