[Cmake-commits] CMake branch, next, updated. v3.3.1-2371-gac00a76

Brad King brad.king at kitware.com
Mon Aug 24 10:40:16 EDT 2015


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  ac00a76e6a3cb80f1b91d7fbf3ca466ef9484908 (commit)
       via  e7f937155f6f8b117d6292b3ffe6cf63c8eda9c0 (commit)
      from  fe6dfb29181101040f540ded717ebf19c1469cd9 (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=ac00a76e6a3cb80f1b91d7fbf3ca466ef9484908
commit ac00a76e6a3cb80f1b91d7fbf3ca466ef9484908
Merge: fe6dfb2 e7f9371
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Aug 24 10:40:15 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Aug 24 10:40:15 2015 -0400

    Merge topic 'libarchive-modern-apis' into next
    
    e7f93715 Use modern libarchive APIs


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7f937155f6f8b117d6292b3ffe6cf63c8eda9c0
commit e7f937155f6f8b117d6292b3ffe6cf63c8eda9c0
Author:     Páder Rezső <rezso at rezso.net>
AuthorDate: Sat Aug 22 18:14:12 2015 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Aug 24 10:40:04 2015 -0400

    Use modern libarchive APIs
    
    Replace use of deprecated libarchive3 functions with their modern
    equivalents.

diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index 44d0d4e..9335680 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -90,49 +90,49 @@ cmArchiveWrite::cmArchiveWrite(
   switch (c)
     {
     case CompressNone:
-      if(archive_write_set_compression_none(this->Archive) != ARCHIVE_OK)
+      if(archive_write_add_filter_none(this->Archive) != ARCHIVE_OK)
         {
-        this->Error = "archive_write_set_compression_none: ";
+        this->Error = "archive_write_add_filter_none: ";
         this->Error += cm_archive_error_string(this->Archive);
         return;
         }
       break;
     case CompressCompress:
-      if(archive_write_set_compression_compress(this->Archive) != ARCHIVE_OK)
+      if(archive_write_add_filter_compress(this->Archive) != ARCHIVE_OK)
         {
-        this->Error = "archive_write_set_compression_compress: ";
+        this->Error = "archive_write_add_filter_compress: ";
         this->Error += cm_archive_error_string(this->Archive);
         return;
         }
       break;
     case CompressGZip:
-      if(archive_write_set_compression_gzip(this->Archive) != ARCHIVE_OK)
+      if(archive_write_add_filter_gzip(this->Archive) != ARCHIVE_OK)
         {
-        this->Error = "archive_write_set_compression_gzip: ";
+        this->Error = "archive_write_add_filter_gzip: ";
         this->Error += cm_archive_error_string(this->Archive);
         return;
         }
       break;
     case CompressBZip2:
-      if(archive_write_set_compression_bzip2(this->Archive) != ARCHIVE_OK)
+      if(archive_write_add_filter_bzip2(this->Archive) != ARCHIVE_OK)
         {
-        this->Error = "archive_write_set_compression_bzip2: ";
+        this->Error = "archive_write_add_filter_bzip2: ";
         this->Error += cm_archive_error_string(this->Archive);
         return;
         }
       break;
     case CompressLZMA:
-      if(archive_write_set_compression_lzma(this->Archive) != ARCHIVE_OK)
+      if(archive_write_add_filter_lzma(this->Archive) != ARCHIVE_OK)
         {
-        this->Error = "archive_write_set_compression_lzma: ";
+        this->Error = "archive_write_add_filter_lzma: ";
         this->Error += cm_archive_error_string(this->Archive);
         return;
         }
       break;
     case CompressXZ:
-      if(archive_write_set_compression_xz(this->Archive) != ARCHIVE_OK)
+      if(archive_write_add_filter_xz(this->Archive) != ARCHIVE_OK)
         {
-        this->Error = "archive_write_set_compression_xz: ";
+        this->Error = "archive_write_add_filter_xz: ";
         this->Error += cm_archive_error_string(this->Archive);
         return;
         }
@@ -177,8 +177,8 @@ cmArchiveWrite::cmArchiveWrite(
 //----------------------------------------------------------------------------
 cmArchiveWrite::~cmArchiveWrite()
 {
-  archive_read_finish(this->Disk);
-  archive_write_finish(this->Archive);
+  archive_read_free(this->Disk);
+  archive_write_free(this->Archive);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index a117238..eba8d07 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1705,7 +1705,7 @@ bool extract_tar(const char* outFileName, bool verbose,
   static_cast<void>(localeRAII);
   struct archive* a = archive_read_new();
   struct archive *ext = archive_write_disk_new();
-  archive_read_support_compression_all(a);
+  archive_read_support_filter_all(a);
   archive_read_support_format_all(a);
   struct archive_entry *entry;
   int r = cm_archive_read_open_file(a, outFileName, 10240);
@@ -1792,7 +1792,7 @@ bool extract_tar(const char* outFileName, bool verbose,
     }
   archive_write_free(ext);
   archive_read_close(a);
-  archive_read_finish(a);
+  archive_read_free(a);
   return r == ARCHIVE_EOF || r == ARCHIVE_OK;
 }
 }

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

Summary of changes:
 Source/cmArchiveWrite.cxx |   28 ++++++++++++++--------------
 Source/cmSystemTools.cxx  |    4 ++--
 2 files changed, 16 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list