[PATCH] Fix a printf hook problem
Ryan Arnold
ryan.arnold@gmail.com
Wed Mar 16 00:06:00 GMT 2011
On Sat, Feb 12, 2011 at 9:10 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> And the libdfp bugs:
>
> 1) Related to 1) above, libdfp arginfo function currently returns
> 0 if it is not D/DD/H modifier, which means that whenever you
> use e/E/f/F/g/G/a/A specifier, if no modifier or some other modifier
> is used it assumes no argument needs to be consumed (similarly to %m),
> i.e. when you register libdfp suddenly "%e %Lg %f" will not work
> anymore.
>
> 2) __printf_dfp doesn't return -2 if modifier is not D/DD/H, which
> means that say %e is printed as if it was _Decimal32 number
> (and because of 1) above random garbage is printed as such number).
>
> 3) #ifndef OPTION_EGLIBC_LOCALE_CODE
> char decimald;
> #endif
> const char *decimal;
> ...
> #else
> /* Hard-code values from 'C' locale. */
> decimald = ".";
> decimal = &decimald;
> decimalwc.wc = L'.';
> #endif
> can't possible work right, assigning "." to a char? Surely
> that was supposed to be decimal = "."; and kill decimald.
Hi Jakub,
I've fixed these issue, tested and checked them in.
Ryan S. Arnold
More information about the Libc-alpha
mailing list