[pacman-dev] [PATCH 1/3] Remove pre libarchive 3.0 code
Emil Velikov
emil.l.velikov at gmail.com
Wed Dec 23 22:43:56 UTC 2020
Pacman has required libarchive 3.0 or later for quite some time mow.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
lib/libalpm/libarchive-compat.h | 20 --------------------
1 file changed, 20 deletions(-)
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 */
--
2.29.2
More information about the pacman-dev
mailing list