mirror of
https://github.com/curl/curl.git
synced 2026-07-24 22:47:16 +03:00
src: add CURL_STRICMP() macro, use _stricmp() on Windows
Add `CURL_STRICMP()` macro that works on all platforms depending on which lib C function is available. Make sure to always use `_stricmp()` on Windows, which is the non-deprecated, official API for this on this platform. Before this patch it used a MinGW-specific call, or a deprecated compatibility wrapper with MSVC. Drop `stricmp` variant detections on Windows with autotools. https://learn.microsoft.com/cpp/c-runtime-library/reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l Ref: #15652 Closes #15788
This commit is contained in:
parent
68bd759c2b
commit
6dacd2f208
7 changed files with 28 additions and 37 deletions
|
|
@ -158,17 +158,9 @@
|
|||
/* Define if you have the socket function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
#if defined(__MINGW32__)
|
||||
#define HAVE_STRCASECMP 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the stricmp function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define if you have the strtoll function. */
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
|
||||
#define HAVE_STRTOLL 1
|
||||
|
|
|
|||
|
|
@ -114,15 +114,9 @@
|
|||
/* Define if you have the socket function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/* #define HAVE_STRCASECMP 1 */
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
/* #define HAVE_STRDUP 1 */
|
||||
|
||||
/* Define if you have the stricmp function. */
|
||||
/* #define HAVE_STRICMP 1 */
|
||||
|
||||
/* Define if you have the strtoll function. */
|
||||
#if defined(__MINGW32__)
|
||||
#define HAVE_STRTOLL 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue