From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vrcd5-0001WD-4H for qemu-devel@nongnu.org; Fri, 13 Dec 2013 18:58:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vrcct-0001o5-4s for qemu-devel@nongnu.org; Fri, 13 Dec 2013 18:58:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vrccs-0001nW-Tq for qemu-devel@nongnu.org; Fri, 13 Dec 2013 18:58:35 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBDNwYph016306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 13 Dec 2013 18:58:34 -0500 Message-ID: <52AB9F5A.9090000@redhat.com> Date: Sat, 14 Dec 2013 00:59:22 +0100 From: Max Reitz MIME-Version: 1.0 References: <1386954633-28905-1-git-send-email-mreitz@redhat.com> <1386954633-28905-20-git-send-email-mreitz@redhat.com> <20131213204958.GG3916@dhcp-200-207.str.redhat.com> <52AB7587.9070904@redhat.com> In-Reply-To: <52AB7587.9070904@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 19/22] blkdebug: Alias "errno" as "error" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Kevin Wolf Cc: Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi On 13.12.2013 22:00, Eric Blake wrote: > On 12/13/2013 01:49 PM, Kevin Wolf wrote: >> Am 13.12.2013 um 18:10 hat Max Reitz geschrieben: >>> Introduce an alias "error" for "errno", since using the latter for QMP >>> is sure to result in various syntax errors due to the name being used >>> directly as an identifier. >>> >>> Signed-off-by: Max Reitz >> I can't say I like this, but it seems we don't have an option. > Don't we already have a way to use QMP keys that collide with C keywords > (for example, "unix" in qapi's SocketAddress becomes "q_unix" in C)? > Why can't we reuse that mechanism, and just add "errno" to the polluted > words list so that the generated C code uses "q_errno" rather than > having to invent an "error" alias? Great, I'll have a look. Max