1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00
freebsd/lib/libc/stdlib
Martin Cracauer 3a921aa75d 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
2010-02-10 00:02:09 +00:00
..
_Exit.c
a64l.3
a64l.c
abort.3
abort.c
abs.3
abs.c
alloca.3
atexit.3
atexit.c
atexit.h
atof.3
atof.c
atoi.3 Remove out of date notes, the atoi code is thread-safe and async-cancel 2007-10-19 06:23:39 +00:00
atoi.c
atol.3 "-isoC-99" should be spelled without 'c'. 2009-03-01 05:44:28 +00:00
atol.c
atoll.c
bsearch.3
bsearch.c
div.3
div.c
exit.3
exit.c
getenv.3 Update the getenv(3) man page to reflect the recent change to the behavior 2009-12-06 23:51:27 +00:00
getenv.c Revert behavior change to setenv(), unsetenv() and putenv() until a more 2009-12-07 00:22:10 +00:00
getopt_long.3
getopt_long.c
getopt.3
getopt.c
getsubopt.3
getsubopt.c
hcreate.3 - This code was intially obtained from NetBSD, but it's missing licence 2008-07-06 17:03:37 +00:00
hcreate.c - remove superfluous word 2008-07-06 11:31:20 +00:00
heapsort.c Use size_t to avoid overflow when sorting arrays larger than 2 GB. 2008-01-13 02:11:10 +00:00
imaxabs.3
imaxabs.c
imaxdiv.3
imaxdiv.c
insque.3
insque.c
l64a.c
labs.3
labs.c
ldiv.3
ldiv.c
llabs.3
llabs.c
lldiv.3
lldiv.c
lsearch.3
lsearch.c
Makefile.inc Simplify. We can just use .sinclude here. 2009-06-23 14:10:46 +00:00
malloc.3 Fix bugs: 2010-01-31 23:16:10 +00:00
malloc.c Fix bugs: 2010-01-31 23:16:10 +00:00
memory.3
merge.c
posix_memalign.3 Add a HISTORY section. 2007-03-28 04:32:51 +00:00
ptsname.3 Our implementation of granpt(3) could be valid in the future. 2009-08-24 11:16:44 +00:00
ptsname.c Add two new routines: fdevname() and fdevname_r(). 2009-02-11 20:24:59 +00:00
ql.h Fix bugs: 2010-01-31 23:16:10 +00:00
qr.h Fix bugs: 2010-01-31 23:16:10 +00:00
qsort_r.c
qsort.3
qsort.c Changing 'r' to a size_t in the previous commit turned quicksort 2008-01-14 09:21:34 +00:00
radixsort.3
radixsort.c
rand.3
rand.c Fix typo in the comment 2007-12-11 20:39:32 +00:00
random.3
random.c
rb.h Clean up cpp logic and comments. 2008-05-14 18:33:13 +00:00
reallocf.c
realpath.3
realpath.c
remque.c
strfmon.3
strfmon.c Fix PR 2010-02-10 00:02:09 +00:00
strtod.3 Implement and document nan(), nanf(), and nanl(). This commit 2007-12-16 21:19:28 +00:00
strtoimax.c
strtol.3 Swap "underflow"/"overflow" in the table header. 2007-04-10 11:17:00 +00:00
strtol.c
strtoll.c
strtonum.3
strtonum.c
strtoq.c
strtoul.3
strtoul.c
strtoull.c
strtoumax.c
strtouq.c
Symbol.map Add thread-specific caching for small size classes, based on magazines. 2008-08-27 02:00:53 +00:00
system.3 Mark the section describing return values with an appropriate section flag. 2008-06-26 08:24:59 +00:00
system.c Fix many "function declaration isn't a prototype" warnings in libc. 2009-12-05 19:31:38 +00:00
tdelete.c
tfind.c
tsearch.3
tsearch.c
twalk.c