qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static
Date: Sun, 08 Mar 2009 11:25:41 -0500	[thread overview]
Message-ID: <49B3F185.6070706@codemonkey.ws> (raw)
In-Reply-To: <f43fc5580903080923u7b976deft41050c0e89861914@mail.gmail.com>

Blue Swirl wrote:
> On 3/8/09, Anthony Liguori <anthony@codemonkey.ws> 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.

Regards,

Anthony Liguori

      reply	other threads:[~2009-03-08 16:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07 15:32 [Qemu-devel] [6736] Sparse fixes: NULL use, header order, ANSI prototypes, static Blue Swirl
2009-03-08 15:21 ` Anthony Liguori
2009-03-08 15:36   ` Blue Swirl
2009-03-08 16:01     ` Filip Navara
2009-03-08 16:16     ` Anthony Liguori
2009-03-08 16:23       ` Blue Swirl
2009-03-08 16:25         ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B3F185.6070706@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).