libalpm
Arch Linux Package Manager Library
libarchive-compat.h
Go to the documentation of this file.
1#ifndef LIBARCHIVE_COMPAT_H
2#define LIBARCHIVE_COMPAT_H
3
4/*
5 * libarchive-compat.h
6 *
7 * Copyright (c) 2013-2024 Pacman Development Team <pacman-dev@lists.archlinux.org>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23#include <stdint.h>
24
25static inline int _alpm_archive_read_free(struct archive *archive)
26{
27 return archive_read_free(archive);
28}
29
30static inline int64_t _alpm_archive_compressed_ftell(struct archive *archive)
31{
32 return archive_filter_bytes(archive, -1);
33}
34
35static inline int _alpm_archive_read_open_file(struct archive *archive,
36 const char *filename, size_t block_size)
37{
38 return archive_read_open_filename(archive, filename, block_size);
39}
40
41static inline int _alpm_archive_filter_code(struct archive *archive)
42{
43 return archive_filter_code(archive, 0);
44}
45
46static inline int _alpm_archive_read_support_filter_all(struct archive *archive)
47{
48 return archive_read_support_filter_all(archive);
49}
50
51#endif /* LIBARCHIVE_COMPAT_H */