[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI proto

From: Anthony Liguori
Subject: Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static
Date: Sun, 08 Mar 2009 11:25:41 -0500
User-agent: Thunderbird (X11/20090105)

Blue Swirl wrote:
On 3/8/09, Anthony Liguori <address@hidden> wrote:
 mmsystem.h needs windows.h to be included first.  We need to get that
include from qemu-common.h.  I see three options:

 1) include qemu-common.h at the top of every file as we were previously
 2) split out a qemu-win32.h or something like that that just contained the
windows headers included as we need them
 3) explicitly include <windows.h> and use -D CFLAGS to set things up as we
need it.

 I guess #3 looks the best to me.

I'd go for 2) but make it qemu-host.h which hides all Win/Linux/BSD
specific stuff, maybe with -D tuning.

I'm about to commit #3. I think doing the #defines in a header file is wrong and broken. I see a large numbers of places in the tree right now that do it and it results in extra warnings. Using -D simplifies things and reduces warnings. Then adding #include <windows.h> where needed becomes pretty clean.


Anthony Liguori

reply via email to

[Prev in Thread] Current Thread [Next in Thread]