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

@ -26,7 +26,6 @@
#include "urldata.h"
#include "strdup.h"
#include "strcase.h"
#include "sendf.h"
#include "headers.h"
#include "curlx/strparse.h"
@ -88,7 +87,7 @@ CURLHcode curl_easy_header(CURL *easy,
/* we need a first round to count amount of this header */
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
hs = Curl_node_elem(e);
if(strcasecompare(hs->name, name) &&
if(curl_strequal(hs->name, name) &&
(hs->type & type) &&
(hs->request == request)) {
amount++;
@ -107,7 +106,7 @@ CURLHcode curl_easy_header(CURL *easy,
else {
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
hs = Curl_node_elem(e);
if(strcasecompare(hs->name, name) &&
if(curl_strequal(hs->name, name) &&
(hs->type & type) &&
(hs->request == request) &&
(match++ == nameindex)) {
@ -173,7 +172,7 @@ struct curl_header *curl_easy_nextheader(CURL *easy,
the index for the currently selected entry */
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
struct Curl_header_store *check = Curl_node_elem(e);
if(strcasecompare(hs->name, check->name) &&
if(curl_strequal(hs->name, check->name) &&
(check->request == request) &&
(check->type & type))
amount++;