Provide inttypes.h to avoid 32/64 bit problems with printf()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 10 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 10 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/10] Provide inttypes.h to avoid 32/64 bit problems with printf()
Hello Simon,
Quoted 32 lines · Simon Glass
+Jeroen
Hi,
Quoted 18 lines · Simon Glass
In quite a few situations we have to print a 64-bit value. Unfortunately the type used for 64-bit can vary depending on the machine. For 64-bit machines it might be 'long' and for 32-bit machines it might be 'long long'.
As a result we need to use either %ld or %lld depending on the architecture. Add the
inttypes.hheader file to provide defines for this and clean up the code to use these defines in a few places.The
stdint.hfile is bundled with recent versions of gcc and it is generally better to use this rather than our own versions. Add an option to use the internalstdint.hfile.Gabe Black (2):
Provide option to avoid defining a custom version ofuintptr_t. Add some standard headers external code might needQuoted 9 lines
Simon Glass (8):
ext4: Use inttypes forprintf()string
Useuint64_tfor time types
Useuint64_tinstead of u64 input_dec()
Tidy up data sizes and function comment indisplay_options
x86: Use correctprintf()format string foruintptr_t
scsi: Use correctprintf()format string foruintptr_t
usb: Use correctprintf()format string foruintptr_t
test: Add a simple test to detected warnings withuint64_t,uintptr_t
Quoted 4 lines
Are there any comments on this series? I'm keen to clean up the
printf()types a bit. Also this simplifies building withe external libraries, and with more work might reduce the difference between U-Boot code in /tools and the rest of it.
No comments from my side. clang seem to digest this fine.
Regards,
Jeroen