[vlc-devel] [PATCH] wasapi: if config.h has _WIN32_WINNT we may not have a useful value
Steve Lhomme
robux4 at gmail.com
Thu Aug 6 08:54:02 CEST 2015
This is related to something I'm working on. IMO this code in
configure.ac is wrong:
AH_TOP([#if defined(_WIN32) && !defined(_WIN32_WINNT)])
AH_TOP([# define _WIN32_WINNT 0x0502 /* Windows XP SP2 */])
AH_TOP([#endif])
It puts the right code in config.h but it's not used during the
configure process where each AC_DEFINE is gradually added to the
configuration environment. So we may end up with mismatching detection
based on the default _WIN32_WINNT version of the toolchain.
On Thu, Aug 6, 2015 at 8:40 AM, Steve Lhomme <robux4 at gmail.com> wrote:
> ---
> modules/audio_output/wasapi.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
> index 48f6d95..5e31fc1 100644
> --- a/modules/audio_output/wasapi.c
> +++ b/modules/audio_output/wasapi.c
> @@ -18,11 +18,15 @@
> * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
> *****************************************************************************/
>
> -#define _WIN32_WINNT 0x600
> #ifdef HAVE_CONFIG_H
> # include <config.h>
> #endif
>
> +#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x600
> +# undef _WIN32_WINNT
> +# define _WIN32_WINNT 0x600
> +#endif
> +
> #define INITGUID
> #define COBJMACROS
> #define CONST_VTABLE
> --
> 2.4.5
>
More information about the vlc-devel
mailing list