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

@ -150,7 +150,7 @@ struct dynhds_entry *Curl_dynhds_get(struct dynhds *dynhds, const char *name,
size_t i;
for(i = 0; i < dynhds->hds_len; ++i) {
if(dynhds->hds[i]->namelen == namelen &&
strncasecompare(dynhds->hds[i]->name, name, namelen)) {
curl_strnequal(dynhds->hds[i]->name, name, namelen)) {
return dynhds->hds[i];
}
}
@ -297,7 +297,7 @@ size_t Curl_dynhds_count_name(struct dynhds *dynhds,
size_t i;
for(i = 0; i < dynhds->hds_len; ++i) {
if((namelen == dynhds->hds[i]->namelen) &&
strncasecompare(name, dynhds->hds[i]->name, namelen))
curl_strnequal(name, dynhds->hds[i]->name, namelen))
++n;
}
}
@ -325,7 +325,7 @@ size_t Curl_dynhds_remove(struct dynhds *dynhds,
size_t i, len;
for(i = 0; i < dynhds->hds_len; ++i) {
if((namelen == dynhds->hds[i]->namelen) &&
strncasecompare(name, dynhds->hds[i]->name, namelen)) {
curl_strnequal(name, dynhds->hds[i]->name, namelen)) {
++n;
--dynhds->hds_len;
dynhds->strs_len -= (dynhds->hds[i]->namelen +