summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/getwc.c
diff options
context:
space:
mode:
authorcracauer <cracauer@FreeBSD.org>2010-02-10 00:02:09 +0000
committercracauer <cracauer@FreeBSD.org>2010-02-10 00:02:09 +0000
commit3d4c1b73b9036a1d5455a4a63eba6e0d20be9350 (patch)
tree9919f4b0264c98ab3dcba2ac782139db1a0889d2 /lib/libc/stdio/getwc.c
parentf4340253d5528006188e856b5e1780bcbae8ec5c (diff)
downloadFreeBSD-src-3d4c1b73b9036a1d5455a4a63eba6e0d20be9350.zip
FreeBSD-src-3d4c1b73b9036a1d5455a4a63eba6e0d20be9350.tar.gz
Fix PR
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/143350 Empty string test gone wrong. Testing this requires that you have a locale that has the sign string unset but has int_n_sign_posn set (the default locale falls through to use "()" around negative numbers which is probably another bug). I created that setup by hand and indeed without this fix negative numbers are put out as positive numbers (doesn't fall through to use "-" as default indicator). Unfixed example in nl_NL.ISO8859-1 with lc->negative_sign set to empty string: strfmon(buf, sizeof(buf), "%-8i", -42.0); ==> example2: 'EUR 42,00' 'Eu 42,00' Fixed: example2: 'EUR 42,00-' 'Eu 42,00-' This file and suggested fix are identical in at least freebsd-8. Backport might be appropriate but some expert on locales should probably have a look at us defaulting to negative numbers in parenthesis when LC_* is default. That doesn't look right and is not what other OSes are doing. PR: 143350 Submitted by: Corinna Vinschen Reviewed by: bug reporter submitted, tested by me
Diffstat (limited to 'lib/libc/stdio/getwc.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud