Re: [PATCH 2/2] virstring: Prefer strtoll_l() and strtoull_l() whenever possible

2023-06-20 Thread Daniel P . Berrangé
On Tue, Jun 20, 2023 at 01:25:23PM +0200, Michal Prívozník wrote: > On 6/19/23 17:02, Daniel P. Berrangé wrote: > > On Mon, Jun 19, 2023 at 02:45:57PM +0200, Michal Prívozník wrote: > >> On 6/19/23 14:31, Daniel P. Berrangé wrote: > >>> On Mon, Jun 19, 2023 at 02:03:48PM +0200, Michal Privoznik wro

Re: [PATCH 2/2] virstring: Prefer strtoll_l() and strtoull_l() whenever possible

2023-06-20 Thread Michal Prívozník
On 6/19/23 17:02, Daniel P. Berrangé wrote: > On Mon, Jun 19, 2023 at 02:45:57PM +0200, Michal Prívozník wrote: >> On 6/19/23 14:31, Daniel P. Berrangé wrote: >>> On Mon, Jun 19, 2023 at 02:03:48PM +0200, Michal Privoznik wrote: It's weird that in 2023 there's no reliable and portable way to >

Re: [PATCH 2/2] virstring: Prefer strtoll_l() and strtoull_l() whenever possible

2023-06-19 Thread Daniel P . Berrangé
On Mon, Jun 19, 2023 at 02:45:57PM +0200, Michal Prívozník wrote: > On 6/19/23 14:31, Daniel P. Berrangé wrote: > > On Mon, Jun 19, 2023 at 02:03:48PM +0200, Michal Privoznik wrote: > >> It's weird that in 2023 there's no reliable and portable way to > >> parse strings, but okay. > >> > >> We start

Re: [PATCH 2/2] virstring: Prefer strtoll_l() and strtoull_l() whenever possible

2023-06-19 Thread Michal Prívozník
On 6/19/23 14:31, Daniel P. Berrangé wrote: > On Mon, Jun 19, 2023 at 02:03:48PM +0200, Michal Privoznik wrote: >> It's weird that in 2023 there's no reliable and portable way to >> parse strings, but okay. >> >> We started with strtol(). Except, it doesn't work the same on >> Linux and Windows. On

Re: [PATCH 2/2] virstring: Prefer strtoll_l() and strtoull_l() whenever possible

2023-06-19 Thread Daniel P . Berrangé
On Mon, Jun 19, 2023 at 02:03:48PM +0200, Michal Privoznik wrote: > It's weird that in 2023 there's no reliable and portable way to > parse strings, but okay. > > We started with strtol(). Except, it doesn't work the same on > Linux and Windows. On Windows it behaves a bit different when it > come

[PATCH 2/2] virstring: Prefer strtoll_l() and strtoull_l() whenever possible

2023-06-19 Thread Michal Privoznik
It's weird that in 2023 there's no reliable and portable way to parse strings, but okay. We started with strtol(). Except, it doesn't work the same on Linux and Windows. On Windows it behaves a bit different when it comes to parsing strings with base = 0. So we've switched to g_ascii_strtoll() whi