]> Git Repo - qemu.git/commitdiff
qapi: Clean up includes in generated files
authorEric Blake <[email protected]>
Mon, 8 Feb 2016 15:36:46 +0000 (08:36 -0700)
committerPeter Maydell <[email protected]>
Tue, 16 Feb 2016 14:29:27 +0000 (14:29 +0000)
As a followup to commit cbf2115, clean up the includes in files
generated by QAPI so that osdep.h is included first in .c files,
and headers which it implies are not included manually.  This
patch is done manually, since Coccinelle (and therefore
scripts/clean-includes) doesn't see into the generator scripts.

Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
scripts/qapi-commands.py
scripts/qapi-event.py
scripts/qapi-introspect.py
scripts/qapi-types.py
scripts/qapi-visit.py

index 91c5a4e8cdb7836182da27a2f43f98cd0f1d1467..f83162184331c22bef4ef695ed114bd72a334cd3 100644 (file)
@@ -297,6 +297,7 @@ h_comment = '''
                             c_comment, h_comment)
 
 fdef.write(mcgen('''
+#include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu/module.h"
 #include "qapi/qmp/types.h"
index 07bcb73d3dc6f841ffb7a6ecaa059779fc59b972..544ae1218d60d3f6ce81babdb9cd5b781eeb8fa1 100644 (file)
@@ -159,6 +159,7 @@ h_comment = '''
                             c_comment, h_comment)
 
 fdef.write(mcgen('''
+#include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "%(prefix)sqapi-event.h"
 #include "%(prefix)sqapi-visit.h"
index 64f2cd0631619be733454ad4e510c140aa58b6d7..e0f926be041bce7a2e43ff41ceb3c19b8d352898 100644 (file)
@@ -1,7 +1,7 @@
 #
 # QAPI introspection generator
 #
-# Copyright (C) 2015 Red Hat, Inc.
+# Copyright (C) 2015-2016 Red Hat, Inc.
 #
 # Authors:
 #  Markus Armbruster <[email protected]>
@@ -204,6 +204,7 @@ h_comment = '''
                             c_comment, h_comment)
 
 fdef.write(mcgen('''
+#include "qemu/osdep.h"
 #include "%(prefix)sqmp-introspect.h"
 
 ''',
index d3f631a2f4a53d33180891652930220bba5ec38e..7b0dca8c72dd6d464b9101958273b982473f40b1 100644 (file)
@@ -279,6 +279,7 @@ h_comment = '''
                             c_comment, h_comment)
 
 fdef.write(mcgen('''
+#include "qemu/osdep.h"
 #include "qapi/dealloc-visitor.h"
 #include "%(prefix)sqapi-types.h"
 #include "%(prefix)sqapi-visit.h"
@@ -287,8 +288,6 @@ fdef.write(mcgen('''
 
 # To avoid circular headers, use only typedefs.h here, not qobject.h
 fdecl.write(mcgen('''
-#include <stdbool.h>
-#include <stdint.h>
 #include "qemu/typedefs.h"
 '''))
 
index 0fdcebcca8f6cce37fa3cd1c5a9f8d25ac616d9f..0cc9b08b14b43f5efb7feaa96ac0ff6065679577 100644 (file)
@@ -435,6 +435,7 @@ h_comment = '''
                             c_comment, h_comment)
 
 fdef.write(mcgen('''
+#include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "%(prefix)sqapi-visit.h"
 ''',
This page took 0.02869 seconds and 4 git commands to generate.