Re: [libvirt] [PATCH v2] json: fix interface locale dependency

2012-08-11 Thread Martin Kletzander
On 08/10/2012 05:39 PM, Eric Blake wrote: > On 08/10/2012 03:43 AM, Martin Kletzander wrote: >>> I'm still worried about whether 'struct lconv' will compile on mingw. >>> Then again, any system that lacks localeconf() probably also lacks any >>> locale that would use ',' for the decimal separator,

Re: [libvirt] [PATCH v2] json: fix interface locale dependency

2012-08-10 Thread Eric Blake
On 08/10/2012 03:43 AM, Martin Kletzander wrote: >> I'm still worried about whether 'struct lconv' will compile on mingw. >> Then again, any system that lacks localeconf() probably also lacks any >> locale that would use ',' for the decimal separator, so maybe >> appropriate ifdef protection is all

Re: [libvirt] [PATCH v2] json: fix interface locale dependency

2012-08-10 Thread Martin Kletzander
On 08/09/2012 06:17 PM, Eric Blake wrote: > virCasprintf() seems like overkill, for now. Since printing a floating > point value is the only case where locale matters, we should be able to > provide a single helper function that guarantees a formatted float, > rather than trying to provide a gener

Re: [libvirt] [PATCH v2] json: fix interface locale dependency

2012-08-09 Thread Eric Blake
On 08/09/2012 07:44 AM, Martin Kletzander wrote: > libvirt creates invalid commands if wrong locale is selected. For > example with locale that uses comma as a decimal point, JSON commands > created with decimal numbers are invalid because comma separates the > entries in JSON. Fortunately even wh

[libvirt] [PATCH v2] json: fix interface locale dependency

2012-08-09 Thread Martin Kletzander
libvirt creates invalid commands if wrong locale is selected. For example with locale that uses comma as a decimal point, JSON commands created with decimal numbers are invalid because comma separates the entries in JSON. Fortunately even when decimal point is affected, thousands grouping is not,