summaryrefslogtreecommitdiff
path: root/lib/curl_setup.h
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-10-27 11:21:01 +0300
committerDaniel Stenberg <daniel@haxx.se>2017-10-27 11:02:42 +0200
commit9e76dbe054c3726833317b8c474bfed37367ee0e (patch)
tree0e6bd01b0b6c00f3aba2471c94f1fe40aecc7b22 /lib/curl_setup.h
parent979d2877be3647bef52e19a38f27346866a66bea (diff)
downloadcurl-9e76dbe054c3726833317b8c474bfed37367ee0e.tar.gz
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
Diffstat (limited to 'lib/curl_setup.h')
-rw-r--r--lib/curl_setup.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index 402ebc03d..efd8281a4 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -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)