This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 4596c5f1ee10d381a821b7aac70a8f81190846d0 Author: anjiahao <[email protected]> AuthorDate: Mon Oct 14 20:56:26 2024 +0800 system:support libarchive Add system/libarchive. It downloads libarchive 3.7.7 when the build is configured, applies 0001-fix-conflict-libarchive-for-nuttx.patch to it, and builds it for the Make and the CMake build. The library and some of its programs can be enabled in Kconfig. Assisted-by: Claude Code:claude-sonnet-5.5 Signed-off-by: anjiahao <[email protected]> Signed-off-by: tengshuangshuang <[email protected]> --- system/libarchive/.gitignore | 2 + .../0001-fix-conflict-libarchive-for-nuttx.patch | 987 ++++++++++++++ system/libarchive/CMakeLists.txt | 266 ++++ system/libarchive/Kconfig | 163 +++ system/libarchive/Make.defs | 24 + system/libarchive/Makefile | 133 ++ system/libarchive/config.h | 1416 ++++++++++++++++++++ 7 files changed, 2991 insertions(+) diff --git a/system/libarchive/.gitignore b/system/libarchive/.gitignore new file mode 100644 index 000000000..499ca033a --- /dev/null +++ b/system/libarchive/.gitignore @@ -0,0 +1,2 @@ +libarchive/ +*.zip diff --git a/system/libarchive/0001-fix-conflict-libarchive-for-nuttx.patch b/system/libarchive/0001-fix-conflict-libarchive-for-nuttx.patch new file mode 100644 index 000000000..6eb457cc2 --- /dev/null +++ b/system/libarchive/0001-fix-conflict-libarchive-for-nuttx.patch @@ -0,0 +1,987 @@ +From 576f829c2485267766adc8ca969ee706d3306b97 Mon Sep 17 00:00:00 2001 +From: anjiahao <[email protected]> +Date: Wed, 30 Oct 2024 16:01:34 +0800 +Subject: [PATCH] fix conflict libarchive for nuttx + +1.file api conflict with stdio.h +2. +libarchive/libarchive_fe/passphrase.c:151: warning: "MAX_SIGNO" redefined + 151 | #define MAX_SIGNO M(M(M(SIGALRM, SIGHUP), \ + +Signed-off-by: anjiahao <[email protected]> +--- + libarchive/archive_read_open_fd.c | 18 +-- + libarchive/archive_read_open_file.c | 12 +- + libarchive/archive_read_open_filename.c | 44 +++---- + libarchive/archive_write_open_fd.c | 10 +- + libarchive/archive_write_open_file.c | 10 +- + libarchive/archive_write_open_filename.c | 14 +-- + libarchive/archive_write_set_format_7zip.c | 54 ++++----- + libarchive/archive_write_set_format_xar.c | 114 +++++++++--------- + .../test_archive_read_multiple_data_objects.c | 18 +-- + libarchive_fe/passphrase.c | 2 + + 10 files changed, 149 insertions(+), 147 deletions(-) + +diff --git a/libarchive/archive_read_open_fd.c b/libarchive/archive_read_open_fd.c +index debfde20..b23c9dc4 100644 +--- a/libarchive/archive_read_open_fd.c ++++ b/libarchive/archive_read_open_fd.c +@@ -56,9 +56,9 @@ struct read_fd_data { + void *buffer; + }; + +-static int file_close(struct archive *, void *); +-static ssize_t file_read(struct archive *, void *, const void **buff); +-static int64_t file_seek(struct archive *, void *, int64_t request, int); ++static int farchive_file_close(struct archive *, void *); ++static ssize_t farchive_file_read(struct archive *, void *, const void **buff); ++static int64_t farchive_file_seek(struct archive *, void *, int64_t request, int); + static int64_t file_skip(struct archive *, void *, int64_t request); + + int +@@ -100,16 +100,16 @@ archive_read_open_fd(struct archive *a, int fd, size_t block_size) + setmode(mine->fd, O_BINARY); + #endif + +- archive_read_set_read_callback(a, file_read); ++ archive_read_set_read_callback(a, farchive_file_read); + archive_read_set_skip_callback(a, file_skip); +- archive_read_set_seek_callback(a, file_seek); +- archive_read_set_close_callback(a, file_close); ++ archive_read_set_seek_callback(a, farchive_file_seek); ++ archive_read_set_close_callback(a, farchive_file_close); + archive_read_set_callback_data(a, mine); + return (archive_read_open1(a)); + } + + static ssize_t +-file_read(struct archive *a, void *client_data, const void **buff) ++farchive_file_read(struct archive *a, void *client_data, const void **buff) + { + struct read_fd_data *mine = (struct read_fd_data *)client_data; + ssize_t bytes_read; +@@ -175,7 +175,7 @@ file_skip(struct archive *a, void *client_data, int64_t request) + * TODO: Store the offset and use it in the read callback. + */ + static int64_t +-file_seek(struct archive *a, void *client_data, int64_t request, int whence) ++farchive_file_seek(struct archive *a, void *client_data, int64_t request, int whence) + { + struct read_fd_data *mine = (struct read_fd_data *)client_data; + int64_t r; +@@ -199,7 +199,7 @@ file_seek(struct archive *a, void *client_data, int64_t request, int whence) + } + + static int +-file_close(struct archive *a, void *client_data) ++farchive_file_close(struct archive *a, void *client_data) + { + struct read_fd_data *mine = (struct read_fd_data *)client_data; + +diff --git a/libarchive/archive_read_open_file.c b/libarchive/archive_read_open_file.c +index cf49ebd8..f2a8c649 100644 +--- a/libarchive/archive_read_open_file.c ++++ b/libarchive/archive_read_open_file.c +@@ -56,8 +56,8 @@ struct read_FILE_data { + char can_skip; + }; + +-static int file_close(struct archive *, void *); +-static ssize_t file_read(struct archive *, void *, const void **buff); ++static int farchive_file_close(struct archive *, void *); ++static ssize_t farchive_file_read(struct archive *, void *, const void **buff); + static int64_t file_skip(struct archive *, void *, int64_t request); + + int +@@ -97,15 +97,15 @@ archive_read_open_FILE(struct archive *a, FILE *f) + setmode(fileno(mine->f), O_BINARY); + #endif + +- archive_read_set_read_callback(a, file_read); ++ archive_read_set_read_callback(a, farchive_file_read); + archive_read_set_skip_callback(a, file_skip); +- archive_read_set_close_callback(a, file_close); ++ archive_read_set_close_callback(a, farchive_file_close); + archive_read_set_callback_data(a, mine); + return (archive_read_open1(a)); + } + + static ssize_t +-file_read(struct archive *a, void *client_data, const void **buff) ++farchive_file_read(struct archive *a, void *client_data, const void **buff) + { + struct read_FILE_data *mine = (struct read_FILE_data *)client_data; + size_t bytes_read; +@@ -168,7 +168,7 @@ file_skip(struct archive *a, void *client_data, int64_t request) + } + + static int +-file_close(struct archive *a, void *client_data) ++farchive_file_close(struct archive *a, void *client_data) + { + struct read_FILE_data *mine = (struct read_FILE_data *)client_data; + +diff --git a/libarchive/archive_read_open_filename.c b/libarchive/archive_read_open_filename.c +index 8def020f..347ea014 100644 +--- a/libarchive/archive_read_open_filename.c ++++ b/libarchive/archive_read_open_filename.c +@@ -82,12 +82,12 @@ struct read_file_data { + } filename; /* Must be last! */ + }; + +-static int file_open(struct archive *, void *); +-static int file_close(struct archive *, void *); +-static int file_close2(struct archive *, void *); ++static int farchive_file_open(struct archive *, void *); ++static int farchive_file_close(struct archive *, void *); ++static int farchive_file_close2(struct archive *, void *); + static int file_switch(struct archive *, void *, void *); +-static ssize_t file_read(struct archive *, void *, const void **buff); +-static int64_t file_seek(struct archive *, void *, int64_t request, int); ++static ssize_t farchive_file_read(struct archive *, void *, const void **buff); ++static int64_t farchive_file_seek(struct archive *, void *, int64_t request, int); + static int64_t file_skip(struct archive *, void *, int64_t request); + static int64_t file_skip_lseek(struct archive *, void *, int64_t request); + +@@ -141,12 +141,12 @@ archive_read_open_filenames(struct archive *a, const char **filenames, + break; + filename = *(filenames++); + } while (filename != NULL && filename[0] != '\0'); +- archive_read_set_open_callback(a, file_open); +- archive_read_set_read_callback(a, file_read); ++ archive_read_set_open_callback(a, farchive_file_open); ++ archive_read_set_read_callback(a, farchive_file_read); + archive_read_set_skip_callback(a, file_skip); +- archive_read_set_close_callback(a, file_close); ++ archive_read_set_close_callback(a, farchive_file_close); + archive_read_set_switch_callback(a, file_switch); +- archive_read_set_seek_callback(a, file_seek); ++ archive_read_set_seek_callback(a, farchive_file_seek); + + return (archive_read_open1(a)); + no_memory: +@@ -221,12 +221,12 @@ archive_read_open_filenames_w(struct archive *a, const wchar_t **wfilenames, + break; + wfilename = *(wfilenames++); + } while (wfilename != NULL && wfilename[0] != '\0'); +- archive_read_set_open_callback(a, file_open); +- archive_read_set_read_callback(a, file_read); ++ archive_read_set_open_callback(a, farchive_file_open); ++ archive_read_set_read_callback(a, farchive_file_read); + archive_read_set_skip_callback(a, file_skip); +- archive_read_set_close_callback(a, file_close); ++ archive_read_set_close_callback(a, farchive_file_close); + archive_read_set_switch_callback(a, file_switch); +- archive_read_set_seek_callback(a, file_seek); ++ archive_read_set_seek_callback(a, farchive_file_seek); + + return (archive_read_open1(a)); + no_memory: +@@ -245,7 +245,7 @@ archive_read_open_filename_w(struct archive *a, const wchar_t *wfilename, + } + + static int +-file_open(struct archive *a, void *client_data) ++farchive_file_open(struct archive *a, void *client_data) + { + struct stat st; + struct read_file_data *mine = (struct read_file_data *)client_data; +@@ -415,7 +415,7 @@ fail: + } + + static ssize_t +-file_read(struct archive *a, void *client_data, const void **buff) ++farchive_file_read(struct archive *a, void *client_data, const void **buff) + { + struct read_file_data *mine = (struct read_file_data *)client_data; + ssize_t bytes_read; +@@ -458,7 +458,7 @@ file_read(struct archive *a, void *client_data, const void **buff) + * without needing to round the request to the block size. + * + * TODO: This can leave future reads mis-aligned. Since we know the +- * offset here, we should store it and use it in file_read() above ++ * offset here, we should store it and use it in farchive_file_read() above + * to determine whether we should perform a short read to get back + * into alignment. Long series of mis-aligned reads can negatively + * impact disk throughput. (Of course, the performance impact should +@@ -537,7 +537,7 @@ file_skip(struct archive *a, void *client_data, int64_t request) + * TODO: Store the offset and use it in the read callback. + */ + static int64_t +-file_seek(struct archive *a, void *client_data, int64_t request, int whence) ++farchive_file_seek(struct archive *a, void *client_data, int64_t request, int whence) + { + struct read_file_data *mine = (struct read_file_data *)client_data; + int64_t r; +@@ -561,7 +561,7 @@ file_seek(struct archive *a, void *client_data, int64_t request, int whence) + } + + static int +-file_close2(struct archive *a, void *client_data) ++farchive_file_close2(struct archive *a, void *client_data) + { + struct read_file_data *mine = (struct read_file_data *)client_data; + +@@ -600,10 +600,10 @@ file_close2(struct archive *a, void *client_data) + } + + static int +-file_close(struct archive *a, void *client_data) ++farchive_file_close(struct archive *a, void *client_data) + { + struct read_file_data *mine = (struct read_file_data *)client_data; +- file_close2(a, client_data); ++ farchive_file_close2(a, client_data); + free(mine); + return (ARCHIVE_OK); + } +@@ -611,6 +611,6 @@ file_close(struct archive *a, void *client_data) + static int + file_switch(struct archive *a, void *client_data1, void *client_data2) + { +- file_close2(a, client_data1); +- return file_open(a, client_data2); ++ farchive_file_close2(a, client_data1); ++ return farchive_file_open(a, client_data2); + } +diff --git a/libarchive/archive_write_open_fd.c b/libarchive/archive_write_open_fd.c +index 8a3f68d0..ed244039 100644 +--- a/libarchive/archive_write_open_fd.c ++++ b/libarchive/archive_write_open_fd.c +@@ -54,8 +54,8 @@ struct write_fd_data { + }; + + static int file_free(struct archive *, void *); +-static int file_open(struct archive *, void *); +-static ssize_t file_write(struct archive *, void *, const void *buff, size_t); ++static int farchive_file_open(struct archive *, void *); ++static ssize_t farchive_file_write(struct archive *, void *, const void *buff, size_t); + + int + archive_write_open_fd(struct archive *a, int fd) +@@ -72,11 +72,11 @@ archive_write_open_fd(struct archive *a, int fd) + setmode(mine->fd, O_BINARY); + #endif + return (archive_write_open2(a, mine, +- file_open, file_write, NULL, file_free)); ++ farchive_file_open, farchive_file_write, NULL, file_free)); + } + + static int +-file_open(struct archive *a, void *client_data) ++farchive_file_open(struct archive *a, void *client_data) + { + struct write_fd_data *mine; + struct stat st; +@@ -114,7 +114,7 @@ file_open(struct archive *a, void *client_data) + } + + static ssize_t +-file_write(struct archive *a, void *client_data, const void *buff, size_t length) ++farchive_file_write(struct archive *a, void *client_data, const void *buff, size_t length) + { + struct write_fd_data *mine; + ssize_t bytesWritten; +diff --git a/libarchive/archive_write_open_file.c b/libarchive/archive_write_open_file.c +index 4c6ebfb2..9fe18bf6 100644 +--- a/libarchive/archive_write_open_file.c ++++ b/libarchive/archive_write_open_file.c +@@ -51,8 +51,8 @@ struct write_FILE_data { + }; + + static int file_free(struct archive *, void *); +-static int file_open(struct archive *, void *); +-static ssize_t file_write(struct archive *, void *, const void *buff, size_t); ++static int farchive_file_open(struct archive *, void *); ++static ssize_t farchive_file_write(struct archive *, void *, const void *buff, size_t); + + int + archive_write_open_FILE(struct archive *a, FILE *f) +@@ -65,12 +65,12 @@ archive_write_open_FILE(struct archive *a, FILE *f) + return (ARCHIVE_FATAL); + } + mine->f = f; +- return (archive_write_open2(a, mine, file_open, file_write, ++ return (archive_write_open2(a, mine, farchive_file_open, farchive_file_write, + NULL, file_free)); + } + + static int +-file_open(struct archive *a, void *client_data) ++farchive_file_open(struct archive *a, void *client_data) + { + (void)a; /* UNUSED */ + (void)client_data; /* UNUSED */ +@@ -79,7 +79,7 @@ file_open(struct archive *a, void *client_data) + } + + static ssize_t +-file_write(struct archive *a, void *client_data, const void *buff, size_t length) ++farchive_file_write(struct archive *a, void *client_data, const void *buff, size_t length) + { + struct write_FILE_data *mine; + size_t bytesWritten; +diff --git a/libarchive/archive_write_open_filename.c b/libarchive/archive_write_open_filename.c +index 6842b98d..5e92c4e1 100644 +--- a/libarchive/archive_write_open_filename.c ++++ b/libarchive/archive_write_open_filename.c +@@ -60,10 +60,10 @@ struct write_file_data { + struct archive_mstring filename; + }; + +-static int file_close(struct archive *, void *); ++static int farchive_file_close(struct archive *, void *); + static int file_free(struct archive *, void *); +-static int file_open(struct archive *, void *); +-static ssize_t file_write(struct archive *, void *, const void *buff, size_t); ++static int farchive_file_open(struct archive *, void *); ++static ssize_t farchive_file_write(struct archive *, void *, const void *buff, size_t); + static int open_filename(struct archive *, int, const void *); + + int +@@ -124,11 +124,11 @@ open_filename(struct archive *a, int mbs_fn, const void *filename) + } + mine->fd = -1; + return (archive_write_open2(a, mine, +- file_open, file_write, file_close, file_free)); ++ farchive_file_open, farchive_file_write, farchive_file_close, file_free)); + } + + static int +-file_open(struct archive *a, void *client_data) ++farchive_file_open(struct archive *a, void *client_data) + { + int flags; + struct write_file_data *mine; +@@ -218,7 +218,7 @@ file_open(struct archive *a, void *client_data) + } + + static ssize_t +-file_write(struct archive *a, void *client_data, const void *buff, ++farchive_file_write(struct archive *a, void *client_data, const void *buff, + size_t length) + { + struct write_file_data *mine; +@@ -238,7 +238,7 @@ file_write(struct archive *a, void *client_data, const void *buff, + } + + static int +-file_close(struct archive *a, void *client_data) ++farchive_file_close(struct archive *a, void *client_data) + { + struct write_file_data *mine = (struct write_file_data *)client_data; + +diff --git a/libarchive/archive_write_set_format_7zip.c b/libarchive/archive_write_set_format_7zip.c +index b870338f..3cb6984a 100644 +--- a/libarchive/archive_write_set_format_7zip.c ++++ b/libarchive/archive_write_set_format_7zip.c +@@ -159,10 +159,10 @@ struct coder { + uint8_t *props; + }; + +-struct file { ++struct archive_file { + struct archive_rb_node rbnode; + +- struct file *next; ++ struct archive_file *next; + unsigned name_len; + uint8_t *utf16name;/* UTF16-LE name. */ + uint64_t size; +@@ -191,7 +191,7 @@ struct _7zip { + int temp_fd; + uint64_t temp_offset; + +- struct file *cur_file; ++ struct archive_file *cur_file; + size_t total_number_entry; + size_t total_number_nonempty_entry; + size_t total_number_empty_entry; +@@ -224,12 +224,12 @@ struct _7zip { + + /* + * The list of the file entries which has its contents is used to +- * manage struct file objects. +- * We use 'next' (a member of struct file) to chain. ++ * manage struct archive_file objects. ++ * We use 'next' (a member of struct archive_file) to chain. + */ + struct { +- struct file *first; +- struct file **last; ++ struct archive_file *first; ++ struct archive_file **last; + } file_list, empty_list; + struct archive_rb_tree rbtree;/* for empty files */ + }; +@@ -247,10 +247,10 @@ static int file_cmp_node(const struct archive_rb_node *, + const struct archive_rb_node *); + static int file_cmp_key(const struct archive_rb_node *, const void *); + static int file_new(struct archive_write *a, struct archive_entry *, +- struct file **); +-static void file_free(struct file *); +-static void file_register(struct _7zip *, struct file *); +-static void file_register_empty(struct _7zip *, struct file *); ++ struct archive_file **); ++static void file_free(struct archive_file *); ++static void file_register(struct _7zip *, struct archive_file *); ++static void file_register_empty(struct _7zip *, struct archive_file *); + static void file_init_register(struct _7zip *); + static void file_init_register_empty(struct _7zip *); + static void file_free_register(struct _7zip *); +@@ -443,7 +443,7 @@ static int + _7z_write_header(struct archive_write *a, struct archive_entry *entry) + { + struct _7zip *zip; +- struct file *file; ++ struct archive_file *file; + int r; + + zip = (struct _7zip *)a->format_data; +@@ -765,7 +765,7 @@ _7z_close(struct archive_write *a) + } + /* Connect a directory file list. */ + ARCHIVE_RB_TREE_FOREACH(n, &(zip->rbtree)) { +- file_register(zip, (struct file *)n); ++ file_register(zip, (struct archive_file *)n); + } + + /* +@@ -900,7 +900,7 @@ static int + make_substreamsInfo(struct archive_write *a, struct coder *coders) + { + struct _7zip *zip = (struct _7zip *)a->format_data; +- struct file *file; ++ struct archive_file *file; + int r; + + /* +@@ -1009,7 +1009,7 @@ make_streamsInfo(struct archive_write *a, uint64_t offset, uint64_t pack_size, + return (r); + + if (numFolders > 1) { +- struct file *file = zip->file_list.first; ++ struct archive_file *file = zip->file_list.first; + for (;file != NULL; file = file->next) { + if (file->size == 0) + break; +@@ -1106,7 +1106,7 @@ make_streamsInfo(struct archive_write *a, uint64_t offset, uint64_t pack_size, + return (r); + + if (numFolders > 1) { +- struct file *file = zip->file_list.first; ++ struct archive_file *file = zip->file_list.first; + for (;file != NULL; file = file->next) { + if (file->size == 0) + break; +@@ -1183,7 +1183,7 @@ make_time(struct archive_write *a, uint8_t type, unsigned flg, int ti) + { + uint8_t filetime[8]; + struct _7zip *zip = (struct _7zip *)a->format_data; +- struct file *file; ++ struct archive_file *file; + int r; + uint8_t b, mask; + +@@ -1272,7 +1272,7 @@ make_header(struct archive_write *a, uint64_t offset, uint64_t pack_size, + uint64_t unpack_size, int codernum, struct coder *coders) + { + struct _7zip *zip = (struct _7zip *)a->format_data; +- struct file *file; ++ struct archive_file *file; + int r; + uint8_t b, mask; + +@@ -1497,8 +1497,8 @@ static int + file_cmp_node(const struct archive_rb_node *n1, + const struct archive_rb_node *n2) + { +- const struct file *f1 = (const struct file *)n1; +- const struct file *f2 = (const struct file *)n2; ++ const struct archive_file *f1 = (const struct archive_file *)n1; ++ const struct archive_file *f2 = (const struct archive_file *)n2; + + if (f1->name_len == f2->name_len) + return (memcmp(f1->utf16name, f2->utf16name, f1->name_len)); +@@ -1508,17 +1508,17 @@ file_cmp_node(const struct archive_rb_node *n1, + static int + file_cmp_key(const struct archive_rb_node *n, const void *key) + { +- const struct file *f = (const struct file *)n; ++ const struct archive_file *f = (const struct archive_file *)n; + + return (f->name_len - *(const char *)key); + } + + static int + file_new(struct archive_write *a, struct archive_entry *entry, +- struct file **newfile) ++ struct archive_file **newfile) + { + struct _7zip *zip; +- struct file *file; ++ struct archive_file *file; + const char *u16; + size_t u16len; + int ret = ARCHIVE_OK; +@@ -1596,14 +1596,14 @@ file_new(struct archive_write *a, struct archive_entry *entry, + } + + static void +-file_free(struct file *file) ++file_free(struct archive_file *file) + { + free(file->utf16name); + free(file); + } + + static void +-file_register(struct _7zip *zip, struct file *file) ++file_register(struct _7zip *zip, struct archive_file *file) + { + file->next = NULL; + *zip->file_list.last = file; +@@ -1620,7 +1620,7 @@ file_init_register(struct _7zip *zip) + static void + file_free_register(struct _7zip *zip) + { +- struct file *file, *file_next; ++ struct archive_file *file, *file_next; + + file = zip->file_list.first; + while (file != NULL) { +@@ -1631,7 +1631,7 @@ file_free_register(struct _7zip *zip) + } + + static void +-file_register_empty(struct _7zip *zip, struct file *file) ++file_register_empty(struct _7zip *zip, struct archive_file *file) + { + file->next = NULL; + *zip->empty_list.last = file; +diff --git a/libarchive/archive_write_set_format_xar.c b/libarchive/archive_write_set_format_xar.c +index 96ef85c6..6a5ef35d 100644 +--- a/libarchive/archive_write_set_format_xar.c ++++ b/libarchive/archive_write_set_format_xar.c +@@ -175,27 +175,27 @@ struct heap_data { + struct chksumval e_sum; /* extracted checksum. */ + }; + +-struct file { ++struct archive_file { + struct archive_rb_node rbnode; + + int id; + struct archive_entry *entry; + + struct archive_rb_tree rbtree; +- struct file *next; +- struct file *chnext; +- struct file *hlnext; ++ struct archive_file *next; ++ struct archive_file *chnext; ++ struct archive_file *hlnext; + /* For hardlinked files. + * Use only when archive_entry_nlink() > 1 */ +- struct file *hardlink_target; +- struct file *parent; /* parent directory entry */ ++ struct archive_file *hardlink_target; ++ struct archive_file *parent; /* parent directory entry */ + /* + * To manage sub directory files. +- * We use 'chnext' (a member of struct file) to chain. ++ * We use 'chnext' (a member of struct archive_file) to chain. + */ + struct { +- struct file *first; +- struct file **last; ++ struct archive_file *first; ++ struct archive_file **last; + } children; + + /* For making a directory tree. */ +@@ -219,8 +219,8 @@ struct hardlink { + struct archive_rb_node rbnode; + int nlink; + struct { +- struct file *first; +- struct file **last; ++ struct archive_file *first; ++ struct archive_file **last; + } file_list; + }; + +@@ -229,10 +229,10 @@ struct xar { + uint64_t temp_offset; + + int file_idx; +- struct file *root; +- struct file *cur_dirent; ++ struct archive_file *root; ++ struct archive_file *cur_dirent; + struct archive_string cur_dirstr; +- struct file *cur_file; ++ struct archive_file *cur_file; + uint64_t bytes_remaining; + struct archive_string tstr; + struct archive_string vstr; +@@ -255,17 +255,17 @@ struct xar { + + struct heap_data toc; + /* +- * The list of all file entries is used to manage struct file ++ * The list of all file entries is used to manage struct archive_file + * objects. +- * We use 'next' (a member of struct file) to chain. ++ * We use 'next' (a member of struct archive_file) to chain. + */ + struct { +- struct file *first; +- struct file **last; ++ struct archive_file *first; ++ struct archive_file **last; + } file_list; + /* + * The list of hard-linked file entries. +- * We use 'hlnext' (a member of struct file) to chain. ++ * We use 'hlnext' (a member of struct archive_file) to chain. + */ + struct archive_rb_tree hardlink_rbtree; + }; +@@ -280,21 +280,21 @@ static int xar_finish_entry(struct archive_write *); + static int xar_close(struct archive_write *); + static int xar_free(struct archive_write *); + +-static struct file *file_new(struct archive_write *a, struct archive_entry *); +-static void file_free(struct file *); +-static struct file *file_create_virtual_dir(struct archive_write *a, struct xar *, ++static struct archive_file *file_new(struct archive_write *a, struct archive_entry *); ++static void file_free(struct archive_file *); ++static struct archive_file *file_create_virtual_dir(struct archive_write *a, struct xar *, + const char *); +-static int file_add_child_tail(struct file *, struct file *); +-static struct file *file_find_child(struct file *, const char *); ++static int file_add_child_tail(struct archive_file *, struct archive_file *); ++static struct archive_file *file_find_child(struct archive_file *, const char *); + static int file_gen_utility_names(struct archive_write *, +- struct file *); ++ struct archive_file *); + static int get_path_component(char *, int, const char *); +-static int file_tree(struct archive_write *, struct file **); +-static void file_register(struct xar *, struct file *); ++static int file_tree(struct archive_write *, struct archive_file **); ++static void file_register(struct xar *, struct archive_file *); + static void file_init_register(struct xar *); + static void file_free_register(struct xar *); + static int file_register_hardlink(struct archive_write *, +- struct file *); ++ struct archive_file *); + static void file_connect_hardlink_files(struct xar *); + static void file_init_hardlinks(struct xar *); + static void file_free_hardlinks(struct xar *); +@@ -328,7 +328,7 @@ static int compression_code(struct archive *, + struct la_zstream *, enum la_zaction); + static int compression_end(struct archive *, + struct la_zstream *); +-static int save_xattrs(struct archive_write *, struct file *); ++static int save_xattrs(struct archive_write *, struct archive_file *); + static int getalgsize(enum sumalg); + static const char *getalgname(enum sumalg); + +@@ -534,7 +534,7 @@ static int + xar_write_header(struct archive_write *a, struct archive_entry *entry) + { + struct xar *xar; +- struct file *file; ++ struct archive_file *file; + struct archive_entry *file_entry; + int r, r2; + +@@ -780,7 +780,7 @@ static int + xar_finish_entry(struct archive_write *a) + { + struct xar *xar; +- struct file *file; ++ struct archive_file *file; + size_t s; + ssize_t w; + +@@ -1146,7 +1146,7 @@ make_fflags_entry(struct archive_write *a, xmlTextWriterPtr writer, + + static int + make_file_entry(struct archive_write *a, xmlTextWriterPtr writer, +- struct file *file) ++ struct archive_file *file) + { + struct xar *xar; + const char *filetype, *filelink, *fflags; +@@ -1529,7 +1529,7 @@ static int + make_toc(struct archive_write *a) + { + struct xar *xar; +- struct file *np; ++ struct archive_file *np; + xmlBufferPtr bp; + xmlTextWriterPtr writer; + int algsize; +@@ -1927,8 +1927,8 @@ static int + file_cmp_node(const struct archive_rb_node *n1, + const struct archive_rb_node *n2) + { +- const struct file *f1 = (const struct file *)n1; +- const struct file *f2 = (const struct file *)n2; ++ const struct archive_file *f1 = (const struct archive_file *)n1; ++ const struct archive_file *f2 = (const struct archive_file *)n2; + + return (strcmp(f1->basename.s, f2->basename.s)); + } +@@ -1936,15 +1936,15 @@ file_cmp_node(const struct archive_rb_node *n1, + static int + file_cmp_key(const struct archive_rb_node *n, const void *key) + { +- const struct file *f = (const struct file *)n; ++ const struct archive_file *f = (const struct archive_file *)n; + + return (strcmp(f->basename.s, (const char *)key)); + } + +-static struct file * ++static struct archive_file * + file_new(struct archive_write *a, struct archive_entry *entry) + { +- struct file *file; ++ struct archive_file *file; + static const struct archive_rb_tree_ops rb_ops = { + file_cmp_node, file_cmp_key + }; +@@ -1977,7 +1977,7 @@ file_new(struct archive_write *a, struct archive_entry *entry) + } + + static void +-file_free(struct file *file) ++file_free(struct archive_file *file) + { + struct heap_data *heap, *next_heap; + +@@ -1995,11 +1995,11 @@ file_free(struct file *file) + free(file); + } + +-static struct file * ++static struct archive_file * + file_create_virtual_dir(struct archive_write *a, struct xar *xar, + const char *pathname) + { +- struct file *file; ++ struct archive_file *file; + + (void)xar; /* UNUSED */ + +@@ -2016,7 +2016,7 @@ file_create_virtual_dir(struct archive_write *a, struct xar *xar, + } + + static int +-file_add_child_tail(struct file *parent, struct file *child) ++file_add_child_tail(struct archive_file *parent, struct archive_file *child) + { + if (!__archive_rb_tree_insert_node( + &(parent->rbtree), (struct archive_rb_node *)child)) +@@ -2031,12 +2031,12 @@ file_add_child_tail(struct file *parent, struct file *child) + /* + * Find a entry from `parent' + */ +-static struct file * +-file_find_child(struct file *parent, const char *child_name) ++static struct archive_file * ++file_find_child(struct archive_file *parent, const char *child_name) + { +- struct file *np; ++ struct archive_file *np; + +- np = (struct file *)__archive_rb_tree_find_node( ++ np = (struct archive_file *)__archive_rb_tree_find_node( + &(parent->rbtree), child_name); + return (np); + } +@@ -2062,7 +2062,7 @@ cleanup_backslash(char *utf8, size_t len) + * Generate a parent directory name and a base name from a pathname. + */ + static int +-file_gen_utility_names(struct archive_write *a, struct file *file) ++file_gen_utility_names(struct archive_write *a, struct archive_file *file) + { + struct xar *xar; + const char *pp; +@@ -2247,7 +2247,7 @@ get_path_component(char *name, int n, const char *fn) + * Add a new entry into the tree. + */ + static int +-file_tree(struct archive_write *a, struct file **filepp) ++file_tree(struct archive_write *a, struct archive_file **filepp) + { + #if defined(_WIN32) && !defined(__CYGWIN__) + char name[_MAX_FNAME];/* Included null terminator size. */ +@@ -2257,7 +2257,7 @@ file_tree(struct archive_write *a, struct file **filepp) + char name[256]; + #endif + struct xar *xar = (struct xar *)a->format_data; +- struct file *dent, *file, *np; ++ struct archive_file *dent, *file, *np; + struct archive_entry *ent; + const char *fn, *p; + int l; +@@ -2278,7 +2278,7 @@ file_tree(struct archive_write *a, struct file **filepp) + == archive_strlen(&(file->parentdir)) && + strcmp(xar->cur_dirstr.s, fn) == 0) { + if (!file_add_child_tail(xar->cur_dirent, file)) { +- np = (struct file *)__archive_rb_tree_find_node( ++ np = (struct archive_file *)__archive_rb_tree_find_node( + &(xar->cur_dirent->rbtree), + file->basename.s); + goto same_entry; +@@ -2327,7 +2327,7 @@ file_tree(struct archive_write *a, struct file **filepp) + * Create virtual parent directories. + */ + while (fn[0] != '\0') { +- struct file *vp; ++ struct archive_file *vp; + struct archive_string as; + + archive_string_init(&as); +@@ -2389,7 +2389,7 @@ file_tree(struct archive_write *a, struct file **filepp) + } + + if (!file_add_child_tail(dent, file)) { +- np = (struct file *)__archive_rb_tree_find_node( ++ np = (struct archive_file *)__archive_rb_tree_find_node( + &(dent->rbtree), file->basename.s); + goto same_entry; + } +@@ -2424,7 +2424,7 @@ same_entry: + } + + static void +-file_register(struct xar *xar, struct file *file) ++file_register(struct xar *xar, struct archive_file *file) + { + file->id = xar->file_idx++; + file->next = NULL; +@@ -2442,7 +2442,7 @@ file_init_register(struct xar *xar) + static void + file_free_register(struct xar *xar) + { +- struct file *file, *file_next; ++ struct archive_file *file, *file_next; + + file = xar->file_list.first; + while (file != NULL) { +@@ -2456,7 +2456,7 @@ file_free_register(struct xar *xar) + * Register entry to get a hardlink target. + */ + static int +-file_register_hardlink(struct archive_write *a, struct file *file) ++file_register_hardlink(struct archive_write *a, struct archive_file *file) + { + struct xar *xar = (struct xar *)a->format_data; + struct hardlink *hl; +@@ -2505,7 +2505,7 @@ file_connect_hardlink_files(struct xar *xar) + { + struct archive_rb_node *n; + struct hardlink *hl; +- struct file *target, *nf; ++ struct archive_file *target, *nf; + + ARCHIVE_RB_TREE_FOREACH(n, &(xar->hardlink_rbtree)) { + hl = (struct hardlink *)n; +@@ -3122,7 +3122,7 @@ compression_end(struct archive *a, struct la_zstream *lastrm) + + + static int +-save_xattrs(struct archive_write *a, struct file *file) ++save_xattrs(struct archive_write *a, struct archive_file *file) + { + struct xar *xar; + const char *name; +diff --git a/libarchive/test/test_archive_read_multiple_data_objects.c b/libarchive/test/test_archive_read_multiple_data_objects.c +index f9f75d96..7f20f627 100644 +--- a/libarchive/test/test_archive_read_multiple_data_objects.c ++++ b/libarchive/test/test_archive_read_multiple_data_objects.c +@@ -175,7 +175,7 @@ struct mydata { + }; + + static int +-file_open(struct archive *a, void *data) ++farchive_file_open(struct archive *a, void *data) + { + struct mydata *mydata = (struct mydata *)data; + (void)a; +@@ -191,7 +191,7 @@ file_open(struct archive *a, void *data) + return (ARCHIVE_OK); + } + static ssize_t +-file_read(struct archive *a, void *data, const void **buff) ++farchive_file_read(struct archive *a, void *data, const void **buff) + { + struct mydata *mydata = (struct mydata *)data; + (void)a; +@@ -225,12 +225,12 @@ file_switch(struct archive *a, void *data1, void *data2) + } + if (mydata2) + { +- r = file_open(a, mydata2); ++ r = farchive_file_open(a, mydata2); + } + return (r); + } + static int +-file_close(struct archive *a, void *data) ++farchive_file_close(struct archive *a, void *data) + { + struct mydata *mydata = (struct mydata *)data; + if (mydata == NULL) +@@ -241,7 +241,7 @@ file_close(struct archive *a, void *data) + return (ARCHIVE_OK); + } + static int64_t +-file_seek(struct archive *a, void *data, int64_t request, int whence) ++farchive_file_seek(struct archive *a, void *data, int64_t request, int whence) + { + struct mydata *mine = (struct mydata *)data; + int64_t r; +@@ -290,12 +290,12 @@ test_customized_multiple_data_objects(void) + filename = reffiles[++i]; + assertA(0 == archive_read_append_callback_data(a, mydata)); + } +- assertA(0 == archive_read_set_open_callback(a, file_open)); +- assertA(0 == archive_read_set_read_callback(a, file_read)); ++ assertA(0 == archive_read_set_open_callback(a, farchive_file_open)); ++ assertA(0 == archive_read_set_read_callback(a, farchive_file_read)); + assertA(0 == archive_read_set_skip_callback(a, file_skip)); +- assertA(0 == archive_read_set_close_callback(a, file_close)); ++ assertA(0 == archive_read_set_close_callback(a, farchive_file_close)); + assertA(0 == archive_read_set_switch_callback(a, file_switch)); +- assertA(0 == archive_read_set_seek_callback(a, file_seek)); ++ assertA(0 == archive_read_set_seek_callback(a, farchive_file_seek)); + assertA(0 == archive_read_open1(a)); + + /* First header. */ +diff --git a/libarchive_fe/passphrase.c b/libarchive_fe/passphrase.c +index 90fef32d..02318a79 100644 +--- a/libarchive_fe/passphrase.c ++++ b/libarchive_fe/passphrase.c +@@ -148,10 +148,12 @@ readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) + #endif + + #define M(a,b) (a > b ? a : b) ++#ifndef MAX_SIGNO + #define MAX_SIGNO M(M(M(SIGALRM, SIGHUP), \ + M(SIGINT, SIGPIPE)), \ + M(M(SIGQUIT, SIGTERM), \ + M(M(SIGTSTP, SIGTTIN), SIGTTOU))) ++#endif + + static volatile sig_atomic_t signo[MAX_SIGNO + 1]; + +-- +2.43.0 + diff --git a/system/libarchive/CMakeLists.txt b/system/libarchive/CMakeLists.txt new file mode 100644 index 000000000..cc47626ac --- /dev/null +++ b/system/libarchive/CMakeLists.txt @@ -0,0 +1,266 @@ +# ############################################################################## +# apps/system/libarchive/CMakeLists.txt +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with this work for +# additional information regarding copyright ownership. The ASF licenses this +# file to you under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +# +# ############################################################################## + +if(CONFIG_UTILS_LIBARCHIVE) + + # ############################################################################ + # Config and Fetch libarchive + # ############################################################################ + + set(LIBARCHIVE_DIR ${CMAKE_CURRENT_LIST_DIR}/libarchive) + + if(NOT EXISTS ${LIBARCHIVE_DIR}) + set(LIBARCHIVE_URL + https://github.com/libarchive/libarchive/releases/download/v3.7.7/libarchive-3.7.7.zip + ) + + FetchContent_Declare( + libarchive_fetch + URL ${LIBARCHIVE_URL} SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/libarchive + BINARY_DIR ${CMAKE_BINARY_DIR}/apps/system/libarchive/libarchive + DOWNLOAD_NO_PROGRESS true + TIMEOUT 30 + PATCH_COMMAND + patch -p1 -d ${CMAKE_CURRENT_LIST_DIR}/libarchive < + ${CMAKE_CURRENT_LIST_DIR}/0001-fix-conflict-libarchive-for-nuttx.patch) + + FetchContent_GetProperties(libarchive_fetch) + + if(NOT libarchive_fetch_POPULATED) + FetchContent_Populate(libarchive_fetch) + endif() + endif() + + # ############################################################################ + # Flags + # ############################################################################ + + set(CFLAGS -Wno-undef -DHAVE_CONFIG_H=1 -D__LIBARCHIVE_CONFIG_H_INCLUDED=1 + -UMAX_SIGNO) + + # ############################################################################ + # Sources + # ############################################################################ + + file(GLOB LIBARCHIVE_CSRCS ${LIBARCHIVE_DIR}/libarchive/*.c + ${LIBARCHIVE_DIR}/libarchive_fe/*.c) + set(CSRCS ${LIBARCHIVE_CSRCS}) + + # ############################################################################ + # Include Directory + # ############################################################################ + + set(INCDIR + ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/libarchive/libarchive + ${CMAKE_CURRENT_LIST_DIR}/libarchive/libarchive_fe) + + if(CONFIG_UTILS_XZ) + list(APPEND INCDIR ${NUTTX_APPS_DIR}/system/xz/xz/src/liblzma/api/) + endif() + + if(CONFIG_LIB_ZLIB) + list(APPEND INCDIR INCDIR ${NUTTX_APPS_DIR}/system/zlib/zlib) + endif() + + if(CONFIG_CRYPTO_MBEDTLS) + list(APPEND INCDIR INCDIR ${NUTTX_APPS_DIR}/crypto/mbedtls/mbedtls/include) + endif() + + # ############################################################################ + # Library Configuration + # ############################################################################ + + nuttx_add_library(libarchive STATIC) + target_sources(libarchive PRIVATE ${CSRCS}) + target_include_directories(libarchive PRIVATE ${INCDIR}) + + target_compile_options(libarchive PRIVATE ${CFLAGS}) + + # ############################################################################ + # Applications Configuration + # ############################################################################ + + if(CONFIG_UTILS_LIBARCHIVE_BSDUNZIP) + + nuttx_add_application( + MODULE + ${CONFIG_UTILS_LIBARCHIVE} + NAME + ${CONFIG_UTILS_LIBARCHIVE_BSDUNZIP_PROGNAME} + STACKSIZE + ${CONFIG_UTILS_LIBARCHIVE_BSDUNZIP_STACKSIZE} + PRIORITY + ${CCONFIG_UTILS_LIBARCHIVE_BSDUNZIP_PRIORITY} + SRCS + ${LIBARCHIVE_DIR}/unzip/bsdunzip.c + ${LIBARCHIVE_DIR}/unzip/cmdline.c + ${LIBARCHIVE_DIR}/unzip/la_getline.c + INCLUDE_DIRECTORIES + ${INCDIR} + COMPILE_FLAGS + ${CFLAGS} + DEPENDS + libarchive) + + endif() + + if(CONFIG_UTILS_LIBARCHIVE_BSDTAR) + + nuttx_add_application( + MODULE + ${CONFIG_UTILS_LIBARCHIVE} + NAME + ${CONFIG_UTILS_LIBARCHIVE_BSDTAR_PROGNAME} + STACKSIZE + ${CONFIG_UTILS_LIBARCHIVE_BSDTAR_STACKSIZE} + PRIORITY + ${CONFIG_UTILS_LIBARCHIVE_BSDTAR_PRIORITY} + SRCS + ${LIBARCHIVE_DIR}/tar/bsdtar.c + ${LIBARCHIVE_DIR}/tar/creation_set.c + ${LIBARCHIVE_DIR}/tar/cmdline.c + ${LIBARCHIVE_DIR}/tar/read.c + ${LIBARCHIVE_DIR}/tar/subst.c + ${LIBARCHIVE_DIR}/tar/util.c + ${LIBARCHIVE_DIR}/tar/write.c + INCLUDE_DIRECTORIES + ${INCDIR} + COMPILE_FLAGS + ${CFLAGS} + DEPENDS + libarchive) + + endif() + + if(CONFIG_UTILS_LIBARCHIVE_BSDCAT) + + nuttx_add_application( + MODULE + ${CONFIG_UTILS_LIBARCHIVE} + NAME + ${CONFIG_UTILS_LIBARCHIVE_BSDCAT_PROGNAME} + STACKSIZE + ${CONFIG_UTILS_LIBARCHIVE_BSDCAT_STACKSIZE} + PRIORITY + ${CONFIG_UTILS_LIBARCHIVE_BSDCAT_PRIORITY} + SRCS + ${LIBARCHIVE_DIR}/cat/bsdcat.c + ${LIBARCHIVE_DIR}/cat/cmdline.c + INCLUDE_DIRECTORIES + ${INCDIR} + COMPILE_FLAGS + ${CFLAGS} + DEPENDS + libarchive) + + endif() + + if(CONFIG_UTILS_LIBARCHIVE_CPIO) + + nuttx_add_application( + MODULE + ${CONFIG_UTILS_LIBARCHIVE} + NAME + ${CONFIG_UTILS_LIBARCHIVE_CPIO_PROGNAME} + STACKSIZE + ${CONFIG_UTILS_LIBARCHIVE_CPIO_STACKSIZE} + PRIORITY + ${CONFIG_UTILS_LIBARCHIVE_CPIO_PRIORITY} + SRCS + ${LIBARCHIVE_DIR}/cpio/cpio.c + ${LIBARCHIVE_DIR}/cpio/cmdline.c + INCLUDE_DIRECTORIES + ${INCDIR} + COMPILE_FLAGS + ${CFLAGS} + DEPENDS + libarchive) + + endif() + + if(CONFIG_UTILS_LIBARCHIVE_MINITAR) + + list(APPEND CFLAGS -Wno-shadow) + nuttx_add_application( + MODULE + ${CONFIG_UTILS_LIBARCHIVE} + NAME + ${CONFIG_UTILS_LIBARCHIVE_MINITAR_PROGNAME} + STACKSIZE + ${CONFIG_UTILS_LIBARCHIVE_MINITAR_STACKSIZE} + PRIORITY + ${CONFIG_UTILS_LIBARCHIVE_MINITAR_PRIORITY} + SRCS + ${LIBARCHIVE_DIR}/examples/minitar/minitar.c + INCLUDE_DIRECTORIES + ${INCDIR} + COMPILE_FLAGS + ${CFLAGS} + DEPENDS + libarchive) + + endif() + + if(CONFIG_UTILS_LIBARCHIVE_TARFILTER) + + list(APPEND CFLAGS -Wno-deprecated-declarations) + nuttx_add_application( + MODULE + ${CONFIG_UTILS_LIBARCHIVE} + NAME + ${CONFIG_UTILS_LIBARCHIVE_TARFILTER_PROGNAME} + STACKSIZE + ${CONFIG_UTILS_LIBARCHIVE_TARFILTER_STACKSIZE} + PRIORITY + ${CONFIG_UTILS_LIBARCHIVE_TARFILTER_PRIORITY} + SRCS + ${LIBARCHIVE_DIR}/examples/tarfilter.c + INCLUDE_DIRECTORIES + ${INCDIR} + COMPILE_FLAGS + ${CFLAGS} + DEPENDS + libarchive) + + endif() + + if(CONFIG_UTILS_LIBARCHIVE_UNTAR) + + list(APPEND CFLAGS -Wno-unused-but-set-variable) + nuttx_add_application( + MODULE + ${CONFIG_UTILS_LIBARCHIVE} + NAME + ${CONFIG_UTILS_LIBARCHIVE_UNTAR_PROGNAME} + STACKSIZE + ${CONFIG_UTILS_LIBARCHIVE_UNTAR_STACKSIZE} + PRIORITY + ${CONFIG_UTILS_LIBARCHIVE_UNTAR_PRIORITY} + SRCS + ${LIBARCHIVE_DIR}/examples/untar.c + INCLUDE_DIRECTORIES + ${INCDIR} + COMPILE_FLAGS + ${CFLAGS} + DEPENDS + libarchive) + + endif() +endif() diff --git a/system/libarchive/Kconfig b/system/libarchive/Kconfig new file mode 100644 index 000000000..55938009e --- /dev/null +++ b/system/libarchive/Kconfig @@ -0,0 +1,163 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config UTILS_LIBARCHIVE + tristate "libarchive" + default n + +if UTILS_LIBARCHIVE + +config UTILS_LIBARCHIVE_BSDUNZIP + bool "Enable bsdunzip" + depends on LIB_ZLIB + default n + +if UTILS_LIBARCHIVE_BSDUNZIP + +config UTILS_LIBARCHIVE_BSDUNZIP_PROGNAME + string "Programe Name" + default "bsdunzip" + +config UTILS_LIBARCHIVE_BSDUNZIP_PRIORITY + int "bsdunzip priority" + default 100 + +config UTILS_LIBARCHIVE_BSDUNZIP_STACKSIZE + int "bsdunzip stacksize" + default DEFAULT_TASK_STACKSIZE + +endif + +config UTILS_LIBARCHIVE_BSDTAR + bool "Enable bsdtar" + depends on LIBC_REGEX + depends on PIPES + depends on LIBC_EXECFUNCS + default n + +if UTILS_LIBARCHIVE_BSDTAR + +config UTILS_LIBARCHIVE_BSDTAR_PROGNAME + string "Programe Name" + default "bsdtar" + +config UTILS_LIBARCHIVE_BSDTAR_PRIORITY + int "bsdtar priority" + default 100 + +config UTILS_LIBARCHIVE_BSDTAR_STACKSIZE + int "bsdtar stacksize" + default DEFAULT_TASK_STACKSIZE + +endif + +config UTILS_LIBARCHIVE_BSDCAT + bool "Enable bsdcat" + depends on LIBC_REGEX + depends on PIPES + depends on LIBC_EXECFUNCS + default n + +if UTILS_LIBARCHIVE_BSDCAT + +config UTILS_LIBARCHIVE_BSDCAT_PROGNAME + string "Programe Name" + default "bsdcat" + +config UTILS_LIBARCHIVE_BSDCAT_PRIORITY + int "bsdcat priority" + default 100 + +config UTILS_LIBARCHIVE_BSDCAT_STACKSIZE + int "bsdcat stacksize" + default DEFAULT_TASK_STACKSIZE + +endif + +config UTILS_LIBARCHIVE_CPIO + bool "Enable cpio" + depends on FS_LINKS + depends on PIPES + depends on DEV_FIFO_SIZE > 0 + depends on LIBC_EXECFUNCS + default n + +if UTILS_LIBARCHIVE_CPIO + +config UTILS_LIBARCHIVE_CPIO_PROGNAME + string "Programe Name" + default "cpio" + +config UTILS_LIBARCHIVE_CPIO_PRIORITY + int "cpio priority" + default 100 + +config UTILS_LIBARCHIVE_CPIO_STACKSIZE + int "cpio stacksize" + default 32768 + +endif + +config UTILS_LIBARCHIVE_MINITAR + bool "Enable minitar" + default n + +if UTILS_LIBARCHIVE_MINITAR + +config UTILS_LIBARCHIVE_MINITAR_PROGNAME + string "Programe Name" + default "minitar" + +config UTILS_LIBARCHIVE_MINITAR_PRIORITY + int "minitar priority" + default 100 + +config UTILS_LIBARCHIVE_MINITAR_STACKSIZE + int "minitar stacksize" + default DEFAULT_TASK_STACKSIZE + +endif + +config UTILS_LIBARCHIVE_TARFILTER + bool "Enable tarfilter" + default n + +if UTILS_LIBARCHIVE_TARFILTER + +config UTILS_LIBARCHIVE_TARFILTER_PROGNAME + string "Programe Name" + default "tarfilter" + +config UTILS_LIBARCHIVE_TARFILTER_PRIORITY + int "tarfilter priority" + default 100 + +config UTILS_LIBARCHIVE_TARFILTER_STACKSIZE + int "tarfilter stacksize" + default DEFAULT_TASK_STACKSIZE + +endif + +config UTILS_LIBARCHIVE_UNTAR + bool "Enable untar" + default n + +if UTILS_LIBARCHIVE_UNTAR + +config UTILS_LIBARCHIVE_UNTAR_PROGNAME + string "Programe Name" + default "untar" + +config UTILS_LIBARCHIVE_UNTAR_PRIORITY + int "untar priority" + default 100 + +config UTILS_LIBARCHIVE_UNTAR_STACKSIZE + int "untar stacksize" + default DEFAULT_TASK_STACKSIZE + +endif + +endif diff --git a/system/libarchive/Make.defs b/system/libarchive/Make.defs new file mode 100644 index 000000000..a22ebc1f2 --- /dev/null +++ b/system/libarchive/Make.defs @@ -0,0 +1,24 @@ +############################################################################ +# apps/system/libarchive/Make.defs +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + + +ifneq ($(CONFIG_UTILS_LIBARCHIVE),) +CONFIGURED_APPS += $(APPDIR)/system/libarchive +endif diff --git a/system/libarchive/Makefile b/system/libarchive/Makefile new file mode 100644 index 000000000..86747fa77 --- /dev/null +++ b/system/libarchive/Makefile @@ -0,0 +1,133 @@ +############################################################################ +# apps/system/libarchive/Makefile +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + + +include $(APPDIR)/Make.defs + +LIBARCHIVE_ZIP = libarchive-3.7.7.zip +LIBARCHIVE_SRC = libarchive + +ifeq ($(wildcard libarchive/.git),) +$(LIBARCHIVE_ZIP): + @echo "Downloading $(LIBARCHIVE_ZIP)" + $(Q) curl -O -L https://github.com/libarchive/libarchive/releases/download/v3.7.7/libarchive-3.7.7.zip + +$(LIBARCHIVE_SRC): $(LIBARCHIVE_ZIP) + unzip -o $(LIBARCHIVE_ZIP) + mv libarchive-3.7.7 $(LIBARCHIVE_SRC) + $(Q) patch -d $(LIBARCHIVE_SRC) -p1 < 0001-fix-conflict-libarchive-for-nuttx.patch + +context:: $(LIBARCHIVE_SRC) + +distclean:: + $(call DELDIR, $(LIBARCHIVE_SRC), $(LIBARCHIVE_ZIP)) + +endif + +CFLAGS += -I. +CFLAGS += -I$(LIBARCHIVE_SRC)/libarchive +CFLAGS += -I$(LIBARCHIVE_SRC)/libarchive_fe + +CFLAGS += -DHAVE_CONFIG_H=1 +CFLAGS += -D__LIBARCHIVE_CONFIG_H_INCLUDED=1 +CFLAGS += -Wno-undef +CFLAGS += -UMAX_SIGNO + +CSRCS += $(wildcard $(LIBARCHIVE_SRC)/libarchive/*.c) +CSRCS += $(wildcard $(LIBARCHIVE_SRC)/libarchive_fe/*.c) + +ifneq ($(CONFIG_UTILS_XZ),) +CFLAGS += -I$(APPDIR)/system/xz/xz/src/liblzma/api +endif + +ifneq ($(CONFIG_LIB_ZLIB),) +CFLAGS += -I$(APPDIR)/system/zlib/zlib +endif + +ifneq ($(CONFIG_CRYPTO_MBEDTLS),) +CFLAGS += -I$(APPDIR)/crypto/mbedtls/mbedtls/include +endif + +ifneq ($(CONFIG_UTILS_LIBARCHIVE_BSDUNZIP),) +CSRCS += libarchive/unzip/cmdline.c +CSRCS += libarchive/unzip/la_getline.c +PROGNAME += $(CONFIG_UTILS_LIBARCHIVE_BSDUNZIP_PROGNAME) +PRIORITY += $(CONFIG_UTILS_LIBARCHIVE_BSDUNZIP_PRIORITY) +STACKSIZE += $(CONFIG_UTILS_LIBARCHIVE_BSDUNZIP_STACKSIZE) +MAINSRC += libarchive/unzip/bsdunzip.c +endif + +ifneq ($(CONFIG_UTILS_LIBARCHIVE_BSDTAR),) +CSRCS += libarchive/tar/cmdline.c +CSRCS += libarchive/tar/creation_set.c +CSRCS += libarchive/tar/read.c +CSRCS += libarchive/tar/write.c +CSRCS += libarchive/tar/util.c +CSRCS += libarchive/tar/subst.c + +PROGNAME += $(CONFIG_UTILS_LIBARCHIVE_BSDTAR_PROGNAME) +PRIORITY += $(CONFIG_UTILS_LIBARCHIVE_BSDTAR_PRIORITY) +STACKSIZE += $(CONFIG_UTILS_LIBARCHIVE_BSDTAR_STACKSIZE) +MAINSRC += libarchive/tar/bsdtar.c +endif + +ifneq ($(CONFIG_UTILS_LIBARCHIVE_BSDCAT),) +CSRCS += libarchive/cat/cmdline.c + +PROGNAME += $(CONFIG_UTILS_LIBARCHIVE_BSDCAT_PROGNAME) +PRIORITY += $(CONFIG_UTILS_LIBARCHIVE_BSDCAT_PRIORITY) +STACKSIZE += $(CONFIG_UTILS_LIBARCHIVE_BSDCAT_STACKSIZE) +MAINSRC += libarchive/cat/bsdcat.c +endif + +ifneq ($(CONFIG_UTILS_LIBARCHIVE_CPIO),) +CSRCS += libarchive/cpio/cmdline.c + +PROGNAME += $(CONFIG_UTILS_LIBARCHIVE_CPIO_PROGNAME) +PRIORITY += $(CONFIG_UTILS_LIBARCHIVE_CPIO_PRIORITY) +STACKSIZE += $(CONFIG_UTILS_LIBARCHIVE_CPIO_STACKSIZE) +MAINSRC += libarchive/cpio/cpio.c +endif + +ifneq ($(CONFIG_UTILS_LIBARCHIVE_MINITAR),) +CFLAGS += -Wno-shadow +PROGNAME += $(CONFIG_UTILS_LIBARCHIVE_MINITAR_PROGNAME) +PRIORITY += $(CONFIG_UTILS_LIBARCHIVE_MINITAR_PRIORITY) +STACKSIZE += $(CONFIG_UTILS_LIBARCHIVE_MINITAR_STACKSIZE) +MAINSRC += libarchive/examples/minitar/minitar.c +endif + +ifneq ($(CONFIG_UTILS_LIBARCHIVE_TARFILTER),) +CFLAGS += -Wno-deprecated-declarations +PROGNAME += $(CONFIG_UTILS_LIBARCHIVE_TARFILTER_PROGNAME) +PRIORITY += $(CONFIG_UTILS_LIBARCHIVE_TARFILTER_PRIORITY) +STACKSIZE += $(CONFIG_UTILS_LIBARCHIVE_TARFILTER_STACKSIZE) +MAINSRC += libarchive/examples/tarfilter.c +endif + +ifneq ($(CONFIG_UTILS_LIBARCHIVE_UNTAR),) +CFLAGS += -Wno-unused-but-set-variable +PROGNAME += $(CONFIG_UTILS_LIBARCHIVE_UNTAR_PROGNAME) +PRIORITY += $(CONFIG_UTILS_LIBARCHIVE_UNTAR_PRIORITY) +STACKSIZE += $(CONFIG_UTILS_LIBARCHIVE_UNTAR_STACKSIZE) +MAINSRC += libarchive/examples/untar.c +endif + +include $(APPDIR)/Application.mk diff --git a/system/libarchive/config.h b/system/libarchive/config.h new file mode 100644 index 000000000..8a09d28fb --- /dev/null +++ b/system/libarchive/config.h @@ -0,0 +1,1416 @@ +/* config.h. Generated from build/cmake/config.h.in by cmake configure */ + +#include <nuttx/config.h> + +#define __LIBARCHIVE_CONFIG_H_INCLUDED 1 + +/* + * Ensure we have C99-style int64_t, etc, all defined. + */ + +/* First, we need to know if the system has already defined them. */ +#define HAVE_INT16_T +#define HAVE_INT32_T +#define HAVE_INT64_T +#define HAVE_INTMAX_T + +#define HAVE_UINT8_T +#define HAVE_UINT16_T +#define HAVE_UINT32_T +#define HAVE_UINT64_T +#define HAVE_UINTMAX_T + +/* We might have the types we want under other spellings. */ +/* #undef HAVE___INT64 */ +/* #undef HAVE_U_INT64_T */ +/* #undef HAVE_UNSIGNED___INT64 */ + +/* The sizes of various standard integer types. */ +#define SIZEOF_SHORT 2 +#define SIZEOF_INT 4 +#define SIZEOF_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_UNSIGNED_SHORT 2 +#define SIZEOF_UNSIGNED 4 +#define SIZEOF_UNSIGNED_LONG 8 +#define SIZEOF_UNSIGNED_LONG_LONG 8 + +/* + * If we lack int64_t, define it to the first of __int64, int, long, and long long + * that exists and is the right size. + */ +#if !defined(HAVE_INT64_T) && defined(HAVE___INT64) +typedef __int64 int64_t; +#define HAVE_INT64_T +#endif + +#if !defined(HAVE_INT64_T) && SIZEOF_INT == 8 +typedef int int64_t; +#define HAVE_INT64_T +#endif + +#if !defined(HAVE_INT64_T) && SIZEOF_LONG == 8 +typedef long int64_t; +#define HAVE_INT64_T +#endif + +#if !defined(HAVE_INT64_T) && SIZEOF_LONG_LONG == 8 +typedef long long int64_t; +#define HAVE_INT64_T +#endif + +#if !defined(HAVE_INT64_T) +#error No 64-bit integer type was found. +#endif + +/* + * Similarly for int32_t + */ +#if !defined(HAVE_INT32_T) && SIZEOF_INT == 4 +typedef int int32_t; +#define HAVE_INT32_T +#endif + +#if !defined(HAVE_INT32_T) && SIZEOF_LONG == 4 +typedef long int32_t; +#define HAVE_INT32_T +#endif + +#if !defined(HAVE_INT32_T) +#error No 32-bit integer type was found. +#endif + +/* + * Similarly for int16_t */ +#if !defined(HAVE_INT16_T) && SIZEOF_INT == 2 +typedef int int16_t; +#define HAVE_INT16_T +#endif + +#if !defined(HAVE_INT16_T) && SIZEOF_SHORT == 2 +typedef short int16_t; +#define HAVE_INT16_T +#endif + +#if !defined(HAVE_INT16_T) +#error No 16-bit integer type was found. +#endif + +/* + * Similarly for uint64_t + */ +#if !defined(HAVE_UINT64_T) && defined(HAVE_UNSIGNED___INT64) +typedef unsigned __int64 uint64_t; +#define HAVE_UINT64_T +#endif + +#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED == 8 +typedef unsigned uint64_t; +#define HAVE_UINT64_T +#endif + +#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED_LONG == 8 +typedef unsigned long uint64_t; +#define HAVE_UINT64_T +#endif + +#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED_LONG_LONG == 8 +typedef unsigned long long uint64_t; +#define HAVE_UINT64_T +#endif + +#if !defined(HAVE_UINT64_T) +#error No 64-bit unsigned integer type was found. +#endif + + +/* + * Similarly for uint32_t + */ +#if !defined(HAVE_UINT32_T) && SIZEOF_UNSIGNED == 4 +typedef unsigned uint32_t; +#define HAVE_UINT32_T +#endif + +#if !defined(HAVE_UINT32_T) && SIZEOF_UNSIGNED_LONG == 4 +typedef unsigned long uint32_t; +#define HAVE_UINT32_T +#endif + +#if !defined(HAVE_UINT32_T) +#error No 32-bit unsigned integer type was found. +#endif + +/* + * Similarly for uint16_t + */ +#if !defined(HAVE_UINT16_T) && SIZEOF_UNSIGNED == 2 +typedef unsigned uint16_t; +#define HAVE_UINT16_T +#endif + +#if !defined(HAVE_UINT16_T) && SIZEOF_UNSIGNED_SHORT == 2 +typedef unsigned short uint16_t; +#define HAVE_UINT16_T +#endif + +#if !defined(HAVE_UINT16_T) +#error No 16-bit unsigned integer type was found. +#endif + +/* + * Similarly for uint8_t + */ +#if !defined(HAVE_UINT8_T) +typedef unsigned char uint8_t; +#define HAVE_UINT8_T +#endif + +#if !defined(HAVE_UINT8_T) +#error No 8-bit unsigned integer type was found. +#endif + +/* Define intmax_t and uintmax_t if they are not already defined. */ +#if !defined(HAVE_INTMAX_T) +typedef int64_t intmax_t; +#endif + +#if !defined(HAVE_UINTMAX_T) +typedef uint64_t uintmax_t; +#endif + +/* Define ZLIB_WINAPI if zlib was built on Visual Studio. */ +/* #undef ZLIB_WINAPI */ + +/* Darwin ACL support */ +/* #undef ARCHIVE_ACL_DARWIN */ + +/* FreeBSD ACL support */ +/* #undef ARCHIVE_ACL_FREEBSD */ + +/* FreeBSD NFSv4 ACL support */ +/* #undef ARCHIVE_ACL_FREEBSD_NFS4 */ + +/* Linux POSIX.1e ACL support via libacl */ +/* #undef ARCHIVE_ACL_LIBACL */ + +/* Linux NFSv4 ACL support via librichacl */ +/* #undef ARCHIVE_ACL_LIBRICHACL */ + +/* Solaris ACL support */ +/* #undef ARCHIVE_ACL_SUNOS */ + +/* Solaris NFSv4 ACL support */ +/* #undef ARCHIVE_ACL_SUNOS_NFS4 */ + +/* MD5 via ARCHIVE_CRYPTO_MD5_LIBC supported. */ +/* #undef ARCHIVE_CRYPTO_MD5_LIBC */ + +/* MD5 via ARCHIVE_CRYPTO_MD5_LIBSYSTEM supported. */ +/* #undef ARCHIVE_CRYPTO_MD5_LIBSYSTEM */ + +/* MD5 via ARCHIVE_CRYPTO_MD5_MBEDTLS supported. */ +/* #undef ARCHIVE_CRYPTO_MD5_MBEDTLS */ + +/* MD5 via ARCHIVE_CRYPTO_MD5_NETTLE supported. */ +/* #undef ARCHIVE_CRYPTO_MD5_NETTLE */ + +/* MD5 via ARCHIVE_CRYPTO_MD5_OPENSSL supported. */ +/* #undef ARCHIVE_CRYPTO_MD5_OPENSSL */ + +/* MD5 via ARCHIVE_CRYPTO_MD5_WIN supported. */ +/* #undef ARCHIVE_CRYPTO_MD5_WIN */ + +/* RMD160 via ARCHIVE_CRYPTO_RMD160_LIBC supported. */ +/* #undef ARCHIVE_CRYPTO_RMD160_LIBC */ + +/* RMD160 via ARCHIVE_CRYPTO_RMD160_NETTLE supported. */ +/* #undef ARCHIVE_CRYPTO_RMD160_NETTLE */ + +/* RMD160 via ARCHIVE_CRYPTO_RMD160_MBEDTLS supported. */ +/* #undef ARCHIVE_CRYPTO_RMD160_MBEDTLS */ + +/* RMD160 via ARCHIVE_CRYPTO_RMD160_OPENSSL supported. */ +/* #undef ARCHIVE_CRYPTO_RMD160_OPENSSL */ + +/* SHA1 via ARCHIVE_CRYPTO_SHA1_LIBC supported. */ +/* #undef ARCHIVE_CRYPTO_SHA1_LIBC */ + +/* SHA1 via ARCHIVE_CRYPTO_SHA1_LIBSYSTEM supported. */ +/* #undef ARCHIVE_CRYPTO_SHA1_LIBSYSTEM */ + +/* SHA1 via ARCHIVE_CRYPTO_SHA1_MBEDTLS supported. */ +/* #undef ARCHIVE_CRYPTO_SHA1_MBEDTLS */ + +/* SHA1 via ARCHIVE_CRYPTO_SHA1_NETTLE supported. */ +/* #undef ARCHIVE_CRYPTO_SHA1_NETTLE */ + +/* SHA1 via ARCHIVE_CRYPTO_SHA1_OPENSSL supported. */ +/* #undef ARCHIVE_CRYPTO_SHA1_OPENSSL */ + +/* SHA1 via ARCHIVE_CRYPTO_SHA1_WIN supported. */ +/* #undef ARCHIVE_CRYPTO_SHA1_WIN */ + +/* SHA256 via ARCHIVE_CRYPTO_SHA256_LIBC supported. */ +/* #undef ARCHIVE_CRYPTO_SHA256_LIBC */ + +/* SHA256 via ARCHIVE_CRYPTO_SHA256_LIBC2 supported. */ +/* #undef ARCHIVE_CRYPTO_SHA256_LIBC2 */ + +/* SHA256 via ARCHIVE_CRYPTO_SHA256_LIBC3 supported. */ +/* #undef ARCHIVE_CRYPTO_SHA256_LIBC3 */ + +/* SHA256 via ARCHIVE_CRYPTO_SHA256_LIBSYSTEM supported. */ +/* #undef ARCHIVE_CRYPTO_SHA256_LIBSYSTEM */ + +/* SHA256 via ARCHIVE_CRYPTO_SHA256_MBEDTLS supported. */ +/* #undef ARCHIVE_CRYPTO_SHA256_MBEDTLS */ + +/* SHA256 via ARCHIVE_CRYPTO_SHA256_NETTLE supported. */ +/* #undef ARCHIVE_CRYPTO_SHA256_NETTLE */ + +/* SHA256 via ARCHIVE_CRYPTO_SHA256_OPENSSL supported. */ +/* #udef ARCHIVE_CRYPTO_SHA256_OPENSSL */ + +/* SHA256 via ARCHIVE_CRYPTO_SHA256_WIN supported. */ +/* #undef ARCHIVE_CRYPTO_SHA256_WIN */ + +/* SHA384 via ARCHIVE_CRYPTO_SHA384_LIBC supported. */ +/* #undef ARCHIVE_CRYPTO_SHA384_LIBC */ + +/* SHA384 via ARCHIVE_CRYPTO_SHA384_LIBC2 supported. */ +/* #undef ARCHIVE_CRYPTO_SHA384_LIBC2 */ + +/* SHA384 via ARCHIVE_CRYPTO_SHA384_LIBC3 supported. */ +/* #undef ARCHIVE_CRYPTO_SHA384_LIBC3 */ + +/* SHA384 via ARCHIVE_CRYPTO_SHA384_LIBSYSTEM supported. */ +/* #undef ARCHIVE_CRYPTO_SHA384_LIBSYSTEM */ + +/* SHA384 via ARCHIVE_CRYPTO_SHA384_MBEDTLS supported. */ +/* #undef ARCHIVE_CRYPTO_SHA384_MBEDTLS */ + +/* SHA384 via ARCHIVE_CRYPTO_SHA384_NETTLE supported. */ +/* #undef ARCHIVE_CRYPTO_SHA384_NETTLE */ + +/* SHA384 via ARCHIVE_CRYPTO_SHA384_OPENSSL supported. */ +/* #undef ARCHIVE_CRYPTO_SHA384_OPENSSL 1 */ + +/* SHA384 via ARCHIVE_CRYPTO_SHA384_WIN supported. */ +/* #undef ARCHIVE_CRYPTO_SHA384_WIN */ + +/* SHA512 via ARCHIVE_CRYPTO_SHA512_LIBC supported. */ +/* #undef ARCHIVE_CRYPTO_SHA512_LIBC */ + +/* SHA512 via ARCHIVE_CRYPTO_SHA512_LIBC2 supported. */ +/* #undef ARCHIVE_CRYPTO_SHA512_LIBC2 */ + +/* SHA512 via ARCHIVE_CRYPTO_SHA512_LIBC3 supported. */ +/* #undef ARCHIVE_CRYPTO_SHA512_LIBC3 */ + +/* SHA512 via ARCHIVE_CRYPTO_SHA512_LIBSYSTEM supported. */ +/* #undef ARCHIVE_CRYPTO_SHA512_LIBSYSTEM */ + +/* SHA512 via ARCHIVE_CRYPTO_SHA512_MBEDTLS supported. */ +/* #undef ARCHIVE_CRYPTO_SHA512_MBEDTLS */ + +/* SHA512 via ARCHIVE_CRYPTO_SHA512_NETTLE supported. */ +/* #undef ARCHIVE_CRYPTO_SHA512_NETTLE */ + +/* SHA512 via ARCHIVE_CRYPTO_SHA512_OPENSSL supported. */ +/* #undef ARCHIVE_CRYPTO_SHA512_OPENSSL */ + +/* SHA512 via ARCHIVE_CRYPTO_SHA512_WIN supported. */ +/* #undef ARCHIVE_CRYPTO_SHA512_WIN */ + +/* AIX xattr support */ +/* #undef ARCHIVE_XATTR_AIX */ + +/* Darwin xattr support */ +/* #undef ARCHIVE_XATTR_DARWIN */ + +/* FreeBSD xattr support */ +/* #undef ARCHIVE_XATTR_FREEBSD */ + +/* Linux xattr support */ +/* #undef ARCHIVE_XATTR_LINUX */ + +/* Version number of bsdcpio */ +#define BSDCPIO_VERSION_STRING "3.8.0" + +/* Version number of bsdtar */ +#define BSDTAR_VERSION_STRING "3.8.0" + +/* Version number of bsdcat */ +#define BSDCAT_VERSION_STRING "3.8.0" + +/* Version number of bsdunzip */ +#define BSDUNZIP_VERSION_STRING "3.8.0" + +/* Define to 1 if you have the `acl_create_entry' function. */ +/* #undef HAVE_ACL_CREATE_ENTRY */ + +/* Define to 1 if you have the `acl_get_fd_np' function. */ +/* #undef HAVE_ACL_GET_FD_NP */ + +/* Define to 1 if you have the `acl_get_link' function. */ +/* #undef HAVE_ACL_GET_LINK */ + +/* Define to 1 if you have the `acl_get_link_np' function. */ +/* #undef HAVE_ACL_GET_LINK_NP */ + +/* Define to 1 if you have the `acl_get_perm' function. */ +/* #undef HAVE_ACL_GET_PERM */ + +/* Define to 1 if you have the `acl_get_perm_np' function. */ +/* #undef HAVE_ACL_GET_PERM_NP */ + +/* Define to 1 if you have the `acl_init' function. */ +/* #undef HAVE_ACL_INIT */ + +/* Define to 1 if you have the <acl/libacl.h> header file. */ +/* #undef HAVE_ACL_LIBACL_H */ + +/* Define to 1 if the system has the type `acl_permset_t'. */ +/* #undef HAVE_ACL_PERMSET_T */ + +/* Define to 1 if you have the `acl_set_fd' function. */ +/* #undef HAVE_ACL_SET_FD */ + +/* Define to 1 if you have the `acl_set_fd_np' function. */ +/* #undef HAVE_ACL_SET_FD_NP */ + +/* Define to 1 if you have the `acl_set_file' function. */ +/* #undef HAVE_ACL_SET_FILE */ + +/* Define to 1 if you have the `arc4random_buf' function. */ +#define HAVE_ARC4RANDOM_BUF 1 + +/* Define to 1 if you have the <attr/xattr.h> header file. */ +/* #undef HAVE_ATTR_XATTR_H */ + +/* Define to 1 if you have the <bcrypt.h> header file. */ +/* #undef HAVE_BCRYPT_H */ + +/* Define to 1 if you have the <bsdxml.h> header file. */ +/* #undef HAVE_BSDXML_H */ + +/* Define to 1 if you have the <bzlib.h> header file. */ +/* #undef HAVE_BZLIB_H */ + +/* Define to 1 if you have the `chflags' function. */ +/* #undef HAVE_CHFLAGS */ + +/* Define to 1 if you have the `chown' function. */ +#define HAVE_CHOWN 1 + +/* Define to 1 if you have the `chroot' function. */ +/* #undef HAVE_CHROOT 1 */ + +/* Define to 1 if you have the <copyfile.h> header file. */ +/* #undef HAVE_COPYFILE_H */ + +/* Define to 1 if you have the `ctime_r' function. */ +#define HAVE_CTIME_R 1 + +/* Define to 1 if you have the <ctype.h> header file. */ +#define HAVE_CTYPE_H 1 + +/* Define to 1 if you have the `cygwin_conv_path' function. */ +/* #undef HAVE_CYGWIN_CONV_PATH */ + +/* Define to 1 if you have the declaration of `ACE_GETACL', and to 0 if you + don't. */ +/* #undef HAVE_DECL_ACE_GETACL */ + +/* Define to 1 if you have the declaration of `ACE_GETACLCNT', and to 0 if you + don't. */ +/* #undef HAVE_DECL_ACE_GETACLCNT */ + +/* Define to 1 if you have the declaration of `ACE_SETACL', and to 0 if you + don't. */ +/* #undef HAVE_DECL_ACE_SETACL */ + +/* Define to 1 if you have the declaration of `ACL_SYNCHRONIZE', and to 0 if + you don't. */ +/* #undef HAVE_DECL_ACL_SYNCHRONIZE */ + +/* Define to 1 if you have the declaration of `ACL_TYPE_EXTENDED', and to 0 if + you don't. */ +/* #undef HAVE_DECL_ACL_TYPE_EXTENDED */ + +/* Define to 1 if you have the declaration of `ACL_TYPE_NFS4', and to 0 if you + don't. */ +/* #undef HAVE_DECL_ACL_TYPE_NFS4 */ + +/* Define to 1 if you have the declaration of `ACL_USER', and to 0 if you + don't. */ +/* #undef HAVE_DECL_ACL_USER */ + +/* Define to 1 if you have the declaration of `INT32_MAX', and to 0 if you + don't. */ +#define HAVE_DECL_INT32_MAX 1 + +/* Define to 1 if you have the declaration of `INT32_MIN', and to 0 if you + don't. */ +#define HAVE_DECL_INT32_MIN 1 + +/* Define to 1 if you have the declaration of `INT64_MAX', and to 0 if you + don't. */ +#define HAVE_DECL_INT64_MAX 1 + +/* Define to 1 if you have the declaration of `INT64_MIN', and to 0 if you + don't. */ +#define HAVE_DECL_INT64_MIN 1 + +/* Define to 1 if you have the declaration of `INTMAX_MAX', and to 0 if you + don't. */ +#define HAVE_DECL_INTMAX_MAX 1 + +/* Define to 1 if you have the declaration of `INTMAX_MIN', and to 0 if you + don't. */ +#define HAVE_DECL_INTMAX_MIN 1 + +/* Define to 1 if you have the declaration of `SETACL', and to 0 if you don't. + */ +/* #undef HAVE_DECL_SETACL */ + +/* Define to 1 if you have the declaration of `SIZE_MAX', and to 0 if you + don't. */ +#define HAVE_DECL_SIZE_MAX 1 + +/* Define to 1 if you have the declaration of `SSIZE_MAX', and to 0 if you + don't. */ +#define HAVE_DECL_SSIZE_MAX 1 + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 1 + +/* Define to 1 if you have the declaration of `UINT32_MAX', and to 0 if you + don't. */ +#define HAVE_DECL_UINT32_MAX 1 + +/* Define to 1 if you have the declaration of `UINT64_MAX', and to 0 if you + don't. */ +#define HAVE_DECL_UINT64_MAX 1 + +/* Define to 1 if you have the declaration of `UINTMAX_MAX', and to 0 if you + don't. */ +#define HAVE_DECL_UINTMAX_MAX 1 + +/* Define to 1 if you have the declaration of `XATTR_NOFOLLOW', and to 0 if + you don't. */ +/* #undef HAVE_DECL_XATTR_NOFOLLOW */ + +/* Define to 1 if you have the <direct.h> header file. */ +/* #undef HAVE_DIRECT_H */ + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the `dirfd' function. */ +#define HAVE_DIRFD 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if nl_langinfo supports D_MD_ORDER */ +/* #undef HAVE_D_MD_ORDER */ + +/* A possible errno value for invalid file format errors */ +#define HAVE_EFTYPE 1 + +/* A possible errno value for invalid file format errors */ +#define HAVE_EILSEQ 1 + +/* Define to 1 if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the <expat.h> header file. */ +/* #undef HAVE_EXPAT_H */ + +/* Define to 1 if you have the <ext2fs/ext2_fs.h> header file. */ +/* #undef HAVE_EXT2FS_EXT2_FS_H */ + +/* Define to 1 if you have the `extattr_get_file' function. */ +/* #undef HAVE_EXTATTR_GET_FILE */ + +/* Define to 1 if you have the `extattr_list_file' function. */ +/* #undef HAVE_EXTATTR_LIST_FILE */ + +/* Define to 1 if you have the `extattr_set_fd' function. */ +/* #undef HAVE_EXTATTR_SET_FD */ + +/* Define to 1 if you have the `extattr_set_file' function. */ +/* #undef HAVE_EXTATTR_SET_FILE */ + +/* Define to 1 if EXTATTR_NAMESPACE_USER is defined in sys/extattr.h. */ +/* #undef HAVE_DECL_EXTATTR_NAMESPACE_USER */ + +/* Define to 1 if you have the declaration of `GETACL', and to 0 if you don't. + */ +/* #undef HAVE_DECL_GETACL */ + +/* Define to 1 if you have the declaration of `GETACLCNT', and to 0 if you + don't. */ +/* #undef HAVE_DECL_GETACLCNT */ + +/* Define to 1 if you have the `fchdir' function. */ +#define HAVE_FCHDIR 1 + +/* Define to 1 if you have the `fchflags' function. */ +/* #undef HAVE_FCHFLAGS */ + +/* Define to 1 if you have the `fchmod' function. */ +#define HAVE_FCHMOD 1 + +/* Define to 1 if you have the `fchown' function. */ +#define HAVE_FCHOWN 1 + +/* Define to 1 if you have the `fcntl' function. */ +#define HAVE_FCNTL 1 + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fdopendir' function. */ +#define HAVE_FDOPENDIR 1 + +/* Define to 1 if you have the `fgetea' function. */ +/* #undef HAVE_FGETEA */ + +/* Define to 1 if you have the `fgetxattr' function. */ +/* #undef HAVE_FGETXATTR */ + +/* Define to 1 if you have the `flistea' function. */ +/* #undef HAVE_FLISTEA */ + +/* Define to 1 if you have the `flistxattr' function. */ +/* #undef HAVE_FLISTXATTR */ + +/* Define to 1 if you have the `fnmatch' function. */ +#define HAVE_FNMATCH 1 + +/* Define to 1 if you have the <fnmatch.h> header file. */ +#define HAVE_FNMATCH_H 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#define HAVE_FSEEKO 1 + +/* Define to 1 if you have the `fsetea' function. */ +/* #undef HAVE_FSETEA */ + +/* Define to 1 if you have the `fsetxattr' function. */ +/* #undef HAVE_FSETXATTR */ + +/* Define to 1 if you have the `fstat' function. */ +#define HAVE_FSTAT 1 + +/* Define to 1 if you have the `fstatat' function. */ +#define HAVE_FSTATAT 1 + +/* Define to 1 if you have the `fstatfs' function. */ +#define HAVE_FSTATFS 1 + +/* Define to 1 if you have the `fstatvfs' function. */ +#define HAVE_FSTATVFS 1 + +/* Define to 1 if you have the `ftruncate' function. */ +#define HAVE_FTRUNCATE 1 + +/* Define to 1 if you have the `futimens' function. */ +#define HAVE_FUTIMENS 1 + +/* Define to 1 if you have the `futimes' function. */ +#define HAVE_FUTIMES 1 + +/* Define to 1 if you have the `futimesat' function. */ +#define HAVE_FUTIMESAT 1 + +/* Define to 1 if you have the `getea' function. */ +/* #undef HAVE_GETEA */ + +/* Define to 1 if you have the `geteuid' function. */ +#define HAVE_GETEUID 1 + +/* Define to 1 if you have the `getgrgid_r' function. */ +#define HAVE_GETGRGID_R 1 + +/* Define to 1 if you have the `getgrnam_r' function. */ +#define HAVE_GETGRNAM_R 1 + +/* Define to 1 if you have the `getline' function. */ +#define HAVE_GETLINE 1 + +/* Define to 1 if you have the `getpid' function. */ +#define HAVE_GETPID 1 + +/* Define to 1 if you have the `getpwnam_r' function. */ +#define HAVE_GETPWNAM_R 1 + +/* Define to 1 if you have the `getpwuid_r' function. */ +#define HAVE_GETPWUID_R 1 + +/* Define to 1 if you have the `getvfsbyname' function. */ +/* #undef HAVE_GETVFSBYNAME */ + +/* Define to 1 if you have the `getxattr' function. */ +/* #undef HAVE_GETXATTR */ + +/* Define to 1 if you have the `gmtime_r' function. */ +#define HAVE_GMTIME_R 1 + +/* Define to 1 if you have the <grp.h> header file. */ +#define HAVE_GRP_H 1 + +/* Define to 1 if you have the `iconv' function. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the <iconv.h> header file. */ +#define HAVE_ICONV_H 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the <io.h> header file. */ +/* #undef HAVE_IO_H */ + +/* Define to 1 if you have the <langinfo.h> header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define to 1 if you have the `lchflags' function. */ +/* #undef HAVE_LCHFLAGS */ + +/* Define to 1 if you have the `lchmod' function. */ +#define HAVE_LCHMOD 1 + +/* Define to 1 if you have the `lchown' function. */ +#define HAVE_LCHOWN 1 + +/* Define to 1 if you have the `lgetea' function. */ +/* #undef HAVE_LGETEA */ + +/* Define to 1 if you have the `lgetxattr' function. */ +/* #undef HAVE_LGETXATTR */ + +/* Define to 1 if you have the `acl' library (-lacl). */ +/* #undef HAVE_LIBACL */ + +/* Define to 1 if you have the `attr' library (-lattr). */ +/* #undef HAVE_LIBATTR */ + +/* Define to 1 if you have the `bsdxml' library (-lbsdxml). */ +/* #undef HAVE_LIBBSDXML */ + +/* Define to 1 if you have the `bz2' library (-lbz2). */ +/* #undef HAVE_LIBBZ2 */ + +/* Define to 1 if you have the `b2' library (-lb2). */ +/* #undef HAVE_LIBB2 */ + +/* Define to 1 if you have the <blake2.h> header file. */ +/* #undef HAVE_BLAKE2_H */ + +/* Define to 1 if you have the `charset' library (-lcharset). */ +/* #undef HAVE_LIBCHARSET */ + +/* Define to 1 if you have the `crypto' library (-lcrypto). */ +/* #undef HAVE_LIBCRYPTO */ + +/* Define to 1 if you have the `expat' library (-lexpat). */ +/* #undef HAVE_LIBEXPAT */ + +/* Define to 1 if you have the `gcc' library (-lgcc). */ +/* #undef HAVE_LIBGCC */ + +/* Define to 1 if you have the `lz4' library (-llz4). */ +/* #undef HAVE_LIBLZ4 1 */ + +/* Define to 1 if you have the `lzma' library (-llzma). */ +/* #undef HAVE_LIBLZMA */ + +/* Define to 1 if you have the `lzmadec' library (-llzmadec). */ +/* #undef HAVE_LIBLZMADEC */ + +/* Define to 1 if you have the `lzo2' library (-llzo2). */ +/* #undef HAVE_LIBLZO2 */ + +/* Define to 1 if you have the `mbedcrypto' library (-lmbedcrypto). */ +/* #undef HAVE_LIBMBEDCRYPTO */ + +/* Define to 1 if you have the `nettle' library (-lnettle). */ +/* #undef HAVE_LIBNETTLE */ + +/* Define to 1 if you have the `pcre' library (-lpcre). */ +/* #undef HAVE_LIBPCRE */ + +/* Define to 1 if you have the `pcreposix' library (-lpcreposix). */ +/* #undef HAVE_LIBPCREPOSIX */ + +/* Define to 1 if you have the `pcre2-8' library (-lpcre2-8). */ +/* #undef HAVE_LIBPCRE2 */ + +/* Define to 1 if you have the `pcreposix' library (-lpcre2posix). */ +/* #undef HAVE_LIBPCRE2POSIX */ + +/* Define to 1 if you have the `xml2' library (-lxml2). */ +/* #undef HAVE_LIBXML2 */ + +/* Define to 1 if you have the <libxml/xmlreader.h> header file. */ +/* #undef HAVE_LIBXML_XMLREADER_H */ + +/* Define to 1 if you have the <libxml/xmlwriter.h> header file. */ +/* #undef HAVE_LIBXML_XMLWRITER_H */ + +/* Define to 1 if you have the `z' library (-lz). */ +/* #undef HAVE_LIBZ */ + +/* Define to 1 if you have the `zstd' library (-lzstd). */ +/* #undef HAVE_LIBZSTD */ + +/* Define to 1 if you have the ZSTD_compressStream function. */ +/* #undef HAVE_ZSTD_compressStream */ + +/* Define to 1 if you have the <limits.h> header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the `link' function. */ +#define HAVE_LINK 1 + +/* Define to 1 if you have the `linkat' function. */ +#define HAVE_LINKAT 1 + +/* Define to 1 if you have the <linux/fiemap.h> header file. */ +/* #undef HAVE_LINUX_FIEMAP_H */ + +/* Define to 1 if you have the <linux/fs.h> header file. */ +/* #undef HAVE_LINUX_FS_H */ + +/* Define to 1 if you have the <linux/magic.h> header file. */ +/* #undef HAVE_LINUX_MAGIC_H */ + +/* Define to 1 if you have the <linux/types.h> header file. */ +/* #undef HAVE_LINUX_TYPES_H */ + +/* Define to 1 if you have the `listea' function. */ +/* #undef HAVE_LISTEA */ + +/* Define to 1 if you have the `listxattr' function. */ +/* #undef HAVE_LISTXATTR */ + +/* Define to 1 if you have the `llistea' function. */ +/* #undef HAVE_LLISTEA */ + +/* Define to 1 if you have the `llistxattr' function. */ +/* #undef HAVE_LLISTXATTR */ + +/* Define to 1 if you have the <localcharset.h> header file. */ +/* #undef HAVE_LOCALCHARSET_H */ + +/* Define to 1 if you have the `locale_charset' function. */ +/* #undef HAVE_LOCALE_CHARSET */ + +/* Define to 1 if you have the <locale.h> header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `localtime_r' function. */ +#define HAVE_LOCALTIME 1 + +/* Define to 1 if the system has the type `long long int'. */ +#define HAVE_LONG_LONG_I 1 + +/* Define to 1 if you have the `lsetea' function. */ +/* #undef HAVE_LSETEA */ + +/* Define to 1 if you have the `lsetxattr' function. */ +/* #undef HAVE_LSETXATTR */ + +/* Define to 1 if you have the `lstat' function. */ +#define HAVE_LSTAT 1 + +/* Define to 1 if `lstat' has the bug that it succeeds when given the + zero-length file name argument. */ +/* #undef HAVE_LSTAT_EMPTY_STRING_BUG */ + +/* Define to 1 if you have the `lutimes' function. */ +#define HAVE_LUTIMES 1 + +/* Define to 1 if you have the <lz4hc.h> header file. */ +/* #undef HAVE_LZ4HC_H */ + +/* Define to 1 if you have the <lz4.h> header file. */ +/* #undef HAVE_LZ4_H */ + +/* Define to 1 if you have the <lzmadec.h> header file. */ +#ifdef CONFIG_UTILS_XZ +#define HAVE_LZMADEC 1 + +/* Define to 1 if you have the <lzma.h> header file. */ +#define HAVE_LZMA_H 1 + +/* Define to 1 if you have a working `lzma_stream_encoder_mt' function. */ +#define HAVE_LZMA_STREAM_ENCODER_ 1 +#endif + +/* Define to 1 if you have the <lzo/lzo1x.h> header file. */ +/* #undef HAVE_LZO_LZO1X_H */ + +/* Define to 1 if you have the <lzo/lzoconf.h> header file. */ +/* #undef HAVE_LZO_LZOCONF_H */ + +/* Define to 1 if you have the <mbedtls/aes.h> header file. */ +#ifdef CONFIG_CRYPTO_MBEDTLS +#define HAVE_MBEDTLS_AES 1 + +/* Define to 1 if you have the <mbedtls/md.h> header file. */ +#define HAVE_MBEDTLS_MD 1 + +/* Define to 1 if you have the <mbedtls/pkcs5.h> header file. */ +#define HAVE_MBEDTLS_PKCS5 1 +#endif + +/* Define to 1 if you have the `mbrtowc' function. */ +#define HAVE_MBRTOWC 1 + +/* Define to 1 if you have the <membership.h> header file. */ +/* #undef HAVE_MEMBERSHIP_H */ + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the <memory.h> header file. */ +/* #undef HAVE_MEMORY_H */ + +/* Define to 1 if you have the `mkdir' function. */ +#define HAVE_MKDIR 1 + +/* Define to 1 if you have the `mkfifo' function. */ +#define HAVE_MKFIFO 1 + +/* Define to 1 if you have the `mknod' function. */ +#define HAVE_MKNOD 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the <nettle/aes.h> header file. */ +/* #undef HAVE_NETTLE_AES_H */ + +/* Define to 1 if you have the <nettle/hmac.h> header file. */ +/* #undef HAVE_NETTLE_HMAC_H */ + +/* Define to 1 if you have the <nettle/md5.h> header file. */ +/* #undef HAVE_NETTLE_MD5_H */ + +/* Define to 1 if you have the <nettle/pbkdf2.h> header file. */ +/* #undef HAVE_NETTLE_PBKDF2_H */ + +/* Define to 1 if you have the <nettle/ripemd160.h> header file. */ +/* #undef HAVE_NETTLE_RIPEMD160_H */ + +/* Define to 1 if you have the <nettle/sha.h> header file. */ +/* #undef HAVE_NETTLE_SHA_H */ + +/* Define to 1 if you have the `nl_langinfo' function. */ +#define HAVE_NL_LANGINFO 1 + +/* Define to 1 if you have the `openat' function. */ +#define HAVE_OPENAT 1 + +/* Define to 1 if you have the <openssl/evp.h> header file. */ +/* #undef HAVE_OPENSSL_EVP_H */ + +/* Define to 1 if you have the <paths.h> header file. */ +/* #undef HAVE_PATHS_H */ + +/* Define to 1 if you have the <pcreposix.h> header file. */ +/* #undef HAVE_PCREPOSIX_H */ + +/* Define to 1 if you have the <pcre2posix.h> header file. */ +/* #undef HAVE_PCRE2POSIX_H */ + +/* Define to 1 if you have the `pipe' function. */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have the `PKCS5_PBKDF2_HMAC_SHA1' function. */ +/* #undef HAVE_PKCS5_PBKDF2_HMAC_SHA1 */ + +/* Define to 1 if you have the `poll' function. */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the <poll.h> header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the `posix_spawnp' function. */ +#define HAVE_POSIX_SPAWNP 1 + +/* Define to 1 if you have the <process.h> header file. */ +/* #undef HAVE_PROCESS_H */ + +/* Define to 1 if you have the <pthread.h> header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the <pwd.h> header file. */ +#define HAVE_PWD_H 1 + +/* Define to 1 if you have the `readdir_r' function. */ +/* #undef HAVE_READDIR_R */ + +/* Define to 1 if you have the `readlink' function. */ +#define HAVE_READLINK 1 + +/* Define to 1 if you have the `readlinkat' function. */ +#define HAVE_READLINKAT 1 + +/* Define to 1 if you have the `readpassphrase' function. */ +/* #undef HAVE_READPASSPHRASE */ + +/* Define to 1 if you have the <readpassphrase.h> header file. */ +/* #undef HAVE_READPASSPHRASE_H */ + +/* Define to 1 if you have the <regex.h> header file. */ +#define HAVE_REGEX_H 1 + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the <signal.h> header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the <spawn.h> header file. */ +#define HAVE_SPAWN_H 1 + +/* Define to 1 if you have the `statfs' function. */ +#define HAVE_STATFS 1 + +/* Define to 1 if you have the `statvfs' function. */ +#define HAVE_STATVFS 1 + +/* Define to 1 if `stat' has the bug that it succeeds when given the + zero-length file name argument. */ +/* #undef HAVE_STAT_EMPTY_STRING_BUG */ + +/* Define to 1 if you have the <stdarg.h> header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `strerror_r' function. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define to 1 if the system has the type `struct statfs'. */ +#define HAVE_STRUCT_STAT 1 + +/* Define to 1 if `f_iosize' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_IOSIZE */ + +/* Define to 1 if `f_namemax' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_NAMEMAX */ + +/* Define to 1 if `f_iosize' is a member of `struct statvfs'. */ +/* #undef HAVE_STRUCT_STATVFS_F_IOSIZE */ + +/* Define to 1 if `st_birthtime' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIME */ + +/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ + +/* Define to 1 if `st_blksize' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 + +/* Define to 1 if `st_flags' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_FLAGS */ + +/* Define to 1 if `st_mtimespec.tv_nsec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC */ + +/* Define to 1 if `st_mtime_n' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_MTIME_N */ + +/* Define to 1 if `st_mtime_usec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_MTIME_USEC */ + +/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 + +/* Define to 1 if `st_umtime' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_UMTIME */ + +/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */ +#define HAVE_STRUCT_TM_TM_GMTOFF 1 + +/* Define to 1 if `__tm_gmtoff' is a member of `struct tm'. */ +/* #undef HAVE_STRUCT_TM___TM_GMTOFF */ + +/* Define to 1 if you have `struct vfsconf'. */ +/* #undef HAVE_STRUCT_VFSCONF */ + +/* Define to 1 if you have `struct xvfsconf'. */ +/* #undef HAVE_STRUCT_XVFSCONF */ + +/* Define to 1 if you have the `symlink' function. */ +#define HAVE_SYMLINK 1 + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the <sys/acl.h> header file. */ +/* #undef HAVE_SYS_ACL_H */ + +/* Define to 1 if you have the <sys/cdefs.h> header file. */ +/* #undef HAVE_SYS_CDEFS_H */ + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the <sys/ea.h> header file. */ +/* #undef HAVE_SYS_EA_H */ + +/* Define to 1 if you have the <sys/extattr.h> header file. */ +/* #undef HAVE_SYS_EXTATTR_H */ + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/mkdev.h> header file. */ +/* #undef HAVE_SYS_MKDEV_H */ + +/* Define to 1 if you have the <sys/mount.h> header file. */ +#define HAVE_SYS_MOUNT_H 1 + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/poll.h> header file. */ +#define HAVE_SYS_POLL_H 1 + +/* Define to 1 if you have the <sys/richacl.h> header file. */ +/* #undef HAVE_SYS_RICHACL_H */ + +/* Define to 1 if you have the <sys/select.h> header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the <sys/statfs.h> header file. */ +#define HAVE_SYS_STATFS_H 1 + +/* Define to 1 if you have the <sys/statvfs.h> header file. */ +#define HAVE_SYS_STATVFS_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + + +/* Define to 1 if you have the <sys/sysmacros.h> header file. */ +#define HAVE_SYS_SYSMACROS_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <sys/utime.h> header file. */ +/* #undef HAVE_SYS_UTIME_H */ + +/* Define to 1 if you have the <sys/utsname.h> header file. */ +#define HAVE_SYS_UTSNAME_H 1 + +/* Define to 1 if you have the <sys/vfs.h> header file. */ +#define HAVE_SYS_VFS_H 1 + +/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the <sys/xattr.h> header file. */ +/* #undef HAVE_SYS_XATTR_H */ + +/* Define to 1 if you have the `timegm' function. */ +#define HAVE_TIMEGM 1 + +/* Define to 1 if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the `tzset' function. */ +#define HAVE_TZSET 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unlinkat' function. */ +#define HAVE_UNLINKAT 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if the system has the type `unsigned long long'. */ +#define HAVE_UNSIGNED_LONG_LO 1 + +/* Define to 1 if the system has the type `unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_I 1 + +/* Define to 1 if you have the `utime' function. */ +#define HAVE_UTIME 1 + +/* Define to 1 if you have the `utimensat' function. */ +#define HAVE_UTIMENSAT 1 + +/* Define to 1 if you have the `utimes' function. */ +#define HAVE_UTIMES 1 + +/* Define to 1 if you have the <utime.h> header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the <wchar.h> header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if the system has the type `wchar_t'. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the `wcrtomb' function. */ +#define HAVE_WCRTOMB 1 + +/* Define to 1 if you have the `wcscmp' function. */ +#define HAVE_WCSCMP 1 + +/* Define to 1 if you have the `wcscpy' function. */ +#define HAVE_WCSCPY 1 + +/* Define to 1 if you have the `wcslen' function. */ +#define HAVE_WCSLEN 1 + +/* Define to 1 if you have the `wctomb' function. */ +#define HAVE_WCTOMB 1 + +/* Define to 1 if you have the <wctype.h> header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define to 1 if you have the <wincrypt.h> header file. */ +/* #undef HAVE_WINCRYPT_H */ + +/* Define to 1 if you have the <windows.h> header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the <winioctl.h> header file. */ +/* #undef HAVE_WINIOCTL_H */ + +/* Define to 1 if you have _CrtSetReportMode in <crtdbg.h> */ +/* #undef HAVE__CrtSetReportMode */ + +/* Define to 1 if you have the `wmemcmp' function. */ +#define HAVE_WMEMCMP 1 + +/* Define to 1 if you have the `wmemcpy' function. */ +#define HAVE_WMEMCPY 1 + +/* Define to 1 if you have the `wmemmove' function. */ +#define HAVE_WMEMMOVE 1 + +/* Define to 1 if you have a working EXT2_IOC_GETFLAGS */ +/* #undef HAVE_WORKING_EXT2_IOC_GETFLAGS */ + +/* Define to 1 if you have a working FS_IOC_GETFLAGS */ +/* #undef HAVE_WORKING_FS_IOC_GETFLAGS */ + +/* Define to 1 if you have the <zlib.h> header file. */ +#ifdef CONFIG_LIB_ZLIB +#define HAVE_ZLIB_H 1 +#endif + +/* Define to 1 if you have the <zstd.h> header file. */ +/* #undef HAVE_ZSTD_H */ + +/* Define to 1 if you have the `ctime_s' function. */ +/* #undef HAVE_CTIME_S */ + +/* Define to 1 if you have the `_fseeki64' function. */ +/* #undef HAVE__FSEEKI64 */ + +/* Define to 1 if you have the `_get_timezone' function. */ +/* #undef HAVE__GET_TIMEZONE */ + +/* Define to 1 if you have the `gmtime_s' function. */ +/* #undef HAVE_GMTIME_S */ + +/* Define to 1 if you have the `localtime_s' function. */ +/* #undef HAVE_LOCALTIME_S */ + +/* Define to 1 if you have the `_mkgmtime' function. */ +/* #undef HAVE__MKGMTIME */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Version number of libarchive as a single integer */ +#define LIBARCHIVE_VERSION_NUMBER "3008000" + +/* Version number of libarchive */ +#define LIBARCHIVE_VERSION_STRING "3.8.0" + +/* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ + +/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>. + */ +/* #undef MAJOR_IN_MKDEV */ + +/* Define to 1 if `major', `minor', and `makedev' are declared in + <sysmacros.h>. */ +#define MAJOR_IN_SYSMACROS 1 + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* The size of `wchar_t', as computed by sizeof. */ +#define SIZEOF_WCHAR_T sizeof(wchar_t) + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#define TIME_WITH_SYS_TIME 1 + +/* + * Some platform requires a macro to use extension functions. + */ +#define SAFE_TO_DEFINE_EXTENSIONS 1 +#ifdef SAFE_TO_DEFINE_EXTENSIONS +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +#define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +#define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +#define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +#define __EXTENSIONS__ 1 +#endif +#endif /* SAFE_TO_DEFINE_EXTENSIONS */ + +/* Version number of package */ +#define VERSION "3.8.0" + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +/* #undef _LARGEFILE_SOURCE */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to control Windows SDK version */ +#ifndef NTDDI_VERSION +/* #undef NTDDI_VERSION */ +#endif // NTDDI_VERSION + +#ifndef _WIN32_WINNT +/* #undef _WIN32_WINNT */ +#endif // _WIN32_WINNT + +#ifndef WINVER +/* #undef WINVER */ +#endif // WINVER + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `int' if <sys/types.h> doesn't define. */ +/* #undef gid_t */ + +/* Define to `unsigned long' if <sys/types.h> does not define. */ +/* #undef id_t */ + +/* Define to `int' if <sys/types.h> does not define. */ +/* #undef mode_t */ + +/* Define to `long long' if <sys/types.h> does not define. */ +/* #undef off_t */ + +/* Define to `int' if <sys/types.h> doesn't define. */ +/* #undef pid_t */ + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef size_t */ + +/* Define to `int' if <sys/types.h> does not define. */ +/* #undef ssize_t */ + +/* Define to `int' if <sys/types.h> doesn't define. */ +/* #undef uid_t */ + +/* Define to `int' if <sys/types.h> does not define. */ +/* #undef intptr_t */ + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef uintptr_t */
