curl_setup: Improve detection of CURL_WINDOWS_APP

If WINAPI_FAMILY is defined, it should be safe to try to include
winapifamily.h to check what the define evaluates to.

This should fix detection of CURL_WINDOWS_APP if building with
_WIN32_WINNT set to 0x0600.

Closes #2025
This commit is contained in:
Martin Storsjo 2017-10-27 11:21:01 +03:00 committed by Daniel Stenberg
parent 979d2877be
commit 9e76dbe054
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 1 additions and 1 deletions

View File

@ -751,7 +751,7 @@ endings either CRLF or LF so 't' is appropriate.
/* Detect Windows App environment which has a restricted access
* to the Win32 APIs. */
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)
# if (defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)) || defined(WINAPI_FAMILY)
# include <winapifamily.h>
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)