]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Rename LOCALE_DE to LOCALE_UTF8, since the code assumes it's a UTF8 locale. Set...
authorTim Kientzle <kientzle@gmail.com>
Mon, 2 Nov 2009 04:39:11 +0000 (23:39 -0500)
committerTim Kientzle <kientzle@gmail.com>
Mon, 2 Nov 2009 04:39:11 +0000 (23:39 -0500)
SVN-Revision: 1578

libarchive/test/test.h
libarchive/test/test_entry.c
libarchive/test/test_pax_filename_encoding.c

index f6d9fe77245645bd0785cc189af51b052ca55203..87071c041fe245b8490304ecd9f7f887d060c821 100644 (file)
@@ -83,9 +83,9 @@
 /* Windows (including Visual Studio and MinGW but not Cygwin) */
 #if defined(_WIN32) && !defined(__CYGWIN__)
 #define strdup _strdup
-#define LOCALE_DE      "deu"
+#define        LOCALE_UTF8     NULL
 #else
-#define LOCALE_DE      "de_DE.UTF-8"
+#define LOCALE_UTF8    "de_DE.UTF-8"
 #endif
 
 /* Visual Studio */
index af9ac984dec5d20479e497f8bb17a81cf60b7d30..1caae8405c3b8a59e1dd5d0deebe71436087f543 100644 (file)
@@ -833,7 +833,7 @@ DEFINE_TEST(test_entry)
        /*
         * Exercise the character-conversion logic, if we can.
         */
-       if (NULL == setlocale(LC_ALL, LOCALE_DE)) {
+       if (NULL == LOCALE_UTF8 || NULL == setlocale(LC_ALL, LOCALE_UTF8)) {
                skipping("Can't exercise charset-conversion logic without"
                        " a suitable locale.");
        } else {
index 700e6f4362d3422af8df34d0d8e9c602acd38b5b..dfa6ae91b9271dbea0c02d391d712f4bcb478906 100644 (file)
@@ -107,9 +107,10 @@ test_pax_filename_encoding_2(void)
         * de_DE.UTF-8 seems to be commonly supported.
         */
        /* If it doesn't exist, just warn and return. */
-       if (NULL == setlocale(LC_ALL, LOCALE_DE)) {
+       if (LOCALE_UTF8 == NULL
+           || NULL == setlocale(LC_ALL, LOCALE_UTF8)) {
                skipping("invalid encoding tests require a suitable locale;"
-                   " %s not available on this system", LOCALE_DE);
+                   " %s not available on this system", LOCALE_UTF8);
                return;
        }