From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJVOU-0001lC-Ma for qemu-devel@nongnu.org; Wed, 03 Oct 2012 16:18:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJVOT-0003PV-Bh for qemu-devel@nongnu.org; Wed, 03 Oct 2012 16:18:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJVOT-0003PP-1b for qemu-devel@nongnu.org; Wed, 03 Oct 2012 16:18:09 -0400 Date: Wed, 3 Oct 2012 22:17:59 +0200 From: Igor Mammedov Message-ID: <20121003221759.103253f2@thinkpad.mammed.net> In-Reply-To: References: <1348691578-17231-1-git-send-email-imammedo@redhat.com> <1348691578-17231-19-git-send-email-imammedo@redhat.com> <506ACFDB.3040302@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 18/22] target-i386: parse cpu_model string into set of stringified properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: aliguori@us.ibm.com, ehabkost@redhat.com, lersek@redhat.com, jan.kiszka@siemens.com, Don@cloudswitch.com, mtosatti@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, pbonzini@redhat.com, Eric Blake , afaerber@suse.de, stefanha@linux.vnet.ibm.com On Wed, 3 Oct 2012 20:09:52 +0000 Blue Swirl wrote: > On Tue, Oct 2, 2012 at 11:28 AM, Eric Blake wrote: > > On 09/30/2012 06:16 AM, Blue Swirl wrote: > >> On Wed, Sep 26, 2012 at 8:32 PM, Igor Mammedov 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 eblake@redhat.com +1-919-301-3266 > > Libvirt virtualization library http://libvirt.org > > -- Regards, Igor