[libvirt] [PATCH v3 0/2] Adding locale support for virStrToDouble().

Martin Kletzander mkletzan at redhat.com
Thu Jun 22 11:23:53 UTC 2017


On Thu, Jun 22, 2017 at 01:12:44PM +0200, Peter Krempa wrote:
>On Thu, Jun 22, 2017 at 11:30:06 +0200, Martin Kletzander wrote:
>> On Wed, Jun 21, 2017 at 02:08:27PM -0300, Julio Faracco wrote:
>> > The commits add locale support for virStrToDouble() due to differences between
>> > the mantissa separator in different languages. For example, kernel always uses
>> > dot to separate mantissa. An user who is using pt_BR locale (for example) uses
>> > comma as a separator. So, this user will have problems to parse a kernel
>> > settings using strtod() function.
>> >
>> > One of commits move the virDoubleToStr() to virstring.* to share locale
>> > global variables. Joining the two functions makes more sense.
>> >
>>
>> Reviewed-by: Martin Kletzander <mkletzan at redhat.com>
>>
>> I'll push it in a minute.  Thanks for the patches and patience!
>
>Since this broke build and will require fixing. I'd prefer that the
>code to set and revert the locale will be wrapped into a function rather
>than scattering conditionally compiled code through the code base.

I'm working on that, but either we need more functions to add
conditionally, or just remove the conditionally compiled code from just
one of those two functions.  I'll post a fix in a while that fixes and
cleans up more stuff, so we'll see and can talk on that patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170622/6d963e7a/attachment-0001.sig>


More information about the libvir-list mailing list