qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] win32: Avoid compiler warning (WIN32_LEAN_AND_MEAN redefined)
Date: Thu,  1 Apr 2010 16:20:07 +0200	[thread overview]
Message-ID: <1270131607-13114-1-git-send-email-weil@mail.berlios.de> (raw)

configure adds the macro WIN32_LEAN_AND_MEAN to
QEMU_CFLAGS, and SDL_syswm.h defines it, too.

This results in a compiler warning (redefinition of
WIN32_LEAN_AND_MEAN in SDL_syswm.h. That warning prevents
compilations for win32 with warning = error).

Fix this by removing the definition of WIN32_LEAN_AND_MEAN
before including SDL_syswm.h.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 sdl.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sdl.c b/sdl.c
index 16a48e9..0334b4b 100644
--- a/sdl.c
+++ b/sdl.c
@@ -21,6 +21,10 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+
+/* Avoid compiler warning because macro is redefined in SDL_syswm.h. */
+#undef WIN32_LEAN_AND_MEAN
+
 #include <SDL.h>
 #include <SDL_syswm.h>
 
-- 
1.5.6.5

             reply	other threads:[~2010-04-01 14:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 14:20 Stefan Weil [this message]
2010-04-21 20:13 ` [Qemu-devel] Re: [PATCH] win32: Avoid compiler warning (WIN32_LEAN_AND_MEAN redefined) Stefan Weil
2010-04-22 10:11   ` Paolo Bonzini
2010-04-22 15:21     ` Richard Henderson
2010-05-08 14:46   ` Stefan Weil
2010-05-10  8:20     ` Paolo Bonzini

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=1270131607-13114-1-git-send-email-weil@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --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).