From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaTm3-00017r-8n for qemu-devel@nongnu.org; Sat, 04 Oct 2014 14:09:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaTlu-00079W-6s for qemu-devel@nongnu.org; Sat, 04 Oct 2014 14:09:43 -0400 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:49896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaTlt-00079O-Va for qemu-devel@nongnu.org; Sat, 04 Oct 2014 14:09:34 -0400 Received: by mail-wi0-f175.google.com with SMTP id d1so1392227wiv.8 for ; Sat, 04 Oct 2014 11:09:33 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <543037D8.6000009@redhat.com> Date: Sat, 04 Oct 2014 20:09:28 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> <1412358473-31398-9-git-send-email-dgilbert@redhat.com> In-Reply-To: <1412358473-31398-9-git-send-email-dgilbert@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 08/47] socket shutdown List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" , qemu-devel@nongnu.org Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, lilei@linux.vnet.ibm.com, quintela@redhat.com, cristian.klein@cs.umu.se, amit.shah@redhat.com, yanghy@cn.fujitsu.com Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > +#ifndef WIN32 > + if (rd) { > + how = SHUT_RD; > + } > + > + if (wr) { > + how = rd ? SHUT_RDWR : SHUT_WR; > + } > + > +#else > + /* Untested */ > + if (rd) { > + how = SD_RECEIVE; > + } > + > + if (wr) { > + how = rd ? SD_BOTH : SD_SEND; > + } > + > +#endif > + These are the same on Windows and non-Windows actually. Just #define SHUT_* to 0/1/2 and avoid the wrapper. Paolo