tidy-up: rename CURL_WINDOWS_APP to CURL_WINDOWS_UWP

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
This commit is contained in:
Viktor Szakats 2024-09-12 13:58:53 +02:00
parent 445fb81237
commit bc2f72b9ae
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
20 changed files with 33 additions and 33 deletions

View file

@ -29,7 +29,7 @@
#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>
@ -47,7 +47,7 @@ static unsigned int WINAPI run_thread(void *ptr)
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;
@ -78,7 +78,7 @@ CURLcode test(char *URL)
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);

View file

@ -74,7 +74,7 @@ static size_t write_memory_callback(void *contents, size_t size,
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

View file

@ -133,7 +133,7 @@ double tutil_tvdiff_secs(struct timeval newer, struct timeval older)
#ifdef _WIN32
HMODULE win32_load_system_library(const TCHAR *filename)
{
#ifdef CURL_WINDOWS_APP
#ifdef CURL_WINDOWS_UWP
(void)filename;
return NULL;
#else

View file

@ -149,7 +149,7 @@ enum sockmode {
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.
*/
@ -426,7 +426,7 @@ static bool read_data_block(unsigned char *buffer, ssize_t maxlen,
}
#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

View file

@ -497,7 +497,7 @@ static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
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
@ -587,7 +587,7 @@ static BOOL WINAPI ctrl_event_handler(DWORD dwCtrlType)
}
#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).
@ -754,7 +754,7 @@ void install_signal_handlers(bool keep_sigalrm)
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;
@ -809,7 +809,7 @@ void restore_signal_handlers(bool keep_sigalrm)
#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)) {