提交 9167ebd9 编写于 作者: E Eric Blake 提交者: Peter Maydell

qapi: Clean up includes in generated files

As a followup to commit cbf21151, 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: NEric Blake <eblake@redhat.com>
Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 681c28a3
......@@ -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"
......
......@@ -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"
......
#
# QAPI introspection generator
#
# Copyright (C) 2015 Red Hat, Inc.
# Copyright (C) 2015-2016 Red Hat, Inc.
#
# Authors:
# Markus Armbruster <armbru@redhat.com>
......@@ -204,6 +204,7 @@ h_comment = '''
c_comment, h_comment)
fdef.write(mcgen('''
#include "qemu/osdep.h"
#include "%(prefix)sqmp-introspect.h"
''',
......
......@@ -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"
'''))
......
......@@ -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"
''',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册