Teemu.Keskinarkaus at cc-systems.com
Fri Apr 11 04:24:36 UTC 2008
> -----Original Message-----
> From: Denys Vlasenko [mailto:vda.linux at googlemail.com]
> Sent: 10. huhtikuuta 2008 19:10
> To: uclibc at uclibc.org
> Cc: Teemu Keskinarkaus
> Subject: Re: Decimalpoint missing
> On Thursday 10 April 2008 14:16, Teemu Keskinarkaus wrote:
> > Hi,
> > It seems that few other fellow have asked this already, but I
> > find any answer.
> > I'm using uClibc 0.9.29 and I'm having problems with decimal points.
> > They are missing when printing floating point value as well as
> > it with (s)scanf. One solution for this is to disable locale from
> > uClibc. That worked just fine until I had to use program that uses
> > both(locale and printing floating points).
> > What I need to do to get the locale and decimal point working at the
> > same time? One post suggested that the decimal point is missing from
> > locale. Are there any patches regarding this issue?
> Can you post an example which shows the problem?
For missing decimalpoint, a simple print example will show the problem.
This example will 'work' with uClibc locale enabled. Something like
int main (void)
float f = 1.23;
printf("Number is: %f\n",f);
Output: Number is 123
If I compile uClibc with locale disabled then output: Number is 1.23
(I have removed the trailing zeroes, but you get the point).
Now, if I disable the locale to get the decimal point handled ok, the
other program (AppWeb webserver) won't work any more. It uses locale
somewhere so if linked statically the error occurs when linking and if
linked dynamically the error occurs when using the program. Oh, did I
mention that I need those floats also in AppWeb. My other program
doesn't use locale so 'fix' for it is to disable locale from uClibc, but
that doesn't work for AppWeb.
More information about the uClibc