diff options
author | cperciva <cperciva@FreeBSD.org> | 2007-01-05 10:48:18 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2007-01-05 10:48:18 +0000 |
commit | f583eee6e15beb870cee2e61468804ac5017cfd2 (patch) | |
tree | a8fbd9a8f7d676f70ed6b0db08db229718f48ade /lib/libarchive/archive.h.in | |
parent | 872ebc62d77854d9b1f45266568982a51ba268a4 (diff) | |
download | FreeBSD-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.h.in')
-rw-r--r-- | lib/libarchive/archive.h.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libarchive/archive.h.in b/lib/libarchive/archive.h.in index 95a9915..dc16c58 100644 --- a/lib/libarchive/archive.h.in +++ b/lib/libarchive/archive.h.in @@ -112,8 +112,13 @@ struct archive_entry; typedef ssize_t archive_read_callback(struct archive *, void *_client_data, const void **_buffer); /* Skips at most request bytes from archive and returns the skipped amount */ +#if ARCHIVE_API_VERSION < 2 typedef ssize_t archive_skip_callback(struct archive *, void *_client_data, size_t request); +#else +typedef off_t archive_skip_callback(struct archive *, void *_client_data, + off_t request); +#endif /* Returns size actually written, zero on EOF, -1 on error. */ typedef ssize_t archive_write_callback(struct archive *, void *_client_data, const void *_buffer, size_t _length); |