diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2021-03-04 22:10:45 +0100 |
---|---|---|
committer | Marc Hoersken <info@marc-hoersken.de> | 2021-03-15 17:01:18 +0100 |
commit | 71529574215190baa15e49e0f825aed79e6566d4 (patch) | |
tree | 98107ea587ba1d3ed038fee1edafdab451e14697 /lib | |
parent | d4a932797aeb5a4302f02280ba61c508b62048db (diff) | |
download | curl-71529574215190baa15e49e0f825aed79e6566d4.tar.gz |
config: fix detection of restricted Windows App environment
Move the detection of the restricted Windows App environment
in curl_setup.h before the definition of USE_WIN32_CRYPTO
via included config-win32.h in case no build system is used.
Reviewed-by: Marcel Raad
Part of #6277
Diffstat (limited to 'lib')
-rw-r--r-- | lib/curl_setup.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 229608363..30cc8d15e 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -54,6 +54,16 @@ # ifndef NOGDI # define NOGDI # endif +/* Detect Windows App environment which has a restricted access + * to the Win32 APIs. */ +# 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) +# define CURL_WINDOWS_APP +# endif +# endif #endif /* @@ -762,17 +772,6 @@ endings either CRLF or LF so 't' is appropriate. # endif #endif /* DONT_USE_RECV_BEFORE_SEND_WORKAROUND */ -/* Detect Windows App environment which has a restricted access - * to the Win32 APIs. */ -# 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) -# define CURL_WINDOWS_APP -# endif -# endif - /* for systems that don't detect this in configure, use a sensible default */ #ifndef CURL_SA_FAMILY_T #define CURL_SA_FAMILY_T unsigned short |