Skip to content

Commit

Permalink
Update to libarchive v.3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
srirangav committed Feb 18, 2022
1 parent 44b4626 commit ed5811f
Show file tree
Hide file tree
Showing 44 changed files with 1,740 additions and 618 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PROJNAME = qlZipInfo
PROJEXT = qlgenerator
PROJVERS = 1.1.7
PROJVERS = 1.1.8
BUNDLEID = "org.calalum.ranga.$(PROJNAME)"

# code signing information
Expand Down
3 changes: 2 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
README
------

qlZipInfo v1.1.7
qlZipInfo v1.1.8
By Sriranga Veeraraghavan <[email protected]>

Homepage:
Expand Down Expand Up @@ -77,6 +77,7 @@ Known Issues:

History:

v1.1.8 - upgrade to libarchive v.3.6.0
v1.1.7 - add support for BinHex 4.0 files
v1.1.6 - fix to detect .tgz files as tar-gzip'ed archives
and .tbz files as tar-bzip2'ed archives, disable
Expand Down
Binary file added Sources/libarchive-3.6.0.tar.gz
Binary file not shown.
16 changes: 16 additions & 0 deletions Sources/libarchive-3.6.0.tar.gz.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEpaRbEq2S2WS4nu4t7FYMgc7CJ24FAmIDuEQACgkQ7FYMgc7C
J25pZRAAqJz6yaZc7KRwTornAWvPBX/0CtNZolZsgHTuNK+c9gCAbm7utjEXC2HB
4JasXtEHle/nV04vuchToyiZ1ZLhxEoYF6SuasIB6ry7cZF2KX7mpwaYPMnny/vf
HZSB5pvADHPB/CGAHfpArSfkTFh3XOIFcEqdUBkN3Ly9YyucSVLqbb0E2yt7MeAS
Xm4EGwP9+1jbYFIaBupckwDASEeR1PZ90KLc/om5cKaBYKUYM5IW4L/nCJC28POI
8ySteFp4TF4kqns4eLnethCwr0Gy9sqGpgiPq7FvCyMy52faRknCccWibvxSrHoc
EF3TLIIR2LgtV7Ws5r+cclr3wCE83euHiw6D7axvQQ774LIYvnSymOambb7/jH5P
L4/IYV4nY1Q0a6b4YiOeV61n1MDoTJ822RwwDKIOIz9h7SXliEtzX4B+As3QEg6s
WGeXorjFb+2cQ6c0R75OhU379e+uFCMdt9DzcmiOYxTB6Tl4QGYZNQV++Lx9AyVh
Dsw3jLYASj9v8tZ+XWaLIXYrkWAc5D8b7gn69PbX/C4NJPlIY7oHN5qn6Mm4hL6O
mO98Sc7ThuKmhvXNKHM4bD29cy4jxDKYeZVlS2GYRqw2pNO494xzEHHbuN06bAF8
WU0XXRrJHZtvPqeriRskiMW0N2PcMjbu9Rzl0gyc+tXtqJMH54Y=
=q4P/
-----END PGP SIGNATURE-----
8 changes: 5 additions & 3 deletions qlZipInfo/libarchive/archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* assert that ARCHIVE_VERSION_NUMBER >= 2012108.
*/
/* Note: Compiler will complain if this does not match archive_entry.h! */
#define ARCHIVE_VERSION_NUMBER 3005002
#define ARCHIVE_VERSION_NUMBER 3006000

#include <sys/stat.h>
#include <stddef.h> /* for wchar_t */
Expand Down Expand Up @@ -97,7 +97,7 @@ typedef ssize_t la_ssize_t;
#endif

/* Large file support for Android */
#ifdef __ANDROID__
#if defined(__LIBARCHIVE_BUILD) && defined(__ANDROID__)
#include "android_lf.h"
#endif

Expand Down Expand Up @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void);
/*
* Textual name/version of the library, useful for version displays.
*/
#define ARCHIVE_VERSION_ONLY_STRING "3.5.2"
#define ARCHIVE_VERSION_ONLY_STRING "3.6.0"
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
__LA_DECL const char * archive_version_string(void);

Expand Down Expand Up @@ -1024,6 +1024,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);
Expand Down
4 changes: 3 additions & 1 deletion qlZipInfo/libarchive/archive_blake2.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@

#if defined(_MSC_VER)
#define BLAKE2_PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop))
#else
#elif defined(__GNUC__)
#define BLAKE2_PACKED(x) x __attribute__((packed))
#else
#define BLAKE2_PACKED(x) _Pragma("pack 1") x _Pragma("pack 0")
#endif

