summaryrefslogtreecommitdiffstats
path: root/src/xz/suffix.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
commitcf178685aca107aa37c748de11da01562e78c46c (patch)
tree84d60b39c1744edcbdd4dbfc5026583914432dba /src/xz/suffix.c
parentAdding upstream version 5.6.1+really5.4.5. (diff)
downloadxz-utils-cf178685aca107aa37c748de11da01562e78c46c.tar.xz
xz-utils-cf178685aca107aa37c748de11da01562e78c46c.zip
Adding upstream version 5.6.2.upstream/5.6.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/xz/suffix.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/xz/suffix.c b/src/xz/suffix.c
index 6ce9787..1d548e4 100644
--- a/src/xz/suffix.c
+++ b/src/xz/suffix.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file suffix.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "private.h"
@@ -21,7 +20,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 +103,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;
@@ -178,7 +183,7 @@ uncompressed_name(const char *src_name, const size_t src_len)
static void
msg_suffix(const char *src_name, const char *suffix)
{
- message_warning(_("%s: File already has `%s' suffix, skipping"),
+ message_warning(_("%s: File already has '%s' suffix, skipping"),
src_name, suffix);
return;
}