aboutsummaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2016-03-14 09:01:28 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-03-22 22:20:15 +0100
commitda34e65cb4025728566d6504a99916f6e7e1dd6a (patch)
tree79cc0f5cfc5b02ead1a6730a3c568a5fd00b6dac /io
parent4829e0378dfb91d55af9dfd741bd09e8f2c4f91a (diff)
include/qemu/osdep.h: Don't include qapi/error.h
Commit 57cb38b included qapi/error.h into qemu/osdep.h to get the Error typedef. Since then, we've moved to include qemu/osdep.h everywhere. Its file comment explains: "To avoid getting into possible circular include dependencies, this file should not include any other QEMU headers, with the exceptions of config-host.h, compiler.h, os-posix.h and os-win32.h, all of which are doing a similar job to this file and are under similar constraints." qapi/error.h doesn't do a similar job, and it doesn't adhere to similar constraints: it includes qapi-types.h. That's in excess of 100KiB of crap most .c files don't actually need. Add the typedef to qemu/typedefs.h, and include that instead of qapi/error.h. Include qapi/error.h in .c files that need it and don't get it now. Include qapi-types.h in qom/object.h for uint16List. Update scripts/clean-includes accordingly. Update it further to match reality: replace config.h by config-target.h, add sysemu/os-posix.h, sysemu/os-win32.h. Update the list of includes in the qemu/osdep.h comment quoted above similarly. This reduces the number of objects depending on qapi/error.h from "all of them" to less than a third. Unfortunately, the number depending on qapi-types.h shrinks only a little. More work is needed for that one. Signed-off-by: Markus Armbruster <armbru@redhat.com> [Fix compilation without the spice devel packages. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'io')
-rw-r--r--io/channel-command.c1
-rw-r--r--io/channel-file.c1
-rw-r--r--io/channel-socket.c1
-rw-r--r--io/channel-tls.c1
-rw-r--r--io/channel-websock.c1
-rw-r--r--io/channel.c1
-rw-r--r--io/task.c1
7 files changed, 7 insertions, 0 deletions
diff --git a/io/channel-command.c b/io/channel-command.c
index 604514adfc..ad25313be1 100644
--- a/io/channel-command.c
+++ b/io/channel-command.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "io/channel-command.h"
#include "io/channel-watch.h"
+#include "qapi/error.h"
#include "qemu/sockets.h"
#include "trace.h"
diff --git a/io/channel-file.c b/io/channel-file.c
index f28e2b0a5c..e1da2435e6 100644
--- a/io/channel-file.c
+++ b/io/channel-file.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "io/channel-file.h"
#include "io/channel-watch.h"
+#include "qapi/error.h"
#include "qemu/sockets.h"
#include "trace.h"
diff --git a/io/channel-socket.c b/io/channel-socket.c
index d005070584..ca8bc20b17 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "io/channel-socket.h"
#include "io/channel-watch.h"
#include "trace.h"
diff --git a/io/channel-tls.c b/io/channel-tls.c
index 7608fd9de0..9a8525c816 100644
--- a/io/channel-tls.c
+++ b/io/channel-tls.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "io/channel-tls.h"
#include "trace.h"
diff --git a/io/channel-websock.c b/io/channel-websock.c
index 35860a2738..708178779e 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "io/channel-websock.h"
#include "crypto/hash.h"
#include "trace.h"
diff --git a/io/channel.c b/io/channel.c
index dd6fc0eb28..692eb179b3 100644
--- a/io/channel.c
+++ b/io/channel.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "io/channel.h"
+#include "qapi/error.h"
#include "qemu/coroutine.h"
bool qio_channel_has_feature(QIOChannel *ioc,
diff --git a/io/task.c b/io/task.c
index bf1a3339b2..c7f97a9b16 100644
--- a/io/task.c
+++ b/io/task.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "io/task.h"
+#include "qapi/error.h"
#include "qemu/thread.h"
#include "trace.h"