#if defined(__cplusplus)
Expand Down
2 changes: 1 addition & 1 deletion qlZipInfo/libarchive/archive_blake2_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static BLAKE2_INLINE uint64_t rotr64( const uint64_t w, const unsigned c )
/* prevents compiler optimizing out memset() */
static BLAKE2_INLINE void secure_zero_memory(void *v, size_t n)
{
static void *(*const volatile memset_v)(void *, int, size_t) = &memset;
static void *(__LA_LIBC_CC *const volatile memset_v)(void *, int, size_t) = &memset;
memset_v(v, 0, n);
}

Expand Down
1 change: 1 addition & 0 deletions qlZipInfo/libarchive/archive_blake2s_ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <string.h>
#include <stdio.h>

#include "archive_platform.h"
#include "archive_blake2.h"
#include "archive_blake2_impl.h"

Expand Down
1 change: 1 addition & 0 deletions qlZipInfo/libarchive/archive_blake2sp_ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <omp.h>
#endif

#include "archive_platform.h"
#include "archive_blake2.h"
#include "archive_blake2_impl.h"

Expand Down
8 changes: 0 additions & 8 deletions qlZipInfo/libarchive/archive_cryptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,6 @@ aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len)
memcpy(ctx->key, key, key_len);
memset(ctx->nonce, 0, sizeof(ctx->nonce));
ctx->encr_pos = AES_BLOCK_SIZE;
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
if (!EVP_CIPHER_CTX_reset(ctx->ctx)) {
EVP_CIPHER_CTX_free(ctx->ctx);
ctx->ctx = NULL;
}
#else
EVP_CIPHER_CTX_init(ctx->ctx);
#endif
return 0;
}

Expand Down
10 changes: 5 additions & 5 deletions qlZipInfo/libarchive/archive_digest.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int
__archive_md5update(archive_md5_ctx *ctx, const void *indata,
size_t insize)
{
CC_MD5_Update(ctx, indata, (unsigned int)insize);
CC_MD5_Update(ctx, indata, (CC_LONG)insize);
return (ARCHIVE_OK);
}

Expand Down Expand Up @@ -548,7 +548,7 @@ static int
__archive_sha1update(archive_sha1_ctx *ctx, const void *indata,
size_t insize)
{
CC_SHA1_Update(ctx, indata, (unsigned int)insize);
CC_SHA1_Update(ctx, indata, (CC_LONG)insize);
return (ARCHIVE_OK);
}

Expand Down Expand Up @@ -811,7 +811,7 @@ static int
__archive_sha256update(archive_sha256_ctx *ctx, const void *indata,
size_t insize)
{
CC_SHA256_Update(ctx, indata, (unsigned int)insize);
CC_SHA256_Update(ctx, indata, (CC_LONG)insize);
return (ARCHIVE_OK);
}

Expand Down Expand Up @@ -1046,7 +1046,7 @@ static int
__archive_sha384update(archive_sha384_ctx *ctx, const void *indata,
size_t insize)
{
CC_SHA384_Update(ctx, indata, (unsigned int)insize);
CC_SHA384_Update(ctx, indata, (CC_LONG)insize);
return (ARCHIVE_OK);
}

Expand Down Expand Up @@ -1305,7 +1305,7 @@ static int
__archive_sha512update(archive_sha512_ctx *ctx, const void *indata,
size_t insize)
{
CC_SHA512_Update(ctx, indata, (unsigned int)insize);
CC_SHA512_Update(ctx, indata, (CC_LONG)insize);
return (ARCHIVE_OK);
}

Expand Down
8 changes: 4 additions & 4 deletions qlZipInfo/libarchive/archive_entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ archive_entry_set_atime(struct archive_entry *entry, time_t t, long ns)
entry->stat_valid = 0;
entry->ae_set |= AE_SET_ATIME;
entry->ae_stat.aest_atime = t;
entry->ae_stat.aest_atime_nsec = (int)ns;
entry->ae_stat.aest_atime_nsec = (unsigned int)ns;
}

void
Expand All @@ -1001,7 +1001,7 @@ archive_entry_set_birthtime(struct archive_entry *entry, time_t t, long ns)
entry->stat_valid = 0;
entry->ae_set |= AE_SET_BIRTHTIME;
entry->ae_stat.aest_birthtime = t;
entry->ae_stat.aest_birthtime_nsec = (int)ns;
entry->ae_stat.aest_birthtime_nsec = (unsigned int)ns;
}

void
Expand All @@ -1018,7 +1018,7 @@ archive_entry_set_ctime(struct archive_entry *entry, time_t t, long ns)
entry->stat_valid = 0;
entry->ae_set |= AE_SET_CTIME;
entry->ae_stat.aest_ctime = t;
entry->ae_stat.aest_ctime_nsec = (int)ns;
entry->ae_stat.aest_ctime_nsec = (unsigned int)ns;
}

