[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/9] w32: Reduce dependencies in sysemu/os-win32.h
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH 8/9] w32: Reduce dependencies in sysemu/os-win32.h |
Date: |
Sun, 23 Feb 2014 18:02:14 +0100 |
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 <address@hidden>
Cc: Max Filippov <address@hidden>
Signed-off-by: Stefan Weil <address@hidden>
---
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..e480b29 100644
--- a/coroutine-win32.c
+++ b/coroutine-win32.c
@@ -24,6 +24,7 @@
#include "qemu-common.h"
#include "block/coroutine_int.h"
+#include "sysemu/os-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 <sys/types.h>
#include <string.h>
#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 2dd3b1e..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 "sysemu/os-winapi.h"
-#include <winsock2.h>
+#include <winerror.h> /* 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 e6966ae..92220e3 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 "sysemu/os-winapi.h" /* TODO: workaround, remove */
#include "qemu-common.h"
#ifdef CONFIG_VNC_PNG
--
1.7.10.4
- Re: [Qemu-devel] [PATCH 9/9] w32: Replace Windows specific data types in common header files, (continued)
[Qemu-devel] [PATCH 6/9] w32: Add and use intermediate include file for windows.h, Stefan Weil, 2014/02/23
[Qemu-devel] [PATCH 5/9] vl: Remove unneeded include file, Stefan Weil, 2014/02/23
[Qemu-devel] [PATCH 2/9] exec: Remove unneeded include files, Stefan Weil, 2014/02/23
[Qemu-devel] [PATCH 8/9] w32: Reduce dependencies in sysemu/os-win32.h,
Stefan Weil <=
[Qemu-devel] [PATCH 7/9] w32: Move inline function from header file to C source, Stefan Weil, 2014/02/23
[Qemu-devel] [PATCH 1/9] util/iov: Use qemu/sockets.h instead of conditional code, Stefan Weil, 2014/02/23
Re: [Qemu-devel] [PATCH 0/9] w32: Reduce dependency on Windows API, Stefan Weil, 2014/02/25