This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix a printf hook problem
- From: Ryan Arnold <ryan dot arnold at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com, "Ryan S. Arnold" <rsa at us dot ibm dot com>
- Date: Tue, 15 Mar 2011 19:06:00 -0500
- Subject: Re: [PATCH] Fix a printf hook problem
- References: <20110212151022.GC30899@tyan-ft48-01.lab.bos.redhat.com>
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