void
Expand Down Expand Up @@ -1140,7 +1140,7 @@ archive_entry_set_mtime(struct archive_entry *entry, time_t t, long ns)
entry->stat_valid = 0;
entry->ae_set |= AE_SET_MTIME;
entry->ae_stat.aest_mtime = t;
entry->ae_stat.aest_mtime_nsec = (int)ns;
entry->ae_stat.aest_mtime_nsec = (unsigned int)ns;
}

void
Expand Down
4 changes: 2 additions & 2 deletions qlZipInfo/libarchive/archive_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define ARCHIVE_ENTRY_H_INCLUDED

/* Note: Compiler will complain if this does not match archive.h! */
#define ARCHIVE_VERSION_NUMBER 3005002
#define ARCHIVE_VERSION_NUMBER 3006000

/*
* Note: archive_entry.h is for use outside of libarchive; the
Expand Down Expand Up @@ -99,7 +99,7 @@ typedef ssize_t la_ssize_t;
#endif

/* Large file support for Android */
#ifdef __ANDROID__
#if defined(__LIBARCHIVE_BUILD) && defined(__ANDROID__)
#include "android_lf.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion qlZipInfo/libarchive/archive_getdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ Convert(time_t Month, time_t Day, time_t Year,
? 29 : 28;
/* Checking for 2038 bogusly assumes that time_t is 32 bits. But
I'm too lazy to try to check for time_t overflow in another way. */
if (Year < EPOCH || Year > 2038
if (Year < EPOCH || Year >= 2038
|| Month < 1 || Month > 12
/* Lint fluff: "conversion from long may lose accuracy" */
|| Day < 1 || Day > DaysInMonth[(int)--Month]
Expand Down
3 changes: 2 additions & 1 deletion qlZipInfo/libarchive/archive_pack_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static pack_t pack_12_20;
static pack_t pack_14_18;
static pack_t pack_8_24;
static pack_t pack_bsdos;
static int compare_format(const void *, const void *);
static int __LA_LIBC_CC compare_format(const void *, const void *);

static const char iMajorError[] = "invalid major number";
static const char iMinorError[] = "invalid minor number";
Expand Down Expand Up @@ -310,6 +310,7 @@ static const struct format {
};

static int
__LA_LIBC_CC
compare_format(const void *key, const void *element)
{
const char *name;
Expand Down
30 changes: 30 additions & 0 deletions qlZipInfo/libarchive/archive_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,16 @@
* either Windows or Posix APIs. */
#if (defined(__WIN32__) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__)
#include "archive_windows.h"
/* The C library on Windows specifies a calling convention for callback
* functions and exports; when we interact with them (capture pointers,
* call and pass function pointers) we need to match their calling
* convention.
* This only matters when libarchive is built with /Gr, /Gz or /Gv
* (which change the default calling convention.) */
#define __LA_LIBC_CC __cdecl
#else
#define la_stat(path,stref) stat(path,stref)
#define __LA_LIBC_CC
#endif

/*
Expand Down Expand Up @@ -155,6 +163,28 @@
#define INTMAX_MIN ((intmax_t)(~INTMAX_MAX))
#endif

/* Some platforms lack the standard PRIxN/PRIdN definitions. */
#if !HAVE_INTTYPES_H || !defined(PRIx32) || !defined(PRId32)
#ifndef PRIx32
#if SIZEOF_INT == 4
#define PRIx32 "x"
#elif SIZEOF_LONG == 4
#define PRIx32 "lx"
#else
#error No suitable 32-bit unsigned integer type found for this platform
#endif
#endif // PRIx32
#ifndef PRId32
#if SIZEOF_INT == 4
#define PRId32 "d"
#elif SIZEOF_LONG == 4
#define PRId32 "ld"
#else
#error No suitable 32-bit signed integer type found for this platform
#endif
#endif // PRId32
#endif // !HAVE_INTTYPES_H || !defined(PRIx32) || !defined(PRId32)

/*
* If we can't restore metadata using a file descriptor, then
* for compatibility's sake, close files before trying to restore metadata.
Expand Down
5 changes: 1 addition & 4 deletions qlZipInfo/libarchive/archive_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,11 @@ struct archive {
* Some public API functions depend on the "real" type of the
* archive object.
*/
struct archive_vtable *vtable;
const struct archive_vtable *vtable;

int archive_format;
const char *archive_format_name;

int compression_code; /* Currently active compression. */
const char *compression_name;

/* Number of file entries processed. */
int file_count;

Expand Down
Loading

0 comments on commit ed5811f

Please sign in to comment.