diff options
author | kientzle <kientzle@FreeBSD.org> | 2007-12-30 04:58:22 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2007-12-30 04:58:22 +0000 |
commit | 2b8395148ff378e52a5e00c0d2ac0123258b759b (patch) | |
tree | 743c28601a2502c30676ab2adfbbb665fa3f38b7 /lib/libarchive/archive.h.in | |
parent | b1a3a611be764b44dbdd47a17ec5076bcfbe6e88 (diff) | |
download | FreeBSD-src-2b8395148ff378e52a5e00c0d2ac0123258b759b.zip FreeBSD-src-2b8395148ff378e52a5e00c0d2ac0123258b759b.tar.gz |
Update libarchive to 2.4.10. This includes a number of improvements
that I've been working on but put off committing until after the
RELENG_7 branch, including:
* New manpages: cpio.5 mtree.5
* New archive_entry_strmode()
* New archive_entry_link_resolver()
* New read support: mtree format
* Internal API change: read format auction only runs once
* Running the auction only once allowed simplifying a lot of bid logic.
* Cpio robustness: search for next header after a sync error
* Support device nodes on ISO9660 images
* Eliminate a lot of unnecessary copies for uncompressed archives
* Corrected handling of new GNU --sparse --posix formats
* Correctly handle a zero-byte write to a compressed archive
* Fixed memory leaks
Many of these improvements were motivated by the upcoming bsdcpio
front-end.
There have also been extensive improvements to the libarchive_test
test harness, which I'll commit separately.
Diffstat (limited to 'lib/libarchive/archive.h.in')
-rw-r--r-- | lib/libarchive/archive.h.in | 58 |
1 files changed, 25 insertions, 33 deletions
diff --git a/lib/libarchive/archive.h.in b/lib/libarchive/archive.h.in index bf90f4a..22e3888 100644 --- a/lib/libarchive/archive.h.in +++ b/lib/libarchive/archive.h.in @@ -60,40 +60,10 @@ extern "C" { /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_LIBRARY_VERSION "libarchive @ARCHIVE_VERSION@" +#define ARCHIVE_LIBRARY_VERSION "libarchive @LIBARCHIVE_VERSION_STRING@" const char * archive_version(void); /* - * Major version number: If ARCHIVE_API_VERSION != - * archive_api_version(), then the library you were linked with is - * using an incompatible API to the one you were compiled with. This - * is almost certainly a fatal problem. - */ -#define ARCHIVE_API_VERSION @ARCHIVE_API_MAJOR@ -int archive_api_version(void); - -/* - * Minor version number: ARCHIVE_API_FEATURE is incremented with each - * significant feature addition, so you can test (at compile or run - * time) if a particular feature is implemented. It's no big deal if - * ARCHIVE_API_FEATURE != archive_api_feature(), as long as both are - * high enough to include the features you're relying on. Specific - * values of FEATURE are documented here: - * - * 1 - Version tests are available. - * 2 - archive_{read,write}_close available separately from _finish. - * 3 - open_memory, open_memory2, open_FILE, open_fd available - * 5 - archive_write_disk interface available - * - * Unfortunately, this count resets whenever ARCHIVE_API_VERSION changes, - * making it awkward to use in practice. For that reason, it is deprecated - * in favor of the more-accurate version stamp below. It will eventually - * be removed. - */ -#define ARCHIVE_API_FEATURE @ARCHIVE_API_MINOR@ -int archive_api_feature(void); - -/* * The "version stamp" is a single integer that makes it easy to check * the exact version: for version a.b.c, the version stamp is * printf("%d%03d%03d",a,b,c). For example, version 2.12.108 has @@ -102,16 +72,34 @@ int archive_api_feature(void); * This was introduced with libarchive 1.9.0 in the libarchive 1.x family * and libarchive 2.2.4 in the libarchive 2.x family. The following * may be useful if you really want to do feature detection for earlier - * libarchive versions: + * libarchive versions (which defined API_VERSION and API_FEATURE): * * #ifndef ARCHIVE_VERSION_STAMP * #define ARCHIVE_VERSION_STAMP \ * (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000) * #endif */ -#define ARCHIVE_VERSION_STAMP @ARCHIVE_VERSION_STAMP@ +#define ARCHIVE_VERSION_STAMP @LIBARCHIVE_VERSION@ int archive_version_stamp(void); +/* + * Major version number: If ARCHIVE_API_VERSION != + * archive_api_version(), then the library you were linked with is + * using an incompatible API to the one you were compiled with. This + * is almost certainly a fatal problem. + * This is deprecated and will be removed; use ARCHIVE_VERSION_STAMP + * instead. + */ +#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_STAMP / 1000000) +int archive_api_version(void); + +/* + * Minor version number. This is deprecated and will be removed. + * Use ARCHIVE_VERSION_STAMP to adapt to libarchive API variations. + */ +#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_STAMP / 1000) % 1000) +int archive_api_feature(void); + #define ARCHIVE_BYTES_PER_RECORD 512 #define ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240 @@ -218,6 +206,9 @@ typedef int archive_close_callback(struct archive *, void *_client_data); #define ARCHIVE_FORMAT_AR 0x70000 #define ARCHIVE_FORMAT_AR_GNU (ARCHIVE_FORMAT_AR | 1) #define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2) +#define ARCHIVE_FORMAT_MTREE 0x80000 +#define ARCHIVE_FORMAT_MTREE_V1 (ARCHIVE_FORMAT_MTREE | 1) +#define ARCHIVE_FORMAT_MTREE_V2 (ARCHIVE_FORMAT_MTREE | 2) /*- * Basic outline for reading an archive: @@ -254,6 +245,7 @@ int archive_read_support_format_cpio(struct archive *); int archive_read_support_format_empty(struct archive *); int archive_read_support_format_gnutar(struct archive *); int archive_read_support_format_iso9660(struct archive *); +int archive_read_support_format_mtree(struct archive *); int archive_read_support_format_tar(struct archive *); int archive_read_support_format_zip(struct archive *); |