diff options
author | Matt Turner <mattst88@gmail.com> | 2019-07-23 13:48:29 -0700 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-07-24 09:16:16 +0200 |
commit | 05a30292f9d2be63af3b4c27d5ae89801da602a2 (patch) | |
tree | f9f596d38b05889dbcb83f9df5c9bcda7dbe48c5 /lib | |
parent | d6f15cb9b054ed76b5bee2e6924d4b0b2a5e52ae (diff) |
Enable largefile support
Requires that config.h be included before other headers, since the macro
_FILE_OFFSET_BITS changes the definitions of things like 'struct stat'.
I chose to simply include it at the top of every C file and at
immediately after the double-inclusion guards of every header.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
58 files changed, 115 insertions, 0 deletions
diff --git a/lib/comp/compressor.c b/lib/comp/compressor.c index b92462e..ce88bdd 100644 --- a/lib/comp/compressor.c +++ b/lib/comp/compressor.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <string.h> #include <stdlib.h> #include <stdio.h> diff --git a/lib/comp/gzip.c b/lib/comp/gzip.c index 379a231..f974341 100644 --- a/lib/comp/gzip.c +++ b/lib/comp/gzip.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <stdbool.h> #include <stdlib.h> #include <string.h> diff --git a/lib/comp/internal.h b/lib/comp/internal.h index 0185f4d..f5bf956 100644 --- a/lib/comp/internal.h +++ b/lib/comp/internal.h @@ -2,6 +2,8 @@ #ifndef INTERNAL_H #define INTERNAL_H +#include "config.h" + #include "compress.h" int generic_write_options(int fd, const void *data, size_t size); diff --git a/lib/comp/lz4.c b/lib/comp/lz4.c index e0bba9c..2dafea3 100644 --- a/lib/comp/lz4.c +++ b/lib/comp/lz4.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <stdbool.h> #include <stdlib.h> #include <string.h> diff --git a/lib/comp/lzo.c b/lib/comp/lzo.c index 09d05ea..5443d7d 100644 --- a/lib/comp/lzo.c +++ b/lib/comp/lzo.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <stdbool.h> #include <stdlib.h> #include <string.h> diff --git a/lib/comp/xz.c b/lib/comp/xz.c index b0a07ab..330441c 100644 --- a/lib/comp/xz.c +++ b/lib/comp/xz.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <stdbool.h> #include <stdlib.h> #include <string.h> diff --git a/lib/comp/zstd.c b/lib/comp/zstd.c index 2868cbf..bc94b2d 100644 --- a/lib/comp/zstd.c +++ b/lib/comp/zstd.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <stdbool.h> #include <stdlib.h> #include <string.h> diff --git a/lib/fstree/add_by_path.c b/lib/fstree/add_by_path.c index 7e0a4ce..8983722 100644 --- a/lib/fstree/add_by_path.c +++ b/lib/fstree/add_by_path.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <string.h> diff --git a/lib/fstree/fstree.c b/lib/fstree/fstree.c index 29dd66b..11a1dd1 100644 --- a/lib/fstree/fstree.c +++ b/lib/fstree/fstree.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <string.h> diff --git a/lib/fstree/fstree_from_dir.c b/lib/fstree/fstree_from_dir.c index ad75006..2343fef 100644 --- a/lib/fstree/fstree_from_dir.c +++ b/lib/fstree/fstree_from_dir.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include "util.h" diff --git a/lib/fstree/fstree_from_file.c b/lib/fstree/fstree_from_file.c index 91a922b..74d79ae 100644 --- a/lib/fstree/fstree_from_file.c +++ b/lib/fstree/fstree_from_file.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include "util.h" diff --git a/lib/fstree/fstree_sort.c b/lib/fstree/fstree_sort.c index cd01235..a38e2a6 100644 --- a/lib/fstree/fstree_sort.c +++ b/lib/fstree/fstree_sort.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <string.h> diff --git a/lib/fstree/gen_inode_table.c b/lib/fstree/gen_inode_table.c index 2782c6d..15ef577 100644 --- a/lib/fstree/gen_inode_table.c +++ b/lib/fstree/gen_inode_table.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <stdlib.h> diff --git a/lib/fstree/get_path.c b/lib/fstree/get_path.c index 4b6f61e..e11af3d 100644 --- a/lib/fstree/get_path.c +++ b/lib/fstree/get_path.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <string.h> diff --git a/lib/fstree/mknode.c b/lib/fstree/mknode.c index 7d09fbd..ea0d0aa 100644 --- a/lib/fstree/mknode.c +++ b/lib/fstree/mknode.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <string.h> diff --git a/lib/fstree/node_from_path.c b/lib/fstree/node_from_path.c index e617059..122e106 100644 --- a/lib/fstree/node_from_path.c +++ b/lib/fstree/node_from_path.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <string.h> diff --git a/lib/fstree/node_stat.c b/lib/fstree/node_stat.c index a28cae8..4c3afe6 100644 --- a/lib/fstree/node_stat.c +++ b/lib/fstree/node_stat.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <string.h> diff --git a/lib/fstree/selinux.c b/lib/fstree/selinux.c index ceaac06..23ce828 100644 --- a/lib/fstree/selinux.c +++ b/lib/fstree/selinux.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <selinux/selinux.h> diff --git a/lib/fstree/xattr.c b/lib/fstree/xattr.c index 2ce39f4..35517de 100644 --- a/lib/fstree/xattr.c +++ b/lib/fstree/xattr.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "fstree.h" #include <stdlib.h> diff --git a/lib/sqfs/data_reader.c b/lib/sqfs/data_reader.c index 7136425..4fbd97a 100644 --- a/lib/sqfs/data_reader.c +++ b/lib/sqfs/data_reader.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "data_reader.h" #include "frag_reader.h" #include "util.h" diff --git a/lib/sqfs/data_writer.c b/lib/sqfs/data_writer.c index 64e27fa..74701fd 100644 --- a/lib/sqfs/data_writer.c +++ b/lib/sqfs/data_writer.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "data_writer.h" #include "highlevel.h" #include "util.h" diff --git a/lib/sqfs/deserialize_fstree.c b/lib/sqfs/deserialize_fstree.c index bc1d6e4..98444ac 100644 --- a/lib/sqfs/deserialize_fstree.c +++ b/lib/sqfs/deserialize_fstree.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_reader.h" #include "highlevel.h" diff --git a/lib/sqfs/frag_reader.c b/lib/sqfs/frag_reader.c index b8991b3..87e4c35 100644 --- a/lib/sqfs/frag_reader.c +++ b/lib/sqfs/frag_reader.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_reader.h" #include "frag_reader.h" #include "util.h" diff --git a/lib/sqfs/id_table.c b/lib/sqfs/id_table.c index cd31360..b4abd0c 100644 --- a/lib/sqfs/id_table.c +++ b/lib/sqfs/id_table.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "id_table.h" #include <stdlib.h> diff --git a/lib/sqfs/id_table_read.c b/lib/sqfs/id_table_read.c index e13f3b1..7147f2e 100644 --- a/lib/sqfs/id_table_read.c +++ b/lib/sqfs/id_table_read.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_reader.h" #include "highlevel.h" #include "util.h" diff --git a/lib/sqfs/id_table_write.c b/lib/sqfs/id_table_write.c index c11895d..c2ed353 100644 --- a/lib/sqfs/id_table_write.c +++ b/lib/sqfs/id_table_write.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "highlevel.h" int id_table_write(id_table_t *tbl, int outfd, sqfs_super_t *super, diff --git a/lib/sqfs/meta_reader.c b/lib/sqfs/meta_reader.c index c85d063..96b59fd 100644 --- a/lib/sqfs/meta_reader.c +++ b/lib/sqfs/meta_reader.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_reader.h" #include "util.h" diff --git a/lib/sqfs/meta_writer.c b/lib/sqfs/meta_writer.c index d55af3d..7b7ee84 100644 --- a/lib/sqfs/meta_writer.c +++ b/lib/sqfs/meta_writer.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_writer.h" #include "squashfs.h" #include "util.h" diff --git a/lib/sqfs/read_inode.c b/lib/sqfs/read_inode.c index 8230138..22eaa0b 100644 --- a/lib/sqfs/read_inode.c +++ b/lib/sqfs/read_inode.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_reader.h" #include <sys/stat.h> diff --git a/lib/sqfs/read_super.c b/lib/sqfs/read_super.c index 8c43fe0..1a84ff9 100644 --- a/lib/sqfs/read_super.c +++ b/lib/sqfs/read_super.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "squashfs.h" #include "util.h" diff --git a/lib/sqfs/readdir.c b/lib/sqfs/readdir.c index 71beedc..d078719 100644 --- a/lib/sqfs/readdir.c +++ b/lib/sqfs/readdir.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_reader.h" #include <stdlib.h> diff --git a/lib/sqfs/serialize_fstree.c b/lib/sqfs/serialize_fstree.c index d786244..bd889a5 100644 --- a/lib/sqfs/serialize_fstree.c +++ b/lib/sqfs/serialize_fstree.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_writer.h" #include "highlevel.h" #include "util.h" diff --git a/lib/sqfs/super.c b/lib/sqfs/super.c index 59eb366..d90e6ea 100644 --- a/lib/sqfs/super.c +++ b/lib/sqfs/super.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "squashfs.h" #include "util.h" diff --git a/lib/sqfs/table.c b/lib/sqfs/table.c index 81e7691..fc90a3f 100644 --- a/lib/sqfs/table.c +++ b/lib/sqfs/table.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_writer.h" #include "highlevel.h" #include "util.h" diff --git a/lib/sqfs/tree_node_from_inode.c b/lib/sqfs/tree_node_from_inode.c index 1ee85e5..f35c046 100644 --- a/lib/sqfs/tree_node_from_inode.c +++ b/lib/sqfs/tree_node_from_inode.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "highlevel.h" #include <stdlib.h> diff --git a/lib/sqfs/write_dir.c b/lib/sqfs/write_dir.c index 909e0bb..8015f31 100644 --- a/lib/sqfs/write_dir.c +++ b/lib/sqfs/write_dir.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_writer.h" #include "util.h" diff --git a/lib/sqfs/write_export_table.c b/lib/sqfs/write_export_table.c index 2815cc2..a0d81eb 100644 --- a/lib/sqfs/write_export_table.c +++ b/lib/sqfs/write_export_table.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "highlevel.h" #include <stdlib.h> diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c index 6e11277..7cef7a7 100644 --- a/lib/sqfs/write_inode.c +++ b/lib/sqfs/write_inode.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_writer.h" #include "util.h" diff --git a/lib/sqfs/write_xattr.c b/lib/sqfs/write_xattr.c index 33b0521..4cc3eea 100644 --- a/lib/sqfs/write_xattr.c +++ b/lib/sqfs/write_xattr.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "meta_writer.h" #include "highlevel.h" #include "util.h" diff --git a/lib/tar/base64.c b/lib/tar/base64.c index 313e9f4..89b7afa 100644 --- a/lib/tar/base64.c +++ b/lib/tar/base64.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "internal.h" static uint8_t convert(char in) diff --git a/lib/tar/checksum.c b/lib/tar/checksum.c index af94ab4..b3cef88 100644 --- a/lib/tar/checksum.c +++ b/lib/tar/checksum.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "internal.h" static unsigned int get_checksum(const tar_header_t *hdr) diff --git a/lib/tar/cleanup.c b/lib/tar/cleanup.c index a34c28b..ed62c0a 100644 --- a/lib/tar/cleanup.c +++ b/lib/tar/cleanup.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "internal.h" void free_sparse_list(sparse_map_t *sparse) diff --git a/lib/tar/internal.h b/lib/tar/internal.h index 04a97d3..8a3a9c5 100644 --- a/lib/tar/internal.h +++ b/lib/tar/internal.h @@ -2,6 +2,8 @@ #ifndef INTERNAL_H #define INTERNAL_H +#include "config.h" + #include "util.h" #include "tar.h" diff --git a/lib/tar/number.c b/lib/tar/number.c index 009a4de..f80532b 100644 --- a/lib/tar/number.c +++ b/lib/tar/number.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "internal.h" int read_octal(const char *str, int digits, uint64_t *out) diff --git a/lib/tar/read_header.c b/lib/tar/read_header.c index 1769e0a..4843bb5 100644 --- a/lib/tar/read_header.c +++ b/lib/tar/read_header.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "internal.h" static bool is_zero_block(const tar_header_t *hdr) diff --git a/lib/tar/read_sparse_map.c b/lib/tar/read_sparse_map.c index 77876f5..a1526c4 100644 --- a/lib/tar/read_sparse_map.c +++ b/lib/tar/read_sparse_map.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "internal.h" sparse_map_t *read_sparse_map(const char *line) diff --git a/lib/tar/read_sparse_map_old.c b/lib/tar/read_sparse_map_old.c index 41d309a..2784640 100644 --- a/lib/tar/read_sparse_map_old.c +++ b/lib/tar/read_sparse_map_old.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "internal.h" sparse_map_t *read_gnu_old_sparse(int fd, tar_header_t *hdr) diff --git a/lib/tar/skip.c b/lib/tar/skip.c index 28c02be..94d3e5d 100644 --- a/lib/tar/skip.c +++ b/lib/tar/skip.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "util.h" #include "tar.h" diff --git a/lib/tar/urldecode.c b/lib/tar/urldecode.c index ac03f10..6bbecec 100644 --- a/lib/tar/urldecode.c +++ b/lib/tar/urldecode.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "internal.h" static int xdigit(int x) diff --git a/lib/tar/write_header.c b/lib/tar/write_header.c index caddc97..19b00bd 100644 --- a/lib/tar/write_header.c +++ b/lib/tar/write_header.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "internal.h" static void write_binary(char *dst, uint64_t value, int digits) diff --git a/lib/util/canonicalize_name.c b/lib/util/canonicalize_name.c index 57e4d66..f696432 100644 --- a/lib/util/canonicalize_name.c +++ b/lib/util/canonicalize_name.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "util.h" static void normalize_slashes(char *filename) diff --git a/lib/util/dirstack.c b/lib/util/dirstack.c index 7bfd1a2..6949749 100644 --- a/lib/util/dirstack.c +++ b/lib/util/dirstack.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <sys/types.h> #include <sys/stat.h> #include <string.h> diff --git a/lib/util/mkdir_p.c b/lib/util/mkdir_p.c index 7d1e052..867933b 100644 --- a/lib/util/mkdir_p.c +++ b/lib/util/mkdir_p.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <sys/types.h> #include <sys/stat.h> #include <string.h> diff --git a/lib/util/padd_file.c b/lib/util/padd_file.c index 2f1ea9a..0ac19a9 100644 --- a/lib/util/padd_file.c +++ b/lib/util/padd_file.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "util.h" #include <stdlib.h> diff --git a/lib/util/print_version.c b/lib/util/print_version.c index 7d1b91a..7b0965b 100644 --- a/lib/util/print_version.c +++ b/lib/util/print_version.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ #include "config.h" + #include "util.h" #include <stdio.h> diff --git a/lib/util/read_data.c b/lib/util/read_data.c index 43f8da8..802baf4 100644 --- a/lib/util/read_data.c +++ b/lib/util/read_data.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <unistd.h> #include <errno.h> #include <stdio.h> diff --git a/lib/util/str_table.c b/lib/util/str_table.c index 72579ce..b6eb27c 100644 --- a/lib/util/str_table.c +++ b/lib/util/str_table.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <stdint.h> #include <stdlib.h> #include <string.h> diff --git a/lib/util/write_data.c b/lib/util/write_data.c index 82f3aca..4396138 100644 --- a/lib/util/write_data.c +++ b/lib/util/write_data.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include <unistd.h> #include <errno.h> #include <stdio.h> |