Skip to content

Commit

Permalink
bump bundled sources to 3.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vmchale committed Apr 28, 2024
1 parent 0c9c011 commit 5f303a0
Show file tree
Hide file tree
Showing 140 changed files with 812 additions and 605 deletions.
12 changes: 7 additions & 5 deletions libarchive-clib/c/archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,7 +34,7 @@
* assert that ARCHIVE_VERSION_NUMBER >= 2012108.
*/
/* Note: Compiler will complain if this does not match archive_entry.h! */
#define ARCHIVE_VERSION_NUMBER 3007002
#define ARCHIVE_VERSION_NUMBER 3007004

#include <sys/stat.h>
#include <stddef.h> /* for wchar_t */
Expand Down Expand Up @@ -157,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.7.2"
#define ARCHIVE_VERSION_ONLY_STRING "3.7.4"
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
__LA_DECL const char * archive_version_string(void);

Expand Down Expand Up @@ -535,6 +533,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;
Expand Down Expand Up @@ -893,7 +895,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 *,
Expand Down
1 change: 0 additions & 1 deletion libarchive-clib/c/archive_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/

#include "archive_platform.h"
__FBSDID("$FreeBSD$");

#ifdef HAVE_ERRNO_H
#include <errno.h>
Expand Down
2 changes: 0 additions & 2 deletions libarchive-clib/c/archive_acl_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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$
*/

#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED
Expand Down
20 changes: 10 additions & 10 deletions libarchive-clib/c/archive_check_magic.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_check_magic.c 201089 2009-12-28 02:20:23Z kientzle $");

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
Expand Down Expand Up @@ -62,7 +61,7 @@ errmsg(const char *m)
}
}

static __LA_DEAD void
static __LA_NORETURN void
diediedie(void)
{
#if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG)
Expand Down Expand Up @@ -99,13 +98,12 @@ archive_handle_type_name(unsigned m)
}
}


static char *
static void
write_all_states(char *buff, unsigned int states)
{
unsigned int lowbit;

buff[0] = '\0';
*buff = '\0';

/* A trick for computing the lowest set bit. */
while ((lowbit = states & (1 + ~states)) != 0) {
Expand All @@ -114,7 +112,6 @@ write_all_states(char *buff, unsigned int states)
if (states != 0)
strcat(buff, "/");
}
return buff;
}

/*
Expand Down Expand Up @@ -160,16 +157,19 @@ __archive_check_magic(struct archive *a, unsigned int magic,

if ((a->state & state) == 0) {
/* If we're already FATAL, don't overwrite the error. */
if (a->state != ARCHIVE_STATE_FATAL)
if (a->state != ARCHIVE_STATE_FATAL) {
write_all_states(states1, a->state);
write_all_states(states2, state);
archive_set_error(a, -1,
"INTERNAL ERROR: Function '%s' invoked with"
" archive structure in state '%s',"
" should be in state '%s'",
function,
write_all_states(states1, a->state),
write_all_states(states2, state));
states1,
states2);
}
a->state = ARCHIVE_STATE_FATAL;
return (ARCHIVE_FATAL);
}
return ARCHIVE_OK;
return (ARCHIVE_OK);
}
2 changes: 0 additions & 2 deletions libarchive-clib/c/archive_cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

#include "archive_platform.h"

__FBSDID("$FreeBSD$");

#ifdef HAVE_STRING_H
# include <string.h>
#endif
Expand Down
2 changes: 0 additions & 2 deletions libarchive-clib/c/archive_cmdline_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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$
*/

#ifndef ARCHIVE_CMDLINE_PRIVATE_H
Expand Down
2 changes: 0 additions & 2 deletions libarchive-clib/c/archive_crc32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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: head/lib/libarchive/archive_crc32.h 201102 2009-12-28 03:11:36Z kientzle $
*/

#ifndef ARCHIVE_CRC32_H
Expand Down
4 changes: 2 additions & 2 deletions libarchive-clib/c/archive_cryptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ static int
aes_ctr_release(archive_crypto_ctx *ctx)
{
EVP_CIPHER_CTX_free(ctx->ctx);
memset(ctx->key, 0, ctx->key_len);
memset(ctx->nonce, 0, sizeof(ctx->nonce));
OPENSSL_cleanse(ctx->key, ctx->key_len);
OPENSSL_cleanse(ctx->nonce, sizeof(ctx->nonce));
return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions libarchive-clib/c/archive_endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: head/lib/libarchive/archive_endian.h 201085 2009-12-28 02:17:15Z kientzle $
*
* Borrowed from FreeBSD's <sys/endian.h>
*/

Expand Down
30 changes: 29 additions & 1 deletion libarchive-clib/c/archive_entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry.c 201096 2009-12-28 02:41:27Z kientzle $");

#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
Expand Down Expand Up @@ -372,6 +371,12 @@ archive_entry_filetype(struct archive_entry *entry)
return (AE_IFMT & entry->acl.mode);
}

int
archive_entry_filetype_is_set(struct archive_entry *entry)
{
return (entry->ae_set & AE_SET_FILETYPE);
}

void
archive_entry_fflags(struct archive_entry *entry,
unsigned long *set, unsigned long *clear)
Expand Down Expand Up @@ -425,6 +430,12 @@ archive_entry_gid(struct archive_entry *entry)
return (entry->ae_stat.aest_gid);
}

