diff options
Diffstat (limited to 'src/xz')
-rw-r--r-- | src/xz/suffix.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xz/suffix.c b/src/xz/suffix.c index 6ce97878..2df2b8c8 100644 --- a/src/xz/suffix.c +++ b/src/xz/suffix.c @@ -21,7 +21,13 @@ # ifdef HAVE_STRINGS_H # include <strings.h> # endif -# define strcmp strcasecmp +# ifdef _MSC_VER +# define suffix_strcmp _stricmp +# else +# define suffix_strcmp strcasecmp +# endif +#else +# define suffix_strcmp strcmp #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])) 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 0; |