On 24 August 2011 11:47, Avi Kivity <a...@redhat.com> wrote:
> On 08/24/2011 01:35 PM, Peter Maydell wrote:
>>
>> On 24 August 2011 11:11, Avi Kivity<a...@redhat.com>  wrote:
>> >  diff --git a/hw/mcf5208.c b/hw/mcf5208.c
>> >  index f4d4fbd..73c6961 100644
>> >  --- a/hw/mcf5208.c
>> >  +++ b/hw/mcf5208.c
>> >  @@ -5,6 +5,7 @@
>> >    *
>> >    * This code is licensed under the GPL
>> >    */
>> >  +#include<glib.h>
>> >    #include "hw.h"
>> >    #include "mcf.h"
>> >    #include "qemu-timer.h"
>>
>> You shouldn't need to include glib.h here, I think? hw.h includes
>> qemu-common.h
>> which includes glib.h.
>>
>
> My preference is not to depend on indirect includes; but I can remove this
> include if it's disliked by many.

qemu-common.h says
/* we put basic includes here to avoid repeating them in device drivers */

so direct includes of system headers in hw/ files is going against
current practice. I don't feel strongly either way on the question
of direct vs indirect, but we should be consistent, and the choice
we've made is "rely on qemu-common.h".

-- PMM

Reply via email to