qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] win32: Avoid compiler warning (WIN32_LEAN_AND_M


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH] win32: Avoid compiler warning (WIN32_LEAN_AND_MEAN redefined)
Date: Thu, 22 Apr 2010 12:11:23 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3

On 04/21/2010 10:13 PM, Stefan Weil wrote:
Stefan Weil schrieb:
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.
>>
+/* Avoid compiler warning because macro is redefined in SDL_syswm.h. */
+#undef WIN32_LEAN_AND_MEAN
+
#include<SDL.h>
#include<SDL_syswm.h>

No comments, no questions? The original patch still applies.

Why does that conflict? If the redefinition is with the same meaning, GCC should not conflict.

There is

#define WIN32_LEAN_AND_MEAN

in SDL_syswm.h and -DWIN32_LEAN_AND_MEAN in configure, so that should be okay.

Paolo




reply via email to

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