Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic support for Universal Windows Platform apps #820

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,9 @@ void Curl_sndbufset(curl_socket_t sockfd)
if(osver.dwMajorVersion >= majorVersion)
detectOsState = DETECT_OS_VISTA_OR_LATER;
}
#elif defined(CURL_WINDOWS_APP)
(void)majorVersion;
detectOsState = DETECT_OS_VISTA_OR_LATER;
#else
ULONGLONG cm;
OSVERSIONINFOEX osver;
Expand Down
10 changes: 10 additions & 0 deletions lib/curl_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -737,4 +737,14 @@ endings either CRLF or LF so 't' is appropriate.
# endif
#endif /* DONT_USE_RECV_BEFORE_SEND_WORKAROUNDS */

/* Detect Windows App environment which has a restricted access
* to the Win32 APIs. */
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)
# include <winapifamily.h>
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
# define CURL_WINDOWS_APP
# endif
# endif

#endif /* HEADER_CURL_SETUP_H */
3 changes: 2 additions & 1 deletion lib/getenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
static
char *GetEnv(const char *variable)
{
#ifdef _WIN32_WCE
#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
(void)variable;
return NULL;
#else
#ifdef WIN32
Expand Down
2 changes: 1 addition & 1 deletion lib/md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
CC_MD5_Final(digest, ctx);
}

#elif defined(_WIN32)
#elif defined(_WIN32) && !defined(CURL_WINDOWS_APP)

#include <wincrypt.h>
#include "curl_memory.h"
Expand Down