From 79ee7df8853c5d7085d87036420b6b388dda2595 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 6 Dec 2012 11:22:34 +0100 Subject: [PATCH] qapi: move inclusions of qemu-common.h from headers to .c files Signed-off-by: Paolo Bonzini --- qapi/opts-visitor.c | 1 + qapi/qapi-types-core.h | 1 - qapi/qapi-visit-core.c | 1 + qemu-error.h | 2 ++ scripts/qapi-commands.py | 1 + scripts/qapi-visit.py | 1 + tests/test-qmp-commands.c | 1 + tests/test-qmp-input-strict.c | 1 + tests/test-qmp-input-visitor.c | 1 + tests/test-qmp-output-visitor.c | 1 + tests/test-string-input-visitor.c | 1 + tests/test-string-output-visitor.c | 1 + tests/test-visitor-serialization.c | 2 ++ 13 files changed, 14 insertions(+), 1 deletion(-) diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index e048b6c863..e3fd25446d 100644 --- a/qapi/opts-visitor.c +++ b/qapi/opts-visitor.c @@ -10,6 +10,7 @@ * */ +#include "qemu-common.h" #include "opts-visitor.h" #include "qemu-queue.h" #include "qemu-option-internal.h" diff --git a/qapi/qapi-types-core.h b/qapi/qapi-types-core.h index f781fc3ab7..831df21ea7 100644 --- a/qapi/qapi-types-core.h +++ b/qapi/qapi-types-core.h @@ -14,7 +14,6 @@ #ifndef QAPI_TYPES_CORE_H #define QAPI_TYPES_CORE_H -#include "qemu-common.h" #include "error.h" #include "qerror.h" diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index 7a82b63766..300293999d 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -11,6 +11,7 @@ * */ +#include "qemu-common.h" #include "qapi/qapi-visit-core.h" #include "qapi/qapi-visit-impl.h" diff --git a/qemu-error.h b/qemu-error.h index 93d74b4a30..c902cc10de 100644 --- a/qemu-error.h +++ b/qemu-error.h @@ -13,6 +13,8 @@ #ifndef QEMU_ERROR_H #define QEMU_ERROR_H +#include + typedef struct Location { /* all members are private to qemu-error.c */ enum { LOC_NONE, LOC_CMDLINE, LOC_FILE } kind; diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 3c4678dbf1..2db0bf1e56 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qapi-commands.py @@ -366,6 +366,7 @@ def gen_command_def_prologue(prefix="", proxy=False): * */ +#include "qemu-common.h" #include "qemu-objects.h" #include "qapi/qmp-core.h" #include "qapi/qapi-visit-core.h" diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index a360de719f..f1aabb3813 100644 --- a/scripts/qapi-visit.py +++ b/scripts/qapi-visit.py @@ -298,6 +298,7 @@ fdef.write(mcgen(''' * */ +#include "qemu-common.h" #include "%(header)s" ''', header=basename(h_file))) diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c index dc3c507f2b..bf41034c62 100644 --- a/tests/test-qmp-commands.c +++ b/tests/test-qmp-commands.c @@ -1,4 +1,5 @@ #include +#include "qemu-common.h" #include "qemu-objects.h" #include "test-qmp-commands.h" #include "qapi/qmp-core.h" diff --git a/tests/test-qmp-input-strict.c b/tests/test-qmp-input-strict.c index f6df8cbe1e..86f24d821c 100644 --- a/tests/test-qmp-input-strict.c +++ b/tests/test-qmp-input-strict.c @@ -14,6 +14,7 @@ #include #include +#include "qemu-common.h" #include "qapi/qmp-input-visitor.h" #include "test-qapi-types.h" #include "test-qapi-visit.h" diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c index 8f5a509582..6568c9907c 100644 --- a/tests/test-qmp-input-visitor.c +++ b/tests/test-qmp-input-visitor.c @@ -13,6 +13,7 @@ #include #include +#include "qemu-common.h" #include "qapi/qmp-input-visitor.h" #include "test-qapi-types.h" #include "test-qapi-visit.h" diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c index 24a6359504..84b1f41894 100644 --- a/tests/test-qmp-output-visitor.c +++ b/tests/test-qmp-output-visitor.c @@ -12,6 +12,7 @@ #include +#include "qemu-common.h" #include "qapi/qmp-output-visitor.h" #include "test-qapi-types.h" #include "test-qapi-visit.h" diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c index 5370e32041..36b3792980 100644 --- a/tests/test-string-input-visitor.c +++ b/tests/test-string-input-visitor.c @@ -13,6 +13,7 @@ #include #include +#include "qemu-common.h" #include "qapi/string-input-visitor.h" #include "test-qapi-types.h" #include "test-qapi-visit.h" diff --git a/tests/test-string-output-visitor.c b/tests/test-string-output-visitor.c index 608f14a5de..afb557a00f 100644 --- a/tests/test-string-output-visitor.c +++ b/tests/test-string-output-visitor.c @@ -12,6 +12,7 @@ #include +#include "qemu-common.h" #include "qapi/string-output-visitor.h" #include "test-qapi-types.h" #include "test-qapi-visit.h" diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c index b8ad16fc9e..a251f878e1 100644 --- a/tests/test-visitor-serialization.c +++ b/tests/test-visitor-serialization.c @@ -14,6 +14,8 @@ #include #include #include + +#include "qemu-common.h" #include "test-qapi-types.h" #include "test-qapi-visit.h" #include "qemu-objects.h"