diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-02-06 12:31:06 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-02-06 12:31:06 -0500 |
commit | c7f0da4134d4e7f2efd295e7fb738c65c469fbd1 (patch) | |
tree | f28bc3fc1b716d9919a5c48c2fa379b6ea1bd500 /tools/add-cfi.common.awk | |
parent | 596207aa38b0db33f222c9924a1310fee3de88b5 (diff) | |
download | musl-c7f0da4134d4e7f2efd295e7fb738c65c469fbd1.tar.gz musl-c7f0da4134d4e7f2efd295e7fb738c65c469fbd1.tar.xz musl-c7f0da4134d4e7f2efd295e7fb738c65c469fbd1.zip |
adjust strftime + modifier to match apparent intent of POSIX
it's unclear from the specification whether the word "consumes" in "consumes more than four bytes to represent a year" refers just to significant places or includes leading zeros due to field width padding. however the examples in the rationale indicate that the latter was the intent. in particular, the year 270 is shown being formatted by %+5Y as +0270 rather than 00270. previously '+' prefixing was implemented just by comparing the year against 10000. instead, count the number of significant digits and padding bytes to be added, and use the total to determine whether to apply the '+' prefix. based on testing by Dennis Wölfing.
Diffstat (limited to 'tools/add-cfi.common.awk')
0 files changed, 0 insertions, 0 deletions