qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH repost] gtk: avoid redefining _WIN32_WINNT mac


From: Paolo Bonzini
Subject: Re: [Qemu-trivial] [PATCH repost] gtk: avoid redefining _WIN32_WINNT macro
Date: Tue, 8 Sep 2015 11:35:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0


On 08/09/2015 11:28, Daniel P. Berrange wrote:
> In file included from ui/gtk.c:40:0:
> include/ui/gtk.h:5:0: warning: "_WIN32_WINNT" redefined
>  # define _WIN32_WINNT 0x0601 /* needed to get definition of MAPVK_VK_TO_VSC 
> */
>   ^
> In file included from 
> /usr/i686-w64-mingw32/sys-root/mingw/include/crtdefs.h:10:0,
>                  from /usr/i686-w64-mingw32/sys-root/mingw/include/stdio.h:9,
>                  from 
> /home/berrange/src/virt/qemu/include/qemu/fprintf-fn.h:12,
>                  from /home/berrange/src/virt/qemu/include/qemu-common.h:18,
>                  from ui/gtk.c:37:
> /usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h:225:0: note: this is 
> the location of the previous definition
>  #define _WIN32_WINNT 0x502
>  ^
> 
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  include/ui/gtk.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/ui/gtk.h b/include/ui/gtk.h
> index ee6dffd..7796231 100644
> --- a/include/ui/gtk.h
> +++ b/include/ui/gtk.h
> @@ -2,7 +2,9 @@
>  #define UI_GTK_H
>  
>  #ifdef _WIN32
> -# define _WIN32_WINNT 0x0601 /* needed to get definition of MAPVK_VK_TO_VSC 
> */
> +# ifndef _WIN32_WINNT
> +#  define _WIN32_WINNT 0x0601 /* needed to get definition of MAPVK_VK_TO_VSC 
> */
> +# endif
>  #endif

Your error message shows that _WIN32_WINNT was 0x0502, do you get
MAPVK_VK_TO_VSC with this patch?

Perhaps #undef the macro first, or do something like:

#if !defined _WIN32_WINNT || _WIN32_WINNT < 0x0601
# undef _WIN32_WINNT
# define _WIN32_WINNT 0x0601
#endif

Paolo



reply via email to

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