diff options
author | Páder Rezső <rezso@rezso.net> | 2015-08-22 18:14:12 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-24 10:40:04 -0400 |
commit | e7f937155f6f8b117d6292b3ffe6cf63c8eda9c0 (patch) | |
tree | 2c385746178f541abded94f3d186d4f0fd660337 /Source/cmArchiveWrite.cxx | |
parent | 2370a99400c6450606e25562386cf40bc9c41f38 (diff) | |
download | cmake-e7f937155f6f8b117d6292b3ffe6cf63c8eda9c0.tar.gz |
Use modern libarchive APIs
Replace use of deprecated libarchive3 functions with their modern
equivalents.
Diffstat (limited to 'Source/cmArchiveWrite.cxx')
-rw-r--r-- | Source/cmArchiveWrite.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index 44d0d4ec48..9335680cf3 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); } //---------------------------------------------------------------------------- |