From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43531 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6Jom-0003hS-35 for qemu-devel@nongnu.org; Sun, 03 Apr 2011 05:42:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q6Joh-0005Yo-1W for qemu-devel@nongnu.org; Sun, 03 Apr 2011 05:41:59 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:59702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6Jog-0005Xu-J6 for qemu-devel@nongnu.org; Sun, 03 Apr 2011 05:41:54 -0400 Message-ID: <4D9840D7.1070209@mail.berlios.de> Date: Sun, 03 Apr 2011 11:41:43 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1301605129-12808-1-git-send-email-weil@mail.berlios.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] w32: Fix compilation of new code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Paolo Bonzini , QEMU Developers Am 03.04.2011 11:10, schrieb Blue Swirl: > On Thu, Mar 31, 2011 at 11:58 PM, Stefan Weil > wrote: >> Some recently added new code did not compile for w32 targets. >> >> The functions qemu_iohandler_fill and qemu_iohandler_poll need >> data type fd_set which is declared in winsock2.h for w32 targets. >> >> Moving the functions from qemu-common.h to qemu_socket.h fixes >> compilations for w32 without adding a new include file to qemu-common.h. > > There's nothing socket specific in qemu_iohandler_fill and > qemu_iohandler_poll, so I'd rather fix qemu-common.h. But I have a > patch in my working queue to move OS specific stuff to qemu-common.h, > I'll fix this there. Adding a new file iohandler.h for these functions would also solve the problem. Or maybe there is an include file which is better suited than qemu_socket.h. I think that functions which are only used in one file and declared in another file should not be in qemu-common.h. In this special case, all code which uses qemu-common.h would also require winsock2.h just because of fd_set! By the way: there is one file qemu_*.h, and there are 25 files qemu-*.h. What about renaming qemu_socket.h to qemu-socket.h? Kind regards, Stefan