From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1aty-0005RD-HY for qemu-devel@nongnu.org; Wed, 15 Aug 2012 06:32:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1atx-0008AY-HQ for qemu-devel@nongnu.org; Wed, 15 Aug 2012 06:32:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1atx-0008AQ-9J for qemu-devel@nongnu.org; Wed, 15 Aug 2012 06:32:37 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7FAWa5G026581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 15 Aug 2012 06:32:36 -0400 Date: Wed, 15 Aug 2012 13:32:27 +0300 From: Alon Levy Message-ID: <20120815103227.GH17706@garlic.redhat.com> References: <5023C014.2080407@redhat.com> <1344522080-28833-1-git-send-email-alevy@redhat.com> <502B5C7B.4020502@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <502B5C7B.4020502@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 1/2] qxl: add QXL_IO_MONITORS_CONFIG_ASYNC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Wed, Aug 15, 2012 at 10:23:23AM +0200, Gerd Hoffmann wrote: > On 08/09/12 16:21, Alon Levy wrote: > > Revision bumped to 4 for new IO support, enabled for spice-server >= > > 0.11.1. New io enabled iff spice-server >= 0.11.1 && spice-protocol >= > > 0.12.0. > > Patch doesn't apply cleanly to master. Strange, will resend. > > > + if $pkg_config --atleast-version=0.12.0 spice-protocol >/dev/null 2>&1; then > > + QEMU_CFLAGS="$QEMU_CFLAGS -DQXL_HAS_IO_MONITORS_CONFIG_ASYNC" > > + fi > > /me thinks now with spice-server having no dependency any more on > spice-protocol we should add a #define SPICE_PROTOCOL_VERSION to > spice-protocol so we don't need constructs like this. So yet another place to remember to update the version number. But I agree it's cleaner. > > Or maybe just use > > #ifndef QXL_HAS_IO_MONITORS_CONFIG_ASYNC > #define QXL_HAS_IO_MONITORS_CONFIG_ASYNC $whatever > #endif I don't get this. You mean to have add #define QXL_HAS_IO_MONITORS_CONFIG_ASYNC bla to spice-protocol? > > ? > > > +#if SPICE_SERVER_VERSION >= 0x000b01 /* 0.11.1 */ > > +#ifdef QXL_HAS_IO_MONITORS_CONFIG_ASYNC > > Can be on a single line: > > #if (SPICE_SERVER_VERSION >= 0x000b01) && > defined(QXL_HAS_IO_MONITORS_CONFIG_ASYNC) > > Or: > > #if (SPICE_SERVER_VERSION >= 0x000b01) && (SPICE_PROTOCOL_VERSION >= ...) > Correct, the point was to make sure when I later removed only a part of it it would show up as a single line removal. But sure, if you prefer it this way. > cheers, > Gerd >