aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-02-08 18:53:31 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-02-16 14:29:27 +0000
commit2aef8c91346b8faa43dffe1e26b6befc65ed7b1b (patch)
treeecbd8ffe7c4bdf4220f76f8f6644c87eba9ae133 /scripts
parent253785e3b96f48c52568c312cec0a5ec596c527f (diff)
downloadqemu-2aef8c91346b8faa43dffe1e26b6befc65ed7b1b.zip
qemu-2aef8c91346b8faa43dffe1e26b6befc65ed7b1b.tar.gz
qemu-2aef8c91346b8faa43dffe1e26b6befc65ed7b1b.tar.bz2
scripts/tracetool: Include qemu/osdep.h in generated .c files
Include qemu/osdep.h as the first include in generated .c files, so they don't implicitly rely on some other included header to pull it in. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/tracetool/backend/simple.py3
-rw-r--r--scripts/tracetool/format/events_c.py1
-rw-r--r--scripts/tracetool/format/tcg_helper_c.py1
3 files changed, 4 insertions, 1 deletions
diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py
index e8c2cd5..3246c20 100644
--- a/scripts/tracetool/backend/simple.py
+++ b/scripts/tracetool/backend/simple.py
@@ -42,7 +42,8 @@ def generate_h(event):
def generate_c_begin(events):
- out('#include "trace.h"',
+ out('#include "qemu/osdep.h"',
+ '#include "trace.h"',
'#include "trace/control.h"',
'#include "trace/simple.h"',
'')
diff --git a/scripts/tracetool/format/events_c.py b/scripts/tracetool/format/events_c.py
index 2717ea3..1cc6a49 100644
--- a/scripts/tracetool/format/events_c.py
+++ b/scripts/tracetool/format/events_c.py
@@ -19,6 +19,7 @@ from tracetool import out
def generate(events, backend):
out('/* This file is autogenerated by tracetool, do not edit. */',
'',
+ '#include "qemu/osdep.h"',
'#include "trace.h"',
'#include "trace/generated-events.h"',
'#include "trace/control.h"',
diff --git a/scripts/tracetool/format/tcg_helper_c.py b/scripts/tracetool/format/tcg_helper_c.py
index 96655a0..afd6e98 100644
--- a/scripts/tracetool/format/tcg_helper_c.py
+++ b/scripts/tracetool/format/tcg_helper_c.py
@@ -23,6 +23,7 @@ def generate(events, backend):
out('/* This file is autogenerated by tracetool, do not edit. */',
'',
+ '#include "qemu/osdep.h"',
'#include "qemu-common.h"',
'#include "trace.h"',
'#include "exec/helper-proto.h"',