Rename internal macro to make its purpose more obvious.
After this patch `grep -i uwp` shows all the code related to UWP.
Ref: https://curl.se/mail/lib-2024-09/0014.html
Closes #14881
* and wait on it.
*/
static
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
DWORD
#else
unsigned int
* gethostbyname_thread() resolves a name and then exits.
*/
static
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
DWORD
#else
unsigned int
#endif
/* Define to use the Windows crypto library. */
-#if !defined(CURL_WINDOWS_APP)
+#if !defined(CURL_WINDOWS_UWP)
#define USE_WIN32_CRYPTO
#endif
# include <winapifamily.h>
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-# define CURL_WINDOWS_APP
+# define CURL_WINDOWS_UWP
# endif
# endif
#endif
#elif defined(USE_THREADS_WIN32)
curl_thread_t Curl_thread_create(
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
DWORD
#else
unsigned int
(CURL_STDCALL *func) (void *),
void *arg)
{
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
typedef HANDLE curl_win_thread_handle_t;
#else
typedef uintptr_t curl_win_thread_handle_t;
#endif
curl_thread_t t;
curl_win_thread_handle_t thread_handle;
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
thread_handle = CreateThread(NULL, 0, func, arg, 0, NULL);
#else
thread_handle = _beginthreadex(NULL, 0, func, arg, 0, NULL);
#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
curl_thread_t Curl_thread_create(
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
DWORD
#else
unsigned int
static char *GetEnv(const char *variable)
{
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP) || \
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP) || \
defined(__ORBIS__) || defined(__PROSPERO__) /* PlayStation 4 and 5 */
(void)variable;
return NULL;
#ifdef _WIN32
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600 && \
- !defined(CURL_WINDOWS_APP)
+ !defined(CURL_WINDOWS_UWP)
# define HAVE_WIN_BCRYPTGENRANDOM
# include <bcrypt.h>
# ifdef _MSC_VER
*/
HMODULE Curl_load_library(LPCTSTR filename)
{
-#ifndef CURL_WINDOWS_APP
+#ifndef CURL_WINDOWS_UWP
HMODULE hModule = NULL;
LOADLIBRARYEX_FN pLoadLibraryEx = NULL;
{
bool matched = FALSE;
-#if defined(CURL_WINDOWS_APP)
+#if defined(CURL_WINDOWS_UWP)
/* We have no way to determine the Windows version from Windows apps,
so let's assume we are running on the target Windows version. */
const WORD fullVersion = MAKEWORD(minorVersion, majorVersion);
DWORD provType,
const unsigned int algId)
{
-#ifdef CURL_WINDOWS_APP
+#ifdef CURL_WINDOWS_UWP
(void)input;
(void)inputlen;
(void)provType;
#ifdef HAS_MANUAL_VERIFY_API
SSLSUPP_CAINFO_BLOB |
#endif
-#ifndef CURL_WINDOWS_APP
+#ifndef CURL_WINDOWS_UWP
SSLSUPP_PINNEDPUBKEY |
#endif
SSLSUPP_TLS13_CIPHERSUITES |
#include "vtls.h"
#if (defined(__MINGW32__) || defined(CERT_CHAIN_REVOCATION_CHECK_CHAIN)) \
- && !defined(CURL_WINDOWS_APP)
+ && !defined(CURL_WINDOWS_UWP)
#define HAS_MANUAL_VERIFY_API
#endif
DWORD length)
{
DWORD actual_length = 0;
-#if defined(CURL_WINDOWS_APP)
+#if defined(CURL_WINDOWS_UWP)
(void)data;
(void)cert_context;
(void)host_names;
struct winsize ts;
if(!ioctl(STDIN_FILENO, TIOCGWINSZ, &ts))
cols = (int)ts.ws_col;
-#elif defined(_WIN32) && !defined(CURL_WINDOWS_APP)
+#elif defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
{
HANDLE stderr_hnd = GetStdHandle(STD_ERROR_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO console_info;
{
CURLcode result = CURLE_OK;
-#ifdef CURL_WINDOWS_APP
+#ifdef CURL_WINDOWS_UWP
(void)config;
(void)backend;
(void)bundle_file;
bool tool_term_has_bold;
-#ifndef CURL_WINDOWS_APP
+#ifndef CURL_WINDOWS_UWP
/* The terminal settings to restore on exit */
static struct TerminalSettings {
HANDLE hStdOut;
QueryPerformanceFrequency(&tool_freq);
-#ifndef CURL_WINDOWS_APP
+#ifndef CURL_WINDOWS_UWP
init_terminal();
#endif
/* Windows stat() may attempt to adjust the Unix GMT file time by a daylight
saving time offset and since it is GMT that is bad behavior. When we have
access to a 64-bit type we can bypass stat and get the times directly. */
-#if defined(_WIN32) && !defined(CURL_WINDOWS_APP)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
HANDLE hfile;
TCHAR *tchar_filename = curlx_convert_UTF8_to_tchar((char *)filename);
/* Windows utime() may attempt to adjust the Unix GMT file time by a daylight
saving time offset and since it is GMT that is bad behavior. When we have
access to a 64-bit type we can bypass utime and set the times directly. */
-#if defined(_WIN32) && !defined(CURL_WINDOWS_APP)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
HANDLE hfile;
TCHAR *tchar_filename = curlx_convert_UTF8_to_tchar((char *)filename);
#define NUM_THREADS 100
#ifdef _WIN32
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
static DWORD WINAPI run_thread(LPVOID ptr)
#else
#include <process.h>
CURLcode test(char *URL)
{
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
typedef HANDLE curl_win_thread_handle_t;
#else
typedef uintptr_t curl_win_thread_handle_t;
for(i = 0; i < tid_count; i++) {
curl_win_thread_handle_t th;
results[i] = CURL_LAST; /* initialize with invalid value */
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
th = CreateThread(NULL, 0, run_thread, &results[i], 0, NULL);
#else
th = _beginthreadex(NULL, 0, run_thread, &results[i], 0, NULL);
static
#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP)
+#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
DWORD
#else
unsigned int
#ifdef _WIN32
HMODULE win32_load_system_library(const TCHAR *filename)
{
-#ifdef CURL_WINDOWS_APP
+#ifdef CURL_WINDOWS_UWP
(void)filename;
return NULL;
#else
ACTIVE_DISCONNECT /* as a client, disconnected from server */
};
-#if defined(_WIN32) && !defined(CURL_WINDOWS_APP)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
/*
* read-wrapper to support reading from stdin on Windows.
*/
}
-#if defined(USE_WINSOCK) && !defined(CURL_WINDOWS_APP)
+#if defined(USE_WINSOCK) && !defined(CURL_WINDOWS_UWP)
/*
* Winsock select() does not support standard file descriptors,
* it can only check SOCKETs. The following function is an attempt
static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
#endif
-#if defined(_WIN32) && !defined(CURL_WINDOWS_APP)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
#ifdef _WIN32_WCE
static DWORD thread_main_id = 0;
#else
}
#endif
-#if defined(_WIN32) && !defined(CURL_WINDOWS_APP)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
/* Window message handler for Windows applications to add support
* for graceful process termination via taskkill (without /f) which
* sends WM_CLOSE to all Windows of a process (even hidden ones).
if(!SetConsoleCtrlHandler(ctrl_event_handler, TRUE))
logmsg("cannot install CTRL event handler");
-#ifndef CURL_WINDOWS_APP
+#ifndef CURL_WINDOWS_UWP
{
#ifdef _WIN32_WCE
typedef HANDLE curl_win_thread_handle_t;
#endif
#ifdef _WIN32
(void)SetConsoleCtrlHandler(ctrl_event_handler, FALSE);
-#ifndef CURL_WINDOWS_APP
+#ifndef CURL_WINDOWS_UWP
if(thread_main_window && thread_main_id) {
if(PostThreadMessage(thread_main_id, WM_APP, 0, 0)) {
if(WaitForSingleObjectEx(thread_main_window, INFINITE, TRUE)) {