From patchwork Thu Mar 20 06:25:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 331998 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D14802C00A8 for ; Thu, 20 Mar 2014 17:25:59 +1100 (EST) Received: from localhost ([::1]:45387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQWQO-00087u-MM for incoming@patchwork.ozlabs.org; Thu, 20 Mar 2014 02:25:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQWPt-00087i-Vh for qemu-devel@nongnu.org; Thu, 20 Mar 2014 02:25:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQWPs-0002a7-AZ for qemu-devel@nongnu.org; Thu, 20 Mar 2014 02:25:25 -0400 Received: from qemu.weilnetz.de ([2a03:4000:2:362::1]:57070 helo=v2201305906712890.yourvserver.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQWPs-0002Zp-3W for qemu-devel@nongnu.org; Thu, 20 Mar 2014 02:25:24 -0400 Received: by v2201305906712890.yourvserver.net (Postfix, from userid 1000) id 845551800BD; Thu, 20 Mar 2014 07:25:18 +0100 (CET) From: Stefan Weil To: Peter Maydell Date: Thu, 20 Mar 2014 07:25:11 +0100 Message-Id: <1395296712-25274-5-git-send-email-sw@weilnetz.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395296712-25274-1-git-send-email-sw@weilnetz.de> References: <1395296712-25274-1-git-send-email-sw@weilnetz.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a03:4000:2:362::1 Cc: Stefan Weil , qemu-devel@nongnu.org, Anthony Liguori , Max Filippov Subject: [Qemu-devel] [PULL for 2.0 4/5] w32: Reduce dependencies in sysemu/os-win32.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Most *.o files depend on that file, but many of them don't need windows.h or winsock2.h. sysemu/os-win32.h only needs some definitions from winerror.h. After that change, all files which depend on windows.h or winsock2.h and which no longer get it indirectly have to be fixed. Use qemu/sockets.h to get winsock2.h. Add comments to all those new include statements. The modification in ui/vnc-enc-tight.c is needed temporarily and will be removed again in the following patch. Cc: Anthony Liguori Cc: Max Filippov Signed-off-by: Stefan Weil --- coroutine-win32.c | 1 + include/net/eth.h | 2 +- include/sysemu/os-win32.h | 3 +-- target-xtensa/xtensa-semi.c | 1 + ui/vnc-enc-tight.c | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/coroutine-win32.c b/coroutine-win32.c index edc1f72..4678d17 100644 --- a/coroutine-win32.c +++ b/coroutine-win32.c @@ -24,6 +24,7 @@ #include "qemu-common.h" #include "block/coroutine_int.h" +#include "qemu/winapi.h" /* CreateFiber, ... */ typedef struct { diff --git a/include/net/eth.h b/include/net/eth.h index b3273b8..f5a369f 100644 --- a/include/net/eth.h +++ b/include/net/eth.h @@ -26,10 +26,10 @@ #ifndef QEMU_ETH_H #define QEMU_ETH_H -#include #include #include "qemu/bswap.h" #include "qemu/iov.h" +#include "qemu/sockets.h" /* u_short */ #define ETH_ALEN 6 diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index 1d6494a..d625612 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -26,8 +26,7 @@ #ifndef QEMU_OS_WIN32_H #define QEMU_OS_WIN32_H -#include "qemu/winapi.h" -#include +#include /* WSAECONNREFUSED, ... */ /* Workaround for older versions of MinGW. */ #ifndef ECONNREFUSED diff --git a/target-xtensa/xtensa-semi.c b/target-xtensa/xtensa-semi.c index 424253d..ad06f99 100644 --- a/target-xtensa/xtensa-semi.c +++ b/target-xtensa/xtensa-semi.c @@ -32,6 +32,7 @@ #include "cpu.h" #include "helper.h" #include "qemu/log.h" +#include "qemu/sockets.h" /* select */ enum { TARGET_SYS_exit = 1, diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 59b59c0..9b0f73d 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -31,6 +31,7 @@ /* This needs to be before jpeglib.h line because of conflict with INT32 definitions between jmorecfg.h (included by jpeglib.h) and Win32 basetsd.h (included by windows.h). */ +#include "qemu/winapi.h" /* TODO: workaround, remove */ #include "qemu-common.h" #ifdef CONFIG_VNC_PNG