[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 05/27] qapi: include osdep.h in type headers
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v6 05/27] qapi: include osdep.h in type headers |
Date: |
Tue, 4 Dec 2018 19:32:52 +0400 |
Hi
On Tue, Dec 4, 2018 at 7:23 PM Markus Armbruster <address@hidden> wrote:
>
> Marc-André Lureau <address@hidden> writes:
>
> > Now that the schema can be configured, it is crucial that all types
> > are configured the same. Make sure config-host.h is included, so
> > build-sys tracks the dependency and rebuilds the types, by including
> > osdep.h first.
> >
> > Signed-off-by: Marc-André Lureau <address@hidden>
> > ---
> > scripts/qapi/types.py | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/scripts/qapi/types.py b/scripts/qapi/types.py
> > index fd7808103c..91f87d0b8f 100644
> > --- a/scripts/qapi/types.py
> > +++ b/scripts/qapi/types.py
> > @@ -201,6 +201,7 @@ class
> > QAPISchemaGenTypeVisitor(QAPISchemaModularCVisitor):
> > ''',
> > types=types, visit=visit))
> > self._genh.preamble_add(mcgen('''
> > +#include "qemu/osdep.h"
> > #include "qapi/qapi-builtin-types.h"
> > '''))
>
> No. Every .c must include qemu/osdep.h first. No .h may include it.
> We clean this up periodically. scripts/clean-includes can help with
> that. We currently have a few offenders in the tree.
Ok, I don't know the reason an internal header couldn't include osdep,
could you explain?
I think we can replace osdep.h by config-host.h for the same result,
I'd have to check.