diff options
author | Assaf Gordon <assafgordon@gmail.com> | 2014-07-15 12:25:03 -0400 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-07-16 22:35:17 +0100 |
commit | 061882d73b4f11f7b7f7151754e617234edc6f7a (patch) | |
tree | d527f75dcf25f2ded0233eb0f7728b958c91a30c /NEWS | |
parent | 37b36018d3f5f276622a9888e32623f9410a80e0 (diff) | |
download | coreutils-061882d73b4f11f7b7f7151754e617234edc6f7a.tar.xz |
numfmt: fix isblank() usage for some unibyte locales
* src/numfmt.c (simple_strtod_int): Replace isdigit() with c_isdigit()
to avoid locale concerns and -Wchar-subscripts warnings on cygwin.
Remove the now redundant locale guard.
(simple_strtod_human): Cast characters to unsigned so that the promoted
int value passed to isblank() is positive, allowing it to work correctly
for all characters in unibyte locales. Previously character 0xA0,
i.e. non-breaking space, would be misclassified for example.
(process_suffixed_number): Likewise.
(skip_fields): Likewise.
Both issues were triggered by the -Wchar-subscripts warning on GCC 4.8.3
on cygwin, due to the is*() implementations used there, but the issue
is present on all platforms defaulting to signed chars.
* NEWS: Mention the bug fix.
Reported by Eric Blake
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -86,6 +86,10 @@ GNU coreutils NEWS -*- outline -*- ln -sr '' F no longer segfaults. Now works as expected. [bug introduced with the --relative feature in coreutils-8.16] + numfmt now handles blanks correctly in all unibyte locales. Previously + in locales where character 0xA0 is a blank, numfmt would mishandle it. + [bug introduced when numfmt was added in coreutils-8.21] + ptx --format long option parsing no longer falls through into the --help case. [bug introduced in TEXTUTILS-1_22i] |