summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/test/test_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libarchive/test/test_entry.c')
-rw-r--r--lib/libarchive/test/test_entry.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libarchive/test/test_entry.c b/lib/libarchive/test/test_entry.c
index bd946c4..35ca6e3 100644
--- a/lib/libarchive/test/test_entry.c
+++ b/lib/libarchive/test/test_entry.c
@@ -27,6 +27,16 @@ __FBSDID("$FreeBSD$");
#include <locale.h>
+#ifndef HAVE_WCSCPY
+static wchar_t * wcscpy(wchar_t *s1, const wchar_t *s2)
+{
+ wchar_t *dest = s1;
+ while ((*s1 = *s2) != L'\0')
+ ++s1, ++s2;
+ return dest;
+}
+#endif
+
/*
* Most of these tests are system-independent, though a few depend on
* features of the local system. Such tests are conditionalized on
@@ -866,6 +876,7 @@ DEFINE_TEST(test_entry)
assert(NULL == archive_entry_symlink_w(e));
}
+#if HAVE_WCSCPY
l = 0x12345678L;
wc = (wchar_t)l; /* Wide character too big for UTF-8. */
if (NULL == setlocale(LC_ALL, "C") || (long)wc != l) {
@@ -885,6 +896,7 @@ DEFINE_TEST(test_entry)
failure("Converting wide characters from Unicode should fail.");
assertEqualString(NULL, archive_entry_pathname(e));
}
+#endif
/* Release the experimental entry. */
archive_entry_free(e);
OpenPOWER on IntegriCloud