From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JMt3g-0002Gt-Cz for qemu-devel@nongnu.org; Wed, 06 Feb 2008 17:48:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JMt3f-0002G2-Go for qemu-devel@nongnu.org; Wed, 06 Feb 2008 17:47:59 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMt3f-0002Fz-EE for qemu-devel@nongnu.org; Wed, 06 Feb 2008 17:47:59 -0500 Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JMt3e-0001bd-Vt for qemu-devel@nongnu.org; Wed, 06 Feb 2008 17:47:59 -0500 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20080206224941.DJUF3337.mtaout02-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Wed, 6 Feb 2008 22:49:41 +0000 Received: from implementation.famille.thibault.fr ([82.21.96.230]) by aamtaout04-winn.ispmail.ntl.com with ESMTP id <20080206224755.VLOX29112.aamtaout04-winn.ispmail.ntl.com@implementation.famille.thibault.fr> for ; Wed, 6 Feb 2008 22:47:55 +0000 Received: from samy by implementation.famille.thibault.fr with local (Exim 4.68) (envelope-from ) id 1JMt3W-0001IF-E0 for qemu-devel@nongnu.org; Wed, 06 Feb 2008 23:47:50 +0100 Date: Wed, 6 Feb 2008 22:47:50 +0000 From: Samuel Thibault Subject: Re: [Qemu-devel] Re: [PATCH] Allow AF_UNIX sockets to be disabled on non-Windows Message-ID: <20080206224750.GA4580@implementation> References: <18329.63445.210933.809690@mariner.uk.xensource.com> <18345.60175.649606.299131@mariner.uk.xensource.com> <47AA083B.4090401@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <47AA083B.4090401@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori, le Wed 06 Feb 2008 13:19:23 -0600, a écrit : > Ian Jackson wrote: > >iwj writes ("[PATCH] Allow AF_UNIX sockets to be disabled on non-Windows"): > > > >>The patch below makes it possible to disable AF_UNIX (unix-domain) > >>sockets in host environments which do not define _WIN32, by adding > >>-DNO_UNIX_SOCKETS to the compiler flags. This is useful in the > >>effectively-embedded qemu host which are going to be using for device > >>emulation in Xen. > > It should just check a define for _MINIOS. That's exactly what we wanted to avoid. > That makes it a lot more obvious why it's not being included. But it doesn't necessarily make obvious _what_ is not being included (here, local sockets). To my mind, something like #if !(defined(_WIN32) || defined(_MINIOS)) #define DO_UNIX_SOCKET #endif And then in the code, #ifdef DO_UNIX_SOCKET, is much nicer than repeating the if (!def||def) everywhere (and have to change them all if another system needs that too) Samuel