summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/system_win32.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2024-09-11 21:49:43 +0300
committerdartraiden <wowemuh@gmail.com>2024-09-11 21:52:35 +0300
commitc36db68a5f58ec6c9135eff778b6e77c30e58088 (patch)
tree22eea126db82c50388c9f94cd683d6ec6f04e6cb /libs/libcurl/src/system_win32.c
parent02bb82c1c0a4031e7b2f5578370fa5acd620f8e1 (diff)
libcurl: update to 8.10.0
Diffstat (limited to 'libs/libcurl/src/system_win32.c')
-rw-r--r--libs/libcurl/src/system_win32.c53
1 files changed, 4 insertions, 49 deletions
diff --git a/libs/libcurl/src/system_win32.c b/libs/libcurl/src/system_win32.c
index 53ddcf345d..a4979f6768 100644
--- a/libs/libcurl/src/system_win32.c
+++ b/libs/libcurl/src/system_win32.c
@@ -38,25 +38,18 @@
LARGE_INTEGER Curl_freq;
bool Curl_isVistaOrGreater;
-bool Curl_isWindows8OrGreater;
/* Handle of iphlpapp.dll */
static HMODULE s_hIpHlpApiDll = NULL;
-/* Function pointers */
+/* Pointer to the if_nametoindex function */
IF_NAMETOINDEX_FN Curl_if_nametoindex = NULL;
-FREEADDRINFOEXW_FN Curl_FreeAddrInfoExW = NULL;
-GETADDRINFOEXCANCEL_FN Curl_GetAddrInfoExCancel = NULL;
-GETADDRINFOEXW_FN Curl_GetAddrInfoExW = NULL;
-/* Curl_win32_init() performs win32 global initialization */
+/* Curl_win32_init() performs Win32 global initialization */
CURLcode Curl_win32_init(long flags)
{
-#ifdef USE_WINSOCK
- HMODULE ws2_32Dll;
-#endif
/* CURL_GLOBAL_WIN32 controls the *optional* part of the initialization which
- is just for Winsock at the moment. Any required win32 initialization
+ is just for Winsock at the moment. Any required Win32 initialization
should take place after this block. */
if(flags & CURL_GLOBAL_WIN32) {
#ifdef USE_WINSOCK
@@ -111,22 +104,6 @@ CURLcode Curl_win32_init(long flags)
Curl_if_nametoindex = pIfNameToIndex;
}
-#ifdef USE_WINSOCK
-#ifdef CURL_WINDOWS_APP
- ws2_32Dll = Curl_load_library(TEXT("ws2_32.dll"));
-#else
- ws2_32Dll = GetModuleHandleA("ws2_32");
-#endif
- if(ws2_32Dll) {
- Curl_FreeAddrInfoExW = CURLX_FUNCTION_CAST(FREEADDRINFOEXW_FN,
- GetProcAddress(ws2_32Dll, "FreeAddrInfoExW"));
- Curl_GetAddrInfoExCancel = CURLX_FUNCTION_CAST(GETADDRINFOEXCANCEL_FN,
- GetProcAddress(ws2_32Dll, "GetAddrInfoExCancel"));
- Curl_GetAddrInfoExW = CURLX_FUNCTION_CAST(GETADDRINFOEXW_FN,
- GetProcAddress(ws2_32Dll, "GetAddrInfoExW"));
- }
-#endif
-
/* curlx_verify_windows_version must be called during init at least once
because it has its own initialization routine. */
if(curlx_verify_windows_version(6, 0, 0, PLATFORM_WINNT,
@@ -136,13 +113,6 @@ CURLcode Curl_win32_init(long flags)
else
Curl_isVistaOrGreater = FALSE;
- if(curlx_verify_windows_version(6, 2, 0, PLATFORM_WINNT,
- VERSION_GREATER_THAN_EQUAL)) {
- Curl_isWindows8OrGreater = TRUE;
- }
- else
- Curl_isWindows8OrGreater = FALSE;
-
QueryPerformanceFrequency(&Curl_freq);
return CURLE_OK;
}
@@ -150,9 +120,6 @@ CURLcode Curl_win32_init(long flags)
/* Curl_win32_cleanup() is the opposite of Curl_win32_init() */
void Curl_win32_cleanup(long init_flags)
{
- Curl_FreeAddrInfoExW = NULL;
- Curl_GetAddrInfoExCancel = NULL;
- Curl_GetAddrInfoExW = NULL;
if(s_hIpHlpApiDll) {
FreeLibrary(s_hIpHlpApiDll);
s_hIpHlpApiDll = NULL;
@@ -212,7 +179,7 @@ HMODULE Curl_load_library(LPCTSTR filename)
HMODULE hModule = NULL;
LOADLIBRARYEX_FN pLoadLibraryEx = NULL;
- /* Get a handle to kernel32 so we can access it is functions at runtime */
+ /* Get a handle to kernel32 so we can access its functions at runtime */
HMODULE hKernel32 = GetModuleHandle(TEXT("kernel32"));
if(!hKernel32)
return NULL;
@@ -271,16 +238,4 @@ HMODULE Curl_load_library(LPCTSTR filename)
#endif
}
-bool Curl_win32_impersonating(void)
-{
-#ifndef CURL_WINDOWS_APP
- HANDLE token = NULL;
- if(OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, TRUE, &token)) {
- CloseHandle(token);
- return TRUE;
- }
-#endif
- return FALSE;
-}
-
#endif /* _WIN32 */