windows: use _strdup() instead of strdup() where missing

To replace deprecated `strdup()` CRT calls with the recommended
`_strdup()`.

Refs:
https://learn.microsoft.com/cpp/c-runtime-library/reference/strdup-wcsdup
https://learn.microsoft.com/cpp/c-runtime-library/reference/strdup-wcsdup-mbsdup

Closes #19794
This commit is contained in:
Viktor Szakats 2025-12-01 19:49:50 +01:00
parent a3fcd80de4
commit 5356bce6ab
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
5 changed files with 14 additions and 8 deletions

View file

@ -69,6 +69,10 @@ extern const struct entry_s s_entries[];
# define snprintf _snprintf
#endif
#ifdef _WIN32
# define strdup _strdup
#endif
#ifdef _WIN32
# define CURL_STRNICMP(p1, p2, n) _strnicmp(p1, p2, n)
#elif defined(HAVE_STRCASECMP)