From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Stefan Weil <sw@weilnetz.de>,
qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>,
Max Filippov <jcmvbkbc@gmail.com>
Subject: [Qemu-devel] [PULL for 2.0 4/5] w32: Reduce dependencies in sysemu/os-win32.h
Date: Thu, 20 Mar 2014 07:25:11 +0100 [thread overview]
Message-ID: <1395296712-25274-5-git-send-email-sw@weilnetz.de> (raw)
In-Reply-To: <1395296712-25274-1-git-send-email-sw@weilnetz.de>
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 <aliguori@amazon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
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 <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 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 <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 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
--
1.7.10.4
next prev parent reply other threads:[~2014-03-20 6:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-20 6:25 [Qemu-devel] [PULL for 2.0 0/5] MinGW related patches Stefan Weil
2014-03-20 6:25 ` [Qemu-devel] [PULL for 2.0 1/5] gtk: Support GTK without VTE Stefan Weil
2014-03-20 6:25 ` [Qemu-devel] [PULL for 2.0 2/5] w32: Add and use intermediate include file for windows.h Stefan Weil
2014-03-20 6:25 ` [Qemu-devel] [PULL for 2.0 3/5] w32: Move inline function from header file to C source Stefan Weil
2014-03-20 6:25 ` Stefan Weil [this message]
2014-03-20 6:25 ` [Qemu-devel] [PULL for 2.0 5/5] w32: Replace Windows specific data types in common header files Stefan Weil
2014-03-20 14:00 ` Andreas Färber
2014-03-20 6:29 ` [Qemu-devel] [PULL for 2.0 0/5] MinGW related patches Stefan Weil
2014-03-20 12:45 ` Peter Maydell
2014-03-20 19:12 ` Stefan Weil
2014-03-20 19:16 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395296712-25274-5-git-send-email-sw@weilnetz.de \
--to=sw@weilnetz.de \
--cc=aliguori@amazon.com \
--cc=jcmvbkbc@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).