mirror of https://git.tukaani.org/xz.git
MSVC: xz: Use _stricmp() instead of strcasecmp() in suffix.c.
This commit is contained in:
parent
e241051f50
commit
5c6f892d41
|
@ -21,7 +21,13 @@
|
||||||
# ifdef HAVE_STRINGS_H
|
# ifdef HAVE_STRINGS_H
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
# endif
|
# endif
|
||||||
# define strcmp strcasecmp
|
# ifdef _MSC_VER
|
||||||
|
# define suffix_strcmp _stricmp
|
||||||
|
# else
|
||||||
|
# define suffix_strcmp strcasecmp
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define suffix_strcmp strcmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,7 +104,7 @@ test_suffix(const char *suffix, const char *src_name, size_t src_len)
|
||||||
|| is_dir_sep(src_name[src_len - suffix_len - 1]))
|
|| is_dir_sep(src_name[src_len - suffix_len - 1]))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (strcmp(suffix, src_name + src_len - suffix_len) == 0)
|
if (suffix_strcmp(suffix, src_name + src_len - suffix_len) == 0)
|
||||||
return src_len - suffix_len;
|
return src_len - suffix_len;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue