From 831fc568fc87a75bb6e05575b93a7541b49e7aba Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 23 Dec 2020 22:43:56 +0000 Subject: Remove pre libarchive 3.0 code Pacman has required libarchive 3.0 or later for quite some time mow. Signed-off-by: Emil Velikov Signed-off-by: Allan McRae --- lib/libalpm/libarchive-compat.h | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/libarchive-compat.h b/lib/libalpm/libarchive-compat.h index 0ff005ae..596fd664 100644 --- a/lib/libalpm/libarchive-compat.h +++ b/lib/libalpm/libarchive-compat.h @@ -24,48 +24,28 @@ static inline int _alpm_archive_read_free(struct archive *archive) { -#if ARCHIVE_VERSION_NUMBER >= 3000000 return archive_read_free(archive); -#else - return archive_read_finish(archive); -#endif } static inline int64_t _alpm_archive_compressed_ftell(struct archive *archive) { -#if ARCHIVE_VERSION_NUMBER >= 3000000 return archive_filter_bytes(archive, -1); -#else - return archive_position_compressed(archive); -#endif } static inline int _alpm_archive_read_open_file(struct archive *archive, const char *filename, size_t block_size) { -#if ARCHIVE_VERSION_NUMBER >= 3000000 return archive_read_open_filename(archive, filename, block_size); -#else - return archive_read_open_file(archive, filename, block_size); -#endif } static inline int _alpm_archive_filter_code(struct archive *archive) { -#if ARCHIVE_VERSION_NUMBER >= 3000000 return archive_filter_code(archive, 0); -#else - return archive_compression(archive); -#endif } static inline int _alpm_archive_read_support_filter_all(struct archive *archive) { -#if ARCHIVE_VERSION_NUMBER >= 3000000 return archive_read_support_filter_all(archive); -#else - return archive_read_support_compression_all(archive); -#endif } #endif /* LIBARCHIVE_COMPAT_H */ -- cgit v1.2.3-70-g09d2