[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 18/22] target-i386: parse cpu_model string into
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 18/22] target-i386: parse cpu_model string into set of stringified properties |
Date: |
Wed, 3 Oct 2012 22:17:59 +0200 |
On Wed, 3 Oct 2012 20:09:52 +0000
Blue Swirl <address@hidden> wrote:
> On Tue, Oct 2, 2012 at 11:28 AM, Eric Blake <address@hidden> wrote:
> > On 09/30/2012 06:16 AM, Blue Swirl wrote:
> >> On Wed, Sep 26, 2012 at 8:32 PM, Igor Mammedov <address@hidden> wrote:
> >>> cpu_model string does represent features in following format:
> >>> ([+-]feat)|(feat=foo)|(feat)
> >>> which makes it impossible directly use property infrastructure
> >>> to set features on CPU.
> >>> This patch introduces parser that splits CPU name from cpu_model and
> >>> converts legacy features string into canonized set of strings that
> >>> is compatible with property manipulation infrastructure.
> >>>
> >
> >>> +
> >>> + *cpu_name = strtok_r(s, ",", &sptr);
> >>
> >> This would break build since strtok_r() isn't available on Mingw, it's
> >
> > Correct. Microsoft is stuck in the past when it comes to standard
> > conformance.
> >
> >> not Posix either.
> >
> > Huh? http://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok_r.html
> > strtok_r has been part of POSIX since pthreads were added.
>
> Sorry, I missed that strtok_r() was sharing the entry with strtok().
Mingw maintainers rejected to implement it though:
http://sourceforge.net/tracker/?func=detail&aid=2673480&group_id=2435&atid=352435
Anyway, I've already replace it with g_strsplit(), resulting patch became even
simpler.
>
> >
> > --
> > Eric Blake address@hidden +1-919-301-3266
> > Libvirt virtualization library http://libvirt.org
> >
--
Regards,
Igor