From a8d095a2bad199f0765b52079df4624d18d4ba64 Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Fri, 25 Jun 2021 18:04:57 +0200 Subject: [PATCH] bin/xbps-rindex: drop libarchive compat macros Closes: #411 [via git-merge-pr] --- bin/xbps-create/main.c | 2 +- bin/xbps-rindex/defs.h | 32 -------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/bin/xbps-create/main.c b/bin/xbps-create/main.c index 11683d95..985a18d6 100644 --- a/bin/xbps-create/main.c +++ b/bin/xbps-create/main.c @@ -638,7 +638,7 @@ write_entry(struct archive *ar, struct archive_entry *entry) if ((target = archive_entry_pathname(entry)) == NULL) return; - if (archive_write_header(ar, entry)) + if (archive_write_header(ar, entry) != ARCHIVE_OK) die_archive(ar, "cannot write %s to archive:", target); /* Only regular files can have data. */ diff --git a/bin/xbps-rindex/defs.h b/bin/xbps-rindex/defs.h index 6368d056..d99b59f3 100644 --- a/bin/xbps-rindex/defs.h +++ b/bin/xbps-rindex/defs.h @@ -28,38 +28,6 @@ #include -/* libarchive compat */ -#if ARCHIVE_VERSION_NUMBER >= 3000000 - -#define archive_read_support_compression_gzip(x) \ - archive_read_support_filter_gzip(x) - -#define archive_read_support_compression_bzip2(x) \ - archive_read_support_filter_bzip2(x) - -#define archive_read_support_compression_xz(x) \ - archive_read_support_filter_xz(x) - -#define archive_write_set_compression_gzip(x) \ - archive_write_add_filter_gzip(x) - -#define archive_write_set_compression_bzip2(x) \ - archive_write_add_filter_bzip2(x) - -#define archive_write_set_compression_xz(x) \ - archive_write_add_filter_xz(x) - -#define archive_read_finish(x) \ - archive_read_free(x) - -#define archive_write_finish(x) \ - archive_write_free(x) - -#define archive_compression_name(x) \ - archive_filter_name(x, 0) - -#endif - #define _XBPS_RINDEX "xbps-rindex" /* From index-add.c */