From cf8cc1c88406d9c2a9337df1792143e887e4595e Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Thu, 12 May 2016 16:03:55 +0000 Subject: [PATCH] Update vendor/libarchive/dist to git commit f48d99b Integrates my pull requests #701, #702 and #703 --- cat/bsdcat.c | 12 ++++++------ cat/bsdcat.h | 2 +- libarchive/archive_read_support_format_mtree.c | 2 +- libarchive_fe/err.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cat/bsdcat.c b/cat/bsdcat.c index af140e0001c7..9ef75a6b476f 100644 --- a/cat/bsdcat.c +++ b/cat/bsdcat.c @@ -42,10 +42,10 @@ __FBSDID("$FreeBSD$"); #define BYTES_PER_BLOCK (20*512) -struct archive *a; -struct archive_entry *ae; -char *bsdcat_current_path; -int exit_status = 0; +static struct archive *a; +static struct archive_entry *ae; +static const char *bsdcat_current_path; +static int exit_status = 0; void @@ -68,7 +68,7 @@ version(void) } void -bsdcat_next() +bsdcat_next(void) { a = archive_read_new(); archive_read_support_filter_all(a); @@ -85,7 +85,7 @@ bsdcat_print_error(void) } void -bsdcat_read_to_stdout(char* filename) +bsdcat_read_to_stdout(const char* filename) { int r; diff --git a/cat/bsdcat.h b/cat/bsdcat.h index ca603d3d6f89..2e055e7c187c 100644 --- a/cat/bsdcat.h +++ b/cat/bsdcat.h @@ -53,4 +53,4 @@ int bsdcat_getopt(struct bsdcat *); void usage(FILE *stream, int eval); void bsdcat_next(void); void bsdcat_print_error(void); -void bsdcat_read_to_stdout(char* filename); +void bsdcat_read_to_stdout(const char* filename); diff --git a/libarchive/archive_read_support_format_mtree.c b/libarchive/archive_read_support_format_mtree.c index 81d96521138e..3efcc37837e6 100644 --- a/libarchive/archive_read_support_format_mtree.c +++ b/libarchive/archive_read_support_format_mtree.c @@ -1342,7 +1342,7 @@ parse_line(struct archive_read *a, struct archive_entry *entry, /* strsep() is not in C90, but strcspn() is. */ /* Taken from http://unixpapa.com/incnote/string.html */ static char * -la_strsep(char **sp, char *sep) +la_strsep(char **sp, const char *sep) { char *p, *s; if (sp == NULL || *sp == NULL || **sp == '\0') diff --git a/libarchive_fe/err.c b/libarchive_fe/err.c index 8618a94ea5d5..8c860350bc3e 100644 --- a/libarchive_fe/err.c +++ b/libarchive_fe/err.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); static void lafe_vwarnc(int, const char *, va_list) __LA_PRINTFLIKE(2, 0); -const char *lafe_progname; +static const char *lafe_progname; const char * lafe_getprogname(void)