|
From: | Paolo Bonzini |
Subject: | Re: glibc's snprintf is a pig; fix or replace ? |
Date: | Wed, 03 Nov 2010 19:57:26 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6 |
On 11/03/2010 10:13 AM, Jim Meyering wrote:
Fixing it in glibc is not trivial. Handling %c, %s and %[xoiud] would be easy, but floating point can be tricky; for some values, you may need additional space for multiple-precision arithmetic to determine the precise width of the printed representation. While it'd be nice to have an all-around fix, even fixing it for integer and string formats would be a most welcome improvement. There are far fewer applications that care about floating point formats.
I don't think it's possible to fix it for floating-point. But the behavior of glibc is not reasonable IMHO.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |