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

@ -60,7 +60,6 @@
#include "progress.h"
#include "dict.h"
#include "curl_printf.h"
#include "strcase.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@ -198,9 +197,9 @@ static CURLcode dict_do(struct Curl_easy *data, bool *done)
if(result)
return result;
if(strncasecompare(path, DICT_MATCH, sizeof(DICT_MATCH)-1) ||
strncasecompare(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) ||
strncasecompare(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) {
if(curl_strnequal(path, DICT_MATCH, sizeof(DICT_MATCH)-1) ||
curl_strnequal(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) ||
curl_strnequal(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) {
word = strchr(path, ':');
if(word) {
@ -245,9 +244,9 @@ static CURLcode dict_do(struct Curl_easy *data, bool *done)
}
Curl_xfer_setup1(data, CURL_XFER_RECV, -1, FALSE); /* no upload */
}
else if(strncasecompare(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) ||
strncasecompare(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) ||
strncasecompare(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) {
else if(curl_strnequal(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) ||
curl_strnequal(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) ||
curl_strnequal(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) {
word = strchr(path, ':');
if(word) {