lib: drop two interim macros in favor of native libcurl API calls

Drop `strcasecompare` and `strncasecompare` in favor of libcurl API
calls `curl_strequal` and `curl_strnequal` respectively.

Also drop unnecessary `strcase.h` includes. Include `curl/curl.h`
instead where it wasn't included before.

Closes #17772
This commit is contained in:
Viktor Szakats 2025-06-28 12:17:30 +02:00
parent d553f7e9f0
commit a3787f98ac
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
54 changed files with 223 additions and 260 deletions

View file

@ -730,7 +730,7 @@ static bool tailmatch(const char *full, size_t flen,
{
if(plen > flen)
return FALSE;
return strncasecompare(part, &full[flen - plen], plen);
return curl_strnequal(part, &full[flen - plen], plen);
}
static struct Curl_addrinfo *
@ -872,8 +872,8 @@ CURLcode Curl_resolv(struct Curl_easy *data,
goto error;
if(!is_ipaddr &&
(strcasecompare(hostname, "localhost") ||
strcasecompare(hostname, "localhost.") ||
(curl_strequal(hostname, "localhost") ||
curl_strequal(hostname, "localhost.") ||
tailmatch(hostname, hostname_len, STRCONST(".localhost")) ||
tailmatch(hostname, hostname_len, STRCONST(".localhost.")))) {
addr = get_localhost(port, hostname);