int
archive_entry_gid_is_set(struct archive_entry *entry)
{
return (entry->ae_set & AE_SET_GID);
}

const char *
archive_entry_gname(struct archive_entry *entry)
{
Expand Down Expand Up @@ -631,6 +642,12 @@ archive_entry_perm(struct archive_entry *entry)
return (~AE_IFMT & entry->acl.mode);
}

int
archive_entry_perm_is_set(struct archive_entry *entry)
{
return (entry->ae_set & AE_SET_PERM);
}

dev_t
archive_entry_rdev(struct archive_entry *entry)
{
Expand Down Expand Up @@ -759,6 +776,12 @@ archive_entry_uid(struct archive_entry *entry)
return (entry->ae_stat.aest_uid);
}

int
archive_entry_uid_is_set(struct archive_entry *entry)
{
return (entry->ae_set & AE_SET_UID);
}

const char *
archive_entry_uname(struct archive_entry *entry)
{
Expand Down Expand Up @@ -827,6 +850,7 @@ archive_entry_set_filetype(struct archive_entry *entry, unsigned int type)
entry->stat_valid = 0;
entry->acl.mode &= ~AE_IFMT;
entry->acl.mode |= AE_IFMT & type;
entry->ae_set |= AE_SET_FILETYPE;
}

void
Expand Down Expand Up @@ -861,6 +885,7 @@ archive_entry_set_gid(struct archive_entry *entry, la_int64_t g)
{
entry->stat_valid = 0;
entry->ae_stat.aest_gid = g;
entry->ae_set |= AE_SET_GID;
}

void
Expand Down Expand Up @@ -1145,6 +1170,7 @@ archive_entry_set_mode(struct archive_entry *entry, mode_t m)
{
entry->stat_valid = 0;
entry->acl.mode = m;
entry->ae_set |= AE_SET_PERM | AE_SET_FILETYPE;
}

void
Expand Down Expand Up @@ -1220,6 +1246,7 @@ archive_entry_set_perm(struct archive_entry *entry, mode_t p)
entry->stat_valid = 0;
entry->acl.mode &= AE_IFMT;
entry->acl.mode |= ~AE_IFMT & p;
entry->ae_set |= AE_SET_PERM;
}

void
Expand Down Expand Up @@ -1354,6 +1381,7 @@ archive_entry_set_uid(struct archive_entry *entry, la_int64_t u)
{
entry->stat_valid = 0;
entry->ae_stat.aest_uid = u;
entry->ae_set |= AE_SET_UID;
}

void
Expand Down
8 changes: 5 additions & 3 deletions libarchive-clib/c/archive_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 3007002
#define ARCHIVE_VERSION_NUMBER 3007004

/*
* Note: archive_entry.h is for use outside of libarchive; the
Expand Down Expand Up @@ -251,11 +249,13 @@ __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_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 *);
Expand All @@ -274,6 +274,7 @@ __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 int archive_entry_perm_is_set(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 *);
Expand All @@ -287,6 +288,7 @@ __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 *);
Expand Down
1 change: 0 additions & 1 deletion libarchive-clib/c/archive_entry_copy_bhfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

#include "archive_platform.h"
__FBSDID("$FreeBSD$");

#include "archive_private.h"
#include "archive_entry.h"
Expand Down
1 change: 0 additions & 1 deletion libarchive-clib/c/archive_entry_copy_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry_copy_stat.c 189466 2009-03-07 00:52:02Z kientzle $");

#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion libarchive-clib/c/archive_entry_link_resolver.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry_link_resolver.c 201100 2009-12-28 03:05:31Z kientzle $");

#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
Expand Down
2 changes: 0 additions & 2 deletions libarchive-clib/c/archive_entry_locale.h
Original file line number Diff line number Diff line change
Expand Up @@ -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$
*/

#ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED
Expand Down
6 changes: 4 additions & 2 deletions libarchive-clib/c/archive_entry_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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: head/lib/libarchive/archive_entry_private.h 201096 2009-12-28 02:41:27Z kientzle $
*/

#ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED
Expand Down Expand Up @@ -147,6 +145,10 @@ struct archive_entry {
#define AE_SET_SIZE 64
#define AE_SET_INO 128
#define AE_SET_DEV 256
#define AE_SET_PERM 512
#define AE_SET_FILETYPE 1024
#define AE_SET_UID 2048
#define AE_SET_GID 4096

/*
* Use aes here so that we get transparent mbs<->wcs conversions.
Expand Down
1 change: 0 additions & 1 deletion libarchive-clib/c/archive_entry_sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/

#include "archive_platform.h"
__FBSDID("$FreeBSD$");

#include "archive.h"
#include "archive_entry.h"
Expand Down
1 change: 0 additions & 1 deletion libarchive-clib/c/archive_entry_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

#include "archive_platform.h"
__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry_stat.c 201100 2009-12-28 03:05:31Z kientzle $");

#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion libarchive-clib/c/archive_entry_strmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

#include "archive_platform.h"
__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_strmode.c,v 1.4 2008/06/15 05:14:01 kientzle Exp $");

#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
Expand Down
Loading

0 comments on commit 5f303a0

Please sign in to comment.