diff options
author | David Cole <david.cole@kitware.com> | 2012-01-09 19:10:01 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-01-09 19:10:01 (GMT) |
commit | 5a5c32e1f22cae3cdba3e5be142ee84b9e4a8d4d (patch) | |
tree | 7ac1ebd509d98ed93d796ce3bf0be1778a20dfe5 /Utilities/cmlibarchive/libarchive/archive_virtual.c | |
parent | e1c07a4342b719b982ffa099d930d2e193591114 (diff) | |
parent | 6c611c6b94ef54cbfdc81a1f049032f13a0ef024 (diff) | |
download | CMake-5a5c32e1f22cae3cdba3e5be142ee84b9e4a8d4d.zip CMake-5a5c32e1f22cae3cdba3e5be142ee84b9e4a8d4d.tar.gz CMake-5a5c32e1f22cae3cdba3e5be142ee84b9e4a8d4d.tar.bz2 |
Merge topic 'update-libarchive'
6c611c6 libarchive: Restore CMake 2.6.3 as minimum version
2f5b677 libarchive: Update README-CMake.txt for new snapshot
156cb3b Merge branch 'libarchive-upstream' into update-libarchive
fd42bf1 libarchive: Set .gitattributes to allow trailing whitespace
4f4fe6e libarchive 3.0.2-r4051 (reduced)
65b6e19 libarchive: Avoid bogus conversion warning from PGI compiler
9ccaeb1 libarchive: Suppress PathScale compiler warnings
2309438 libarchive: Rename isoent_rr_move_dir parameter isoent => curent
b6ca96e libarchive: Include linux/types.h before linux/fiemap.h
f293b73 libarchive: Define _XOPEN_SOURCE=500 on HP-UX
6781a09 libarchive: Cleanup after ZLIB_WINAPI check
f15d757 libarchive: Remove hard-coded build configuration
3a9f449 libarchive: Use Apple copyfile.h API only if available
6af6b96 libarchive: Do not use MNT_NOATIME if not defined
02d5e40 libarchive: Check for 'struct statvfs' member 'f_iosize'
8b7ee30 libarchive: Do not use ST_NOATIME if not defined
...
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_virtual.c')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_virtual.c | 97 |
1 files changed, 75 insertions, 22 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_virtual.c b/Utilities/cmlibarchive/libarchive/archive_virtual.c index c592136..752dc17 100644 --- a/Utilities/cmlibarchive/libarchive/archive_virtual.c +++ b/Utilities/cmlibarchive/libarchive/archive_virtual.c @@ -24,71 +24,124 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_virtual.c,v 1.1 2007/03/03 07:37:36 kientzle Exp $"); +__FBSDID("$FreeBSD: head/lib/libarchive/archive_virtual.c 201098 2009-12-28 02:58:14Z kientzle $"); #include "archive.h" #include "archive_entry.h" #include "archive_private.h" int +archive_filter_code(struct archive *a, int n) +{ + return ((a->vtable->archive_filter_code)(a, n)); +} + +int +archive_filter_count(struct archive *a) +{ + return ((a->vtable->archive_filter_count)(a)); +} + +const char * +archive_filter_name(struct archive *a, int n) +{ + return ((a->vtable->archive_filter_name)(a, n)); +} + +int64_t +archive_filter_bytes(struct archive *a, int n) +{ + return ((a->vtable->archive_filter_bytes)(a, n)); +} + +int archive_write_close(struct archive *a) { - return ((a->vtable->archive_close)(a)); + return ((a->vtable->archive_close)(a)); } int archive_read_close(struct archive *a) { - return ((a->vtable->archive_close)(a)); + return ((a->vtable->archive_close)(a)); } -#if ARCHIVE_API_VERSION > 1 int -archive_write_finish(struct archive *a) +archive_write_free(struct archive *a) { - return ((a->vtable->archive_finish)(a)); + return ((a->vtable->archive_free)(a)); } -#else -/* Temporarily allow library to compile with either 1.x or 2.0 API. */ -void + +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* For backwards compatibility; will be removed with libarchive 4.0. */ +int archive_write_finish(struct archive *a) { - (void)(a->vtable->archive_finish)(a); + return ((a->vtable->archive_free)(a)); } #endif int +archive_read_free(struct archive *a) +{ + return ((a->vtable->archive_free)(a)); +} + +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* For backwards compatibility; will be removed with libarchive 4.0. */ +int archive_read_finish(struct archive *a) { - return ((a->vtable->archive_finish)(a)); + return ((a->vtable->archive_free)(a)); } +#endif int archive_write_header(struct archive *a, struct archive_entry *entry) { - ++a->file_count; - return ((a->vtable->archive_write_header)(a, entry)); + ++a->file_count; + return ((a->vtable->archive_write_header)(a, entry)); } int archive_write_finish_entry(struct archive *a) { - return ((a->vtable->archive_write_finish_entry)(a)); + return ((a->vtable->archive_write_finish_entry)(a)); } -#if ARCHIVE_API_VERSION > 1 ssize_t -#else -/* Temporarily allow library to compile with either 1.x or 2.0 API. */ -int -#endif archive_write_data(struct archive *a, const void *buff, size_t s) { - return ((a->vtable->archive_write_data)(a, buff, s)); + return ((a->vtable->archive_write_data)(a, buff, s)); } ssize_t -archive_write_data_block(struct archive *a, const void *buff, size_t s, off_t o) +archive_write_data_block(struct archive *a, const void *buff, size_t s, int64_t o) +{ + if (a->vtable->archive_write_data_block == NULL) { + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "archive_write_data_block not supported"); + a->state = ARCHIVE_STATE_FATAL; + return (ARCHIVE_FATAL); + } + return ((a->vtable->archive_write_data_block)(a, buff, s, o)); +} + +int +archive_read_next_header(struct archive *a, struct archive_entry **entry) +{ + return ((a->vtable->archive_read_next_header)(a, entry)); +} + +int +archive_read_next_header2(struct archive *a, struct archive_entry *entry) +{ + return ((a->vtable->archive_read_next_header2)(a, entry)); +} + +int +archive_read_data_block(struct archive *a, + const void **buff, size_t *s, int64_t *o) { - return ((a->vtable->archive_write_data_block)(a, buff, s, o)); + return ((a->vtable->archive_read_data_block)(a, buff, s, o)); } |