]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix build error on POSIX platform.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 16 Apr 2011 03:43:08 +0000 (23:43 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 16 Apr 2011 03:43:08 +0000 (23:43 -0400)
SVN-Revision: 3241

libarchive/archive_string.c

index bc5f3743429edacd4752f19188c64a9bf4c810e7..18be7fc9237ec596f21ee5083d8c0b3d4cfa045e 100644 (file)
@@ -692,15 +692,19 @@ create_sconv_object(const char *fc, const char *tc,
                        flag |= SCONV_UTF16BE;
                sc->from_cp = current_codepage;
                sc->to_cp = make_codepage_from_charset(tc);
+#if defined(_WIN32) && !defined(__CYGWIN__)
                if (IsValidCodePage(sc->to_cp))
                        flag |= SCONV_WIN_CP;
+#endif
        } else if (flag & SCONV_FROM_CHARSET) {
                if (strcmp(fc, "UTF-16BE") == 0)
                        flag |= SCONV_UTF16BE;
                sc->to_cp = current_codepage;
                sc->from_cp = make_codepage_from_charset(fc);
+#if defined(_WIN32) && !defined(__CYGWIN__)
                if (IsValidCodePage(sc->from_cp))
                        flag |= SCONV_WIN_CP;
+#endif
        }
        sc->flag = flag;