[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Purpose of qemu-common.h (was Re: [PATCH v4 7/7] hw/i386: b
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] Purpose of qemu-common.h (was Re: [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients) |
Date: |
Thu, 25 Apr 2013 17:57:41 -0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Apr 25, 2013 at 03:45:04PM -0500, Anthony Liguori wrote:
> Eduardo Habkost <address@hidden> writes:
>
> > On Thu, Apr 25, 2013 at 02:03:05PM -0500, Anthony Liguori wrote:
> >> Laszlo Ersek <address@hidden> 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
- Re: [Qemu-devel] [PATCH v4 5/7] hw/acpi: export acpi_checksum(), (continued)
- Re: [Qemu-devel] [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients, Laszlo Ersek, 2013/04/26
- Re: [Qemu-devel] [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients, Michael S. Tsirkin, 2013/04/29
- Re: [Qemu-devel] [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients, Kevin O'Connor, 2013/04/29
- Re: [Qemu-devel] [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients, Laszlo Ersek, 2013/04/29
- Re: [Qemu-devel] [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients, Michael S. Tsirkin, 2013/04/29
Re: [Qemu-devel] [PATCH v4 0/7] publish etc/acpi/APIC in fw_cfg, Laszlo Ersek, 2013/04/24