(xheader_init): New function
(xheader_decode_global,xheader_store,xheader_read)
(xheader_write_global,xheader_write,xheader_string_begin)
(xheader_string_add,xheader_string_end): Take xhdr as first
argument.
(buffer_write_global_xheader): New function
(struct xheader): Move definition to tar.h
(extended_header): Remove global
(xheader_init): New function
(xheader_decode_global,xheader_store,xheader_read)
(xheader_write_global,xheader_write,xheader_string_begin)
(xheader_string_add,xheader_string_end): Take xhdr as first
argument.
(extract_link, extract_symlink): Use
transform_member_name instead of safer_name_suffix so that
--transform and --strip-components affect links as well.
(struct exclude_tag): rename to exclusion_tag
(check_exclusion_tags): New function
(cachedir_file_p): New function (from check_cache_directory)
(dump_dir0,dump_file0): Use check_exclusion_tags
(exclude_caches_option): Remove
(enum exclusion_tag_type): New data type
(add_exclude_tag): Rename to add_exclusion_tag
(cachedir_file_p): New prototype
(diff_dumpdir): Compare directory contents using
dumpdir_cmp. Do not free dumpdir_buffer, it will leave the
incremental directory table in the inconsistent state and trigger
full dump.
(read_and_process): Process dumpdirs no matter what the archive
format.
Paul Eggert [Tue, 12 Dec 2006 23:56:24 +0000 (23:56 +0000)]
Port to Forte Developer 7 C 5.4 and C99.
* src/common.h (add_exclude_tag): Add decl; C99 requires this
and Forte warns about it.
* src/incremen.c: Include <mkdtemp.h> for mkdtemp prototype,
for same reason.
* src/misc.c (get_max_open_files): Rewrite to avoid code that
Forte C complains about as being unreachable.
* src/xheader.c (mtime_code): Rewrite to avoid Forte error
reported by Trond Hasle Amundsen.
Paul Eggert [Mon, 4 Dec 2006 21:35:56 +0000 (21:35 +0000)]
* NEWS: Fix some race conditions with tar -x --same-owner.
* src/extract.c (ARCHIVED_PERMSTATS): Add a comment saying that
S_IRWXG | S_IRWXO might be masked out.
(set_mode): Set the mode if some bits were masked out originally.
(set_stat): Don't chmod before chown, as that might temporarily
grant permissions that we don't want to grant. The chmod was
there only to work around broken hosts, so add a comment advising
users not to use those broken hosts instead.
(repair_delayed_set_stat, extract_dir):
Remember to mask out current umask before inverting permissions.
(extract_dir): If the owner might change, or if the mode has
special bits, create the directory 700 at first, but restore it later.
(open_output_file): New arg mode; all uses changed.
(extract_file, extract_node, extract_fifo): If the owner might
change, omit group and other bits at first, but restore them after
changing the owner.
Paul Eggert [Thu, 30 Nov 2006 00:14:10 +0000 (00:14 +0000)]
Port to latest gnulib. There were a lot of changes, so the
simplest way to get this up and running was to switch to coreutils
bootstrap procedure. I noticed one feature missing after this
merge: the ability to update a single .po file. I can add that
later if need be.
* README-cvs, bootstrap.conf: New files.
* lib/.cvsignore: Remove Makefile.am, printf-parse.c, vasnprintf.c.
* lib/printf-parse.c, lib/vasnprintf.c: New files, from coreutils,
to override gnulib, so that we don't need xsize.h.
* bootstrap: Replace with coreutils bootstrap, except add support
for paxutils.
* configure.ac (gl_USE_SYSTEM_EXTENSIONS): Remove, as gl_EARLY now
does this.
(gl_EARLY, gl_INIT): Add.
(tar_GNULIB): Remove.
* gnulib.modules: Add configmake.
* lib/Makefile.tmpl: Remove, replacing with....
* lib/Makefile.am: New file.
* src/Makefile.am (tar.o): Remove dependency: Automake does this
for us.
* src/tar.c: Include <configmake.h> and <rmt-command.h>, not
<localedir.h>.