diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-12-02 15:18:05 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-12-02 15:18:05 -0500 |
commit | 216b706548c16e3bc9612c8a2e5eed23f016504c (patch) | |
tree | de96295a1d3903657bc237b849b7438657309388 /COPYRIGHT | |
parent | 7dcb640da361f272a6c317b03466fd2013934c81 (diff) | |
download | musl-216b706548c16e3bc9612c8a2e5eed23f016504c.tar.gz musl-216b706548c16e3bc9612c8a2e5eed23f016504c.tar.xz musl-216b706548c16e3bc9612c8a2e5eed23f016504c.zip |
fix a couple issues in the inttypes.h PRI/SCN macros
most importantly, the format/scan macros for the [u]int_fast16_t and [u]int_fast32_t types were defined incorrectly assuming these types would match the native word/pointer size. this is incorrect on any 64-bit system; the "fast" types for 16- and 32-bit integers are simply int. another issue which was "only a warning" (despite being UB) is that the choice of "l" versus "ll" was incorrect for 64-bit types on 64-bit machines. while it would "work" to always use "long long" for 64-bit types, we use "long" on 64-bit machines to match what glibc does and what the ABI documents recommend. the macro definitions were probably right in very old versions of musl, but became wrong when we aligned most closely with the 'standard' ABI. checking UINTPTR_MAX is an easy way to get the system wordsize without pulling in new headers. finally, the useless __PRIPTR macro to allow the underlying type of [u]intptr_t to vary has been removed. we are using "long" on all targets, and thankfully this matches what glibc does, so I do not envision ever needing to change it. thus, the "l" has just been incorporated directly in the strings.
Diffstat (limited to 'COPYRIGHT')
0 files changed, 0 insertions, 0 deletions