diff --git a/buildwin/archive.dll b/buildwin/archive.dll index e53a38b..95242dc 100644 Binary files a/buildwin/archive.dll and b/buildwin/archive.dll differ diff --git a/buildwin/archive.lib b/buildwin/archive.lib index 18ae442..76263d6 100644 Binary files a/buildwin/archive.lib and b/buildwin/archive.lib differ diff --git a/buildwin/include/archive.h b/buildwin/include/archive.h index 316a68a..de472a1 100644 --- a/buildwin/include/archive.h +++ b/buildwin/include/archive.h @@ -21,8 +21,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.50 2008/05/26 17:00:22 kientzle Exp $ */ #ifndef ARCHIVE_H_INCLUDED @@ -36,12 +34,15 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3003002 +#define ARCHIVE_VERSION_NUMBER 3008006 #include #include /* for wchar_t */ #include /* For FILE * */ +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* time_t is slated to be removed from public includes in 4.0 */ #include /* For time_t */ +#endif /* * Note: archive.h is for use outside of libarchive; the configuration @@ -52,7 +53,7 @@ */ #if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 # include -#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) && !defined(_SCO_DS) && !defined(__osf__) +#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) && !defined(_SCO_DS) && !defined(__osf__) && !defined(__CLANG_INTTYPES_H) # include #endif @@ -65,12 +66,15 @@ #define __LA_INT64_T_DEFINED # if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) typedef __int64 la_int64_t; +typedef unsigned __int64 la_uint64_t; # else # include /* ssize_t */ # if defined(_SCO_DS) || defined(__osf__) typedef long long la_int64_t; +typedef unsigned long long la_uint64_t; # else typedef int64_t la_int64_t; +typedef uint64_t la_uint64_t; # endif # endif #endif @@ -96,8 +100,24 @@ typedef ssize_t la_ssize_t; # endif #endif +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Use the platform types for time_t */ +#define __LA_TIME_T time_t +#else +/* Use 64-bits integer types for time_t */ +#define __LA_TIME_T la_int64_t +#endif + +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Use the platform types for dev_t */ +#define __LA_DEV_T dev_t +#else +/* Use 64-bits integer types for dev_t */ +#define __LA_DEV_T la_int64_t +#endif + /* Large file support for Android */ -#ifdef __ANDROID__ +#if defined(__LIBARCHIVE_BUILD) && defined(__ANDROID__) #include "android_lf.h" #endif @@ -120,6 +140,8 @@ typedef ssize_t la_ssize_t; # define __LA_DECL __declspec(dllimport) # endif # endif +#elif defined __LIBARCHIVE_ENABLE_VISIBILITY +# define __LA_DECL __attribute__((visibility("default"))) #else /* Static libraries or non-Windows needs no special declaration. */ # define __LA_DECL @@ -132,7 +154,7 @@ typedef ssize_t la_ssize_t; #define __LA_PRINTF(fmtarg, firstvararg) /* nothing */ #endif -#if defined(__GNUC__) && __GNUC__ >= 3 && __GNUC_MINOR__ >= 1 +#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) # define __LA_DEPRECATED __attribute__((deprecated)) #else # define __LA_DEPRECATED @@ -155,7 +177,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.3.2" +#define ARCHIVE_VERSION_ONLY_STRING "3.8.6" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); @@ -177,6 +199,24 @@ __LA_DECL const char * archive_zlib_version(void); __LA_DECL const char * archive_liblzma_version(void); __LA_DECL const char * archive_bzlib_version(void); __LA_DECL const char * archive_liblz4_version(void); +__LA_DECL const char * archive_libzstd_version(void); +__LA_DECL const char * archive_liblzo2_version(void); +__LA_DECL const char * archive_libexpat_version(void); +__LA_DECL const char * archive_libbsdxml_version(void); +__LA_DECL const char * archive_libxml2_version(void); +__LA_DECL const char * archive_mbedtls_version(void); +__LA_DECL const char * archive_nettle_version(void); +__LA_DECL const char * archive_openssl_version(void); +__LA_DECL const char * archive_libmd_version(void); +__LA_DECL const char * archive_commoncrypto_version(void); +__LA_DECL const char * archive_cng_version(void); +__LA_DECL const char * archive_wincrypt_version(void); +__LA_DECL const char * archive_librichacl_version(void); +__LA_DECL const char * archive_libacl_version(void); +__LA_DECL const char * archive_libattr_version(void); +__LA_DECL const char * archive_libiconv_version(void); +__LA_DECL const char * archive_libpcre_version(void); +__LA_DECL const char * archive_libpcre2_version(void); /* Declare our basic types. */ struct archive; @@ -245,6 +285,8 @@ typedef int archive_open_callback(struct archive *, void *_client_data); typedef int archive_close_callback(struct archive *, void *_client_data); +typedef int archive_free_callback(struct archive *, void *_client_data); + /* Switches from one client data object to the next/prev client data object. * This is useful for reading from different data blocks such as a set of files * that make up one large file. @@ -276,6 +318,7 @@ typedef const char *archive_passphrase_callback(struct archive *, #define ARCHIVE_FILTER_LZOP 11 #define ARCHIVE_FILTER_GRZIP 12 #define ARCHIVE_FILTER_LZ4 13 +#define ARCHIVE_FILTER_ZSTD 14 #if ARCHIVE_VERSION_NUMBER < 4000000 #define ARCHIVE_COMPRESSION_NONE ARCHIVE_FILTER_NONE @@ -315,6 +358,7 @@ typedef const char *archive_passphrase_callback(struct archive *, #define ARCHIVE_FORMAT_CPIO_SVR4_NOCRC (ARCHIVE_FORMAT_CPIO | 4) #define ARCHIVE_FORMAT_CPIO_SVR4_CRC (ARCHIVE_FORMAT_CPIO | 5) #define ARCHIVE_FORMAT_CPIO_AFIO_LARGE (ARCHIVE_FORMAT_CPIO | 6) +#define ARCHIVE_FORMAT_CPIO_PWB (ARCHIVE_FORMAT_CPIO | 7) #define ARCHIVE_FORMAT_SHAR 0x20000 #define ARCHIVE_FORMAT_SHAR_BASE (ARCHIVE_FORMAT_SHAR | 1) #define ARCHIVE_FORMAT_SHAR_DUMP (ARCHIVE_FORMAT_SHAR | 2) @@ -338,6 +382,7 @@ typedef const char *archive_passphrase_callback(struct archive *, #define ARCHIVE_FORMAT_RAR 0xD0000 #define ARCHIVE_FORMAT_7ZIP 0xE0000 #define ARCHIVE_FORMAT_WARC 0xF0000 +#define ARCHIVE_FORMAT_RAR_V5 0x100000 /* * Codes returned by archive_read_format_capabilities(). @@ -415,6 +460,7 @@ __LA_DECL int archive_read_support_compression_xz(struct archive *) #endif __LA_DECL int archive_read_support_filter_all(struct archive *); +__LA_DECL int archive_read_support_filter_by_code(struct archive *, int); __LA_DECL int archive_read_support_filter_bzip2(struct archive *); __LA_DECL int archive_read_support_filter_compress(struct archive *); __LA_DECL int archive_read_support_filter_gzip(struct archive *); @@ -433,6 +479,7 @@ __LA_DECL int archive_read_support_filter_program_signature __LA_DECL int archive_read_support_filter_rpm(struct archive *); __LA_DECL int archive_read_support_filter_uu(struct archive *); __LA_DECL int archive_read_support_filter_xz(struct archive *); +__LA_DECL int archive_read_support_filter_zstd(struct archive *); __LA_DECL int archive_read_support_format_7zip(struct archive *); __LA_DECL int archive_read_support_format_all(struct archive *); @@ -441,11 +488,14 @@ __LA_DECL int archive_read_support_format_by_code(struct archive *, int); __LA_DECL int archive_read_support_format_cab(struct archive *); __LA_DECL int archive_read_support_format_cpio(struct archive *); __LA_DECL int archive_read_support_format_empty(struct archive *); +/* archive_read_support_format_gnutar() is an alias for historical reasons + * of archive_read_support_format_tar(). */ __LA_DECL int archive_read_support_format_gnutar(struct archive *); __LA_DECL int archive_read_support_format_iso9660(struct archive *); __LA_DECL int archive_read_support_format_lha(struct archive *); __LA_DECL int archive_read_support_format_mtree(struct archive *); __LA_DECL int archive_read_support_format_rar(struct archive *); +__LA_DECL int archive_read_support_format_rar5(struct archive *); __LA_DECL int archive_read_support_format_raw(struct archive *); __LA_DECL int archive_read_support_format_tar(struct archive *); __LA_DECL int archive_read_support_format_warc(struct archive *); @@ -524,6 +574,10 @@ __LA_DECL int archive_read_open_filenames(struct archive *, const char **_filenames, size_t _block_size); __LA_DECL int archive_read_open_filename_w(struct archive *, const wchar_t *_filename, size_t _block_size); +#if defined(_WIN32) && !defined(__CYGWIN__) +__LA_DECL int archive_read_open_filenames_w(struct archive *, + const wchar_t **_filenames, size_t _block_size); +#endif /* archive_read_open_file() is a deprecated synonym for ..._open_filename(). */ __LA_DECL int archive_read_open_file(struct archive *, const char *_filename, size_t _block_size) __LA_DEPRECATED; @@ -688,6 +742,8 @@ __LA_DECL int archive_read_set_passphrase_callback(struct archive *, #define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000) /* Default: Do not clear no-change flags when unlinking object */ #define ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS (0x20000) +/* Default: Do not extract atomically (using rename) */ +#define ARCHIVE_EXTRACT_SAFE_WRITES (0x40000) __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *, int flags); @@ -778,6 +834,7 @@ __LA_DECL int archive_write_add_filter_program(struct archive *, const char *cmd); __LA_DECL int archive_write_add_filter_uuencode(struct archive *); __LA_DECL int archive_write_add_filter_xz(struct archive *); +__LA_DECL int archive_write_add_filter_zstd(struct archive *); /* A convenience function to set the format based on the code or name. */ @@ -789,7 +846,10 @@ __LA_DECL int archive_write_set_format_7zip(struct archive *); __LA_DECL int archive_write_set_format_ar_bsd(struct archive *); __LA_DECL int archive_write_set_format_ar_svr4(struct archive *); __LA_DECL int archive_write_set_format_cpio(struct archive *); +__LA_DECL int archive_write_set_format_cpio_bin(struct archive *); __LA_DECL int archive_write_set_format_cpio_newc(struct archive *); +__LA_DECL int archive_write_set_format_cpio_odc(struct archive *); +__LA_DECL int archive_write_set_format_cpio_pwb(struct archive *); __LA_DECL int archive_write_set_format_gnutar(struct archive *); __LA_DECL int archive_write_set_format_iso9660(struct archive *); __LA_DECL int archive_write_set_format_mtree(struct archive *); @@ -809,9 +869,17 @@ __LA_DECL int archive_write_set_format_filter_by_ext(struct archive *a, const ch __LA_DECL int archive_write_set_format_filter_by_ext_def(struct archive *a, const char *filename, const char * def_ext); __LA_DECL int archive_write_zip_set_compression_deflate(struct archive *); __LA_DECL int archive_write_zip_set_compression_store(struct archive *); +__LA_DECL int archive_write_zip_set_compression_lzma(struct archive *); +__LA_DECL int archive_write_zip_set_compression_xz(struct archive *); +__LA_DECL int archive_write_zip_set_compression_bzip2(struct archive *); +__LA_DECL int archive_write_zip_set_compression_zstd(struct archive *); +/* Deprecated; use archive_write_open2 instead */ __LA_DECL int archive_write_open(struct archive *, void *, archive_open_callback *, archive_write_callback *, archive_close_callback *); +__LA_DECL int archive_write_open2(struct archive *, void *, + archive_open_callback *, archive_write_callback *, + archive_close_callback *, archive_free_callback *); __LA_DECL int archive_write_open_fd(struct archive *, int _fd); __LA_DECL int archive_write_open_filename(struct archive *, const char *_file); __LA_DECL int archive_write_open_filename_w(struct archive *, @@ -872,7 +940,7 @@ __LA_DECL int archive_write_set_options(struct archive *_a, const char *opts); /* - * Set a encryption passphrase. + * Set an encryption passphrase. */ __LA_DECL int archive_write_set_passphrase(struct archive *_a, const char *p); __LA_DECL int archive_write_set_passphrase_callback(struct archive *, @@ -1005,6 +1073,8 @@ __LA_DECL int archive_read_disk_set_atime_restored(struct archive *); #define ARCHIVE_READDISK_NO_ACL (0x0020) /* Default: File flags are read from disk. */ #define ARCHIVE_READDISK_NO_FFLAGS (0x0040) +/* Default: Sparse file information is read from disk. */ +#define ARCHIVE_READDISK_NO_SPARSE (0x0080) __LA_DECL int archive_read_disk_set_behavior(struct archive *, int flags); @@ -1058,6 +1128,10 @@ __LA_DECL int archive_compression(struct archive *) __LA_DEPRECATED; #endif +/* Parses a date string relative to the current time. + * NOTE: This is not intended for general date parsing, and the resulting timestamp should only be used for libarchive. */ +__LA_DECL time_t archive_parse_date(time_t now, const char *datestr); + __LA_DECL int archive_errno(struct archive *); __LA_DECL const char *archive_error_string(struct archive *); __LA_DECL const char *archive_format_name(struct archive *); @@ -1089,6 +1163,8 @@ __LA_DECL int archive_match_excluded(struct archive *, */ __LA_DECL int archive_match_path_excluded(struct archive *, struct archive_entry *); +/* Control recursive inclusion of directory content when directory is included. Default on. */ +__LA_DECL int archive_match_set_inclusion_recursion(struct archive *, int); /* Add exclusion pathname pattern. */ __LA_DECL int archive_match_exclude_pattern(struct archive *, const char *); __LA_DECL int archive_match_exclude_pattern_w(struct archive *, @@ -1174,8 +1250,10 @@ __LA_DECL int archive_match_include_gname_w(struct archive *, const wchar_t *); /* Utility functions */ +#if ARCHIVE_VERSION_NUMBER < 4000000 /* Convenience function to sort a NULL terminated list of strings */ __LA_DECL int archive_utility_string_sort(char **); +#endif #ifdef __cplusplus } diff --git a/buildwin/include/archive_entry.h b/buildwin/include/archive_entry.h index bcc2962..f7f1c52 100644 --- a/buildwin/include/archive_entry.h +++ b/buildwin/include/archive_entry.h @@ -22,15 +22,13 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD: head/lib/libarchive/archive_entry.h 201096 2009-12-28 02:41:27Z kientzle $ */ #ifndef ARCHIVE_ENTRY_H_INCLUDED #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3003002 +#define ARCHIVE_VERSION_NUMBER 3008006 /* * Note: archive_entry.h is for use outside of libarchive; the @@ -42,7 +40,11 @@ #include #include /* for wchar_t */ +#include /* for C99 int64_t, etc. */ +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* time_t is slated to be removed from public includes in 4.0 */ #include +#endif #if defined(_WIN32) && !defined(__CYGWIN__) #include @@ -56,12 +58,15 @@ #define __LA_INT64_T_DEFINED # if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) typedef __int64 la_int64_t; +typedef unsigned __int64 la_uint64_t; # else #include # if defined(_SCO_DS) || defined(__osf__) typedef long long la_int64_t; +typedef unsigned long long la_uint64_t; # else typedef int64_t la_int64_t; +typedef uint64_t la_uint64_t; # endif # endif #endif @@ -97,8 +102,32 @@ typedef ssize_t la_ssize_t; # define __LA_MODE_T mode_t #endif +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Use the platform types for time_t */ +#define __LA_TIME_T time_t +#else +/* Use 64-bits integer types for time_t */ +#define __LA_TIME_T la_int64_t +#endif + +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Use the platform types for dev_t */ +#define __LA_DEV_T dev_t +#else +/* Use 64-bits integer types for dev_t */ +#define __LA_DEV_T la_int64_t +#endif + +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Libarchive 3.x used signed int64 for inode numbers */ +#define __LA_INO_T la_int64_t +#else +/* Switch to unsigned for libarchive 4.0 */ +#define __LA_INO_T la_uint64_t +#endif + /* Large file support for Android */ -#ifdef __ANDROID__ +#if defined(__LIBARCHIVE_BUILD) && defined(__ANDROID__) #include "android_lf.h" #endif @@ -121,12 +150,15 @@ typedef ssize_t la_ssize_t; # define __LA_DECL __declspec(dllimport) # endif # endif +#elif defined __LIBARCHIVE_ENABLE_VISIBILITY +# define __LA_DECL __attribute__((visibility("default"))) #else /* Static libraries on all platforms and shared libraries on non-Windows. */ # define __LA_DECL #endif -#if defined(__GNUC__) && __GNUC__ >= 3 && __GNUC_MINOR__ >= 1 +#if defined(__GNUC__) && (__GNUC__ > 3 || \ + (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) # define __LA_DEPRECATED __attribute__((deprecated)) #else # define __LA_DEPRECATED @@ -189,6 +221,13 @@ struct archive_entry; #define AE_IFDIR ((__LA_MODE_T)0040000) #define AE_IFIFO ((__LA_MODE_T)0010000) +/* + * Symlink types + */ +#define AE_SYMLINK_TYPE_UNDEFINED 0 +#define AE_SYMLINK_TYPE_FILE 1 +#define AE_SYMLINK_TYPE_DIRECTORY 2 + /* * Basic object manipulation */ @@ -227,33 +266,37 @@ __LA_DECL struct archive_entry *archive_entry_new2(struct archive *); * also return NULL when implicit character set conversions fail. * This is usually what you want. */ -__LA_DECL time_t archive_entry_atime(struct archive_entry *); +__LA_DECL __LA_TIME_T archive_entry_atime(struct archive_entry *); __LA_DECL long archive_entry_atime_nsec(struct archive_entry *); __LA_DECL int archive_entry_atime_is_set(struct archive_entry *); -__LA_DECL time_t archive_entry_birthtime(struct archive_entry *); +__LA_DECL __LA_TIME_T archive_entry_birthtime(struct archive_entry *); __LA_DECL long archive_entry_birthtime_nsec(struct archive_entry *); __LA_DECL int archive_entry_birthtime_is_set(struct archive_entry *); -__LA_DECL time_t archive_entry_ctime(struct archive_entry *); +__LA_DECL __LA_TIME_T archive_entry_ctime(struct archive_entry *); __LA_DECL long archive_entry_ctime_nsec(struct archive_entry *); __LA_DECL int archive_entry_ctime_is_set(struct archive_entry *); -__LA_DECL dev_t archive_entry_dev(struct archive_entry *); +__LA_DECL __LA_DEV_T archive_entry_dev(struct archive_entry *); __LA_DECL int archive_entry_dev_is_set(struct archive_entry *); -__LA_DECL dev_t archive_entry_devmajor(struct archive_entry *); -__LA_DECL dev_t archive_entry_devminor(struct archive_entry *); +__LA_DECL __LA_DEV_T archive_entry_devmajor(struct archive_entry *); +__LA_DECL __LA_DEV_T archive_entry_devminor(struct archive_entry *); __LA_DECL __LA_MODE_T archive_entry_filetype(struct archive_entry *); +__LA_DECL int archive_entry_filetype_is_set(struct archive_entry *); __LA_DECL void archive_entry_fflags(struct archive_entry *, unsigned long * /* set */, unsigned long * /* clear */); __LA_DECL const char *archive_entry_fflags_text(struct archive_entry *); __LA_DECL la_int64_t archive_entry_gid(struct archive_entry *); +__LA_DECL int archive_entry_gid_is_set(struct archive_entry *); __LA_DECL const char *archive_entry_gname(struct archive_entry *); __LA_DECL const char *archive_entry_gname_utf8(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_gname_w(struct archive_entry *); +__LA_DECL void archive_entry_set_link_to_hardlink(struct archive_entry *); __LA_DECL const char *archive_entry_hardlink(struct archive_entry *); __LA_DECL const char *archive_entry_hardlink_utf8(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_hardlink_w(struct archive_entry *); -__LA_DECL la_int64_t archive_entry_ino(struct archive_entry *); -__LA_DECL la_int64_t archive_entry_ino64(struct archive_entry *); +__LA_DECL int archive_entry_hardlink_is_set(struct archive_entry *); +__LA_DECL __LA_INO_T archive_entry_ino(struct archive_entry *); +__LA_DECL __LA_INO_T archive_entry_ino64(struct archive_entry *); __LA_DECL int archive_entry_ino_is_set(struct archive_entry *); __LA_DECL __LA_MODE_T archive_entry_mode(struct archive_entry *); __LA_DECL time_t archive_entry_mtime(struct archive_entry *); @@ -264,18 +307,23 @@ __LA_DECL const char *archive_entry_pathname(struct archive_entry *); __LA_DECL const char *archive_entry_pathname_utf8(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_pathname_w(struct archive_entry *); __LA_DECL __LA_MODE_T archive_entry_perm(struct archive_entry *); -__LA_DECL dev_t archive_entry_rdev(struct archive_entry *); -__LA_DECL dev_t archive_entry_rdevmajor(struct archive_entry *); -__LA_DECL dev_t archive_entry_rdevminor(struct archive_entry *); +__LA_DECL int archive_entry_perm_is_set(struct archive_entry *); +__LA_DECL int archive_entry_rdev_is_set(struct archive_entry *); +__LA_DECL __LA_DEV_T archive_entry_rdev(struct archive_entry *); +__LA_DECL __LA_DEV_T archive_entry_rdevmajor(struct archive_entry *); +__LA_DECL __LA_DEV_T archive_entry_rdevminor(struct archive_entry *); __LA_DECL const char *archive_entry_sourcepath(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_sourcepath_w(struct archive_entry *); __LA_DECL la_int64_t archive_entry_size(struct archive_entry *); __LA_DECL int archive_entry_size_is_set(struct archive_entry *); __LA_DECL const char *archive_entry_strmode(struct archive_entry *); +__LA_DECL void archive_entry_set_link_to_symlink(struct archive_entry *); __LA_DECL const char *archive_entry_symlink(struct archive_entry *); __LA_DECL const char *archive_entry_symlink_utf8(struct archive_entry *); +__LA_DECL int archive_entry_symlink_type(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *); __LA_DECL la_int64_t archive_entry_uid(struct archive_entry *); +__LA_DECL int archive_entry_uid_is_set(struct archive_entry *); __LA_DECL const char *archive_entry_uname(struct archive_entry *); __LA_DECL const char *archive_entry_uname_utf8(struct archive_entry *); __LA_DECL const wchar_t *archive_entry_uname_w(struct archive_entry *); @@ -292,18 +340,18 @@ __LA_DECL int archive_entry_is_encrypted(struct archive_entry *); * always copied. */ -__LA_DECL void archive_entry_set_atime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_set_atime(struct archive_entry *, __LA_TIME_T, long); __LA_DECL void archive_entry_unset_atime(struct archive_entry *); #if defined(_WIN32) && !defined(__CYGWIN__) __LA_DECL void archive_entry_copy_bhfi(struct archive_entry *, BY_HANDLE_FILE_INFORMATION *); #endif -__LA_DECL void archive_entry_set_birthtime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_set_birthtime(struct archive_entry *, __LA_TIME_T, long); __LA_DECL void archive_entry_unset_birthtime(struct archive_entry *); -__LA_DECL void archive_entry_set_ctime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_set_ctime(struct archive_entry *, __LA_TIME_T, long); __LA_DECL void archive_entry_unset_ctime(struct archive_entry *); -__LA_DECL void archive_entry_set_dev(struct archive_entry *, dev_t); -__LA_DECL void archive_entry_set_devmajor(struct archive_entry *, dev_t); -__LA_DECL void archive_entry_set_devminor(struct archive_entry *, dev_t); +__LA_DECL void archive_entry_set_dev(struct archive_entry *, __LA_DEV_T); +__LA_DECL void archive_entry_set_devmajor(struct archive_entry *, __LA_DEV_T); +__LA_DECL void archive_entry_set_devminor(struct archive_entry *, __LA_DEV_T); __LA_DECL void archive_entry_set_filetype(struct archive_entry *, unsigned int); __LA_DECL void archive_entry_set_fflags(struct archive_entry *, unsigned long /* set */, unsigned long /* clear */); @@ -311,6 +359,8 @@ __LA_DECL void archive_entry_set_fflags(struct archive_entry *, /* Note that all recognized tokens are processed, regardless. */ __LA_DECL const char *archive_entry_copy_fflags_text(struct archive_entry *, const char *); +__LA_DECL const char *archive_entry_copy_fflags_text_len(struct archive_entry *, + const char *, size_t); __LA_DECL const wchar_t *archive_entry_copy_fflags_text_w(struct archive_entry *, const wchar_t *); __LA_DECL void archive_entry_set_gid(struct archive_entry *, la_int64_t); @@ -324,15 +374,15 @@ __LA_DECL void archive_entry_set_hardlink_utf8(struct archive_entry *, const cha __LA_DECL void archive_entry_copy_hardlink(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *); __LA_DECL int archive_entry_update_hardlink_utf8(struct archive_entry *, const char *); -__LA_DECL void archive_entry_set_ino(struct archive_entry *, la_int64_t); -__LA_DECL void archive_entry_set_ino64(struct archive_entry *, la_int64_t); +__LA_DECL void archive_entry_set_ino(struct archive_entry *, __LA_INO_T); +__LA_DECL void archive_entry_set_ino64(struct archive_entry *, __LA_INO_T); __LA_DECL void archive_entry_set_link(struct archive_entry *, const char *); __LA_DECL void archive_entry_set_link_utf8(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_link(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *); __LA_DECL int archive_entry_update_link_utf8(struct archive_entry *, const char *); __LA_DECL void archive_entry_set_mode(struct archive_entry *, __LA_MODE_T); -__LA_DECL void archive_entry_set_mtime(struct archive_entry *, time_t, long); +__LA_DECL void archive_entry_set_mtime(struct archive_entry *, __LA_TIME_T, long); __LA_DECL void archive_entry_unset_mtime(struct archive_entry *); __LA_DECL void archive_entry_set_nlink(struct archive_entry *, unsigned int); __LA_DECL void archive_entry_set_pathname(struct archive_entry *, const char *); @@ -341,14 +391,15 @@ __LA_DECL void archive_entry_copy_pathname(struct archive_entry *, const char *) __LA_DECL void archive_entry_copy_pathname_w(struct archive_entry *, const wchar_t *); __LA_DECL int archive_entry_update_pathname_utf8(struct archive_entry *, const char *); __LA_DECL void archive_entry_set_perm(struct archive_entry *, __LA_MODE_T); -__LA_DECL void archive_entry_set_rdev(struct archive_entry *, dev_t); -__LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, dev_t); -__LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, dev_t); +__LA_DECL void archive_entry_set_rdev(struct archive_entry *, __LA_DEV_T); +__LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, __LA_DEV_T); +__LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, __LA_DEV_T); __LA_DECL void archive_entry_set_size(struct archive_entry *, la_int64_t); __LA_DECL void archive_entry_unset_size(struct archive_entry *); __LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_sourcepath_w(struct archive_entry *, const wchar_t *); __LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *); +__LA_DECL void archive_entry_set_symlink_type(struct archive_entry *, int); __LA_DECL void archive_entry_set_symlink_utf8(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *); __LA_DECL void archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *); @@ -386,6 +437,20 @@ __LA_DECL void archive_entry_copy_stat(struct archive_entry *, const struct stat __LA_DECL const void * archive_entry_mac_metadata(struct archive_entry *, size_t *); __LA_DECL void archive_entry_copy_mac_metadata(struct archive_entry *, const void *, size_t); +/* + * Digest routine. This is used to query the raw hex digest for the + * given entry. The type of digest is provided as an argument. + */ +#define ARCHIVE_ENTRY_DIGEST_MD5 0x00000001 +#define ARCHIVE_ENTRY_DIGEST_RMD160 0x00000002 +#define ARCHIVE_ENTRY_DIGEST_SHA1 0x00000003 +#define ARCHIVE_ENTRY_DIGEST_SHA256 0x00000004 +#define ARCHIVE_ENTRY_DIGEST_SHA384 0x00000005 +#define ARCHIVE_ENTRY_DIGEST_SHA512 0x00000006 + +__LA_DECL const unsigned char * archive_entry_digest(struct archive_entry *, int /* type */); +__LA_DECL int archive_entry_set_digest(struct archive_entry *, int, const unsigned char *); + /* * ACL routines. This used to simply store and return text-format ACL * strings, but that proved insufficient for a number of reasons: @@ -514,9 +579,6 @@ __LA_DECL int archive_entry_acl_reset(struct archive_entry *, int /* want_type __LA_DECL int archive_entry_acl_next(struct archive_entry *, int /* want_type */, int * /* type */, int * /* permset */, int * /* tag */, int * /* qual */, const char ** /* name */); -__LA_DECL int archive_entry_acl_next_w(struct archive_entry *, int /* want_type */, - int * /* type */, int * /* permset */, int * /* tag */, - int * /* qual */, const wchar_t ** /* name */); /* * Construct a text-format ACL. The flags argument is a bitmask that @@ -691,7 +753,6 @@ __LA_DECL void archive_entry_linkify(struct archive_entry_linkresolver *, struct archive_entry **, struct archive_entry **); __LA_DECL struct archive_entry *archive_entry_partial_links( struct archive_entry_linkresolver *res, unsigned int *links); - #ifdef __cplusplus } #endif