[Cmake-commits] CMake branch, next, updated. v3.0.0-3863-gcd57f13

Clinton Stimpson clinton at elemtech.com
Mon Jun 23 11:20:03 EDT 2014


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  cd57f1396212c086e59a9784b56b0b69f34be784 (commit)
       via  e97d3d5d5dc2689317e7f27b65257b9563487a19 (commit)
      from  e852f30085651294be6ea6947f31425f2ce1e63b (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=cd57f1396212c086e59a9784b56b0b69f34be784
commit cd57f1396212c086e59a9784b56b0b69f34be784
Merge: e852f30 e97d3d5
Author:     Clinton Stimpson <clinton at elemtech.com>
AuthorDate: Mon Jun 23 11:20:02 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 23 11:20:02 2014 -0400

    Merge topic 'libarchive-encoding' into next
    
    e97d3d5d Encoding: Fix compile errors with old gcc versions.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e97d3d5d5dc2689317e7f27b65257b9563487a19
commit e97d3d5d5dc2689317e7f27b65257b9563487a19
Author:     Clinton Stimpson <clinton at elemtech.com>
AuthorDate: Mon Jun 23 09:19:07 2014 -0600
Commit:     Clinton Stimpson <clinton at elemtech.com>
CommitDate: Mon Jun 23 09:19:07 2014 -0600

    Encoding: Fix compile errors with old gcc versions.

diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index c5fc34f..593808b 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -237,8 +237,13 @@ bool cmArchiveWrite::AddFile(const char* file,
     std::cout << dest << "\n";
     }
   Entry e;
+#if cmsys_STL_HAS_WSTRING
   archive_entry_copy_sourcepath_w(e, cmsys::Encoding::ToWide(file).c_str());
   archive_entry_copy_pathname_w(e, cmsys::Encoding::ToWide(file).c_str());
+#else
+  archive_entry_copy_sourcepath(e, file);
+  archive_entry_copy_pathname(e, file);
+#endif
   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 65fdd2c..537ae8b 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1581,8 +1581,12 @@ namespace{
     }
   strftime(tmp, sizeof(tmp), fmt, localtime(&tim));
   fprintf(out, " %s ", tmp);
+#if cmsys_STL_HAS_WSTRING
   fprintf(out, "%s",
     cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry)).c_str());
+#else
+  fprintf(out, "%s", archive_entry_pathname(entry));
+#endif
 
   /* Extra information for links. */
   if (archive_entry_hardlink(entry)) /* Hard link */
@@ -1637,13 +1641,17 @@ 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;
+#if cmsys_STL_HAS_WSTRING
+  std::wstring wOutFileName = cmsys::Encoding::ToWide(outFileName);
   int r = archive_read_open_filename_w(a, wOutFileName.c_str(), 10240);
+#else
+  int r = archive_read_open_file(a, outFileName, 10240);
+#endif
   if(r)
     {
     cmSystemTools::Error("Problem with archive_read_open_file(): ",
@@ -1668,8 +1676,12 @@ bool extract_tar(const char* outFileName, bool verbose,
       if(extract)
         {
         cmSystemTools::Stdout("x ");
+#if cmsys_STL_HAS_WSTRING
         cmSystemTools::Stdout(
           cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry)).c_str());
+#else
+        cmSystemTools::Stdout(archive_entry_pathname(entry));
+#endif
         }
       else
         {
@@ -1679,8 +1691,12 @@ bool extract_tar(const char* outFileName, bool verbose,
       }
     else if(!extract)
       {
+#if cmsys_STL_HAS_WSTRING
       cmSystemTools::Stdout(
         cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry)).c_str());
+#else
+        cmSystemTools::Stdout(archive_entry_pathname(entry));
+#endif
       cmSystemTools::Stdout("\n");
       }
     if(extract)
@@ -1710,7 +1726,11 @@ 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 \""
+#if cmsys_STL_HAS_WSTRING
                  << cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry))
+#else
+                 << archive_entry_pathname(entry)
+#endif
                  << "\" -> \""
                  << linktext << "\"." << std::endl;
         }
@@ -1720,7 +1740,11 @@ bool extract_tar(const char* outFileName, bool verbose,
         cmSystemTools::Error("Problem with archive_write_header(): ",
                              archive_error_string(ext));
         cmSystemTools::Error("Current file: ",
+#if cmsys_STL_HAS_WSTRING
           cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry)).c_str());
+#else
+          archive_entry_pathname(entry));
+#endif
         break;
         }
       }

-----------------------------------------------------------------------

Summary of changes:
 Source/cmArchiveWrite.cxx |    5 +++++
 Source/cmSystemTools.cxx  |   26 +++++++++++++++++++++++++-
 2 files changed, 30 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list