1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/lib/libc
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
..
amd64
arm
compat-43 Implement sighold, sigignore, sigpause, sigrelse, sigset functions 2009-11-26 13:49:37 +00:00
db
gdtoa
gen Also add a cross-reference to NetBSD updlastlogx(). 2010-02-03 19:31:02 +00:00
gmon Fix many "function declaration isn't a prototype" warnings in libc. 2009-12-05 19:31:38 +00:00
i386
ia64
include Use umtx to implement process sharable semaphore, to make this work, 2010-01-05 02:37:59 +00:00
inet
isc
locale Fix grammar. 2009-11-16 14:33:31 +00:00
mips Reinstate the ptrace patch to restore the 'gp' register after calling 2010-02-04 05:49:59 +00:00
nameser
net Remove extra semicolon. 2010-01-31 21:47:39 +00:00
nls - Deal with some special cases [1] 2010-02-09 19:37:12 +00:00
posix1e Don't forget to clean up the file copied from the kernel sources. 2010-01-02 20:27:14 +00:00
powerpc
quad
regex
resolv
rpc Use the correct types to store uids and gids in the credential cache. 2010-01-09 23:36:51 +00:00
softfloat
sparc64
stdio Give a less silly response to a silly request. 2010-01-10 14:30:30 +00:00
stdlib Fix PR 2010-02-10 00:02:09 +00:00
stdtime Use _pthread_once() rather than _once() for localtime() and gmtime(). These 2010-01-06 20:43:40 +00:00
string Mark up "unsigned char". 2010-02-04 11:23:28 +00:00
sys Add PT_VM_TIMESTAMP and PT_VM_ENTRY so that the tracing process can 2010-02-09 05:52:35 +00:00
uuid
xdr
yp Eliminate more dead stores. 2009-11-25 04:45:45 +00:00
Makefile Merge r195030 from project/mips to head by hand 2010-01-09 00:01:35 +00:00
Versions.def