[vlc-devel] [PATCH] configure: Don't force _WIN32_WINNT to 0x0601 if it is set to a higher version

Steve Lhomme robux4 at ycbcr.xyz
Thu Jul 12 07:58:11 CEST 2018


There are many things here:

- _WIN32_WINNT was set conditionally and unconditionally (conditionally 
is right)

- it was overridden by the unconditional part when set to a newer/older 
value than 0x0601, that part should just go away

- the intent of the conditional part is that the default is 0x0601 but 
any other value would work. Your patches changes that and don't allow 
forcing building for older targets. I don't think it's necessary/right.

Simply removing the  AC_DEFINE() line was sufficient.


On 2018-07-11 22:13, Martin Storsjö wrote:
> Since e807c8e91, we're explicitly unconditionally defining _WIN32_WINNT,
> regardless if it was set before or not.
>
> If it was set before (e.g. on the command line), to a higher version,
> we should honor that.
>
> This fixes WinRT building, where _WIN32_WINNT is set to Windows 8 or
> higher on the command line.
> ---
>   configure.ac | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 36252aa..de9c69d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -202,10 +202,10 @@ case "${host_os}" in
>       CXXFLAGS="${CXXFLAGS} -static-libgcc"
>       AC_CHECK_TOOL(WINDRES, windres, :)
>       AC_CHECK_TOOL(OBJCOPY, objcopy, :)
> -    AH_TOP([#if defined(_WIN32) && !defined(_WIN32_WINNT)])
> +    AH_TOP([#if defined(_WIN32) && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0601)])
> +    AH_TOP([# undef _WIN32_WINNT])
>       AH_TOP([# define _WIN32_WINNT 0x0601 /* Windows 7 */])
>       AH_TOP([#endif])
> -    AC_DEFINE([_WIN32_WINNT], 0x0601, [Define to '0x0601' for Windows 7 APIs.])
>       AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.])
>       AC_DEFINE([_UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
>       AC_DEFINE([UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
> -- 
> 2.7.4
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list