mirror of
https://github.com/curl/curl.git
synced 2026-08-24 19:53:46 +03:00
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:
parent
d553f7e9f0
commit
a3787f98ac
54 changed files with 223 additions and 260 deletions
|
|
@ -23,7 +23,10 @@
|
|||
***************************************************************************/
|
||||
|
||||
#include "strparse.h"
|
||||
#include "../strcase.h"
|
||||
|
||||
#ifndef WITHOUT_LIBCURL
|
||||
#include <curl/curl.h> /* for curl_strnequal() */
|
||||
#endif
|
||||
|
||||
void curlx_str_init(struct Curl_str *out)
|
||||
{
|
||||
|
|
@ -238,7 +241,7 @@ int curlx_str_newline(const char **linep)
|
|||
int curlx_str_casecompare(struct Curl_str *str, const char *check)
|
||||
{
|
||||
size_t clen = check ? strlen(check) : 0;
|
||||
return ((str->len == clen) && strncasecompare(str->str, check, clen));
|
||||
return ((str->len == clen) && curl_strnequal(str->str, check, clen));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue