mirror of
https://github.com/curl/curl.git
synced 2025-01-30 14:22:33 +08:00
version: allow stricmp() for sorting the feature list
In CMakeLists.txt there is an attempt to detect `stricmp()`, and in certain cases, this attempt is the only successful one to detect a case-insensitive comparison function. `HAVE_STRICMP` is defined as a result, but this macro wasn't used anywhere in the source. This patch makes use of it as an alternative when alpha-sorting the `--version` feature list. Reviewed-by: Daniel Stenberg Closes #8916
This commit is contained in:
parent
ba6a3fd3ee
commit
d67f41acd3
@ -197,6 +197,8 @@ featcomp(const void *p1, const void *p2)
|
||||
return strcasecmp(* (char * const *) p1, * (char * const *) p2);
|
||||
#elif defined(HAVE_STRCMPI)
|
||||
return strcmpi(* (char * const *) p1, * (char * const *) p2);
|
||||
#elif defined(HAVE_STRICMP)
|
||||
return stricmp(* (char * const *) p1, * (char * const *) p2);
|
||||
#else
|
||||
return strcmp(* (char * const *) p1, * (char * const *) p2);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user