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:
Viktor Szakats 2022-05-25 15:24:42 +00:00
parent ba6a3fd3ee
commit d67f41acd3
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -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