On Thu, Apr 25, 2013 at 03:45:04PM -0500, Anthony Liguori wrote: > Eduardo Habkost <ehabk...@redhat.com> writes: > > > On Thu, Apr 25, 2013 at 02:03:05PM -0500, Anthony Liguori wrote: > >> Laszlo Ersek <ler...@redhat.com> writes: > >> > --- /dev/null > >> > +++ b/hw/i386/acpi.h > >> > + > >> > +#include <stddef.h> > >> > >> QEMU style would normally be to use qemu-common.h here but honestly I > >> prefer using system headers when it's possible. Just FYI. > > > > I thought we were actively trying to stop including qemu-common.h from > > other header files, because it easily leads to unexpected (and hard to > > fix) circular header dependencies. > > The problem is qemu-common including other headers, not other headers > including qemu-common...
Well, it depends on what's the stated purpose/rules of qemu-common.h. If its purpose if to allow .c files to have many commonly-used definitions available without including commonly-used header files one by one, qemu-common.h will inevitably include other QEMU header files. > > But like I said in my original note, I don't like using qemu-common in > headers anyway. Agreed on this specific case. But I would really like to clarify the purpose of qemu-common.h, because I always believed that it was supposed to be a "includes lots of other stuff" header, not a "is included by lots of other stuff" header (and it can't be both). BTW, qemu-common.h already have a comment stating the following: """ This file is supposed to be included only by .c files. No header file should depend on qemu-common.h, as this would easily lead to circular header dependencies. """ If this is not true, we must correct it. -- Eduardo