summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_read_open_file.c
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2007-01-05 10:48:18 +0000
committercperciva <cperciva@FreeBSD.org>2007-01-05 10:48:18 +0000
commitf583eee6e15beb870cee2e61468804ac5017cfd2 (patch)
treea8fbd9a8f7d676f70ed6b0db08db229718f48ade /lib/libarchive/archive_read_open_file.c
parent872ebc62d77854d9b1f45266568982a51ba268a4 (diff)
downloadFreeBSD-src-f583eee6e15beb870cee2e61468804ac5017cfd2.zip
FreeBSD-src-f583eee6e15beb870cee2e61468804ac5017cfd2.tar.gz
Change the client skipper API to use off_t instead of size_t/ssize_t; but
wrap this within #if/#else/#endif so that it will only take effect once ARCHIVE_API_VERSION is increased (which should happen on HEAD some time between now and when RELENG_7 is branched).
Diffstat (limited to 'lib/libarchive/archive_read_open_file.c')
-rw-r--r--lib/libarchive/archive_read_open_file.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libarchive/archive_read_open_file.c b/lib/libarchive/archive_read_open_file.c
index cb18fc3..e7d514b 100644
--- a/lib/libarchive/archive_read_open_file.c
+++ b/lib/libarchive/archive_read_open_file.c
@@ -57,7 +57,11 @@ struct read_FILE_data {
static int file_close(struct archive *, void *);
static int file_open(struct archive *, void *);
static ssize_t file_read(struct archive *, void *, const void **buff);
+#if ARCHIVE_API_VERSION < 2
static ssize_t file_skip(struct archive *, void *, size_t request);
+#else
+static off_t file_skip(struct archive *, void *, off_t request);
+#endif
int
archive_read_open_FILE(struct archive *a, FILE *f)
@@ -112,8 +116,13 @@ file_read(struct archive *a, void *client_data, const void **buff)
return (bytes_read);
}
+#if ARCHIVE_API_VERSION < 2
static ssize_t
file_skip(struct archive *a, void *client_data, size_t request)
+#else
+static off_t
+file_skip(struct archive *a, void *client_data, off_t request)
+#endif
{
struct read_FILE_data *mine = (struct read_FILE_data *)client_data;
OpenPOWER on IntegriCloud