This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 294377f70ba9dc12714dda998f32830ab04cd810 (commit) via 46265beb251639a86a2bd6062c78d980c66f8e1e (commit) from 6d94c89da1f56e08b8439f2b4377c153d8833b36 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=294377f70ba9dc12714dda998f32830ab04cd810 commit 294377f70ba9dc12714dda998f32830ab04cd810 Merge: 6d94c89 46265be Author: Clinton Stimpson <clin...@elemtech.com> AuthorDate: Mon Jun 16 22:10:02 2014 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Jun 16 22:10:02 2014 -0400 Merge topic 'libarchive-encoding' into next 46265beb Encoding: Fix potential encoding issues with libarchive on Windows. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=46265beb251639a86a2bd6062c78d980c66f8e1e commit 46265beb251639a86a2bd6062c78d980c66f8e1e Author: Clinton Stimpson <clin...@elemtech.com> AuthorDate: Thu Jun 12 06:46:40 2014 -0600 Commit: Clinton Stimpson <clin...@elemtech.com> CommitDate: Mon Jun 16 13:58:42 2014 -0600 Encoding: Fix potential encoding issues with libarchive on Windows. Because the 8bit string encoding in libarchive can be different than the 8bit string encoding in CMake, change to call the wide version of libarchive functions. They are different if CMake is configured to use UTF-8 as the internal encoding. diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index 58f7573..c5fc34f 100644 --- a/Source/cmArchiveWrite.cxx +++ b/Source/cmArchiveWrite.cxx @@ -237,8 +237,8 @@ bool cmArchiveWrite::AddFile(const char* file, std::cout << dest << "\n"; } Entry e; - archive_entry_copy_sourcepath(e, file); - archive_entry_set_pathname(e, dest.c_str()); + archive_entry_copy_sourcepath_w(e, cmsys::Encoding::ToWide(file).c_str()); + archive_entry_copy_pathname_w(e, cmsys::Encoding::ToWide(file).c_str()); if(archive_read_disk_entry_from_file(this->Disk, e, -1, 0) != ARCHIVE_OK) { this->Error = "archive_read_disk_entry_from_file: "; diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 2e417cb..65fdd2c 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1581,7 +1581,8 @@ namespace{ } strftime(tmp, sizeof(tmp), fmt, localtime(&tim)); fprintf(out, " %s ", tmp); - fprintf(out, "%s", archive_entry_pathname(entry)); + fprintf(out, "%s", + cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry)).c_str()); /* Extra information for links. */ if (archive_entry_hardlink(entry)) /* Hard link */ @@ -1636,12 +1637,13 @@ long copy_data(struct archive *ar, struct archive *aw) bool extract_tar(const char* outFileName, bool verbose, bool extract) { + std::wstring wOutFileName = cmsys::Encoding::ToWide(outFileName); struct archive* a = archive_read_new(); struct archive *ext = archive_write_disk_new(); archive_read_support_compression_all(a); archive_read_support_format_all(a); struct archive_entry *entry; - int r = archive_read_open_file(a, outFileName, 10240); + int r = archive_read_open_filename_w(a, wOutFileName.c_str(), 10240); if(r) { cmSystemTools::Error("Problem with archive_read_open_file(): ", @@ -1666,7 +1668,8 @@ bool extract_tar(const char* outFileName, bool verbose, if(extract) { cmSystemTools::Stdout("x "); - cmSystemTools::Stdout(archive_entry_pathname(entry)); + cmSystemTools::Stdout( + cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry)).c_str()); } else { @@ -1676,7 +1679,8 @@ bool extract_tar(const char* outFileName, bool verbose, } else if(!extract) { - cmSystemTools::Stdout(archive_entry_pathname(entry)); + cmSystemTools::Stdout( + cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry)).c_str()); cmSystemTools::Stdout("\n"); } if(extract) @@ -1706,8 +1710,9 @@ bool extract_tar(const char* outFileName, bool verbose, else if(const char* linktext = archive_entry_symlink(entry)) { std::cerr << "cmake -E tar: warning: skipping symbolic link \"" - << archive_entry_pathname(entry) << "\" -> \"" - << linktext << "\"." << std::endl; + << cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry)) + << "\" -> \"" + << linktext << "\"." << std::endl; } #endif else @@ -1715,7 +1720,7 @@ bool extract_tar(const char* outFileName, bool verbose, cmSystemTools::Error("Problem with archive_write_header(): ", archive_error_string(ext)); cmSystemTools::Error("Current file: ", - archive_entry_pathname(entry)); + cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry)).c_str()); break; } } ----------------------------------------------------------------------- Summary of changes: Source/cmArchiveWrite.cxx | 4 ++-- Source/cmSystemTools.cxx | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits