From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeroen Hofstee Date: Fri, 24 Oct 2014 09:19:02 +0200 Subject: [U-Boot] [PATCH 0/10] Provide inttypes.h to avoid 32/64 bit problems with printf() In-Reply-To: References: <1413369519-11677-1-git-send-email-sjg@chromium.org> Message-ID: <5449FD66.4080701@myspectrum.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Simon, On 24-10-14 03:03, Simon Glass wrote: > +Jeroen > > Hi, > > On 15 October 2014 04:38, Simon Glass 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. Regards, Jeroen