(struct directory.contents, flags): New members
(nfs,found,new): Remove. Replaced by appropriate bitmask values in
`flags' field. All uses updated.
(directory_meta_table): New table.
(hash_directory): Rename to hash_directory_name
(compare_directories): Rename to compare_directory_names
(hash_directory_meta,compare_directory_meta,find_directory_meta):
New functions
(compare_dirents): Removed
(note_directory): Get 7th argument: directory contents.
All callers updated
(dumpdir_locate,makedumpdir): New functions
(scan_directory): Rewritten. Use makedumpdir to create a sorted
dumpdir array. This makes the obstack argument unnecessary. Besides,
ALL_CHILDREN flag is set only for new directories.
(procdir): Change return type to struct directory. Return
immediately if the directory was already initialized. Discover
directory renames using directory_meta_table.
(append_incremental_renames): New function.
(read_directory_file, write_directory_file): Use new snapshot file
format.
(directory.new): New member
(note_directory,find_directory: Use make_directory to create
struct directory entries
(procdir): Avoid duplicating directories in the incremental
backup map.
Sort the two lines of stderr from the
first `tar -v --listed-incremental'. They would come out
reversed and provoke a test failure on a tmpfs
file system.
Paul Eggert [Wed, 8 Mar 2006 00:55:56 +0000 (00:55 +0000)]
* src/buffer.c (record_buffer_aligned): New var.
(init_buffer): Use it to ensure that the buffer is aligned.
This doesn't result in any measurable performance improvement
on my host (Debian GNU/Linux 3.1 stable, with default block size),
but I assume it does help on some hosts.
Paul Eggert [Tue, 21 Feb 2006 05:55:28 +0000 (05:55 +0000)]
* tests/multiv04.at (split directory members in a MV archive):
Don't use %X in an awk printf format; this doesn't work with
Solaris 10 /usr/bin/awk. Use %x instead.
Paul Eggert [Mon, 20 Feb 2006 08:15:31 +0000 (08:15 +0000)]
Avoid installation glitches on Solaris 8 with Sun C 5.4.
* lib/.cvsignore: Add system-ioctl.h.
* lib/Makefile.tmpl (noinst_HEADERS): Add system-ioctl.h.
* src/buffer.c: Include system-ioctl.h.
* src/compare.c: Likewise.
* src/delete.c: Likewise.
* src/system.c: Include <getline.h>, <setenv.h>.
* src/tar.c: Include <getline.h>.
Paul Eggert [Tue, 7 Feb 2006 23:51:37 +0000 (23:51 +0000)]
* gnulib.modules: Add closeout, exitfial.
* lib/.cvsignore: Add __fpending.c, __fpending.h, closeout.c,
closeout.h.
* src/buffer.c: Incluse closeout.h.
(_open_archive): Use freopen rather than fopen, so
that stdlis is always either stdout or stderr. Use
close_stdout_set_file_name to report its name.
* src/tar.c: Include closeout.h and exitfail.h.
(parse_opt, usage): Call close_stdout as appropriate, to check for
write errors.
(decode_options): Exit with status TAREXIT_FAILURE, not 1.
(main): Set exit_failure, to exit with proper status on memory
allocation failure and the like.
Use close_stdout rather than rolling our own test.
Paul Eggert [Tue, 7 Feb 2006 22:18:36 +0000 (22:18 +0000)]
* NEWS: --version now outputs copyright etc., to conform to the
GNU coding standards. Remove --license.
* gnulib.modules: Add version-etc-fsf.
* doc/tar.texi: Document the change.
* lib/.cvsignore: Add version-etc-fsf.c, version-etc.c, version-etc.h.
* scripts/Makefile.am (SED_CMD): Update PAKCAGE_NAME, not PACKAGE.
* scripts/backup.in: Remove --license. Change --version to conform
to GCS.
* scripts/restore.in: Likewise.
* scripts/backup.sh.in (license): Output briefer license in the
style of coreutils, for consistency with other changes.
* src/tar.c: Include <version-etc.h>.
(LICENSE_OPTION): Remove.
(options): Remove --license.
(license): Remove.
(parse_opt): Use version_etc instead of rolling it ourselves.
Remove --license.
* tests/version.at (tar --version): Check only the first line of
output.
(list_archive): Use is_dumpdir
Do not wrap skip_member in mv_begin/mv_end, the function itself
takes care of it.
(decode_header): Set stat_info->is_dumpdir
(skip_member): Do nothing if skipped is true