[U-Boot] [PATCH 0/10] Provide inttypes.h to avoid 32/64 bit problems with printf()

Simon Glass
2014-10-24T17:18:20Z

Hi Jeroen,

On 24 October 2014 11:06, Jeroen Hofstee <jeroen@myspectrum.nl> wrote:
> Hi Simon, attempt two..
>
> On 24-10-14 03:03, Simon Glass wrote:
>>
>> +Jeroen
>>
>> Hi,
>>
>> On 15 October 2014 04:38, Simon Glass <sjg@chromium.org> wrote:
>>>
>>> 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.h header file to provide defines for this and clean up
>>> the
>>> code to use these defines in a few places.
>>>
>>> The stdint.h file 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
>>> internal stdint.h file.
>>>
>>>
>>> Gabe Black (2):
>>> Provide option to avoid defining a custom version of uintptr_t.
>>> Add some standard headers external code might need
>>>
>>> Simon Glass (8):
>>> ext4: Use inttypes for printf() string
>>> Use uint64_t for time types
>>> Use uint64_t instead of u64 in put_dec()
>>> Tidy up data sizes and function comment in display_options
>>> x86: Use correct printf() format string for uintptr_t
>>> scsi: Use correct printf() format string for uintptr_t
>>> usb: Use correct printf() format string for uintptr_t
>>> test: Add a simple test to detected warnings with uint64_t, uintptr_t
>>
>> 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.

OK that's good. Thanks for trying it out.

Regards,
Simon