This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix a printf hook problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]