]> git.ipfire.org Git - thirdparty/tar.git/commit
Use Gnulib’s same-inode module
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Aug 2025 23:10:49 +0000 (16:10 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Aug 2025 17:27:28 +0000 (10:27 -0700)
commitbdc442bd5c2cb573c57a46b36f2cdfd0daf52c55
treedb5108ec43a3cf2a518b787dd86c790740d1abc8
parent5402831d627f27ff5d9dbb4bf83284eb86130d0b
Use Gnulib’s same-inode module

This is more portable to non-POSIX systems.
However, don’t bother trying to port to systems
where st_ino is not a scalar of type dev_t,
as these systems no longer seem to be active targets
and it’s not worth the maintenance hassle.
* gnulib.modules: Add same-inode, now that we use it
explicitly rather than indirectly.
* src/compare.c (diff_link):
* src/create.c (compare_links, restore_parent_fd):
* src/incremen.c (compare_directory_meta, procdir):
* src/extract.c (dl_compare, repair_delayed_set_stat)
(apply_nonancestor_delayed_set_stat, extract_link)
(apply_delayed_link):
* src/names.c (add_file_id):
* src/system.c (sys_file_is_archive, sys_detect_dev_null_output):
Include same-inode.h, and prefer its macros and functions
to doing things by hand.
* src/create.c (struct link):
* src/extract.c (struct delayed_set_stat, struct delayed_link):
* src/incremen.c (struct directory):
* src/names.c (struct file_id_list):
Rename members to st_dev and st_ino so that SAME_INODE and
PSAME_INODE can be used on the type.  All uses changed.
* src/system.c (sys_compare_links): Remove.
All uses replaced by psame_inode.
gnulib.modules
src/common.h
src/compare.c
src/create.c
src/extract.c
src/incremen.c
src/names.c
src/system.c