mirror of
https://github.com/curl/curl.git
synced 2026-08-26 08:33:31 +03:00
windows: reduce/stop loading DLLs at runtime
- replace dynamic `InitSecurityInterface()` call with early binding and link `secur32` system DLL. The library and function are available in all supported curl Windows targets, meaning WinXP or newer. Add small hack for mingw32ce to make it build. - detect and use `if_nametoindex()` on Windows when available. Link `iphlpapi` system DLL. Requires targeting Vista or newer. Replacing the dynamic call and the pre-load optimization for lib3026. Suggested-by: Jay Satiro Closes #17413
This commit is contained in:
parent
c129d0b1a8
commit
0d71b18153
16 changed files with 186 additions and 182 deletions
10
lib/url.c
10
lib/url.c
|
|
@ -59,6 +59,10 @@
|
|||
#error "We cannot compile without socket() support!"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_IF_NAMETOINDEX) && defined(_WIN32)
|
||||
#include <iphlpapi.h>
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "doh.h"
|
||||
|
|
@ -1794,10 +1798,10 @@ static void zonefrom_url(CURLU *uh, struct Curl_easy *data,
|
|||
#if defined(HAVE_IF_NAMETOINDEX) || defined(_WIN32)
|
||||
/* Zone identifier is not numeric */
|
||||
unsigned int scopeidx = 0;
|
||||
#ifdef _WIN32
|
||||
scopeidx = Curl_if_nametoindex(zoneid);
|
||||
#else
|
||||
#ifdef HAVE_IF_NAMETOINDEX
|
||||
scopeidx = if_nametoindex(zoneid);
|
||||
#else
|
||||
scopeidx = Curl_if_nametoindex(zoneid);
|
||||
#endif
|
||||
if(!scopeidx) {
|
||||
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue