Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2007 12:47:45 -0500
From:      David Schultz <das@FreeBSD.ORG>
To:        Andrey Chernov <ache@nagual.pp.ru>, src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/tools/regression/lib/libc/stdio test-printfloat.c test-scanfloat.c
Message-ID:  <20071203174745.GA13567@VARK.MIT.EDU>
In-Reply-To: <20071203080739.GA56795@nagual.pp.ru>
References:  <200712030718.lB37IlLc009328@repoman.freebsd.org> <20071203072214.GA11030@VARK.MIT.EDU> <20071203080739.GA56795@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 03, 2007, Andrey Chernov wrote:
> On Mon, Dec 03, 2007 at 02:22:14AM -0500, David Schultz wrote:
> > On Mon, Dec 03, 2007, David Schultz wrote:
> > > das         2007-12-03 07:18:47 UTC
> > > 
> > >   FreeBSD src repository
> > > 
> > >   Modified files:
> > >     tools/regression/lib/libc/stdio test-printfloat.c 
> > >                                     test-scanfloat.c 
> > >   Log:
> > >   Tests for rounding, and for the leading 0's bug.
> > 
> > test-printfloat is failing on my machine due to the fact that the
> > default locale in FreeBSD seems to have a thousands separator now.
> > I thought the default locale wasn't supposed to. Can someone
> > comment?
> 
> Default locale don't have thousands separator as you can see:
> 
> static const struct lc_numeric_T _C_numeric_locale = {
>         ".",            /* decimal_point */
>         "",             /* thousands_sep */
>         numempty        /* grouping */
> };
> 
> Something wrong in your default locale setup, use LC_ALL=C for sure.

This works, but there's still something wrong, because the start
of the program has a line:

        assert(setlocale(LC_NUMERIC, ""));

It looks like it should be setlocale(LC_NUMERIC, "C") to ensure
that the right locale is used. I'll go ahead and fix that.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071203174745.GA13567>