1 2005-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
3 * src/tar.c (decode_options): Report error if -A or -r is used
4 together with compression option.
6 2005-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
8 * doc/tar.texi: Use @option and @kbd consistently.
11 2005-09-28 Sergey Poznyakoff <gray@gnu.org.ua>
14 * src/common.h (show_stored_names_option): New variable
15 * src/list.c (print_header): If show_stored_names_option is given,
16 list member names as stored in the archive. Patch proposed by Erik
17 Cumps <erik.cumps@icos.be>
18 * src/tar.c: Implement --show-stored-names option
20 * src/common.h (test_label_option): New variable;
21 * src/list.c (print_header): Special handling if test_label_option
23 * src/names.c (all_names_found): If test_label_option is set
25 * src/tar.c: New option --test-label tests the archive volume
26 label. The option proposed by Wouter Verhelst <wouter@nixsys.be>
28 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
30 * tests/Makefile.am (clean-local): Don't attempt to run
31 $(TESTSUITE) if it doesn't exist. Problem reported by
34 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
36 Don't filter time stamps through the resolution supported
37 by struct stat; keep them to full nanosecond resolution.
38 This affects behavior only on older hosts or file systems
39 that have lower-resolution time stamps.
40 * src/common.h (OLDER_STAT_TIME): Parenthesize arg.
41 (OLDER_TAR_STAT_TIME): New macro.
42 (code_timespec): New function.
43 (BILLION, LOG10_BILLION, TIMESPEC_STRSIZE_BOUND): New constants.
44 * src/compare.c (diff_file): Use full time stamp resolution.
45 * src/create.c (start_header, dump_file0): Likewise.
46 (start_header, dump_file0): Adjust to new structure layout.
47 (dump_regular_finish): Simplify by using timespec_cmp.
48 * src/extract.c (struct delayed_set_stat): Don't store stat info
49 that we don't need, to save space. All uses changed.
50 (struct delayed_set_stat, struct delayed_link, file_newer_p):
51 (create_placeholder_file, extract_link, apply_delayed_links):
52 Use full time stamp resolution.
53 (check_time): Use code_timespec rather than rolling our own code.
54 (set_stat, delay_set_stat): Arg now points to tar_stat_info to
55 avoid losing time information. All callers changed.
56 * src/list.c (read_and, decode_header, print_heaeder):
57 Use full time stamp resolution.
58 * src/misc.c (code_timespec): New function.
59 * src/tar.h (struct tar_stat_info): Record atime, mtime, ctime
60 separately, for benefit of hosts with lower resolution.
61 * src/update.c (update_archive): Use full time stamp resolution.
62 * src/xheader.c (code_time): Use new code_timespec function
64 (atime_coder, atime_decoder, ctime_coder, ctime_decoder):
65 (mtime_coder, mtime_decoder): Use full time stamp resolution.
67 Report time stamps to full resolution in environment.
68 Report memory allocation failures rather than ignoring them.
69 * src/system.c (time_to_env): New function.
70 (oct_to_env, str_to_env, chr_to_env): Report memory allocation failures.
71 (stat_to_env): Report full resolution in time stamps.
73 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
75 Merge changes from gnulib for file system sub-second time stamps.
76 * configure.ac: Remove checks for struct stat.st_spare1, struct
77 stat.st_atim.tv_nsec, struct stat.st_atimespec.tv_nsec, struct
78 stat.st_atimensec, as gnulib now does this for us.
79 Similarly for LIB_CLOCK_GETTIME.
80 * gnulib.modules: Add stat-time.
81 * lib/.cvsignore: Add stat-time.h.
82 * src/common.h: Include stat-time.h.
83 (timespec_lt): Remove. All callers changed to use timespec_cmp.
84 (get_stat_atime, get_stat_ctime, get_stat_mtime):
85 (set_stat_atime, set_stat_ctime, set_stat_mtime):
86 Remove; now defined by stat-time.h.
88 2005-09-14 Sergey Poznyakoff <gray@gnu.org.ua>
90 * src/incremen.c (list_dumpdir): New function. Used to dump
91 contents of GNUTYPE_DUMPDIR blocks.
92 * src/common.h (list_dumpdir): Likewise.
93 * src/list.c (list_archive): Use list_dumpdir() to display
94 GNUTYPE_DUMPDIR blocks. Do that only if two or more -v options are
97 2005-09-12 Paul Eggert <eggert@cs.ucla.edu>
99 * lib/.cvsignore: Adjust to current gnulib and modules used.
100 Add getdelim.c, getdelim.h, mbchar.c, mbchar.h, mbuiter.h, memchr.c,
101 pipe-safer.c, size_max.h, strdup.c, strdup.h, strnlen.h, strnlen1.c,
102 strnlen1.h, unistd--.h.
103 Remove getndelim2.c, getndelim2.h, pathmax.h, sysexits.h, xstrdup.c.
105 Treat fishy-looking hard links like fishy-looking symlinks.
106 * src/extract.c (struct delayed_set_stat): Rename after_symlinks
107 member to after_links. All uses changed.
108 (struct delayed_link): Renamed from struct delayed_symlink.
109 All uses changed. New member is_symlink.
110 (delayed_link_head): Renamed from delayed_symlink_head. All uses
112 (create_placeholder_file): New function, taken from extract_symlink.
113 (extract_link): Create placeholders for fishy-looking hard links.
114 (extract_symlink): Move code into create_placeholder_file.
115 (apply_delayed_links): Renamed from apply_delayed_symlinks.
116 All uses changed. Create both hard links and symlinks.
118 2005-09-03 Paul Eggert <eggert@cs.ucla.edu>
120 * README-alpha: Modernize description of software required for
123 2005-09-03 Sergey Poznyakoff <gray@gnu.org.ua>
125 * gnulib.modules: Add strdup
126 * src/incremen.c (purge_directory): Do not dereference symbolic
127 links. Bug reported by Ralph Corderoy <ralph@inputplus.co.uk> and
128 David Brown <davidb@davidb.org>
129 * tests/incr01.at: New test.
130 * tests/Makefile.am: Add incr01.at
131 * tests/testsuite.at: Likewise
134 2005-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
136 * src/incremen.c (read_directory_file): Use strtoumax to read
137 snapshot file contents.
138 (write_directory_file_entry): Use umaxtostr().
140 2005-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
142 * src/create.c (file_dumpable_p,dump_file0): Fix handling of
143 sparse files to /dev/null with --totals option.
144 * tests/update.at: Remove dependency on file order.
146 2005-07-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
148 * doc/tar.texi: Fix typo.
150 2005-07-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
152 * tests/pipe.at: Pipe the output from `tar xfv' through sort.
154 2005-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
156 * src/sparse.c (tar_sparse_init): Fill structure with zeros. Call
157 sparse_select_optab(). All callers updated.
158 (sparse_member_p, sparse_fixup_header): Use tar_sparse_init().
160 2005-06-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
162 * src/sparse.c (pax_sparse_member_p): Checking member size
163 vs. file size is not reliable enough. Use sparse_map_avail.
165 * tests/star/gtarfail.at: Adapt to the new output format
166 * tests/star/gtarfail2.at: Likewise
167 * tests/star/multi-fail.at: Likewise
168 * tests/star/pax-big-10g.at: Likewise
169 * tests/star/ustar-big-2g.at: Likewise
170 * tests/star/ustar-big-8g.at: Likewise
172 * tests/sparse03.at: New test.
173 * tests/Makefile.am: Add sparse03.at
174 * tests/testsuite.at: Likewise
176 * src/xheader.c (size_decoder): Do not set archive_file_size.
178 Fix bugs introduced yesterday:
180 * src/sparse.c (tar_sparse_init): Initialize
182 (sparse_scan_file): Initialize archive_file_size to 0. The
183 variable keeps size of the file *as stored in the archive*, not
184 the size reported by stat.
186 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
188 A sweep of the sparse code prompted by a bug report by Jim Meyering.
189 * src/sparse.c: Include <inttostr.h>.
190 (struct tar_sparse_file): offset and dumped_size are off_t, not
191 size_t. optab is now const *.
192 (dump_zeros): Return bool success flag, not off_t.
194 Use a constant-zero buffer rather than clearing a buffer each time.
195 Don't mess up if write fails.
196 (dump_zeros, check_sparse_region):
197 Don't assume off_t is no wider than size_t.
198 (tar_sparse_init): Don't bother clearing a field that is already clear.
199 (zero_block_p): First arg is const *, not *.
200 (clear_block, SPARSES_INIT_COUNT): Remove.
201 (sparse_add_map): First arg is now struct start_stat_info *, not
202 struct tar_sparse_file *. All callers changed.
203 Use x2nrealloc to check for size_t overflow.
204 (parse_scan_file): Cache commonly-used parts of file.
205 Use an auto buffer, not a static one.
206 Don't bother clearing the buffer; not needed.
207 Don't bother clearing items that are already clear.
208 (oldgnu_optab, star_optab, pax_optab): Now const.
209 (sparse_dump_region): Don't bother clearing the buffer before
210 reading into it; just clear the parts that aren't read into.
211 (sparse_dump_file): Clear the whole local variable 'file'.
212 (diff_buffer): Remove; now a local var.
213 (check_sparse_region): Don't bother clearing buffer before
214 reading into it. Don't assume off_t is promoted to long.
215 (oldgnu_get_sparse_info, star_get_sparse_info):
216 Use an auto status, not static.
217 * src/tar.h (struct tar_stat_info): had_trailing_slash is
219 * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder):
220 Rewrite to avoid cast.
221 (sparse_offset_decoder, sparse_numbytes_decoder):
222 Diagnose excess entries rather than crashing.
224 2005-06-22 Jim Meyering <jim@meyering.net>
226 * src/common.h (timespec_lt): Add a return type: bool.
228 2005-06-21 Paul Eggert <eggert@cs.ucla.edu>
230 Further improvements inspired by Jim Meyering's fixes.
232 * NEWS: Better support for full-resolution time stamps.
233 The -v option now prints time stamps only to 1-minute resolution.
234 * gnulib.modules: Add utimens.
235 * lib/.cvsignore: Add imaxtostr.c, inttostr.c, inttostr.h,
236 offtostr.c, umaxtostr.c, utimens.c, utimens.h. Remove paxconvert.c.
237 * lib/Makefile.tmpl (libtar_a_SOURCES): Remove paxconvert.c.
238 * lib/paxconvert.c: Remove; superseded by umaxtostr.c.
239 * po/POTFILES.in: Remove lib/paxconvert.c. Add lib/xalloc-die.c,
241 * src/buffer.c (set_start_time, compute_duration, start_time):
242 Use gettime rather than rolling our own code.
243 * src/common.h (OLDGNU_NAME_FIELD_SIZE, MAXOCTAL11, MAXOCTAL7): Remove.
244 (newer_ctime_option): Remove.
245 (timespec_lt): New function.
246 (OLDER_STAT_TIME): Use it.
247 (string_to_chars): First arg is char const *, not char *.
248 (tartime): Time arg is now struct timespec. New bool arg.
250 (code_ns_fraction): New decl.
251 (sys_stat_nanoseconds): Remove decl.
252 (get_stat_atime, get_stat_ctime, get_stat_mtime): New functions.
253 (set_stat_atime, set_stat_ctime, set_stat_mtime): New functions.
254 * src/compare.c: Include utimens.h rather than rolling our own.
255 (diff_dir, diff_file, diff_link, diff_symlink, diff_special):
257 (diff_dumpdir, diff_multivol): Prototype.
258 (diff_file): Support higher-resolution time stamps.
259 * src/create.c: Include utimens.h rather than rolling our own.
260 (MAX_OCTAL_VAL): New macro.
261 (tar_copy_str, string_to_chars): Don't bother to zero-fill;
262 the destination is already zeroed.
263 (string_to_chars): First arg is char const *.
264 (start_private_header): Use MINOR_TO_CHARS, not MAJOR_TO_CHARS,
265 for minor device number.
266 (write_header_name, dump_hard_link, dump_file0):
267 Simplify test for old GNU format.
268 (start_header): Put in placeholders for uid, etc., even when
269 using extended headers, for benefit of older "tar" implementations.
270 Don't assume uintmax_t is wider than 32 bits.
271 Output extended header for mtime if needed.
272 (dump_regular_finish, dump_file0):
273 Support extended time stamp resolution.
274 * src/extract.c: Include utimens.h rather than rolling our own.
275 (check_time): Support extended time stamp resolution.
276 * src/list.c: Include <inttostr.h>.
277 (tartime): Use umaxtostr rather than stringify_uintmax_t_backwards.
278 * src/xheader.c: Include <inttostr.h>.
279 Do not include <xstrtol.h>.
280 (strtoimax) [!HAVE_DECL_STRTOIMAX && !defined strtoimax]: New decl.
281 (strtoumax) [!HAVE_DECL_STRTOUMAX && !defined strtoumax]: New decl.
282 (BILLION, LOG10_BILLION): New constants.
283 (to_decimal): Remove; superseded by inttostr. All callers changed
285 (xheader_format_name): Don't assume pids and uintmax_t values
286 fit in 63 bytes (!) when printed.
287 (decode_record): Don't bother to check for ERANGE; an out of range
288 value must be treater than len_max anyway.
289 If the length is out of range, output it in the diagnostic.
290 (format_uintmax): Remove; all callers changed to use umaxtostr.
291 (xheader_print): Don't assume sizes can be printed in 99 bytes (!).
292 (out_of_range_header): New function.
293 (decode_time): Use it.
294 (code_time): Accept struct timespec, not time_t and unsigned long.
295 All callers changed. Size sbuf properly, and remove unnecessary check.
296 Don't assume time stamps can fit in 199 bytes.
297 Handle negative time stamps. Handle fractional time stamps
298 more consistently. Don't output unnecessary trailing zeros.
299 (decode_time): Yield struct timespec, not time_t and unsigned long.
301 Handle negative time stamps. Truncate towards minus infinity
302 consistently. Improve overflow checks, and output a better
303 diagnostic on overflow.
304 (code_num): Don't assume uintmax_t can be printed in 99 bytes (!).
305 (decode_num): New function, for better diagnostics.
306 (atime_coder, atime_decoder, gid_decoder, ctime_coder):
307 (ctime_decoder, mtime_coder, mtime_decoder, size_decoder):
308 (uid_decoder, sparse_size_decoder, sparse_numblocks_decoder):
309 (sparse_offset_decoder, sparse_numbytes_decoder):
310 Use decode_num, etc., instead of xstrtoumax, etc.
312 2005-06-21 Jim Meyering <jim@meyering.net>
314 Carefully crafted invalid headers can cause buffer overrun.
315 Invalid header fields go undiagnosed.
316 Some valid time strings are ignored.
318 * src/xheader.c (sparse_numblocks_decoder): Remove unchecked use
319 of `calloc'. Use xcalloc instead.
320 (decode_time, gid_decoder, size_decoder, uid_decoder):
321 (sparse_size_decoder, sparse_offset_decoder, sparse_numblocks_decoder):
322 Ensure that the result of calling xstrtoumax is no larger than
323 the maximum value for the target type. Upon any failure, exit with
325 (sparse_numblocks_decoder): Avoid buffer overrun/heap corruption:
326 use x2nrealloc, rather than `n *= 2' and xrealloc(p, n,....
327 (decode_time): Rewrite to accept time strings like
328 1119018481.000000000. Before, such strings were always ignored.
330 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
332 * src/create.c (dump_file0): Check for is_avoided_name()
333 first. Fixes bug reported by Martin Lohmeier
334 <martin@mein-horde.de>
335 * tests/update.at: New file
336 * tests/Makefile.am (TESTSUITE_AT): Add update.at
337 * tests/testsuite.at: Likewise
339 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
341 * configure.ac (AC_STRUCT_ST_BLKSIZE)
342 (AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
344 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
346 * src/names.c (excluded_name): excluded_filename ->
347 excluded_file_name, because the name was changed in gnulib.
349 2005-05-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
351 * src/tar.c (read_name_from_file,update_argv): Automatically
352 detect nul-terminated list files.
355 2005-05-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
357 * scripts/backup.sh.in: Bugfixes.
359 2005-05-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
361 * scripts/backup.in: Minor fixes
362 * scripts/backup.sh.in (mt_begin,mt_rewind)
363 (mt_offline,mt_status): Use $MT to invoke mt
364 (init_common): Set --rsh-command option for mt if TAPE_FILE is a
366 * doc/tar.texi: Document new backup scripts behavior
368 2005-05-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
370 * lib/.cvsignore: Updated
371 * lib/Makefile.tmpl: Add new paxutils files
372 * po/POTFILES.in: Likewise
373 * src/buffer.c: Update invocations of safer_name_suffix()
374 * src/create.c: Likewise
375 * src/extract.c: Likewise
376 * src/xheader.c: Likewise
377 * src/common.h: Include paxlib.h instead of paxerror.h
378 (safer_name_suffix,removed_prefixes_p): Removed. The functions are
379 imported from paxutils
380 * src/names.c (hash_string_hasher,hash_string_compare)
381 (hash_string_insert,hash_string_lookup,removed_prefixes_p)
382 (safer_name_suffix): Moved to paxutils
384 2005-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
386 * bootstrap (copy_files): Accept optional third argument: a prefix
387 to be appended to destination file names.
388 Import paxutils/paxlib files.
389 * configure.ac: Remove checking for LIB_SETSOCKOPT, it is handled
391 * lib/Makefile.tmpl (libtar_a_SOURCES): Add paxerror.c paxexit.c
393 * po/POTFILES.in: Likewise.
394 * src/common.h: Remove defines and declarations imported from
396 * src/misc.c: Likewise
397 * src/list.c (stringify_uintmax_t_backwards): Moved to paxutils
399 2005-05-17 Paul Eggert <eggert@cs.ucla.edu>
401 * src/misc.c (remove_any_file): Fix typo in previous change.
403 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
405 Port to Solaris 10's treatment of unlinking directories.
406 * gnulib-modules: Add unlinkdir.
407 * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c.
408 * src/common.h (we_are_root): Remove extern decl; it's now static.
409 * src/extract.c (we_are_root): Now static.
410 * src/misc.c: Include <unlinkdir.h>.
411 (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
413 * ChangeLog, ChangeLog.1, Makefile.am, NEWS, PORTS, README,
414 README-alpha, TODO, bootstrap, configure.ac, doc/Makefile.am,
415 doc/convtexi.pl, doc/fdl.texi, doc/gendocs_template,
416 lib/Makefile.tmpl, lib/prepargs.c, lib/waitpid.c, po/POTFILES.in,
417 scripts/Makefile.am, scripts/backup-specs, scripts/backup.in,
418 scripts/backup.sh.in, scripts/restore.in, src/Makefile.am,
419 src/arith.h, src/buffer.c, src/common.h, src/compare.c,
420 src/create.c, src/delete.c, src/extract.c, src/incremen.c,
421 src/list.c, src/mangle.c, src/misc.c, src/names.c, src/sparse.c,
422 src/system.c, src/tar.c, src/tar.h, src/update.c, src/utf8.c,
423 src/xheader.c, tests/Makefile.am, tests/append.at,
424 tests/append01.at, tests/comprec.at, tests/delete01.at,
425 tests/delete02.at, tests/delete03.at, tests/delete04.at,
426 tests/delete05.at, tests/extrac01.at, tests/extrac02.at,
427 tests/extrac03.at, tests/extrac04.at, tests/extrac05.at,
428 tests/gzip.at, tests/ignfail.at, tests/incremental.at,
429 tests/link01.at, tests/listed01.at, tests/listed02.at,
430 tests/long01.at, tests/longv7.at, tests/multiv01.at,
431 tests/multiv02.at, tests/multiv03.at, tests/multiv04.at,
432 tests/old.at, tests/options.at, tests/options02.at, tests/pipe.at,
433 tests/recurse.at, tests/same-order01.at, tests/same-order02.at,
434 tests/shortrec.at, tests/sparse01.at, tests/sparse02.at,
435 tests/testsuite.at, tests/truncate.at, tests/version.at,
436 tests/volume.at, tests/star/gtarfail.at, tests/star/gtarfail2.at,
437 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
438 tests/star/quicktest.sh, tests/star/ustar-big-2g.at,
439 tests/star/ustar-big-8g.at:
440 Update FSF postal mail address.
442 2005-05-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
446 * bootstrap: Install files from paxutils/doc
447 * doc/Makefile.am (tar_TEXINFOS): Add genfile.texi
448 * doc/tar.texi (Genfile): New appendix
449 * src/compare.c (diff_file): diff_handle was not initialized
450 * src/create.c (dump_regular_file): Correctly pad archive members
451 that shrunk during archiving. Repored by Frank Heckenbach.
452 * src/extract.c (file_newer_p): Return false if file does not
454 (prepare_to_extract): Correct warning wording.
455 * tests/truncate.at: New test case
456 * tests/Makefile.am: Add truncate.at
457 * tests/testsuite.at: Likewise.
459 * doc/.cvsignore: Updated
460 * lib/.cvsignore: Updated
461 * tests/.cvsignore: Updated
463 2005-05-02 Paul Eggert <eggert@cs.ucla.edu>
465 * tests/multivol04.at: Tell awk to read from /dev/null.
467 Adjust to recent gnulib changes.
468 * lib/.cvsignore: Add dup-safer.c, fd-safer.c, unistd-safer.h.
469 * src/common.h (initial_umask): New var.
470 * src/create.c (start_ueader): Use it, and adjust to new modechange
472 (hash_link): unsigned -> size_t parameters and result.
473 * src/incremen.c (hash_directory): Likewise.
474 * src/names.c (hash_string_hasher): Likewise.
475 * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
477 2005-04-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
479 * tests/Makefile.am: Add shortrec.at.
481 2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
483 * src/buffer.c (reading_from_pipe): Remove. All uses removed.
484 (short_read): Don't warn about short reads; they're normal.
485 * tests/shortrec.at: New file.
486 * tests/testsuite.at: Include it.
488 * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
489 it is sometimes left behind as a garbage file (maybe due to the
492 2005-04-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
494 * src/list.c: Handle Solaris 'X' type flag
495 * src/tar.h (SOLARIS_XHDTYPE): New define
497 2005-04-06 Sergey Poznyakoff <gray@mirddin.farlep.net>
499 * src/tar.c: Minor fixes to text messages. Proposed by Benno
501 * src/extract.c: Likewise
502 (extract_file): Assign orig_file_name
503 to save_name uniformly over the program. This fixes matching
504 directory names at the start of an archive volume.
505 * src/buffer.c (flush_write): Warn when the name of the archive
506 straddling volume boundary is longer than 100 characters. Earlier
507 behavior was to issue a fatal error.
508 (struct zip_magic): Reverted part of changes from 2005-04-04.
509 They make the maintenance too costly. Removing `unsigned'
510 qualifier from `magic' member should be enough.
511 * src/compare.c (diff_init): Read directory file if in listed
512 incremental. This prevents spurious 'Contents differ' diagnostics.
513 (diff_archive): Minor fixes to text messages
514 (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
515 to save_name uniformly over the program. This fixes matching
516 directory names at the start of an archive volume.
517 * src/create.c: Assign orig_file_name
518 to save_name uniformly over the program. This fixes matching
519 directory names at the start of an archive volume.
520 * src/list.c: Likewise
522 * tests/multiv03.at: Modified to match the new behavior
523 * tests/multiv04.at: New file. Test splittind directory members between
525 * tests/Makefile.am: Add multiv04.at
526 * tests/testsuite.at: Likewise.
528 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
530 * configure.ac (AC_CONFIG_AUX_DIR): Rename from config to build-aux,
531 for reasons discussed in the thread beginning at
532 <http://lists.gnu.org/archive/html/bug-gnulib/2005-03/msg00119.html>.
533 * .cvsignore: Remove config; add build-aux.
535 * src/buffer.c (struct zip_magic): Use char arrays, not pointers.
536 The unsigned char * pointer ran afoul of pedantic C compilers, and
537 we didn't need pointers anyway. Put the size field before the
538 data to avoid unnecessary padding. All uses changed.
539 (magic) Make it const, since it doesn't change. All uses changed.
541 2005-04-02 Paul Eggert <eggert@cs.ucla.edu>
543 * src/xheader.c (decode_record): Don't dump core when given
544 a corrupted extended header. Problem reported by Jim Meyering.
545 Also, check for other ways that the header might be invalid,
546 e.g., missing newline at end. Do not allow keys with nulls.
547 Allow blanks before and after length, as POSIX requires.
548 Do not allow leading "-" in length. Check for length overflow.
549 (xheader_decode, xheader_decode_global): Let decode_record
550 check for exhaustion of record.
551 (xheader_read): Null-terminate the extended record;
552 decode_record relies on this.
554 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
556 * bootstrap (TP_URL): Change from
557 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
558 <http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
559 some redirection glitches.
560 Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
561 * doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
562 * lib/.cvsignore: Add intprops.h (new gnulib file).
564 2005-03-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
566 * src/list.c (print_header): Print UID/GID in case of
567 empty user/group name. This could occur when dumping
568 files belonging to non-existing users and when listing
570 Reported by Igor Lautar.
572 * src/create.c: Correctly parse empty uname/gname
573 * src/sparse.c (sparse_scan_file): Bugfix. offset had
576 * scripts/backup.in: Use `head -n 1'. Provide missing
577 argument to ${MT_STATUS}. Proposed by Jan Merka.
578 * scripts/backup.sh.in: Likewise. Fixed typo in
579 MT_OFFLINE assignment.
580 * scripts/restore.in (restore_fs): Use root_fs
582 2005-02-15 Sergey Poznyakoff <gray@Mirddin.farlep.net>
584 * src/create.c: Replace strdup with xstrdup
585 * src/names.c: Likewise
586 * src/tar.c: Likewise
588 * tests/append01.at: Added reference to bug-tar archive
589 * tests/listed02.at: Use -print with find.
591 2005-02-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
593 * THANKS: Added Tim Adye. Fixed UTF.
594 * src/list.c (read_header): Removed assignment to
595 oldgnu_header.isextended. It was breaking append mode.
597 * tests/append01.at: New test.
598 * tests/Makefile.am: Added append01.at
599 * tests/testsuite.at: Likewise
601 2005-02-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
603 * gnulib.modules: New file. List of required gnulib
605 * bootstrap: Merge list of required modules from
606 paxutils with that from tar proper.
607 * src/tar.c: Various fixes in help and diagnostic messages.
609 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
611 * src/common.h (EXTRACT_OVER_PIPE): New macro
612 * src/compare.c: Code clean up.
613 * src/extract.c (extract_archive): Do not check for
614 EXTRACT_OVER_PIPE, decode_options() does this.
615 * src/misc.c (exec_error,fork_error,dup2_error)
616 (pipe_error): Removed unneeded functions.
617 * src/system.c (sys_exec_command): Use xclose, xpipe,
618 xfork, xdup2 and exec_fatal.
619 * src/tar.c (options): Improved sorting. Document --backup=off.
620 (decode_options): Clear backup_option if necessary.
622 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
624 Initial implementation of --to-command option proposed
627 * bootstrap: Get setenv module from gnulib
628 * src/buffer.c: Do not use 8-bit chars in comments
629 * src/common.h (to_command_option)
630 (ignore_command_error_option): New globals
631 (sys_exec_command,sys_wait_command): New commands
632 * src/extract.c (extract_file): Handle to_command_option
633 Fix error recovery: decrease `size' by `written', not
634 by `count', otherwise tar misses the next header
635 Do not diagnose write error if to_command_option
636 is set, since the command may have exited prematurely.
637 It would be better to check for sigpipe, though.
638 (prepare_to_extract): Handle to_command_option
639 * src/misc.c (exec_error, fork_error, dup_error)
640 (pipe_error): New functions
641 * src/system.c (sys_exec_command)
642 (sys_wait_command): New functions
643 * src/tar.c: Handle new options --to-command,
644 --ignore-command-error
645 * THANKS: Added Hansjoerg Lipp
647 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
649 * src/list.c (from_header): New arg OCTAL_ONLY, normally false.
650 All uses changed. Fix typo that sometimes suppressed all "Archive
651 contains obsolescent base-64 headers" warnings, not just the first
653 (tar_checksum): Accept only octal checksums, since they aren't
654 supposed to overflow into weird formats.
656 Adjust to gnulib changes.
657 * lib/.cvsignore: Add chdir-long.c, chdir-long.h, memrchr.c,
658 memrchr.h, openat.c, openat.h. Remove pathmax.h (added by
659 mistake, perhaps?), sysexit.h (my typo), xstrdup.c (gnulib removed
660 this file). Sort entries.
662 2005-02-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
664 * src/extract.c: Further rewrite.
665 * src/buffer.c: Removed unused variables.
666 * src/list.c: Likewise
667 * src/tar.c (update_argv): Changed type to void
669 * src/common.h (OLDGNU_NAME_FIELD_SIZE): New constant
670 * src/create.c (start_private_header,write_header_name)
671 (dump_hard_link): Restore compatibility with 1.13.25
672 * src/extract.c (extract_archive): Rewritten
673 * src/list.c: Add translators' comments
674 * src/tar.c (options) Minor spelling fix
675 * tests/star/quicktest.sh: Determine path to the tar executable.
677 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
679 * po/POTFILES.in: Added tests/genfile.c
680 * src/buffer.c (short_read): Use ngettext()
681 (new_volume): use quote().
682 * src/create.c: Use quote()
683 * src/extract.c: Likewise
684 * src/xheader.c: Likewise
685 * src/misc.c: Add comments to translators
687 * tests/same-order01.at: sort ls output
688 * tests/sparse01.at (RE_CHECK): Added missing space
690 * tests/sparse02.at: Test extracting sparse files over a pipe.
691 * tests/Makefile.am: Added sparse02.at
692 * tests/testsuite.at: Likewise
693 * tests/listed02.at: Skip the test on filesystems that do not
694 update ctime of a file when renaming it. To be reverted when
695 the new incremental mode is ready.
696 * tests/sparse01.at: Extract and compare sparse file
698 2005-02-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
700 * src/sparse.c: Extract sparse files even if the output
703 2005-02-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
705 * bootstrap: Add a comment to lib/Makefile.am saying that this
706 is an autogenerated file.
707 Exit with code 1 if any of autotools fails.
708 * lib/Makefile.tmpl: Insert Emacs magic to the first line.
709 * tests/Makefile.am: Add append.at
711 * m4/.cvsignore: Ignore all *.m4 files
713 2005-01-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
715 Rewritten handling of -T (--files-from) option. Now it
716 inserts the file names immediately into argv array which allows
718 1) any valid tar options (including another -T) to be used in the file
719 2) any number of -T options to be given in command line
721 * configure.ac: Raised version number to 1.15.2
722 * src/common.h: Include obstack.h
723 (files_from_option): Removed
724 (unquote_option): New variable
725 (stat_fatal): New function
726 (name_close): Removed function.
727 * src/incremen.c: Remove inclusion of obstack.h
728 * src/xheader.c: Likewise.
729 * src/misc.c (stat_fatal): New function
730 * src/names.c (name_file): Removed variable.
731 (read_name_from_file): Removed function. All callers changed.
732 (name_close): Removed function. All callers changed.
733 * src/tar.c: New options --unquote (--no-unquote) and
735 (add_file_id,read_name_from_file,update_argv): New functions
736 (parse_opt): Rewritten handling of -T option. Handle hidden
737 --HANG option for debugging purposes.
738 (decode_options): Init unquote_option to true. Init argv_stk.
739 Remove unneeded references to files_from_option
741 * doc/tar.texi: Document new options.
742 Moved rendition macros and option value definitions into
744 * doc/rendition.texi: New file
745 * doc/value.texi: New file
746 * doc/Makefile.am: Updated
748 2005-01-13 Paul Eggert <eggert@cs.ucla.edu>
750 * tests/testsuite.at (RE_CHECK): Use "join - file", not
751 "join file -", to work around a bug in Solaris 8 join.
752 Problem reported by Tomohiro Suzuki.
754 2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
756 * src/list.c (read_header): Fixed calculation of the
757 size for GNU long name/link. Tar was reading one block
758 more if name_size was divisible by 512. Thanks Josef
760 * tests/long01.at: New file. Test listing of GNU long names
762 * tests/pipe.at: Sort tar output.
763 * tests/Makefile.am: Added long01.at
764 * tests/testsuite.at: Likewise.
765 * THANKS: Added Josef Bauer
766 * lib/.cvsignore: Updated
767 * m4/.cvsignore: Updated
770 2005-01-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
772 * directory: Updated for 1.15.1
773 * doc/Makefile.am: Use gendocs.sh to generate web documentation
774 * doc/gendocs_template: Template file for gendocs.sh
775 * doc/tar.texi: Updated docs for --[no-]same-permissions
776 * src/tar.c: Reworded docstrings for --[no-]same-permissions
778 2005-01-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
780 * bootstrap: Create m4/paxutils.m4
781 * configure.ac: Call tar_PAXUTILS
782 * tests/options02.at: Test that tar correctly handles non-option
783 arguments interspersed with options.
784 * tests/Makefile.am: Add options02.at
785 * tests/testsuite.at: Likewise
786 * tests/listed02.at: Do not create useless directory
788 2005-01-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
790 * src/tar.c (parse_opt): Bugfix: Use ARGP_KEY_ARG. Thanks
791 Mike Frysinger <vapier@gentoo.org> for reporting.
793 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
795 * lib/Makefile.tmpl (localedir.h): Omit needless quotes and a
796 needless sed command. Problem reported by Paul Jarc.
798 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
800 Accommodate latest gnulib.
801 * doc/.cvsignore: Add getdate.texi.
802 * bootstrap: Do not treat alloca-opt specially; this is no
803 longer needed (and breaks builds) with latest gnulib.
805 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
807 * src/tar.c (main): Reverted recent changes (#ifdef).
809 2004-12-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
811 * configure.ac: Raise version number to 1.15.1
813 * NEWS: Entry for 1.15.1
814 * src/buffer.c: Bugfix. Changes introduced 2004-11-26
815 broke extraction from stdin.
816 * src/list.c (from_header, tar_checksum): Changed declaration.
818 * src/common.h: Likewise
819 * src/tar.c (main): Protect invocation of setlocale by
822 * tests/comprec.at: New test
823 * tests/pipe.at: New test
824 * tests/Makefile.am (comprec.at,pipe.at): New tests
825 * tests/testsuite.at: Likewise
826 * tests/gzip.at: Use AT_GZIP_PREREQ
827 * tests/star/pax-big-10g.at: Likewise
828 * tests/star/ustar-big-2g.at: Likewise
829 * tests/star/ustar-big-8g.at: Likewise
831 * tests/extrac04.at: Discard stderr from sort, on some
832 systems it spits out lots of irrelevant info.
833 * tests/listed02.at: Likewise
835 * doc/index.html.in: Rewritten in xhtml to follow recent
839 2004-12-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
841 Released version 1.15. Sources up to this point are
844 * configure.ac: Raised version number to 1.15
847 * bootstrap (update_po): Give -r to wget. Always remove index.html
848 Ignore alloca-opt module (it duplicates alloca)
850 * tests/Makefile.am: Distribute star/quicktest.sh
851 * tests/star/README: Document quicktest.sh
852 * tests/star/qucktest.sh: Removed.
853 * tests/star/quicktest.sh: New file.
855 2004-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
858 * doc/tar.texi: Document auto-detection of compressed archive
860 * src/tar.c (decode_options): Ignore --seek if used with --delete.
861 Delete.c is based on the assumption that the archive is being
862 actually read, not lseeked.
864 * tests/delete05.at: New file
865 * tests/extrac02.at: Fixed typo in AT_SETUP
866 * tests/Makefile.am: Added delete05.at
867 * tests/testsuite.at: Likewise.
869 2004-12-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
871 * src/delete.c (delete_archive_members): Bugfix: when
872 attempting to delete an nonexistent member, the last
873 blocking_factor blocks were zeroed.
875 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
877 * TODO: Mention sub-second resolution, lutimes, lchmod.
879 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
881 Adjust to recent gnulib changes.
882 * doc/getdate.texi: Remove, since bootstrap gets it from gnulib now.
883 * .cvsignore: Add rmt, rmt/*, rmt/*/*.
884 * lib/.cvsignore: Add allocsa.c, allocsa.h, allocsa.valgrind,
885 charset.alias, config.charset, getcwd.c, getcwd.h, localcharset.c,
886 localcharset.h, ref-add.sed, ref-add.sin, ref-del.sed,
887 ref-del.sin, setenv.c, setenv.h, unsetenv.c. Remove pathmax.h,
889 * m4/.cvsignore: Add allocsa.m4, eealloc.m4, getcwd-path-max.m4,
890 localcharset.m4, realloc.m4, setenv.m4. Remove malloc.m4,
891 pathmax.m4, realloc.m4.
893 2004-11-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
895 * configure.ac: Raised version number to 1.14.91
896 * scripts/tarcat: New file
897 * scripts/Makefile.am: Added tarcat
898 * src/buffer.c (hit_eof): Changed type to boolean
899 (read_full_records,reading_from_pipe): New variables
900 (check_compressed_archive,open_compressed_archive): New functions
901 (open_archive): Autodetect compressed archives and act accordingly.
902 Set reading_from_pipe. This fixes controversial set of changes
903 introduced 2004-05-11,2004-03-22.
904 * src/list.c (tar_checksum): New function
905 (read_header): Use tar_checksum().
906 * src/common.h (tar_checksum): New function
908 * tests/star/README: Updated
912 2004-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
914 * src/tar.c (decode_options): Fixed -o semantics. Thanks
915 Jean Delvare <khali@linux-fr.org>
917 2004-10-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
919 * bootstrap: Add localcharset
920 * lib/Makefile.tmpl: Initialize SUFFIXES and CLEANFILES since the
921 makefile snippet from localcharset uses '+=' on them.
922 * src/Makefile.am (LDADD): Add LIBICONV
923 * src/list.c (decode_header): Set uname/gname to NULL if their
924 header counterparts are empty
925 * src/tar.c (options): Use OPTION_NO_TRANS
926 * src/utf8.c: Use locale_charset() from gnulib
928 * tests/star/README: Updated
933 2004-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
935 * THANKS: Added Bryan Ford
936 * doc/Makefile.am (.text): Fixed rule
937 * po/POTFILES.in: Added argp-help.c
939 2004-10-04 Bryan Ford <baford@mit.edu>
941 * src/tar.c: New option --exclude-caches, to exclude
942 cache directories automatically on archive creation.
943 Cache directories are directories containing a
944 standardized tag file, as specified at:
945 http://www.brynosaurus.com/cachedir/spec.html
946 * src/common.h: New variable exclude_caches_option.
947 * src/create.c: New function check_cache_directory(),
948 called from dump_dir0() if exclude_caches_option is set,
949 to check for a cache directory tag and exclude the directory
950 if such a tag is found.
951 * doc/tar.texi: Updated accordingly.
953 2004-09-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
955 * doc/tar.texi: Minor fix
956 * src/tar.c (options): Minor fix
958 2004-09-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
961 * lib/Makefile.tmpl: Added 'rtapelib.o: localedir.h' dependency
962 * src/common.h: Comment WANT_DIRECTORY_REMOVE_OPTION.
963 * src/extract.c: Normalized use of remove_any_file().
964 * src/misc.c: Likewise.
965 * src/tar.c (parse_opt): Emit warning if -l option is used.
966 (show_default_settings): REMOTE_SHELL may be undefined
968 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
970 Test suite rewritten in autotest.
972 * configure.ac: Updated for autotest
973 * src/tar.c (argp_program_version): Modified.
974 * tests/Makefile.am: Rewritten for autotest.
976 * tests/.cvsignore: Updated
977 * tests/append.at: New file
978 * tests/atlocal.in: New file
979 * tests/delete01.at: New file
980 * tests/delete02.at: New file
981 * tests/delete03.at: New file
982 * tests/delete04.at: New file
983 * tests/extrac01.at: New file
984 * tests/extrac02.at: New file
985 * tests/extrac03.at: New file
986 * tests/extrac04.at: New file
987 * tests/extrac05.at: New file
988 * tests/gzip.at: New file
989 * tests/ignfail.at: New file
990 * tests/incremental.at: New file
991 * tests/link01.at: New file
992 * tests/listed01.at: New file
993 * tests/listed02.at: New file
994 * tests/longv7.at: New file
995 * tests/multiv01.at: New file
996 * tests/multiv02.at: New file
997 * tests/multiv03.at: New file
998 * tests/old.at: New file
999 * tests/options.at: New file
1000 * tests/recurse.at: New file
1001 * tests/same-order01.at: New file
1002 * tests/same-order02.at: New file
1003 * tests/sparse01.at: New file
1004 * tests/testsuite.at: New file
1005 * tests/version.at: New file
1006 * tests/volume.at: New file
1007 * tests/star/gtarfail.at: New file
1008 * tests/star/gtarfail2.at: New file
1009 * tests/star/multi-fail.at: New file
1010 * tests/star/pax-big-10g.at: New file
1011 * tests/star/ustar-big-2g.at: New file
1012 * tests/star/ustar-big-8g.at: New file
1014 * tests/preset.in: Removed
1015 * tests/before: Removed
1016 * tests/after: Removed
1017 * tests/version.sh: Removed.
1018 * tests/append.sh: Removed.
1019 * tests/delete01.sh: Removed.
1020 * tests/delete02.sh: Removed.
1021 * tests/delete03.sh: Removed.
1022 * tests/delete04.sh: Removed.
1023 * tests/extrac01.sh: Removed.
1024 * tests/extrac02.sh: Removed.
1025 * tests/extrac03.sh: Removed.
1026 * tests/extrac04.sh: Removed.
1027 * tests/extrac05.sh: Removed.
1028 * tests/gzip.sh: Removed.
1029 * tests/incremen.sh: Removed.
1030 * tests/ignfail.sh: Removed.
1031 * tests/link01.sh: Removed.
1032 * tests/listed01.sh: Removed.
1033 * tests/listed02.sh: Removed.
1034 * tests/longv7.sh: Removed.
1035 * tests/multiv01.sh: Removed.
1036 * tests/multiv02.sh: Removed.
1037 * tests/multiv03.sh: Removed.
1038 * tests/old.sh: Removed.
1039 * tests/options.sh: Removed.
1040 * tests/same-order01.sh: Removed.
1041 * tests/same-order02.sh: Removed.
1042 * tests/volume.sh: Removed.
1043 * tests/recurse.sh: Removed.
1044 * tests/sparse01.sh: Removed.
1045 * tests/star/gtarfail.sh: Removed.
1046 * tests/star/gtarfail2.sh: Removed.
1047 * tests/star/multi-fail.sh: Removed.
1048 * tests/star/ustar-big-2g.sh: Removed.
1049 * tests/star/ustar-big-8g.sh: Removed.
1050 * tests/star/pax-big-10g.sh: Removed.
1052 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1054 * bootstrap: Install genfile.c from paxutils
1055 * tests/genfile.c: Removed. Integrated into
1057 * tests/mksparse.c: Removed. Integrated into
1058 (paxutils) genfile.c
1059 * tests/Makefile.am: Removed mksparse
1060 * tests/sparse01.sh: Use genfile instead of mksparse
1062 2004-09-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1064 Started merging with cpio into paxutils. Sources before
1065 this point are tagged alpha-1_14_90
1067 * Makefile.am: Updated for use with paxutils
1068 * README-alpha: Likewise
1069 * bootstrap: Likewise
1070 * configure.ac: Likewise
1071 * lib/Makefile.tmpl: Likewise
1072 * po/POTFILES.in: Likewise
1073 * src/Makefile.am: Likewise
1074 * src/buffer.c: Likewise
1075 * src/common.h: Likewise
1076 * src/compare.c: Likewise
1077 * src/create.c: Likewise
1078 * src/delete.c: Likewise
1079 * src/extract.c: Likewise
1080 * src/incremen.c: Likewise
1081 * src/list.c: Likewise
1082 * src/mangle.c: Likewise
1083 * src/misc.c: Likewise
1084 * src/names.c: Likewise
1085 * src/sparse.c: Likewise
1086 * src/system.c: Likewise
1087 * src/tar.c: Likewise
1088 * src/update.c: Likewise
1089 * src/utf8.c: Likewise
1090 * src/xheader.c: Likewise
1092 * src/system.h: Removed
1093 * src/rmt.c: Removed
1094 * src/rmt.h: Removed
1095 * src/rtapelib.c: Removed
1097 2004-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1099 * tests/listed02.sh: Do not depend on any particular ordering
1102 2004-09-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1104 * doc/tar.texi: Document the use of -C option in
1105 file lists. Document --seek option.
1106 * configure.ac: New option --with-rmt. New configuration variable
1107 DEFAULT_RMT_DIR. Removed DEFAULT_RMT_COMMAND.
1108 * src/Makefile.am: Install rmt into rmtdir
1109 * src/tar.c (usage): Minor fix.
1113 2004-09-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1115 * configure.ac: Raised version number to 1.14.90
1116 * src/common.h (is_individual_file): New prototype
1117 * src/create.c (dump_file0): Fix bug introduced
1119 * src/names.c (register_individual_file)
1120 (is_individual_file): New functions.
1121 * tests/listed01.sh: Use genfile instead of dd.
1122 * tests/listed02.sh: New file.
1123 * tests/Makefile.am: Added listed02.sh
1127 2004-08-31 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1129 * src/sparse.c (sparse_add_map): Fixed improper initializations
1130 of sparse_map_size. We assume that whatever number it contains
1131 describes adequately the current size of sparse_map. The only
1132 number we need to reset is sparse_map_avail.
1133 * src/compare.c (verify_volume): Call set_next_block_after
1134 if read_header returns HEADER_FAILURE
1135 Destroy and reinitialize content of current_stat_info and
1136 extended_header after each iteration (bug reported by
1137 John L. Males <jlmales@yahoo.com>).
1138 Issue a warning if the created archive contains some members
1139 whose file names were stripped off their leading prefixes.
1140 This is a temporary fix of the issue reported by Bdale Garbee
1141 <bdale@gag.com> (Refs: Debian bug 230064, Message-Id
1142 <87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)
1144 * src/names.c (removed_prefixes_p): New function.
1146 * src/buffer.c: When computing write rate do not take
1147 into account the time needed to verify the archive(s).
1148 The bug reported by John L. Males <jlmales@yahoo.com>
1149 (set_start_time,compute_duration): New functions.
1150 (print_total_written): Use the result of compute_duration().
1151 (close_archive): Call compute_duration.
1152 * src/common.h (set_start_time, removed_prefixes_p): New prototypes.
1153 * src/list.c (decode_header): Fixed initialization
1154 of stat_info->is_sparse
1155 * src/tar.c (main): Call set_start_time().
1157 * src/misc.c (unquote_string): Unquote '\a' and '\v'.
1158 Reported by Helmut Waitzmann <helmut.waitzmann@web.de>.
1163 2004-08-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1165 * src/tar.c: Fix copy-n-paste errors in the license
1167 2004-08-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1169 * scripts/backup.in: Renamed LIBPATH to LIBDIR.
1170 Use ROOT_FS with -C option. Do not send mail
1171 if ADMINISTRATOR is set to NONE.
1172 * scripts/backup.sh.in (test_root): Append / to
1173 ROOT_FS if it does not already end in it.
1174 * scripts/restore.in: Renamed LIBPATH to LIBDIR.
1175 New option -a (--all). Do not start restore unless
1176 -a or patterns are given.
1177 (restore_fs,restore_files): Fixed use of --listed option.
1178 * doc/tar.texi: Updated
1181 2004-08-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1183 * src/tar.c (find_argp_option): Fixed typo
1185 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
1187 Merge argp, getopt, xalloc changes from gnulib.
1188 * bootstrap (gnulib_modules): Add xalloc-die.
1189 Remove code to test for patches; we don't have patches now.
1190 Set LC_ALL=C so that file names sort consistently.
1191 Prefer the gnulib copies of gettext.m4, glibc21.m4,
1192 lib-ld.m4, lib-prefix.m4, po.m4 too.
1194 * patches/getopt.diff: Remove; gnulib now works unpatched.
1195 * configure.ac (_getopt_long_only_r): Remove check.
1196 gl_ARGP now does this for us.
1197 * lib/.cvsignore: Add fnmatch.h, getopt_.h, sysexit.h,
1199 * src/extract.c: Adjust to changes to gnulib xalloc module.
1200 (extr_init): Remove assignment to xalloc_fail_func; no longer needed.
1201 (xalloc_die): New function.
1203 2004-08-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1207 * src/buffer.c (flush_write): Limit filenames
1208 of the members that straddle multivolume archive
1209 boundary to 100 characters.
1210 (flush_read): Use strncmp when comparing multivolume member
1212 * tests/multiv03.sh: New file
1213 * tests/Makefile.am: Added multiv03.sh
1215 2004-08-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1217 * src/list.c (read_and): Call decode_header before
1218 calling skip_member()
1219 (skip_member): Use is_sparse field to determine if the
1220 member is a sparse file.
1222 * tests/Makefile.am: Added extrac05.sh
1223 * tests/extrac05.sh: New file
1224 * tests/append.sh: Rearranged leading comments. Added explicit
1225 references to report messages wherever available.
1226 * tests/delete01.sh: Likewise
1227 * tests/delete02.sh: Likewise
1228 * tests/delete03.sh: Likewise
1229 * tests/delete04.sh: Likewise
1230 * tests/extrac01.sh: Likewise
1231 * tests/extrac02.sh: Likewise
1232 * tests/extrac03.sh: Likewise
1233 * tests/extrac04.sh: Likewise
1234 * tests/gzip.sh: Likewise
1235 * tests/ignfail.sh: Likewise
1236 * tests/incremen.sh: Likewise
1237 * tests/link01.sh: Likewise
1238 * tests/listed01.sh: Likewise
1239 * tests/longv7.sh: Likewise
1240 * tests/multiv01.sh: Likewise
1241 * tests/multiv02.sh: Likewise
1242 * tests/old.sh: Likewise
1243 * tests/options.sh: Likewise
1244 * tests/recurse.sh: Likewise
1245 * tests/same-order01.sh: Likewise
1246 * tests/same-order02.sh: Likewise
1247 * tests/sparse01.sh: Likewise
1248 * tests/version.sh: Likewise
1249 * tests/volume.sh: Likewise
1251 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1253 * bootstrap: Extended --update-po option to take an
1254 optional argument specifying the po file to update.
1255 * src/create.c: Improved compatibility with 1.13.25
1256 * tests/link01.sh: New file.
1257 * tests/Makefile.am: Added link01.sh
1259 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
1263 * patches/argp.diff: Remove; no longer needed.
1265 * lib/.cvsignore: Add stat-macros.h.
1266 Remove addext.c, malloc.c, realloc.c.
1268 * src/extract.c: Include <getcwd.h>.
1269 (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
1270 * src/extract.c (make_directories):
1271 FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
1272 * src/misc.c (must_be_dot_or_slash): Likewise.
1273 * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
1275 * src/tar.c (parse_opt): Likewise.
1276 * src/incremen.c (purge_directory): Fix format buffer typos in warning
1278 * src/tar.c (options): Add missing initializers to pacify gcc.
1279 (decode_options): Remove unused var.
1281 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
1283 * bootstrap (gnulib_modules): Add getpagesize.
1284 * configure.ac (valloc): Remove check; valloc no longer used.
1285 * lib/.cvsignore: Add getpagesize.h.
1286 * m4/.cvsignore: Add getpagesize.m4.
1287 * src/buffer.c (record_buffer): New var.
1288 (open_archive): Don't use valloc; on older or buggy hosts, you can't
1289 free the result. Use page_aligned_alloc instead.
1290 * src/compare.c (diff_init): Likewise.
1291 * src/buffer.c (open_archive): Record the pointer to be freed
1293 (close_archive): Free record_buffer.
1294 * src/common.h (page_aligned_alloc): New decl.
1295 * src/misc.c (quote_n, quote): Remove these redundant functions.
1296 (ptr_align): New function, from coreutils/src/system.h.
1297 (page_aligned_alloc): New function.
1298 * src/system.h (valloc): Remove.
1300 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
1302 * src/extract.c (extract_archive): Do not report an error
1303 when hard-linking X to X when X exists. Problem reported by
1305 * lib/.cvsignore: Add fchown-stub.c.
1307 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1310 * src/common.h (root_device): New global.
1311 (gnu_restore): Renamed to purge_directory().
1312 * src/extract.c (extr_init): Save the device number
1314 (extract_archive): Renamed gnu_restore() to purge_directory().
1315 * src/incremen.c (gnu_restore): Renamed to purge_directory().
1316 Do not attempt to purge the directory if it is on a different
1317 device and one_file_system_option is set.
1319 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1321 * doc/tar.texi: The actual default for exclude patterns
1322 is --no-anchored. Fixed.
1323 * src/tar.c (options): Likewise.
1324 Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
1326 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1328 * doc/tar.texi: Fixed several inconsistencies.
1329 * src/tar.c: Fixed docstring for --checkpoint option.
1331 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1333 * src/buffer.c (seek_archive): New function
1334 * src/common.h (seek_archive): New function
1335 (seekable_archive): New global.
1336 * src/list.c (skip_file): Use seek_archive() if
1338 * src/tar.c (struct fmttab): Accept 'pax' as alias
1340 (options): New option -n (--seek).
1341 * src/update.c: Determine type of the archive before
1346 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1348 * bootstrap: New option --update-po
1349 * src/tar.c: New option -H (short alias to --format)
1350 * doc/tar.texi: Document -H option
1351 * src/names.c (safer_name_suffix): Fixed bug introduced
1354 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1356 * bootstrap: Apply patches from patch subdirectory
1358 * patches/argp.diff: New file
1359 * patches/getopt.diff: New file
1360 * configure.ac: Check for _getopt_long_only_r and
1361 force using included version of getopt if the function
1363 * src/tar.c: Use argp for command line parsing.
1364 * src/system.h: Minor formatting fix
1365 * m4/.cvsignore: Updated
1366 * lib/.cvsignore: Updated
1367 * doc/tar.texi: Minor fix.
1368 * src/extract.c: Fix improper use of 'path' term
1369 * src/incremen.c: Likewise
1370 * src/list.c: Likewise
1371 * src/misc.c: Likewise
1372 * src/names.c: Likewise
1373 * src/rmt.h: Likewise
1374 * src/rtapelib.c: Likewise
1375 * src/update.c: Likewise
1376 * src/xheader.c: Likewise
1377 * tests/star/README: Minor fix
1379 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1381 * configure.ac: Raised version number to 1.14.1
1382 * src/tar.c: Renamed --strip-path to --strip-components
1383 Changed improper use of _() to ngettext().
1384 * src/extract.c: Renamed strip_path_option to strip_components_option
1385 * src/common.h: Likewise.
1387 * doc/tar.texi: Updated
1389 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1391 * src/system.c (sys_child_open_for_uncompress): Do not
1392 set read_full_records_option: the compressed archive is
1393 likely not to contain integer number of records. Should
1394 the user wish to use reblocking, he may always give tar
1395 -B option. This is a minor improvement over the change
1397 * src/buffer.c (open_archive): Removed assignment to
1398 read_full_records_option.
1400 * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
1401 as the format argument, rather than a possibly-translated variable
1402 string. Patch provided by Jim Meyering <jim@meyering.net>
1403 * src/tar.c (decode_options): Fixed typo in the comment.
1404 * tests/star/README: Minor correction
1406 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1408 * directory: New file. GNU directory entry for tar.
1409 * doc/Makefile.am: Rewritten. Added rules for generating
1410 documentation for the project's website.
1411 * doc/.cvsignore: Updated
1412 * doc/index.html.in: New file.
1414 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1416 * configure.ac: Raised version number to 1.14
1418 * tests/after: Added copyleft statement
1419 * tests/before: Added copyleft statement
1420 * tests/preset.in: Added copyleft statement
1422 Tar 1.14 is released. Sources up to this point are tagged
1425 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1427 * configure.ac: Fixed prerequisite headers for sys/buf.h
1429 * src/system.h: Likewise.
1430 * tests/after (compare): Fixed argument quoting under eval
1431 * tests/before: Quote TAR_ARCHIVE_FORMATS
1433 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1438 * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
1439 DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
1440 the pathname of the rmt utility.
1441 New option --enable-backup-scripts.
1442 * doc/tar.texi: Updated
1443 * scripts/Makefile.am: Install the scripts only if requested
1445 * scripts/backup.in: Fixed --version output.
1446 Fixed initialization of the listing files and printing
1447 the time of the last previous level dump.
1448 * scripts/restore.in: Fixed --version output.
1449 * src/Makefile.am (localedir.h rule): Generate correct
1450 DEFAULT_RMT_COMMAND variable.
1451 * src/common.h (rmt_command_option): New variable.
1452 * src/list.c (read_and): Print block number before
1453 issuing 'Skipping to next header' diagnostics, if
1454 requested by block_number_option.
1455 * src/rtapelib.c: Use rmt_command_option instead of
1456 hardcoded "/etc/rmt".
1457 * src/tar.c: New option --rmt-command.
1458 (decode_options): Handle --rmt-command. Initialize
1459 rmt_command_option to DEFAULT_RMT_COMMAND.
1461 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1463 * doc/tar.texi: Further update.
1465 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1467 * configure.ac: Minor fix
1468 * scripts/Makefile.am: Updated
1469 * scripts/backup-specs: Updated
1470 * scripts/backup.in: Minor fixes
1471 * scripts/backup.sh: Removed
1472 * scripts/backup.sh.in: New file. Source for backup.sh
1473 * scripts/restore.in: New file
1474 * scripts/.cvsignore: Updated
1475 * scripts/WARNING: Removed
1476 * doc/tar.texi: Updated
1479 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1481 * src/names.c (name_gather): Bugfix: Honor single -C with
1483 * tests/same-order01.sh: New file
1484 * tests/same-order02.sh: New file
1485 * tests/Makefile.am: Updated
1487 * tests/append.sh: Added copyleft header
1488 * tests/delete01.sh: Likewise
1489 * tests/delete02.sh: Likewise
1490 * tests/delete04.sh: Likewise
1491 * tests/extrac01.sh: Likewise
1492 * tests/extrac02.sh: Likewise
1493 * tests/extrac03.sh: Likewise
1494 * tests/extrac04.sh: Likewise
1495 * tests/gzip.sh: Likewise
1496 * tests/ignfail.sh: Likewise
1497 * tests/incremen.sh: Likewise
1498 * tests/multiv01.sh: Likewise
1499 * tests/old.sh: Likewise
1500 * tests/options.sh: Likewise
1501 * tests/recurse.sh: Likewise
1502 * tests/version.sh: Likewise
1503 * tests/volume.sh: Likewise
1504 * tests/star/gtarfail.sh: Likewise
1505 * tests/star/gtarfail2.sh: Likewise
1506 * tests/star/multi-fail.sh: Likewise
1507 * tests/star/pax-big-10g.sh: Likewise
1508 * tests/star/qucktest.sh: Likewise
1509 * tests/star/ustar-big-2g.sh: Likewise
1510 * tests/star/ustar-big-8g.sh: Likewise
1512 * doc/.cvsignore: Updated
1514 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1516 * configure.ac: Check whether date accepts +format argument
1517 (for backup scripts).
1518 * scripts/level-0: Removed
1519 * scripts/level-1: Removed
1520 * scripts/weekly.new: Removed
1521 * scripts/dump-remind: Removed
1522 * scripts/backup.in: New file
1523 * scripts/backup.sh: New file
1524 * scripts/dump-remind.in: New file
1525 * scripts/backup-specs: Updated
1526 * scripts/Makefile.am: Updated for new directory contents.
1527 * scripts/.cvsignore: Updated
1529 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1532 * doc/tar.texi: Updated
1533 * src/tar.c: --utc implies -vv
1535 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1537 * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
1538 does not define it if it fails to find iconv.h.
1540 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1542 * bootstrap: Use gnulib-tool to generate lib/Makefile.am
1543 and parts of configure.ac
1544 * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
1545 * lib/Makefile.am: Removed
1546 * lib/Makefile.tmpl: New file.
1547 * lib/.cvsignore: Updated
1548 * m4/.cvsignore: Updated
1549 * src/xheader.c: Include stpcpy.h
1551 * src/create.c: Produce an error, not warning, if the
1552 filename is too long.
1553 * tests/longv7.sh: Synchronized with the recent changes.
1555 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1557 * configure.ac: Fixed test for iconv_t
1558 * src/rmt.h: Bugfix by Jürgen Weigert
1559 * THANKS: Add Jürgen Weigert
1560 * tests/star/README: Fixed typo
1562 2004-04-04 Paul Eggert <eggert@twinsun.com>
1564 Merge getdate documentation changes from coreutils.
1566 * doc/getdate.texi: Update from coreutils CVS.
1567 * doc/tar.texi: Fix getdate menu to match getdate.texi's.
1569 Merge recent gnulib changes, and remove some lint.
1571 Improve support for nanosecond-resolution time stamps.
1572 * bootstrap: Add gettime, timespec modules.
1573 * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
1574 * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
1576 * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
1577 * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
1578 st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
1579 * src/common.h (newer_mtime_option): Now a struct timespec, not
1580 time_t. All uses changed.
1581 (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
1582 * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
1583 * src/incremen.c (scan_path): Likewise.
1584 * src/list.c (read_and): Likewise.
1585 * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
1586 whether newer_mtime_option is initialized.
1587 * src/tar.c (decode_options): Likewise.
1588 * src/tar.c (decode_options): Adjust to new signature for get_date.
1590 * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
1591 result of safe_read, full_write, and similar functions.
1592 Detect safe_read error by comparing to SAFE_READ_ERROR;
1593 detect full_write error by comparing to 0.
1595 * src/common.h (write_error_details, sys_write_archive_buffer):
1597 * src/misc.c (write_error_details): Likewise.
1598 * src/rmt.c (main): Likewise.
1599 * src/rmt.h (rmt_read__, rmt_write__): Likewise.
1600 * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
1601 * src/sparse.c (sparse_scan_file, sparse_dump_region,
1602 check_sparse_region, check_data_region): Likewise.
1603 * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
1604 sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
1605 * src/update.c (append_file): Likewise.
1607 * src/buffer.c (clear_read_error_count): Use explicit (void)
1608 to indicate a function with no arguments.
1609 * src/create.c (check_links): Likewise.
1610 * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
1611 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
1612 sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
1613 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
1615 * src/utf8.c (get_input_charset): Likewise.
1616 * src/xheader.c (xheader_ghdr_name, xheader_write_global,
1617 xheader_decode_global, extended_header_init): Likewise.
1618 * tests/mksparse.c (usage): Likewise.
1620 * src/buffer.c (new_volume): Rename local variables to avoid
1622 * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
1623 sparse_file_p, sparse_member_p, sparse_fixup_header,
1624 sparse_dump_file, sparce_extract_file, sparse_skip_file,
1625 sparse_diff_file): Likewise.
1626 * src/compare.c (diff_archive): Likewise.
1627 * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
1628 dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
1630 * src/extract.c (repair_delayed_set_stat): Likewise.
1631 * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
1633 * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
1634 tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
1635 sparse_dump_file, sparse_file_p, sparse_member_p,
1636 sparse_fixup_header, sparse_extract_file, sparse_skip_file,
1637 check_data_region, sparse_diff_file): Likewise.
1638 * src/system.c (sys_stat_nanoseconds): Likewise.
1639 * src/xheader.c (xheader_format_name): Likewise.
1641 * src/common.h (enum old_files): Remove comma before }; not portable.
1643 * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
1644 * src/rmt.c (usage): Likewise.
1645 * src/xheader.c (xheader_set_single_keyword): Likewise.
1646 * tests/genfile.c (usage): Likewise.
1647 * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
1650 * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
1652 * src/names.c (uname_to_uid, gname_to_gid): Likewise.
1653 * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
1654 langtab.charset, charset_lookup): Likewise.
1656 * src/common.h (name_init): Remove unused args. All callers changed.
1657 * src/names.c (name_init): Likewise.
1659 * src/common.h (usage, xheader_write, xheader_write_global,
1660 sys_reset_uid_gid): New decls.
1662 * src/compare.c (report_difference, process_noop): Add
1663 __attribute__ ((unused)) for unused attributes.
1664 * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
1666 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
1667 gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
1668 path_coder, size_coder, uid_coder, uname_coder,
1669 sparse_numblocks_coder): Likewise.
1671 * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
1672 dump_file0): Now static.
1673 * src/utf8.c (charset_lookup): Likewise.
1674 * src/xheader.c (xheader_protected_pattern_p,
1675 xheader_protected_keyword_p, xheader_set_single_keyword,
1676 xheader_keyword_deleted_p, xheader_keyword_override_p,
1677 xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
1679 * tests/genfile.c (usage): Likewise.
1680 * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
1683 * src/create.c (hash_link): Rewrite to avoid cast.
1685 * src/extract.c (file_newer_p): Use parameter, not global var.
1686 * src/misc.c (write_error_details): Likewise.
1688 * src/extract.c (prepare_to_extract): Remove directory arg; not
1689 used. All callers changed.
1691 * src/misc.c (close_fatal): Remove; not used.
1692 * src/system.c (sys_utimes): Likewise.
1694 * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
1696 * src/rmt.c (main): Update copyright date to 2004.
1697 * src/tar.c (decode_options): Likewise.
1699 * src/rtapelib.c (get_status_string): Don't lose errno when
1700 skipping the error messages.
1701 (get_status): Report an error if atol returns a negative number.
1703 * src/utf8.c (struct langtab, langtab, charset_lookup,
1704 get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
1706 (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
1707 Use macros, not definitions, to avoid type clashes with system
1709 (charset_lookup): Local var is now auto, not static.
1710 (utf8_convert): Use ICONV_CONST instead of const, to avoid
1713 * src/utf8.c (langtab): Initialize all elements of struct, to
1715 * src/xheader.c (xhdr_tab): Likewise.
1717 * src/xheader.c: Include fnmatch.h, since we use fnmatch.
1719 * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
1721 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
1724 * configure.ac: Raised version number to 1.13.94
1725 * src/system.h: Protect inclusion of <sys/time.h>
1727 Declare time() if HAVE_DECL_TIME is 0
1728 * tests/.cvsignore: Added mksparse
1730 * tests/sparse01.sh: New file
1731 * tests/multiv02.sh: New file
1732 * tests/Makefile.am: Add sparse01.sh and multiv02.sh
1733 * tests/longv7.sh: Added missing call to 'after'
1735 * src/common.h: Added missing prototypes
1736 * src/compare.c (diff_archive): Use is_sparse member
1737 instead of GNUTYPE_SPARSE.
1738 * src/create.c: Removed unused variables
1739 * src/extract.c (extract_archive): Use sparse_member_p instead
1741 Removed unused variables
1742 * src/list.c (decode_header): Use sparse_fixup_header to correct
1744 (print_header): Do not rely on GNUTYPE_SPARSE type.
1745 Use st->stat.st_size to print real file size.
1746 (skip_member): Assign stat_info.file_name to save_name. This fixes
1747 bug reported by Mads Martin Joergensen <mmj@suse.de>
1748 Use sparse_skip_file() to skip sparse members.
1749 * src/rtapelib.c: include "common.h"
1750 * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
1751 (struct tar_sparse_optab.fixup_header): New member
1752 (tar_sparse_member_p): New function.
1753 (tar_sparse_init): Return true if decode_header is not provided
1754 (tar_sparse_fixup_header)
1755 (sparse_member_p,sparse_fixup_header)
1757 (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
1758 (star_fixup_header, pax_sparse_member_p): New function
1759 (pax_decode_header): Remove
1760 * src/system.h: Include <sys/time.h> and <utime.h> when available
1761 * src/tar.c (usage): Prototype moved to common.h
1762 * src/tar.h (struct tar_stat_info.is_sparse): New member
1763 * src/utf8.c (utf8_convert): Changed prototype
1764 (get_input_charset): Removed unused variable
1765 * src/xheader.c: include <fnmatch.h>
1766 (size_decoder): Assign to both st->archive_file_size and
1768 (st->stat.st_size): Assign to st->stat.st_size
1769 (sparse_numbytes_decoder): Removed unused variable
1770 * src/.cvsignore: Added .gdbinit
1771 * THANKS: Added Mads Martin Joergensen
1773 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1775 * src/create.c (write_long_name): Do not allow more than
1776 NAME_FIELD_SIZE-1 characters in a file name for V7 format
1778 * tests/longv7.sh: New file.
1779 * tests/Makefile.am: Add longv7.sh
1781 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1783 * src/buffer.c (open_archive): Clear read_full_records_option
1784 if reading from a pipe.
1785 (short_read): Display warning about the deduced record size
1787 * tests/star/pax-big-10g.sh: Updated to match the above changes.
1788 * tests/star/ustar-big-2g.sh: Likewise.
1789 * tests/star/ustar-big-8g.sh: Likewise.
1791 * configure.ac: Added gl_FUNC_STRTOULL
1792 * src/create.c (start_header): Check for GNU_FORMAT
1793 if incremental_option is set.
1794 * src/xheader.c (to_decimal): New function.
1795 (xheader_format_name): Use to_decimal() instead of snprintf.
1796 * tests/listed01.sh: Use genfile instead of dd
1797 * tests/multiv01.sh: Likewise.
1799 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1801 * src/list.c (read_and): Stop processing the archive after
1802 encountering a single zero record. Many old archives contain
1803 arbitrary garbage after it.
1804 The warning is issued anyway.
1806 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1808 * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
1809 conversion buffer was not null terminated. Fix provided
1810 by Leland Lucius <llucius@tiny.net>
1811 * THANKS: Added Leland Lucius
1812 * src/utf8.c (utf8_convert): Indentation fix.
1814 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1816 * src/buffer.c (flush_read): Bugfix: the
1817 condition at line 714 included
1819 || (status > 0 && !read_full_records_option)
1821 which is grossly wrong, since even if new_volume() below succeeds,
1822 the subsequent call to rmtread will overwrite the chunk of data
1823 already read in the buffer and thus spoil everything.
1824 * src/system.c (sys_child_open_for_uncompress): Minor stylistic
1826 * tests/star/multi-fail.sh: New test.
1827 * tests/Makefile.am: Added multi-fail.sh
1828 * tests/star/README: Updated
1830 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1833 * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
1834 * src/common.h (utc_option): new global
1835 (enum old_files.KEEP_NEWER_FILES): New element
1836 * src/extract.c: Handle --keep-newer-files option
1837 * src/list.c (tartime): Print UTC if --utc was given.
1838 * src/tar.c: New options: --utc and keep-newer-files
1840 * tests/Makefile.am: Added new tests
1841 * tests/after: Rewritten
1842 * tests/before: Rewritten
1843 * tests/preset.in: Rewritten
1844 * tests/delete03.sh: Accommodate for the new testsuite logic
1845 * tests/gzip.sh: Likewise
1846 * tests/incremen.sh: Likewise
1847 * tests/listed01.sh: Likewise
1848 * tests/multiv01.sh: Likewise
1849 * tests/old.sh: Likewise
1850 * tests/options.sh: Likewise
1851 * tests/version.sh: Likewise
1852 * tests/volume.sh: Likewise
1854 * tests/star: New directory
1855 * tests/star/README: New file
1856 * tests/star/gtarfail.sh: New file
1857 * tests/star/gtarfail2.sh: New file
1858 * tests/star/pax-big-10g.sh: New file
1859 * tests/star/qucktest.sh: New file
1860 * tests/star/ustar-big-2g.sh: New file
1861 * tests/star/ustar-big-8g.sh: New file
1863 2004-02-26 Paul Eggert <eggert@twinsun.com>
1865 * doc/tar.texi (dircategory Individual utilities): Append period,
1866 as suggested by Karl Berry.
1868 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1870 * src/list.c (decode_header): Call xheader_decode before
1871 the assignment to current_stat_info.archive_file_size.
1873 2004-02-23 Paul Eggert <eggert@twinsun.com>
1875 * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
1877 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1882 * tests/before: Move testing of the prerequisite archive formats
1883 to the separate function 'prereq'. Do not expect any arguments
1884 * tests/delete03.sh: Use prereq() instead of passing arguments
1886 * tests/incremen.sh: Likewise.
1887 * tests/listed01.sh: Likewise.
1888 * tests/multiv01.sh: Likewise.
1890 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1892 Added UTF-8 support. Finished global extended header
1896 * configure.ac: Detect libiconv
1897 * src/utf8.c: New file. Conversions to and from utf-8.
1898 * src/Makefile.am: Added utf8.c
1899 * src/create.c (write_header_name) In pax format, use
1900 "path" keyword if the file name is not ASCII
1901 (start_header): Likewise for uname and gname.
1902 * src/list.c: Decode encountered global headers.
1903 * src/xheader.c: Use keywords from the global
1905 Correctly handle UTF-8 conversions.
1906 (xheader_list_destroy): New function.
1907 (xheader_set_single_keyword,xheader_set_keyword_equal): Added
1908 missing gettext markers
1909 (decode_record): Rewritten using caller-provided handler and
1911 * tests/listed01.sh: Give credit to Andreas Schuldei.
1913 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1915 * src/create.c (dump_file0): The conditional at line
1916 1296 prevented incremental backups on individual files
1917 from working, as reported by Andreas Schuldei
1918 <andreas@schuldei.org>.
1920 This is due to the condition
1922 (0 < top_level || !incremental_option)
1924 Removing it makes incremental backups work for individual
1925 files as well as for directories. On the other hand, it does
1926 not affect other functionality, as shown by the reasoning below:
1928 To begin with, the two parts of this condition are mutually
1929 superfluous, because
1931 1) when top_level < 0, incremental_option == 1
1932 so the condition yields false
1933 2) when top_level >= 0, incremental_option == 0
1934 so the condition yields true.
1936 In other words, it is completely equivalent to
1938 (!incremental_option)
1940 Now, let's consider the effect of its removal. There are two cases:
1942 1) when incremental_option==1
1943 This means incremental backup in progress. In this case dump_file
1944 is invoked only for directories or for files marked with 'Y' by
1945 get_directory_contents. The latter are those that did not meet the
1946 condition in incremen.c:242, which is exactly the same condition
1947 as this at create.c:1296. So, for these files the check
1948 (!incremental_option) is useless, since the rest of the
1949 conditional will yield false anyway. On the other hand, if
1950 dump_file is invoked on a directory, the conditional will yield
1951 false due to !S_ISDIR assertion, so these will be processed as usual.
1953 Thus, for this case the extra condition (!incremental_option) is
1954 irrelevant, and its removal won't alter the behavior of tar,
1955 *except* that it will enable incremental backups on individual
1956 files, which is the wanted effect.
1958 2) when incremental_option==0
1959 In this case the condition yields true and its removal does not
1960 affect the functionality.
1963 * configure.ac: Raised patchlevel to 93
1964 * src/incremen.c: Minor stylistic fixes.
1965 * tests/listed01.sh: New test. Check listed incremental
1966 backups on individual files.
1967 * tests/Makefile.am: Added listed01.sh
1969 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1971 * src/common.h (simple_finish_header,start_private_header): New
1973 (xheader_ghdr_name): Changed declaration
1974 * src/create.c (start_private_header): Removed static qualifier.
1975 (write_extended): Removed superfluous last argument. Use
1977 (simple_finish_header): New function.
1978 (finish_header): Use simple_finish_header() to break recursive
1979 dependency between this function and write_extended().
1980 * src/tar.c (assert_format): Do not bail out if several
1981 --format arguments are given. This is a common case when
1982 TAR_OPTIONS are used.
1983 (decode_options): New option --show-defaults displays the
1984 compiled-in defaults.
1985 Use POSIX format if no --format option was given and
1986 --pax-option was specified.
1987 Do not allow to use --pax-option unless the archive format is
1988 set to POSIX (or reading subcommand is requested).
1990 * src/update.c (update_archive): Write global extended header if
1992 * src/xheader.c (xheader_format_name): Bugfix.
1993 (xheader_xhdr_name): Changed the default extended header name
1994 to '%d/PaxHeaders.%p/%f', as POSIX requires.
1995 (xheader_ghdr_name): Removed unused argument.
1996 (xheader_write,xheader_write_global): New function.
1997 (xheader_decode): Modified to honor overrides whatever
1998 the current archive format is.
2000 * src/delete.c (delete_archive_members): Call xheader_decode
2002 * src/list.c (decode_header): Likewise.
2003 * src/incremen.c (sort_obstack): Fixed typo in the comment
2005 * doc/tar.texi: Document new default for extended
2008 * tests/before: Accept an optional list of allowed archive
2009 formats. Exit with the status 77 if the current archive
2010 format does not match any of them.
2011 * tests/delete03.sh: Require gnu, oldgnu or posix format
2012 * tests/incremen.sh: Require gnu or oldgnu format
2013 * tests/multiv01.sh: Likewise
2015 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2017 * doc/tar.texi (Option Summary): Documented --pax-option
2018 * src/tar.c: Likewise.
2020 * src/create.c (to_chars): Added a comment.
2021 * src/tar.h: Comment to GNU_FORMAT
2023 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2026 * configure.ac: Added stpcpy
2027 * bootstrap: Likewise
2028 * lib/Makefile.am: Likewise
2029 * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
2031 * src/create.c (write_extended): Call xheader_xhdr_name
2032 instead of using hardcoded "././@PaxHeader" name.
2033 * src/tar.c: New option --pax-option (equivalent to -o option
2035 * src/xheader.c: Implement pax -o option. Fixed misleading
2036 heading comment (introduced 2003-09-02).
2037 * src/incremen.c: Minor fixes
2038 * m4/.cvsignore: Updated
2040 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2042 * src/incremen.c: Removed accumulator stuff in favor of obstack.
2043 (get_directory_contents): Split into two functions
2044 * src/update.c: Minor changes
2045 * doc/tar.texi: Fixed typo
2047 2004-02-15 Paul Eggert <eggert@twinsun.com>
2049 Fix Debian bug 230872, originally reported by Jeff King in
2050 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
2052 * doc/tar.texi (posix compliance): Remove. The whole section
2053 was a misunderstanding of what POSIXLY_CORRECT is supposed to
2054 mean. The GNU Coding Standards says that POSIXLY_CORRECT
2055 is for disabling extensions that are incompatible with POSIX:
2056 it is not for disabling compatible extensions. All references
2057 to this section removed.
2058 (posix): This format is created only if the posix format is
2059 specified; it is no longer created if gnu format is specified
2060 and POSIXLY_CORRECT is set.
2061 * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
2062 POSIX does not specify the behavior of tar, so we should
2063 not worry about POSIXLY_CORRECT here.
2065 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2067 * Makefile.am: Removed m4
2068 * configure.ac: Require automake-1.8/autoconf-2.59. Removed
2070 * README-alpha: Updated
2071 * bootstrap: Updated TP URL, improved help output. Default
2072 to :ext:anoncvs and set CVS_RSH, unless already set.
2073 * m4/Makefile.am: Removed
2075 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2077 * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
2078 Use $option instead of $1 so all options will be parsed.
2080 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2082 Started rewriting buffer.c ...
2084 * bootstrap: New option --no-po
2085 * src/buffer.c (new_volume,check_label_pattern): Changed return type.
2086 (time_to_start_writing): Changed data type
2087 (file_to_switch_to): Removed. Variable never assigned to.
2088 (open_archive) Moved option compatibility checks to tar.c
2089 Other minor changes.
2090 * src/common.h (maybe_backup_file): Changed return type
2091 * src/misc.c: Likewise.
2092 * src/create.c: Updated invocations of safer_name_suffix
2093 * src/extract.c: Likewise
2094 * src/delete.c: Updated assignment to write_archive_to_stdout
2095 * src/tar.c (decode_options): More option compatibility checks
2096 (moved from buffer.c)
2097 * src/update.c (time_to_start_writing): Changed data type.
2098 * tests/recurse.sh: New test case.
2099 * tests/mksparse.c: New file.
2100 * tests/Makefile.am: Added recurse.sh and mksparse.c
2102 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2104 * src/sparse.c (sparse_diff_file): Bugfix. Thanks
2105 Martin Simmons for the patch.
2106 * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
2107 <pius@pld-linux.org> for the patch.
2109 2003-12-26 Paul Eggert <eggert@twinsun.com>
2111 Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
2112 and translation website.
2114 * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
2115 intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
2116 isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
2117 a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
2118 files are replaced by autoreconf. Also, there seems to be a bug
2119 in gettext/autoconf/automake if we try to omit these files after
2120 autoreconf has replaced them, even though the gettext manual says
2121 they're optional. So give up and just include them for now, even
2122 though they make 'configure' longer and slower.
2124 Change translation URL from
2125 <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
2126 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
2127 accommodate translator website revamp.
2129 Fail if autoreconf fails.
2131 * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
2132 signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
2133 ignore files now supplied by gettext 0.13.1.
2135 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2137 Synchronized with the backup repository on Mirddin
2139 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2141 * configure.ac: Check for varios members of struct stat
2142 that may represent file modification times with a subsecond
2144 Check for utimes (for future use)
2145 * src/buffer.c (short_read): Issue a warning on short reads.
2146 * src/common.h (sys_stat_nanoseconds): New function
2147 * src/create.c (dump_file0): Use sys_stat_nanoseconds().
2148 * src/list.c (read_and): Treat only two successive zero
2149 filled blocks as an EOF indicator. Issue a warning if
2150 a single one is encountered.
2151 * src/system.c (sys_stat_nanoseconds): New function
2152 * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
2154 * src/xheader.c (code_time,decode_time): Support for subsecond
2156 (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
2157 (mtime_coder,mtime_decoder): Update invocations of code_time and
2159 (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
2160 (sparse_numblocks_decoder,sparse_offset_decoder)
2161 (sparse_numbytes_decoder): Updated
2163 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2165 * src/names.c (safer_name_suffix): Reverted change made
2166 2003-11-14. Reason: Discussion with Paul Eggert and
2167 Jean-Louis Martineau. See also ChangeLog entry from
2169 * tests/delete03.sh: Likewise.
2170 * tests/extrac04.sh: Likewise.
2171 * tests/multiv01.sh: Likewise.
2173 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2175 * src/incremen.c (write_directory_file): Use sys_truncate
2176 * src/list.c (print_header): Use archive_file_size member
2177 when printing real file size.
2178 * src/sparse.c (sparse_scan_file): Correctly handle files with
2180 (sparse_dump_region,sparse_extract_region): Allow for zero size
2183 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2185 * configure.ac: Raised version number to 1.13.92
2186 * src/list.c (decode_header): Discern between pax and ustar
2188 Initialize current_stat_info.archive_file_size.
2190 NOTE: Modifications from this date on are temporarily
2191 stored on local CVS on mirddin. This repository will
2192 be synchronized with Savannah as soon as the latter
2193 becomes operational again.
2195 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2198 * src/sparse.c: Initial implementation of GNU/pax sparse
2200 * src/common.h (xheader_store): Changed prototype.
2201 * src/create.c: Update calls to xheader_store
2202 * src/extract.c (extract_archive): Check reported size vs.
2203 archive file size to determine if we have to do with a
2205 * src/tar.c (usage): Cleaned up the sample argument to --newer
2207 (decode_options): Allow --sparse for POSIX_FORMAT archives.
2208 * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
2210 Implemented GNU.sparse.* keywords.
2212 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2214 * configure.ac: Check for setlocale. Thanks Bruno Haible for
2217 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2219 * src/create.c (write_gnu_long_link): Use oldgnu
2220 magic with @LongLink blocks.
2222 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2224 * src/tar.h: Support for star sparse format.
2225 * src/sparse.c: Likewise.
2227 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2229 * src/sparse.c (sparse_diff_file): New function
2230 * src/common.h (sys_compare_uid,sys_compare_gid): New functions
2231 (sys_compare_uid_gid): Removed.
2232 (sys_compare_links,report_difference): Changed prototype
2233 (sparse_diff_file): New function
2234 * src/system.c (sys_compare_uid,sys_compare_gid): New functions
2235 (sys_compare_uid_gid): Removed.
2236 (sys_compare_links): Changed declaration
2237 * src/compare.c (diff_archive): Use sparse_diff_file.
2239 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2241 Rewritten sparse file handling.
2243 * src/sparse.c: New file. Provides a universal framework
2244 for various methods for sparse files handling.
2245 * src/Makefile.am: Added sparse.c
2246 * src/common.h (struct sp_array,sparsearray,sp_array_size)
2247 (init_sparsearray,fill_in_sparse_array): Removed
2248 (enum dump_status): New data type
2249 (pad_archive,close_diag,open_diag,read_diag_details)
2250 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
2252 (sparse_file_p,sparse_dump_file,sparse_extract_file): New
2254 (print_header): Changed prototype declaration.
2255 * src/tar.h (struct sp_array): Declaration from common.h
2256 (struct tar_stat_info): New members archive_file_size,
2257 sparse_map_avail,sparse_map.
2258 * src/create.c: Major rewrite.
2259 * src/extract.c: Use new sparse file interface.
2260 * src/compare.c (diff_sparse_files): Temporary placeholder.
2262 * src/buffer.c: Minor changes
2263 * src/tar.c: Likewise.
2264 * src/list.c: Likewise.
2265 * src/misc.c (close_diag,open_diag,read_diag_details)
2266 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
2267 diagnostics functions.
2268 * src/incremen.c: Use new diagnostics functions.
2269 * src/names.c: Likewise.
2271 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2273 * configure.ac: Fixed check for setsockopt
2275 * src/create.c: Do not zero-terminate name field if
2276 the name is exactly 100 characters long.
2277 (write_ustar_long_name): Fixed cheking for unsplittable
2280 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2282 * src/create.c (start_header): Removed debugging hook
2283 (dump_file): Fixed handling of linkname field.
2284 * src/names.c (safer_name_suffix): If the input
2285 file name ends with a slash, output one should do so
2287 * doc/tar.texi: Documented --format=ustar
2289 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2291 * src/tar.h (archive_format): USTAR_FORMAT: New type.
2292 * src/create.c: Added POSIX.1-1988 support.
2293 * src/names.c (safer_name_suffix): Skip leading ./
2294 * src/tar.c: New option --format=ustar forces
2295 POSIX.1-1988 archive format.
2296 * tests/delete03.sh: Updated.
2297 * tests/extrac04.sh: Updated.
2298 * tests/multiv01.sh: Updated.
2300 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2302 * src/list.c (read_and): Initialize current_stat_info
2303 and extended_header at the start of the loop.
2304 * src/names.c (all_names_found): Check if the argument
2305 contains valid filename. Fixes coredump on `not_a_tar_file'
2306 * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
2307 (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
2308 Fixes `pax-big-10g' bug.
2310 2003-11-12 Paul Eggert <eggert@twinsun.com>
2312 Fix some C compatibility bugs reported by Joerg Schilling.
2314 * src/common.h (stripped_prefix_len): Fix misspelling
2315 "stripped_path_len" in declaration.
2316 * src/rmt.c (main): Use "return FOO;" rather than
2317 "exit (FOO);"; we no longer have to worry about
2318 pre-ANSI hosts that mishandled returned values from "main".
2319 * src/tar.c (main): Likewise. This avoids warnings on some
2321 * src/system.c: Include signal.h, for 'kill'.
2322 * src/system.h (DEV_BSIZE): Remove.
2323 (DEFAULT_ST_BLKSIZE): New macro.
2324 (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
2325 * src/tar.c (enum): Remove comma just before }.
2327 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2329 * src/list.c (decode_header): Initialize st_atime and
2332 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2334 * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
2335 Bunk <bunk@fs.tum.de> for reporting.
2336 * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
2337 <martin@xemacs.org> for spotting.
2339 2003-11-04 Paul Eggert <eggert@twinsun.com>
2341 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
2344 2003-10-26 Paul Eggert <eggert@twinsun.com>
2346 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
2347 Bug reported by Christian Weisgerber.
2349 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2353 * src/tar.c (decode_options): Removed superfluous archive format
2355 * doc/tar.texi: Documented new features.
2357 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2360 * THANKS: Added Wojciech Polak
2361 * configure.ac: Added checks for missing functions. Raised
2362 version number to indicate alpha release.
2363 * lib/Makefile.am: Added missing headers
2364 * lib/waitpid.c: Added missing includes.
2365 * src/extract.c: Likewise.
2366 * src/names.c: Removed spurious includes.
2367 * src/xheader.c: Likewise.
2368 * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
2369 macro overriding broken mkdir prototypes.
2371 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2373 * configure.ac: Check for dev_t and ino_t.
2374 * m4/Makefile.am: Added missing files.
2375 * src/system.c: New file.
2376 * src/Makefile.am: Added system.c
2377 * src/common.h: Prototypes for functions from system.c
2378 * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
2379 * src/buffer.c: Moved system dependencies to system.c
2380 * src/compare.c: Likewise.
2381 * src/create.c: Likewise.
2382 * src/delete.c: Likewise.
2383 * src/extract.c: Likewise.
2384 * src/rtapelib.c: Likewise.
2386 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2388 Implemented --occurrence option.
2391 * src/tar.c: New option --occurrence.
2392 * src/common.h (occurrence_option): New global
2393 (struct name): Changed `found' member to `uintmax_t
2395 (names_done): Removed
2396 (all_names_found): Changed prototype.
2397 (ISFOUND,WASFOUND): New macros
2398 * src/delete.c (delete_archive_members): Honor --occurrence
2400 * src/list.c (read_and): Likewise.
2401 * src/names.c: Count number of occurrences of each name in the
2403 (name_match): Honor --occurrence option.
2404 (names_done): Removed
2405 (all_names_found,names_notfound): Rewritten.
2407 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2409 * src/tar.c: Removed extra precaution regarding
2410 subcommand_option == CAT_SUBCOMMAND
2411 * lib/Makefile.am: Updated
2413 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2415 * src/common.h (names_done): New function.
2416 * src/names.c: Likewise.
2417 * src/list.c (read_and): Use all_names_found() as `while'
2419 * src/tar.c: New option --first-copy
2422 2003-09-24 Paul Eggert <eggert@twinsun.com>
2424 * src/rmt.c (main): Don't translate Copyright string; international
2425 law says the word "Copyright" should be in English.
2426 * src/tar.c (decode_options): Likewise.
2428 2003-09-22 Paul Eggert <eggert@twinsun.com>
2430 * doc/tar.texi (extracting untrusted archives): New section.
2432 * src/common.h (stripped_path_len): Renamed from cut_path_elements.
2433 Return size_t, not pointer, so that we don't have to worry about
2434 violating the C standard by converting char const * to char *.
2435 All callers changed.
2436 * src/names.c (stripped_path_len): Likewise. Strip file system
2437 prefix, too. Count adjacent slashes as if they were one slash;
2438 that is the POSIX standard.
2440 2003-09-17 Paul Eggert <eggert@twinsun.com>
2442 * README-alpha: Document maintainer tool assumptions a bit. GNU
2443 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
2444 Debian bug 211447. Fix minor misspellings/whitespace nits.
2446 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
2447 gl_USE_SYSTEM_EXTENSIONS.
2449 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
2450 * m4/.cvsignore: Add restrict.m4, time_r.m4.
2452 2003-09-17 Paul Eggert <eggert@twinsun.com>
2454 * bootstrap: Don't use "for option; do";
2455 Solaris 8 /bin/sh doesn't like that.
2457 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2459 * README-alpha: Updated
2460 * bootstrap: Updated
2462 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2464 * README-alpha: Updated
2465 * bootstrap: Updated
2466 * po/POTFILES.in: Added src/xheader.c
2467 * src/common.h (cut_path_elements): Added proto.
2469 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2471 * src/buffer.c: Use ngettext where appropriate.
2472 * src/compare.c: Likewise.
2473 * src/create.c: Likewise.
2474 * src/misc.c: Likewise.
2475 * src/tar.c: Likewise.
2476 * src/update.c: Likewise.
2478 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2480 * .cvsignore: Added *.shar.gz
2483 * src/common.h (strip_path_elements): New variable.
2484 * src/extract.c (extract_archive): Implemented --strip-path
2485 * src/names.c (cut_path_elements): New function.
2486 * src/tar.c: New option --strip-path=NUM.
2487 (decode_options) Assign boolean values to bool variables.
2489 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2491 * src/delete.c: Fixed deletion from the POSIX archives.
2492 * src/list.c (read_header): Minor change.
2493 * src/tar.c (main): Do not check for volume_label_option
2494 if subcommand_option is not CREATE_SUBCOMMAND.
2495 * src/xheader.c (xheader_decode): Store the header as
2496 well (for eventual delete).
2498 * tests/incremen.sh: Explicitly request GNU format. This will
2499 disappear when GNU extended header keywords are working.
2500 * tests/multiv01.sh: Likewise
2501 * tests/volume.sh: Likewise
2503 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2505 * src/create.c: Support for "linkpath" extended keyword.
2506 * src/xheader.c (decode_record): Reversed the return
2509 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2511 * configure.ac: Allow to redefine the default output format.
2512 * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
2513 (archive_format_string): New function.
2514 (usage): Updated help output.
2519 2003-09-02 Paul Eggert <eggert@twinsun.com>
2521 * src/common.h (destroy_stat, xheader_decode, xheader_store,
2522 xheader_read, xheader_finish, xheader_destroy): Add decls;
2525 * src/create.c (write_extended): Remove unused local 'bufsize'.
2527 * src/delete.c (delete_archive_members): Handle case of
2528 HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
2529 * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
2530 occurs, as it's not possible.
2531 * src/update.c (update_archive): Likewise.
2533 Use "const" when possible in new code.
2534 * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
2535 (fmttab): Now const. All uses changed.
2536 * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
2537 (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
2538 decode_record, xheader_store, xheader_print, code_string, code_time,
2539 code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
2540 gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
2541 linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
2542 mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
2543 uid_coder, uid_decoder, uname_coder, uname_decoder):
2544 Use pointers to const when possible.
2545 (xhdr_tab): Now const.
2547 * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
2548 (set_archive_format): Report an error if no format name matches,
2549 instead of returning an undefined value.
2551 * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
2552 atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
2553 ctime_decoder, mtime_decoder, path_decoder, size_decoder,
2554 uid_decoder, uname_decoder): Remove unused keyword arg.
2557 * src/tar.c (set_archive_format): Now static.
2558 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
2560 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
2561 atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
2562 linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
2563 ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
2564 size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
2565 Remove forward decls; no longer needed.
2566 (xhdr_tab): Move to end, so that the forward decls aren't needed.
2567 Add a forward declaration.
2569 Use 'bool' in new code, when appropriate.
2570 * src/xheader.c (decode_record): Return bool, not int.
2571 * src/common.h (read_header): Since it accepts bool, change
2572 all callers to use false and true rather than 0 and 1.
2574 * src/xheader.c (decode_record): Fix misspelling in diagnostic
2575 "extended headed" -> "extended header".
2577 GNU coding style fixes.
2578 * src/xheader.c (decode_record, xheader_decode):
2579 Do not use decls like "char *p, *q;".
2582 (xheader_store): Avoid parentheses around object operand of sizeof.
2584 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2586 * src/create.c (start_header): Store long file names
2587 in "path" keyword of an extended header if in POSIX
2589 (finish_header): print header before calling write_extended().
2590 * src/list.c (list_archive): Always decode the header. This
2591 is necessary so the extended header is processed and the correct
2592 filename is printed no matter what the state of verbose_option.
2593 * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
2594 for the time being).
2596 2003-09-01 Paul Eggert <eggert@twinsun.com>
2598 Update from gnulib, and correct fnmatch to fnmatch-gnu.
2599 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
2601 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
2603 * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
2604 * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
2605 copying rules from gnulib module descriptions.
2606 (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
2607 Update from gnulib modules alloca, fnmatch, getline, stdbool.
2608 * m4/.cvsignore: Add utimes-null.m4. Sort.
2610 2003-09-01 Sergey Poznyakoff
2612 Added initial support for creating POSIX headers.
2614 * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
2615 (string_to_chars): New functions
2616 (struct xheader): Changed structure
2617 (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
2619 * src/create.c (string_to_chars): New function.
2620 (write_extended): New function
2621 (start_header): Create extended POSIX headers if necessary.
2622 (finish_header): Likewise.
2623 * src/list.c (print_header): Take user/group from
2625 * src/names.c (gid_to_gname,gname_to_gid)
2626 (uid_to_uname,uname_to_uid): Changed prototypes.
2627 * src/tar.c: New option --format.
2628 * src/tar.h (OLDGNU_COMPATIBILITY): Removed
2629 (struct extra_header): Removed unused structure.
2630 (union block.extra_header): Removed unused member.
2631 * src/xheader.c: Implemented coder functions.
2632 * bootstrap: Added obstack.
2633 * lib/.cvsignore: Likewise.
2634 * configure.ac: Added 'gl_OBSTACK'
2635 * m4/Makefile.am: Added new files.
2636 * m4/.cvsignore: Likewise.
2637 * TODO: Minor formatting change
2639 2003-08-31 Sergey Poznyakoff
2641 Added initial support for POSIX extended and STAR headers
2642 (only for listing/extracting).
2644 * src/xheader.c: New file.
2645 * src/Makefile.am: Added xheader.c
2646 * src/tar.h (struct star_header): New datatype
2647 (XHDTYPE,XGLTYPE): New defines
2648 (enum archive_format:STAR_FORMAT): New member
2649 (struct tar_stat_info): New datatype.
2650 (union block.star_header): New member.
2651 * src/common.h (orig_file_name,current_file_name)
2652 (current_trailing_slash,current_link_name): Removed variables.
2653 (current_stat_info): New variable
2654 (current_stat): Removed
2655 (extended_header): New variable
2656 (decode_header): Changed prototype.
2657 * src/list.c (decode_header): Added initial support for POSIX extended
2659 (skip_member): Check oldgnu_header only if current_format is set
2661 * src/buffer.c: Use current_stat_info
2662 * src/compare.c: Likewise.
2663 * src/create.c: Likewise.
2664 * src/delete.c: Likewise.
2665 * src/incremen.c: Likewise.
2666 * src/mangle.c: Likewise.
2667 * src/update.c: Likewise.
2668 * src/extract.c: Likewise.
2669 (make_directories): Improved check for the existence of the directory
2670 * src/tar.c (destroy_stat): New function.
2672 2003-08-29 Paul Eggert <eggert@twinsun.com>
2674 * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
2675 was worth (e.g., different users in en_GB disagree about -ize
2677 * po/en_GB.po: Remove.
2679 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2683 * src/tar.c: Removed support for the obsolete command line
2685 * doc/tar.texi: Removed references to the obsolete command
2688 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2692 * doc/tar.texi: Updated
2693 * src/common.h (check_links_option): New variable
2694 (orig_file_name): New variable
2695 (check_links): New proto.
2696 * src/create.c (struct link.nlink): New member
2697 (link_table): Static for the module.
2698 (dump_file): Update `link' member when adding new links
2700 (check_links): New function.
2701 * src/list.c (print_header): Use orig_file_name.
2702 * src/tar.c: New option --check-links. Changed semantics of
2703 -o to comply to UNIX98 when extracting and to its previous
2704 semantics otherwise.
2705 (main): Call check_links if --check-links. was given.
2707 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2709 * src/list.c (print_header): Revised
2710 * NEWS: Started the entry for 1.13.26
2711 * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
2713 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2715 * .cvsignore: Added to the repository.
2716 * doc/.cvsignore: Likewise.
2717 * lib/.cvsignore: Likewise.
2718 * m4/.cvsignore: Likewise.
2719 * po/.cvsignore: Likewise.
2720 * scripts/.cvsignore: Likewise.
2721 * src/.cvsignore: Likewise.
2722 * tests/.cvsignore: Likewise.
2724 * lib/Makefile.am: Added exitfail.[hc]
2725 * src/misc.c (chdir_do): Fixed call to restore_cwd
2726 * src/buffer.c (flush_read): Fixed behavior on short
2727 reads right after opening the new archive (multiv01.sh test).
2728 (new_volume): Special handling for "-".
2729 * src/list.c (print_header): Print trailing slash if
2730 current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
2731 * tests/multiv01.sh: Minor changes.
2732 * m4/Makefile.am: Added missing files.
2734 2003-07-05 Paul Eggert <eggert@twinsun.com>
2736 Finish the checkin begin yesterday.
2738 * NEWS: Document the user-visible changes installed in the last
2741 * TODO: New file (actually, resurrected; but with new contents).
2743 * src/list.c (read_and): Give full type for procedure arg.
2744 (read_header): Strip trailing slashes, setting current_trailing_slash.
2745 (tartime): Avoid int overflow when printing year (!).
2746 (print_header): New arg specifying block ordinal. All uses changed.
2747 Print link as 'h' type. Give labels for long links and names.
2749 * src/misc.c (contains_dot_dot): Moved to names.c
2750 (must_be_dot_or_slash): New function.
2751 (safer_rmdir): Use it.
2752 (remove_any_file): Now takes enum as option, not boolean.
2753 Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
2754 to unlink a directory.
2755 (deref_stat): Accept bool, not int.
2757 * src/names.c (namelist_match): Allow partial matches only if
2759 (hash_string_hasher): Renamed from hash_avoided_name.
2760 (hash_string_compare): Renamed from compare_avoided_anames.
2761 (hash_string_insert, hash_string_lookup): New functions.
2762 (add_avoided_name, is_avoided_name): Use them.
2763 (safer_name_suffix): New function.
2764 (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
2766 * src/rmt.c: Don't include print-copyr.h.
2767 (prepare_input_buffer): New arg FD.
2768 Do not read more than INT_MAX bytes at once,
2769 since it breaks on some brain damaged Tru64 hosts.
2771 when retrying instead of subtracting 1024; for speed.
2772 (main): Use gettext to translate (C), not print_copyright.
2774 * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
2775 now that gnulib handles this.
2776 Include <stddef.h> and <limits.h> unconditionally, now that we assume
2778 Assume that offsetof is defined in stddef.h.
2779 Do not include <sys/param.h>.
2780 (realloc, lseek): Do not declare.
2781 (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
2782 (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
2783 declarations, since we now assume C89 or better.
2784 (PARAMS): Remove, as we now assume C89. All uses changed.
2785 (bindtextdomain, textdomain): Include <gettext.h> to define.
2786 Include <unlocked-io.h>.
2787 (valloc): Define if not defined, and if valloc is not declared.
2788 (xstrdup): Remove decl.
2790 * src/tar.c: Do not include <print-copyr.h>.
2791 Include <getdate.h>.
2792 (get_date): Remove decl.
2793 (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
2794 IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
2795 NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
2796 SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
2797 (long_options, decode_options): Use them.
2798 (OVERWRITE_DIR_OPTION): Remove.
2799 (long_options): New options --index-file, --no-overwrite-dir.
2800 Remove --overwrite-dir option.
2801 (usage): Use PACKAGE_BUGREPORT.
2802 (decode_options): Terminate new argv properly.
2803 Use PACKAGE_NAME, PACKAGE_VERSION.
2804 If verbose, report how we grokked any textual date option.
2805 (main): Add support for index-file.
2807 * tests/Makefile.am: Convert to UTF-8.
2808 (AUTOMAKE_OPTIONS): Remove.
2809 (TESTS): Add delete04.sh, multiv01.sh, options.sh.
2810 (INCLUDES): Remove ../intl.
2811 (LDADD): Don't link libtar.a twice.
2813 * tests/genfile.c: Convert to UTF-8.
2814 Don't include <print-copyr.h>.
2815 (DEFAULT_PATTERN): Renamed from DEFAULT.
2816 (ZEROS_PATTERN): Renamed from ZEROS.
2817 (main): Use gettext to translate (C), not print_copyright.
2819 2003-07-04 Paul Eggert <eggert@twinsun.com>
2821 Revamp to meet current standards of autoconf, automake,
2822 gettext, and gnulib, and incorporate new translations.
2824 * config/config.guess, config/config.sub, config/depcomp,
2825 config/install-sh, config/mdate-sh, config/missing,
2826 config/mkinstalldirs, config/texinfo.texi:
2827 Moved here from parent directory, or from doc.
2828 * config.hin: Renamed from config.h.in.
2829 * config/config.rpath: New file.
2831 * intl: Remove this subdirectory.
2833 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
2835 * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
2836 lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
2837 lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
2838 lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
2839 lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
2840 m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
2843 * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
2844 lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
2845 lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
2846 m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
2847 m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
2848 m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
2849 m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
2850 m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
2851 m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
2852 m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
2853 m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
2854 m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
2855 m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
2856 m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
2857 m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
2858 m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
2859 po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
2860 po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
2861 po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
2863 * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
2864 lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
2865 lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
2866 lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
2867 lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
2868 lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
2869 lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
2870 lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
2871 lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
2872 lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
2873 lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
2874 lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
2875 lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
2876 m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
2877 m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
2878 m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
2879 m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
2880 m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
2882 Upgrade to latest version from external source. The file "bootstrap"
2883 now grabs these automatically, so we needn't keep track of them
2884 in this change long any longer.
2886 * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
2887 (SUBDIRS): Remove intl.
2888 * PORTS: Update for star, Macintosh.
2889 * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
2890 Bison 1.875, gettext 0.12.1.
2891 * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
2892 * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
2893 (AC_CONFIG_AUX_DIR): New.
2894 (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
2896 (AC_PREREQ): Bump from 2.52 to 2.57.
2897 (AC_GNU_SOURCE): New.
2898 (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
2899 we no longer support K&R C.
2901 (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
2902 sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
2903 (AC_MBSTATE_T): Remove.
2904 (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
2905 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
2906 HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
2907 (AM_STDBOOL_H): Add.
2908 (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
2909 jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
2910 (AC_CHECK_TYPE): Remove ssize_t.
2911 (gt_TYPE_SSIZE_T): Add.
2912 (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
2913 jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
2914 AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
2915 AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
2916 jm_FUNC_MKTIME, jm_FUNC_REALLOC):
2917 Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
2918 (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
2919 (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
2920 (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
2921 napms, poll, select, strstr, usleep.
2922 (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
2923 rmdir, strcasecmp, strncasecmp, strtol, strtoul.
2924 (AM_GNU_GETTEXT): Use external and need-ngettext options.
2925 (AM_GNU_GETTEXT_VERSION): New.
2926 (AC_OUTPUT): Remove intl/Makefile.
2928 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2929 ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
2930 * doc/fdl.texi: Update to current GNU version.
2931 * doc/gettext.texi: Update to current coreutils version,
2932 plus a copyright notice.
2933 * doc/tar.texi: Switch to new method for doing copyright notices.
2934 Use @acronym instead of @sc where appropriate.
2935 Remove empty examples. Give a few more examples.
2937 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2938 (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
2939 are built up in pieces with +=.
2940 (noinst_HEADERS, INCLUDES): Remove.
2941 (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
2942 (libtar_a_LIBADD): Use $ rather than @.
2943 (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
2945 * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
2946 bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
2947 ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
2948 intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
2949 isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
2950 memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
2951 pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
2952 safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
2953 stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
2954 strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
2955 unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
2956 Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
2957 prereq.m4, xstrtoimax.m4.
2959 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
2960 be translated, since it's not a user-visible tool.
2962 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2964 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2965 (INCLUDES): Remove ../intl. Put top-srcdir before ., for
2966 consistency with coreutils.
2967 (LDADD): Link LIBINTL after libtar.a, since
2968 it's now external and should stand by itself.
2970 * src/buffer.c (print_total_written): Adjust to new human.h
2972 (child_open_for_compress): Do not increase size to BLOCKSIZE.
2973 (open_archive): Open index file name.
2974 Strip trailing slahes from file names.
2975 (flush_write): Set size to 0 if not saving names.
2976 (flush_write, flush_read): Use safer_name_suffix rather than
2979 * src/common.h: Include <quote.h>.
2980 (absolute_names_option, atime_preserve_option, backup_option,
2981 block_number_option, checkpoint_option, dereference_option,
2982 force_local_option, ignore_failed_read_option, ignore_zeros_option,
2983 incremental_option, interactive_option, multi_volume_option,
2984 numeric_owner_option, one_file_system_option, recursive_unlink_option,
2985 read_full_records_option, remove_files_option, same_order_option,
2986 show_omitted_dirs_option, sparse_option, starting_file_option,
2987 to_stdout_option, totals_option, touch_option, verify_option,
2988 dev_null_output, now_verifying, we_are_root): Now bool, not int.
2989 (current_trailing_slash, index_file_name, recent_long_name_blocks,
2990 recent_long_link_blocks): New vars.
2991 (NO_OVERWRITE_DIR_OLD_FILES): New constant.
2992 (OVERWRITE_OLD_DIRS): Remove.
2993 (enum remove_option): New enum.
2994 (remove_any_file): Use it as option arg, not int.
2995 (is_avoided_name, contains_dot_dot): Return bool, not int.
2996 (safer_name_suffix): New decl.
2998 * src/compare.c (now_verifying): Now bool, not int.
2999 (fill_in_sparse_array): Move to extract.c. Now returns bool;
3000 all callers changed to test for failure.
3001 (diff_sparse_files): Take size from current_stat, not from param.
3002 (diff_archive): Do not count trailing slashes in archives.
3003 (verify_volume): Test for header failure after loop, not before.
3005 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
3006 All callers changed.
3007 (start_header): Clear devmajor and devminor fields, too.
3008 (finish_header): New arg block_ordinal.
3009 (init_sparsearray): Now extern. Set sp_array_size to
3010 SPARSES_IN_OLDGNU_HEADER if it is zero.
3011 (dump_file): Keep link table as a hash.
3012 Do not count "file changed as we read it" as a failure.
3014 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
3015 Move extern decl to common.h.
3017 * src/extract.c (we_are_root): Now bool, not int.
3018 (check_time): Warn about implausibly old time stamps.
3019 (set_stat): Use utimbuf, not stat_info.
3020 (prepare_to_extract): New arg DIRECTORY.
3021 (fill_in_sparse_array): Moved here from compare.c.
3022 (extract_sparse_file): Now returns off_t, giving size left.
3023 Truncate file at end.
3024 (extract_archive): Use safer_name_suffix rather than rolling our own.
3025 Use fill_in_sparse_array rather than rolling our own.
3026 Strip trailing slashes more effectively.
3027 Check for unsafe names.
3029 * src/incremen.c (struct directory): nfs and found are now of type
3031 (gnu_restore): Now takes directory name as argument, not offset
3032 of directory name in a global. All uses changed.
3033 (CURRENT_FILE_NAME): Remove.
3036 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
3039 2002-09-30 Paul Eggert <eggert@twinsun.com>
3041 * src/rmt.c (prepare_input_buffer): Renamed form
3042 prepare_record_buffer. All uses changed. Do not assume that
3043 size_t is the same width as int.
3045 2002-03-29 Paul Eggert <eggert@twinsun.com>
3047 * src/incremen.c (get_directory_contents):
3048 If ignore_failed_read_option, only warn about
3049 get_directory_contents failures. Fix suggested by
3052 2002-01-31 Mark W. Eichin <eichin@thok.org>
3054 * src/buffer.c (child_open_for_compress): Don't try to read
3055 past the end of the buffer.
3057 2001-10-11 Jim Meyering <meyering@lucent.com>
3059 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
3060 and quote_n (1, ... to avoid clobbering a buffer.
3062 2001-09-26 Paul Eggert <eggert@twinsun.com>
3064 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
3066 * src/buffer.c (flush_read): Don't diagnose partial blocks before
3067 end of file; just ignore them silently.
3069 * src/list.c (read_header): Don't keep around extended name
3070 and link info indefinitely; keep it only for the next file.
3071 This fixes a bug introduced in 1.13.24, and removes the need
3072 for some static variables. Set recent_long_name and
3073 recent_long_link to zero if there were no long links; this
3074 avoids a violation of ANSI C rules for pointers in delete.c.
3075 * THANKS: Add Christian Laubscher.
3077 2001-09-26 Jim Meyering <meyering@lucent.com>
3079 * doc/tar.texi (Remote Tape Server): is know -> is known
3081 2001-09-25 Paul Eggert <eggert@twinsun.com>
3083 * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
3084 <iconv.h> may define EILSEQ (e.g. libiconv). Define a
3085 replacement EILSEQ to be ENOENT, not EINVAL, since callers may
3086 want to distinguish EINVAL and EILSEQ.
3088 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
3090 * src/extract.c (maybe_recoverable):
3091 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
3093 2001-09-22 Paul Eggert <eggert@twinsun.com>
3095 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
3097 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
3100 * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
3101 * PORTS: Add copyright notice, 'star' reference.
3102 * README-alpha: Add copyright notice, autoconf 2.52 patch.
3103 * THANKS: Add Christophe Kalt.
3104 * config.sub: Upgrade to 2001-09-14 version.
3106 * configure.ac (ALL_LINGUAS): Add ko.
3107 * po/ko.po: Resurrected file.
3109 * doc/convtexi.pl: Add coding advice for Emacs.
3111 * doc/getdate.texi: Add copyright notice.
3113 * doc/mdate-sh: Upgrade to automake 1.5 version.
3115 * doc/tar.texi (extracting files): Mention --to-stdout.
3116 (Option Summary, Dealing with Old Files): New option --overwrite-dir.
3117 (Overwrite Old Files): Likewise.
3119 * lib/Makefile.am (noinst_HEADERS):
3120 Remove copysym.h. Add print-copyr.h, unicodeio.h.
3121 (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
3123 * lib/copysym.c, lib/copysym.h: Remove.
3124 * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
3125 lib/unicodeio.h: New files.
3127 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3128 lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
3130 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
3131 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
3133 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
3134 * m4/isc-posix.m4: Remove.
3136 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
3138 * po/POTFILES.in: Add copyright notice.
3140 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
3142 * tests/Makefile.am (LDADD): Likewise.
3144 * src/buffer.c (write_archive_buffer, close_archive):
3145 If an archive is a socket, treat it like a FIFO.
3146 (records_read, records_written): New vars.
3147 (write_archive_to_stdout): Now bool, not int.
3148 (open_archive, flush_write, flush_read): Keep records_read and
3149 records_written up to date.
3151 * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
3152 (write_archive_to_stdout): Now bool, not int.
3153 (enum read_header): New value HEADER_SUCCESS_EXTENDED.
3154 (read_header): Now takes bool arg. Existing callers modified
3155 to pass 0, unless otherwise specified.
3157 * src/delete.c (records_read): Remove; now a global.
3158 (acting_as_filter): Now bool, not int.
3159 (recent_long_name, recent_long_link, recent_long_name_blocks,
3160 recent_long_link_blocks, records_read, records_written): New decls.
3161 (records_skipped): New var.
3162 (move_archive): Don't divide by zero if arg is 0.
3163 Use the above vars to compute how far to move.
3164 (write_recent_blocks): New function.
3165 (delete_archive_member): Pass 1 to read_header, so that it doesn't
3166 read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
3167 Keep track of how many records have been skipped.
3168 Let the buffer code count records.
3169 When copying a header, copy any extended headers that came before it.
3171 * src/extract.c (extract_archive): When marking a directory to be
3172 updated after symlinks, stat all directories after it in the
3173 delayed-set-stat list too, since they will be checked after
3174 symlinks. Add support for --overwrite-dir.
3176 * src/list.c (recent_long_name, recent_long_link,
3177 recent_long_name_blocks, recent_long_link_blocks): New vars.
3178 (read_and): Pass 0 to read_header.
3179 (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
3180 headers into new vars. Null-terminate incoming symbolic links.
3182 * src/rmt.c: Include print-copyr.h, not copysym.h.
3183 (main): Use print_copyright, not copyright_symbol.
3184 * src/tar.c (decode_options): Likewise.
3185 (OVERWRITE_DIR_OPTION): New constant.
3186 (long_options, usage, decode_options): Add --overwrite-dir.
3188 * src/tar.h: Put copyright notice into documentation.
3190 * tests/Makefile.am (TESTS): Add delete03.sh.
3191 * tests/delete03.sh: New file.
3193 * tests/genfile.c: Include print-copyr.h, not copysym.h.
3194 (main): Use print_copyright, not copyright_symbol.
3195 Include <argmatch.h>.
3196 (pattern_strings): Remove.
3197 (pattern_args, pattern_types): New constants.
3198 (main): Use XARGMATCH, not argmatch.
3200 2001-09-20 Jim Meyering <meyering@lucent.com>
3202 * lib/xstrtol.c (strtoimax): Guard declaration with
3203 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
3204 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
3205 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
3206 (strtoumax): Likewise, for completeness (it wasn't necessary).
3207 * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
3208 Check for declaration of strtoimax.
3209 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
3210 Check for declaration of strtoumax.
3212 2001-09-16 Paul Eggert <eggert@twinsun.com>
3214 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
3216 2001-09-14 Paul Eggert <eggert@twinsun.com>
3218 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
3220 * README-alpha: Describe automake patch.
3222 * configure.ac (LIBOBJS):
3223 Remove automake 1.4 workaround, as we're using 1.5 now.
3224 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
3226 * lib/copysym.c: Include stddef.h, for size_t.
3227 Include langinfo.h if needed.
3228 Use locale_charset only if USE_INCLUDED_LIBINTL;
3229 if not, use nl_langinfo (CODESET) if available.
3231 2001-09-13 Paul Eggert <eggert@twinsun.com>
3233 * config.guess, config.sub: Sync with canonical versions.
3235 * configure.ac (jm_PREREQ_XGETCWD): Add.
3237 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
3238 (libtar_a_SOURCES): Add copysym.c.
3239 * copysym.c, copysym.h: New files.
3241 * lib/error.c: Sync with fileutils version.
3243 * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
3244 * m4/getcwd.m4: New file.
3245 * m4/uintmax_t.m4: Remove.
3247 * m4/gettext.m4 (AM_WITH_NLS):
3248 Fix bug with calculating version of Bison 1.29.
3249 Reported by Karl Berry.
3251 * src/Makefile.am (datadir): Remove.
3253 * src/rmt.c: Include copysym.h.
3254 (main): Use copyright_symbol to translate copyright notice,
3256 * src/tar.c: Likewise.
3257 * tests/genfile.c: Likewise.
3259 * src/system.h (MB_LEN_MAX): New symbol.
3261 2001-09-11 Paul Eggert <eggert@twinsun.com>
3263 * src/extract.c (struct delayed_set_stat): New member
3265 (delay_set_stat): Initialize it to 0.
3266 (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
3267 taking an extra stat ourselves. All callers changed.
3268 (set_stat): Likewise.
3269 (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
3270 If false, stop when encountering a struct whose 'after_symlinks'
3271 member is true. Otherwise, go through all structures but check
3272 them more carefully. All callers changed.
3273 (extract_archive): When extracting a deferred symlink, if its parent
3274 directory's status needs fixing, then mark the directory as needing
3275 to be fixed after symlinks.
3276 (extract_finish): Fix status of ordinary directories, then apply
3277 delayed symlinks, then fix the status of directories that are
3278 ancestors of delayed symlinks.
3280 * src/rtapelib.c (rexec):
3281 Remove declaration; it ran afoul of prototypes on Crays.
3282 Reported by Wendy Palm of Cray.
3284 2001-09-06 Paul Eggert <eggert@twinsun.com>
3286 * lib/strtoimax.c (HAVE_LONG_LONG):
3287 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
3288 (strtoimax): Use sizeof (long), not
3289 sizeof strtol (ptr, endptr, base),
3290 to work around bug in IBM C compiler.
3292 2001-09-04 Paul Eggert <eggert@twinsun.com>
3294 * lib/xgetcwd.c: Include "xalloc.h".
3295 (xgetcwd): Do not return NULL when memory is exhausted; instead,
3296 report an error and exit.
3298 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
3299 (jm_PREREQ): Use it.
3301 2001-09-03 Paul Eggert <eggert@twinsun.com>
3303 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
3304 (jm_PREREQ_XGETCWD): New macro.
3306 * lib/exclude.c (fnmatch_no_wildcards):
3307 Fix typo that caused us to do case-folding
3308 search even when that was not desired. This occurred only in the
3311 * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
3312 Do not include xalloc.h.
3313 (INITIAL_BUFFER_SIZE): New symbol.
3314 Do not use xmalloc / xrealloc, since the caller is responsible for
3315 handling errors. Preserve errno around `free' during failure.
3316 Do not overrun buffer when using getwd.
3318 * lib/xgetcwd.c (xgetcwd):
3319 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
3320 to decide whether to use getcwd (NULL, 0).
3322 2001-09-02 Paul Eggert <eggert@twinsun.com>
3324 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
3326 2001-09-01 Jim Meyering <meyering@lucent.com>
3328 * exclude.c: Use `""', not `<>' to #include non-system header files.
3329 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
3330 and strncasecmp as r-values. Unixware didn't have declarations.
3332 2001-08-31 Jim Meyering <meyering@lucent.com>
3334 * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
3335 Use an initial, malloc'd, buffer of length 128 rather than
3336 a statically allocated one of length 1024.
3338 2001-08-30 Paul Eggert <eggert@twinsun.com>
3340 * lib/utime.c: Include full-write.h.
3341 * lib/xstrtol.c (strtoimax): New decl.
3343 2001-08-29 Paul Eggert <eggert@twinsun.com>
3345 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
3347 * src/create.c (dump_file): Relativize link names before dumping.
3348 This fixes a bug reported by Jose Pedro Oliveira.
3350 * src/create.c (dump_file): Use offsetof when computing sizes for
3351 struct hack; this avoids wasted space in some cases.
3352 * src/incremen.c (note_directory, find_directory): Likewise.
3353 * src/names.c (name_gather, addname): Likewise.
3355 * src/extract.c (extract_archive): Use strcpy, not memcpy,
3356 for consistency with other code that does similar things.
3357 * src/names.c (name_gather): Likewise.
3359 * src/names.c (read_name_from_file, name_next, name_gather,
3360 add_hierarchy_to_namelist): Avoid quadratic behavior when
3361 reallocating buffers. Check for buffer size overflow.
3362 (addname): Avoid unnecessary clearing of memory.
3364 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
3366 * src/extract.c (delay_set_stat): Fix off-by-one error in file
3367 name size allocation that caused core dumps.
3369 2001-08-28 Paul Eggert <eggert@twinsun.com>
3371 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
3373 * configure.ac (GNU_SOURCE): Define to 1, not /**/.
3374 (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
3375 (daddr_t): Remove; no longer used.
3376 (jm_PREREQ_HUMAN): Add.
3378 * acconfig.h: Remove; no longer needed.
3380 * config.guess, config.sub:
3381 New files, from automake 1.5. Gettext 0.10.39 needs them.
3382 * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
3384 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
3385 (SUBDIRS): Put intl before lib, as gettext requires.
3387 * ABOUT-NLS: Upgrade to gettext 0.10.39.
3388 * intl: Upgrade entire directory to gettext 0.10.39.
3389 * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
3390 New files, from gettext 0.10.39.
3391 * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
3392 Upgrade to gettext 0.10.39,
3393 * po/Makefile.in.in: Likewise, except fix a typo in its copying
3395 * po/cat-id-tbl.c, po/stamp-cat-id:
3396 Remove; no longer used by gettext 0.10.39.
3397 * po/ChangeLog: New file.
3399 * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
3400 $(srcdir)/tar.texi: Likewise.
3401 * doc/freemanuals.texi: New file.
3402 * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
3403 `fileds' -> `fields'
3404 * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
3406 * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
3407 (noinst_HEADERS): Add quote.h.
3408 (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
3410 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
3412 * lib/full-write.c, lib/savedir.c: Comment fix.
3414 * lib/pathmax.h: Remove.
3416 * lib/quote.c, lib/quote.h: New files.
3418 * lib/xgetcwd.c: Don't include pathmax.h.
3419 Include stdlib.h and unistd.h if available.
3421 (xmalloc, xstrdup, free): Remove decls.
3422 (xgetcwd): Don't assume sizes fit in unsigned.
3423 Check for overflow when computing sizes.
3424 Simplify reallocation code.
3426 * lib/xmalloc.c: Quote failure tests.
3428 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
3430 * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
3431 similar to strtol.c.
3432 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
3433 (verify): New macro.
3434 (strtoumax, uintmax_t, strtoull, strtol): Remove.
3435 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
3436 (strtoimax): Renamed from strtoumax. All uses of unsigned values
3437 changed to signed values. Check sizes at compile-time, not
3438 run-time. Prefer strtol to strtoll if both work.
3441 * lib/xstrtol.h (xstrtoimax): New decl.
3443 * m4/Makefile.am (EXTRA_DIST):
3444 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
3445 longlong.m4, xstrtoimax.m4.
3447 * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
3448 Remove; now done by autoconf.
3449 (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
3450 Use AC_CHECK_TYPE instead of merely looking for the header.
3452 * m4/uintmax_t.m4: Use shorter comment.
3454 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
3455 Quote first arg of AC_DEFUN.
3456 Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
3457 is needed to parse the include file.
3458 Simplify logic behind the args to AC_REPLACE.
3460 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
3462 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
3465 Use "Copyright %d" to simplify the translator's job in the future.
3466 Advise translator about circle-C.
3467 * src/tar.c: (decode_options): Likewise.
3468 * tests/genfile.c (main): Likewise.
3470 2001-08-28 Jim Meyering <meyering@lucent.com>
3472 * lib/argmatch.c: Include "quote.h".
3473 (argmatch_invalid): Quote the context.
3475 * lib/dirname.c (dir_name): Fix typo on PC platforms.
3477 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
3478 Use single-quote for local .h files.
3480 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
3482 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
3485 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
3486 invoking mktime the last time.
3488 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
3490 * lib/rename.c: Major rewrite by Volker Borchert to use system
3491 rename function, but to work around problems with trailing
3494 * lib/strtoll.c: New file, from glibc.
3495 * lib/strtoul.c: Update from glibc.
3497 * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
3498 Add support for signed numbers, too.
3499 (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
3501 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
3503 (strtoumax, uintmax_t, strtoull, strtoul): New macros.
3504 (main): Use generic names in debugging output.
3505 * lib/strtoimax.c: Plus add the following changes of my own:
3506 (main): Use accurate names in debugging output.
3508 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
3511 * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
3512 m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
3513 m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
3514 m4/utime.m4, m4/utimes.m4:
3515 Quote the first argument in each use of AC_DEFUN.
3517 * m4/getline.m4: Don't use string.h.
3519 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
3521 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
3523 2001-08-27 Paul Eggert <eggert@twinsun.com>
3525 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
3527 The biggest change is the new --exclude semantics and options.
3528 The basic idea was suggested by Gerhard Poul; thanks!
3530 * NEWS: Describe new --exclude semantics and options, and bug fixes.
3531 * README: ignfail.sh fails on some NFS hosts.
3532 * NEWS, README, lib/xstrtol.h: Add copyright notice.
3534 * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
3535 (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
3536 Remove; the automake bug has been fixed.
3537 * acinclude.m4: Remove.
3539 * configure.ac: Renamed from configure.in.
3540 (AC_PREREQ): Bump from 2.13 to 2.52.
3541 (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
3542 1997-05-30) has an encoding error.
3543 (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
3544 (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
3546 * doc/fdl.texi: Update to current GNU version.
3548 * doc/tar.texi: Put leading '*' in direntry.
3549 Accommodate new gfdl sectioning.
3550 New option --recursion (the default) that is the inverse of
3553 New options --anchored, --ignore-case, --wildcards,
3554 --wildcards-match-slash, and their negations (e.g., --no-anchored).
3555 Along with --recursion and --no-recursion, these control how exclude
3556 patterns are interpreted. The default interpretation of exclude
3557 patterns is now --no-anchored --no-ignore-case --recursion
3558 --wildcards --wildcards-match-slash.
3560 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
3562 * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
3563 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
3564 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
3565 Include if available.
3566 (<xalloc.h>): Include
3567 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
3568 (verify): New macro. Use it to verify that EXCLUDE macros do not
3569 collide with FNM macros.
3570 (struct patopts): New struct.
3571 (struct exclude): Use it, as exclude patterns now come with options.
3572 (new_exclude): Support above changes.
3573 (new_exclude, add_exclude_file):
3574 Initial size must now be a power of two to simplify overflow checking.
3575 (free_exclude, fnmatch_no_wildcards): New function.
3576 (excluded_filename): No longer requires options arg, as the options
3577 are determined by add_exclude. Now returns bool, not int.
3578 (excluded_filename, add_exclude):
3579 Add support for the fancy new exclusion options.
3580 (add_exclude, add_exclude_file): Now takes int options arg.
3581 Check for arithmetic overflow when computing sizes.
3582 (add_exclude_file): xrealloc might modify errno, so don't
3583 realloc until after errno might be used.
3585 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
3587 (free_exclude): New decl.
3588 (add_exclude, add_exclude_file): Now takes int options arg.
3589 (excluded_filename): No longer requires options arg, as the options
3590 are determined by add_exclude. Now returns bool, not int.
3592 * lib/prepargs.c: Include <string.h>; required for C99 since
3596 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
3598 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
3599 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
3601 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
3602 Remove inttypes_h.m4, largefile.m4, mktime.m4.
3604 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
3605 subsumed by Autoconf 2.50.
3607 * m4/error.m4: Upgrade to serial 2.
3609 * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
3610 remove test for GNU C library. It's not correct, as some
3611 older glibcs are buggy.
3613 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
3615 * m4/prereq.m4: Upgrade to serial 20, but then:
3616 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
3617 (jm_PREREQ_EXCLUDE): New macro.
3618 (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
3621 * m4/realloc.m4: Upgrade to serial 4.
3623 * m4/strerror_r.m4: Revert to serial 1002.
3625 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
3627 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
3629 * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
3630 (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
3631 it is now subsumed by autoconf. Add inttypes.h.
3633 * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
3634 po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
3636 * src/buffer.c (new_volume): Stop if the script exits with an error.
3638 * src/common.h (excluded_with_slash, excluded_without_slash):
3639 Remove, replacing by:
3640 (excluded): New decl.
3641 (link_error): New decl.
3642 (excluded_name): Now returns bool.
3645 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
3646 Support hard links to symbolic links.
3648 (struct delayed_symlink): Remove 'names' member, replacing it with
3649 'sources' and 'target' member. All uses changed.
3651 (struct string_list): New type.
3653 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
3654 for struct hack; this avoids wasted space in some cases.
3656 (extract_archive): Fix test for absolute pathnames and/or "..".
3657 Use link_error to report errors for links.
3658 Remove redundant trailing '/' at "really_dir", for all uses, not
3659 just before invoking mkdir.
3660 If overwriting old files, do not worry so much about existing
3662 Fix mode computation in the case where the directory exists.
3664 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
3665 link, make a copy of the symbolic link.
3667 * src/incremen.c (get_directory_contents):
3668 If ignore_failed_read_option, only warn about
3671 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
3672 However, check for error even for '-' or '+' case.
3674 (print_header): Try parsing uids and gids as unsigned integers first,
3675 and as a uid_t or gid_t only if that fails. This adds support for
3676 listing positive uids and gids that are greater than UID_MAX and
3679 * src/misc.c (link_error): New function.
3681 * src/names.c (collect_and_sort_names):
3682 If ignore_failed_read_option, only warn about
3685 (excluded_name): Now returns bool. Simplify, as the fancy
3686 features are now all in excluded_filename.
3688 * src/rtapelib.c (base_name): Remove decl, as system.h now
3691 * src/system.h: Include stddef.h if available.
3692 (offsetof): Declare if stddef.h doesn't.
3694 Include <dirname.h>.
3695 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
3697 * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
3698 NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
3699 NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
3700 WILDCARDS_MATCH_SLASH_OPTION):
3703 (long_options, usage, decode_options): Add support for --anchored,
3704 --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
3705 --no-wildcards-match-slash, --recursion, --wildcards,
3706 --wildcards-match-slash.
3708 (decode_options): Implement the new way of interpreting exclude
3711 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
3713 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
3714 just print error messages suggesting alternatives.
3716 (add_filtered_exclude): Remove.
3718 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
3720 * tests/extrac04.sh (out): Remove
3721 directory/subdirectory/file1, as the new semantics for
3722 --exclude exclude it.
3724 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
3726 2001-08-12 Paul Eggert <eggert@twinsun.com>
3728 * lib/addext.c (<errno.h>): Include.
3729 (errno): Declare if not defined.
3730 (addext): Work correctly on the Hurd, where pathconf returns -1 and
3731 leaves errno alone, because there is no limit. Also, work even if
3732 size_t is narrower than long.
3734 2001-07-08 Paul Eggert <eggert@twinsun.com>
3736 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
3738 2001-05-10 Paul Eggert <eggert@twinsun.com>
3740 * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
3741 Include <backupfile.h> and <dirname.h> after size_t is defined.
3742 (addext): Use base_len to trim redundant trailing slashes instead of
3745 * lib/backupfile.c (ISSLASH, base_name):
3746 Remove decls; now in dirname.h.
3747 Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
3749 (find_backup_file_name): Rename locals to avoid new functions.
3750 Use base_len instead of rolling it ourselves.
3751 Work even if dirlen is 0.
3752 Use a dir of '.' if given the empty string.
3755 Do not include <stdio.h>, <assert.h>; no longer needed.
3756 (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
3757 Include <string.h>, <dirname.h>.
3758 (base_name): Allow file names ending in slashes, other than names
3759 that are all slashes. In this case, return the basename followed
3762 * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
3763 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
3764 (dir_len): Renamed from dirlen.
3765 All callers changed.
3767 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
3769 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
3771 2001-02-16 Paul Eggert <eggert@twinsun.com>
3773 * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
3774 Do not declare or define if HAVE_MBRTOWC,
3775 since the test for HAVE_MBRTOWC now requires proper declarations.
3777 * lib/alloca.c (malloc): Undef before defining.
3779 2001-02-13 Paul Eggert <eggert@twinsun.com>
3781 * src/compare.c (read_and_process): Use off_t for size.
3782 From Maciej W. Rozycki.
3784 2001-01-26 Paul Eggert <eggert@twinsun.com>
3786 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
3788 2001-01-12 Paul Eggert <eggert@twinsun.com>
3790 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
3792 * lib/savedir.h (savedir): Remove size arg.
3794 * doc/tar.texi: Add @setchapternewpage odd.
3795 Remove -I as an alias for -T, for now.
3797 Update copyright. Remove "Published by".
3798 Dates beginning with / or . are taken to be file names.
3800 * src/tar.c (<time.h>): Do not include;
3801 (time): Do not declare.
3802 (usage): Remove -I as an alias for -T.
3803 (OPTION_STRING): Remove -I.
3804 (decode_options): Dates that look like an absolute path name,
3805 or that start with '.', are presumed to be file names whose
3807 Remove 'I' as an aliase for 'T'.
3810 * src/extract.c (<time.h>): Do not include; system.h now does this.
3811 (make_directories): Skip filesystem prefixes.
3812 Don't assume '/' is the only separator.
3813 (extract_sparse_file): Use new full_write semantics.
3814 On write error, return instead of invoking skip_file.
3815 Do not free sparsearray; caller does this now.
3816 (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
3818 (extract_archive): Don't assume file name lengths fit in int.
3819 Report what got stripped from member name; it might be more than '/'.
3820 Use new full_write semantics.
3821 Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
3823 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
3825 * src/buffer.c (<time.h>): Do not include; system.h now does this.
3826 (time): Remove decl; likewise.
3827 (child_open_for_uncompress): Use new full_write semantics.
3828 (flush_write): Use ISSLASH instead of testing for '/'.
3829 (flush_read): Likewise.
3831 * src/rmt.h (_remdev): Look for / anywhere in Path.
3833 * src/misc.c (contains_dot_dot): Skip filesystem prefix.
3834 Don't assume '/' is the only separator.
3835 (safer_rmdir): Don't assume '/' is the only separator.
3837 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
3839 * lib/dirname.h (dirlen): New decl.
3841 * src/incremen.c (get_directory_contents):
3842 Remove path_size arg; all callers changed.
3843 Don't assume '/' is the only directory separator.
3844 (gnu_restore): Work even if file name length doesn't fit in int.
3846 * lib/addext.c (ISSLASH): New macro.
3847 (addext): Trim any redundant trailing slashes.
3849 * src/names.c (name_next):
3850 Don't assume '/' is the only directory separator.
3851 (namelist_match): Likewise.
3852 (add_hierarchy_to_namelist): Remove dirsize arg.
3853 Do not assume '/' is the only directory separator.
3854 (new_name): Likewise.
3856 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
3857 (libtar_a_SOURCES): Add dirname.c.
3859 * src/create.c (relativize):
3860 New function, with much of old start_header's guts.
3861 Handle filesystem prefixes.
3862 (start_header): Use this new function.
3863 (init_sparsearray): Don't bother to zero out the new array;
3865 (deal_with_sparse): Fix array allocation bug.
3866 (create_archive): Don't assume '/' is the only separator.
3867 (dump_file): Likewise.
3868 Don't worry about leading / in symlink targets.
3870 * lib/savedir.c (savedir):
3871 Remove size arg; it wasn't portable. All callers changed.
3873 * lib/utime.c (utime_null): Adjust to new full_write convention.
3875 * configure.in (YACC): Avoid portability problem with Ultrix sh.
3877 * lib/backupfile.c: Include <dirname.h>.
3878 (ISSLASH): New macro.
3879 (find_backup_file_name): Use dirlen to calculate directory lengths.
3880 (max_backup_version): Strip redundant trailing slashes.
3882 * src/common.h: Include <full-write.h>.
3883 (get_directory_contents): No longer has size arg.
3884 (gnu_restore): Arg is size_t, not int.
3886 * src/system.h: Include <time.h>.
3887 (time): Declare if not defined.
3889 * lib/full-write.c: Include full-write.h, not safe-read.h.
3890 full_write returns size_t, with short writes meaning failure.
3891 All callers changed.
3893 * src/rtapelib.c: Include full-write.h.
3895 * src/rmt.c: Include full-write.h.
3896 (main): Update copyright.
3898 * doc/getdate.texi: Mention that only English is supported.
3899 Show how to use "date" so that the output is acceptable to getdate.
3900 Mention Z as an abbreviation for UTC.
3902 * lib/full-write.h: New file.
3904 * src/list.c: system.h now does time.h stuff.
3907 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
3909 Do not include string.h, strings.h, or assert.h; no longer needed.
3910 (strrchr, memrchr, malloc): Remove decls; no longer needed.
3912 (base_name): New decl.
3913 (BACKSLASH_IS_PATH_SEPARATOR): Remove.
3914 (dir_name_r): Remove.
3915 (dirlen): New function.
3916 (dir_name): Use dirlen instead of dir_name_r.
3917 (<string.h>, <strings.h>): Include only if test program.
3918 (main): Use "return 0", not "exit (0)".
3920 2000-12-08 Paul Eggert <eggert@twinsun.com>
3922 * lib/dirname.h: New file.
3924 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
3926 * lib/fnmatch.c: Do not comment out all the code if we are using
3927 the GNU C library, because in some cases we are replacing buggy
3928 code in the GNU C library itself.
3930 2000-10-30 Paul Eggert <eggert@twinsun.com>
3932 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
3934 2000-10-29 Paul Eggert <eggert@twinsun.com>
3936 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
3938 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
3940 2000-10-28 Paul Eggert <eggert@twinsun.com>
3942 * doc/tar.texi: --no-recursion now applies to extraction, too.
3943 * src/create.c (dump_file): no_recurse_option -> ! recursion_option
3944 * src/names.c (namelist_match, excluded_name):
3945 Do not match subfiles of a directory
3946 if --no-recursion is specified.
3947 * src/tar.c (NO_RECURSE_OPTION): Remove.
3948 (long_options): Have getopt set the --no-recursion flag.
3949 (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
3950 Remove case for NO_RECURSE_OPTION.
3951 * src/common.h (recursion_option):
3952 Renamed from no_recurse_option, with sense
3953 negated, and with FNM_LEADING_DIR being the nonzero value.
3955 * names.c (namelist_match): New function.
3956 (name_match, name_scan): Use it to eliminate duplicate code.
3957 (names_notfound): Remove special case for Amiga.
3959 2000-10-27 Paul Eggert <eggert@twinsun.com>
3961 * src/misc.c (read_error_details, read_warn_details,
3962 read_fatal_details): Don't assume size_t is unsigned long.
3964 * src/buffer.c (flush_read): If read_full_records_option, try to
3965 fill the input buffer, as --delete -f - needs this.
3967 2000-10-24 Paul Eggert <eggert@twinsun.com>
3969 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
3971 * src/buffer.c (check_label_pattern):
3972 Make sure header name is a string before
3973 passing it to fnmatch.
3974 (init_volume_number): Check for global_volno overflow.
3975 (new_volume): Check for global_volno overflow.
3977 * src/tar.c (decode_options):
3978 Check that volume label is not too long to overflow
3979 name in tar header block.
3981 * Makefile.am (EXTRA_DIST): Remove rebox.el.
3983 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
3984 (AC_FUNC_STRERROR_R): Use this instead.
3986 2000-10-23 Paul Eggert <eggert@twinsun.com>
3988 * src/extract.c: Include <time.h>, since we invoke "time".
3990 * lib/prepargs.c (prepend_default_options):
3991 Don't use NULL, for portability.
3993 * m4/fnmatch.m4: Add "working" to message.
3995 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
3997 (getpwuid, getgrgid): Declare only if system headers don't.
3998 (gid_to_gname): Don't invoke setgrent.
3999 (namelist): Now static, not global.
4000 (nametail): New var. All uses of namelast changed to use
4001 nametail, with one extra level of indirection.
4002 (name_gather): Use memcpy instead of strncpy + assignment of NUL.
4003 (name_match): Set nametail too, when setting namelist to null.
4004 (add_hierarchy_to_namelist): Change type of dir arg from char * to
4005 struct name *, so that we don't have to look up the name again
4006 here. Get change_dir from dir rather than as a separate arg. Add
4007 dirsize arg, and pass it along to get_directory_contents. Remove
4008 unnecessary check of directory type.
4009 (new_name): Do not append a slash if PATH already ends in one.
4010 (avoided_names, struct avoided_name): Remove.
4011 (avoided_name_table): New var, replacing avoided_names.
4012 (hash_avoided_name, compare_avoided_names): New function.
4013 (add_avoided_name, is_avoided_name): Use hash table rather than
4016 * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
4017 (child_open_for_compress, child_open_for_uncompress,
4018 close_archive): Propagate any failure of the compression process
4020 (open_archive, flush_write, flush_read, close_archive): Do not
4021 allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
4022 -1. Instead, allocate an array with the size that's needed.
4023 (open_archive): Don't bother checking S_ISCHR of /dev/null.
4024 (backspace_output): Don't try to backspace past start of archive.
4025 (close_archive): Remove special case for DELETE_SUBCOMMAND.
4027 * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
4028 DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
4029 HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
4030 HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
4031 PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
4032 WITH_DMALLOC, WITH_REGEX):
4033 Remove; now generated automatically.
4035 * configure.in (_GNU_SOURCE): Define to empty, not 1, for
4036 compatibility for glibc fragments.
4037 (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
4038 HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
4039 DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
4040 that we needn't put an entry into acconfig.h.
4041 (ALL_LINGUAS): Add da.
4042 (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
4043 (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
4045 (AC_MBSTATE_T): Add.
4046 (RMT): Append $(EXEEXT).
4047 (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
4048 (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
4049 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
4050 HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
4051 (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
4052 (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
4053 (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
4054 Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
4055 (EMUL_OPEN3): Remove; no longer needed.
4056 (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
4058 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
4060 * src/common.h: Do not include basename.h.
4061 * src/rtapelib.c (base_name): Do not include basename.h;
4062 declare base_name instead.
4064 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
4066 * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
4067 lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
4068 * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
4069 Adjust to the above changes.
4071 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
4073 * src/open3.c: Remove.
4075 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
4076 (tar_SOURCES): Remove open3.c.
4077 (INCLUDES): Remove -I.., as automake does that.
4078 (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
4080 The following changes are to put LOCALEDIR into localedir.h instead
4081 of passing it on the command line.
4083 (DISTCLEANFILES): New macro.
4084 (localedir.h): New rule.
4085 (rmt.o tar.o): Now depend on localedir.h.
4087 * tests/delete02.sh, tests/extrac04.sh: New files.
4089 * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
4090 (TESTS): Add extrac04.sh, and restore delete02.sh.
4091 (DEFS): Remove; LOCALEDIR is now done via localedir.h.
4092 (INCLUDES): Remove -I.. as automake does this now.
4094 * src/rtapelib.c (rexec): Don't declare unless using it.
4095 (do_command): Simplify signal-handling code slightly.
4097 * src/delete.c (blocks_needed): Remove. All uses changed to use
4098 blocking_factor - new_blocks.
4099 (acting_as_filter): New var.
4100 (write_record, delete_archive_members): Use acting_as_filter
4101 rather than archive == STDIN_FILENO to detect whether we're acting
4102 as a filter, as open can return STDIN_FILENO in some cases.
4103 (delete_archive_members): Ignore zero blocks if
4104 ignore_zeros_option is nonzero. Fix bug that messed up last
4105 output block: write_eot can't be used here, as it gets confused
4106 when the input is at end of file.
4108 * src/compare.c (diff_archive): Do not impose an arbitrary limit on
4109 symbolic link contents length. Pass directory size to
4110 get_directory_contents.
4112 * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
4113 m4/strerror_r.m4: New files.
4114 * m4/signedchar.m4: Remove this file.
4115 * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
4116 * m4/Makefile.am (EXTRA_DIST): Likewise.
4118 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
4120 * po/da.po: New translation file.
4122 * src/mangle.c (extract_mangle):
4123 Fix diagnostic with wrong number of %s'es.
4125 * lib/fnmatch.c (fnmatch):
4126 Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
4127 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
4129 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
4130 fall off a device's end. Detect this.
4132 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
4134 (open): Remove macro; we no longer support EMUL_OPEN3. Do not
4135 include <pathmax.h> and directory include files like <dirent.h>;
4136 no longer used. Include <savedir.h> instead.
4137 (closedir, signed_char): remove macro; no longer used.
4138 (bool, false, true): Include <stdbool.h> if you have the include
4139 file, otherwise define.
4142 (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
4143 opendir_warn, readdir_error): Remove; no longer needed.
4144 (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
4145 before deciding whether we're trying to remove ".".
4146 (remove_any_file): Try unlink first if we are not root. Use
4147 savedir when recursively removing directories, to avoid exhausting
4149 (savedir_error, savedir_warn, symlink_error): New functions.
4151 * src/list.c: (read_and): Do not invoke
4152 apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
4153 responsible for that. Do not invoke apply_delayed_set_stat; our
4154 caller is now responsible for that.
4155 (read_header): Use signed char instead of signed_char. Prevent
4156 later references to current_header from mistakenly treating it as
4158 (from_header): Quote invalid base-64 strings in diagnostics.
4159 (time_from_header): Do not warn about future timestamps in
4160 archive; check_time now does that.
4161 (print_header): Quote unknown file types.
4162 (skip_member): New function, replacing skip_extended_headers and
4163 now skipping the whole member instead of just the extended
4164 headers. All callers changed. This makes the code handle
4165 extended headers uniformly, and fixes some bugs.
4167 * src/update.c (update_archive): Use skip_member.
4169 * src/extract.c (we_are_root): Now global.
4170 (struct delayed_symlink): New type.
4171 (delayed_symlink_head): New var.
4172 (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
4173 not apply_delayed_set_stat.
4174 (set_mode, set_stat): Pointer args are now const pointers.
4175 (check_time): New function.
4176 (set_stat): Warn if setting a file's timestamp to be the future.
4177 (make_directories): Do not save and restore errno.
4178 (maybe_recoverable): Set errno to ENOENT if we cannot make missing
4179 intermediate directories.
4180 (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
4181 not in caller. Extract potentially dangerous symbolic links more
4182 carefully, deferring their creation until the end, and using a
4183 regular file placeholder in the meantime. Do not remove trailing
4184 / and /. from file names. Do not bother checking for ".." when
4185 checking whether a directory loops back on itself, as loopbacks
4186 can occur with symlinks too. Also, in that case, do not bother
4187 saving and restoring errno; just set it to EEXIST.
4188 (apply_nonancestor_delayed_set_stat): A prefix is a potential
4189 ancestor if it ends in slash too (as well as ending in a char just
4191 (apply_delayed_set_stat): Remove.
4192 (apply_delayed_symlinks, extract_finish): New functions.
4194 * doc/fdl.texi: New file.
4195 * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
4196 ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
4197 * doc/tar.texi: Add Free Documentation License. New section
4198 "Overwrite Old Files", and revamp that section to make it easier to
4199 follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
4200 documentation into getdate.texi. Fix several minor typos. Describe
4201 TAR_OPTIONS. Describe incompatibility between incremental backups and
4202 --atime-preserve. Describe incompatibility between --verify and other
4203 options. Mention that tar normally removes symbolic links rather than
4204 following them, when extracting a file of the same name.
4206 * THANKS: Add gpoul. Change skip's address.
4208 * po/POTFILES.in: Add lib/human.c.
4210 * src/common.h (namelist, namelast): Remove decls.
4211 (we_are_root, extract_finish, skip_member, savedir_error,
4212 savedir_warn, symlink_error, gnu_list_name): New decls.
4213 (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
4214 skip_extended_headers, is_dot_or_dotdot, closedir_error,
4215 closedir_warn, opendir_error, opendir_warn, readdir_error,
4216 readdir_warn): Remove decls.
4217 (get_directory_contents): New off_t arg.
4218 (addname): Now returns struct name *.
4220 * src/tar.h, tests/genfile.c: Fix comments.
4222 * src/create.c: Include hash.h.
4223 (gnu_list_name): Remove decl.
4224 (struct link): Remove "next" member.
4226 (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
4227 consistency with other diagnostics.
4228 (deal_with_sparse): Check for I/O error when closing the file.
4229 (create_archive): Do not allocate an array of size PATH_MAX, as
4230 PATH_MAX might be (size_t) -1. Instead, allocate an array with
4231 the size that's needed.
4232 (hash_link, compare_links): New functions.
4233 (dump_file): Do not exhaust open file descriptors when descending
4234 deeply into a directory, by using savedir rather than
4235 opendir/readdir. Do not zero-fill the name buffer unnecessarily.
4236 Hash the set of links already created, instead of using a linked
4237 list. Fix some bugs in outputting sparse files which caused the
4238 sparse tables to be incorrect. When a file unexpectedly shrinks,
4239 output zeros rather than garbage. Do not allocate an array of
4240 size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
4241 allocate an array with the size that's needed.
4243 * src/incremen.c: Include hash.h.
4244 (struct directory): Remove "next", "dir_text". Change "name" to
4245 be char[1] with struct hack, not const char *. Add "found".
4246 (directory_list): Remove. Replaced by directory_table.
4247 (directory_table): New var.
4248 (nfs_string): Renamed from nfs.
4249 (hash_directory, compare_directories): New functions.
4250 (note_directory): Now returns struct directory *. First arg is
4251 now const pointer. struct stat arg is now dev_t, ino_t, nfs.
4252 Remove text arg. New "found" arg, basically corresponding to the
4253 old text arg not being null. All callers changed.
4254 (note_directory, find_directory): Use hash table rather than
4256 (get_directory_contents): New arg "device". Use savedir to do the
4257 hard work. Save the nfs-ness of stat_data, since it might change
4258 under us. Use note_directory instead of find_directory to save
4259 some work. When adding an "A" record, do it with
4260 add_to_accumulator instead of cheating with strcat.
4261 (read_directory_file): Use "+" flag before device to indicate
4262 whether it was NFS. Fix typo in checking for strtoul error.
4263 (write_directory_file_entry): New function.
4264 (write_directory_file): Use it, and use the hash routines to
4265 traverse the directory table.
4266 (gnu_restore): Use savedir rather than opendir/readdir.
4268 * src/tar.c: Include localedir.h, prepargs.h.
4269 (long_options): Now static.
4270 (long_options, usage, decode_options): -j is now short for
4271 --bzip2, and -I is now an alias for -T.
4272 (decode_options, main): argv is not const pointer now.
4273 (decode_options): Invoke prepend_default_options to support
4274 TAR_OPTIONS. In diagnostic, mention the string that was the
4275 invalid blocking factor, tape length, group, owner, or record
4276 size. --delete is no longer incompatible with -f -, undoing
4278 (main): Invoke extract_finish at end of extraction.
4280 * src/rmt.c: Include localedir.h.
4281 (main): Update copyright date to 2000.
4283 * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
4284 following changes: Use @sc where appropriate. Document the ranges of
4285 supported times more precisely. Add Eggert to getdate authors.
4286 Document old Latin 12m/12pm tradition. Remove list of alphabetic time
4287 zone names, as it wasn't correct and people shouldn't be relying on it
4288 anyway. Relative items also account for non-DST adjustments. Fix
4291 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
4293 * tests/ignfail.sh: opendir -> savedir in diagnostics.
4295 * tests/preset.in: Set LANGUAGE to the empty string, for some
4298 2000-10-20 Paul Eggert <eggert@twinsun.com>
4300 * m4/fnmatch.m4: Mention the GNU C library.
4302 2000-10-19 Paul Eggert <eggert@twinsun.com>
4304 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
4307 2000-10-17 Paul Eggert <eggert@twinsun.com>
4309 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
4312 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
4313 (CHAR_BIT): Define if not defined.
4315 2000-09-09 Paul Eggert <eggert@twinsun.com>
4317 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
4319 2000-08-07 Paul Eggert <eggert@twinsun.com>
4321 * lib/xmalloc.c: Memory exhausted -> memory exhausted
4323 * lib/xalloc.h (xalloc_msg_memory_exhausted):
4324 change to array from char *.
4326 2000-08-06 Paul Eggert <eggert@twinsun.com>
4328 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
4329 compatibility with glibc 2.1.3 strftime.c.
4331 2000-07-31 Paul Eggert <eggert@twinsun.com>
4333 * lib/quotearg.c (quotearg_n_options):
4334 Don't make the initial slot vector a constant,
4335 since it might get modified.
4337 * lib/quotearg.c: Add support for more than one preallocated slot.
4339 2000-07-30 Paul Eggert <eggert@twinsun.com>
4341 * lib/quotearg.c (quotearg_n_options):
4342 Preallocate a slot 0 buffer, so that the caller
4343 can always quote one small component of a "memory exhausted" message
4346 2000-07-23 Paul Eggert <eggert@twinsun.com>
4349 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
4350 mbstate_t is always defined.
4352 Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
4353 some GCC installations, and this configuration error is likely to be
4356 2000-07-22 Paul Eggert <eggert@twinsun.com>
4359 When the system forces us to redefine mbstate_t, shadow its mbsinit
4360 function. From Bruno Haible.
4362 2000-07-14 Paul Eggert <eggert@twinsun.com>
4364 * lib/xmalloc.c: Simplify exhausted message.
4366 * lib/quotearg.h: Update copyright date; from Jim Meyering.
4368 2000-07-13 Paul Eggert <eggert@twinsun.com>
4370 * lib/quotearg.h (enum quoting style):
4371 New constant clocale_quoting_style.
4374 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
4375 Add support for clocale_quoting_style, undoing previous change to
4376 locale_quoting_style.
4378 2000-07-10 Paul Eggert <eggert@twinsun.com>
4381 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
4382 since otherwise we don't need it.
4383 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
4384 since we don't do multibytes in that case.
4385 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
4386 invoke multibyte primitives.
4388 * m4/mbstate_t.m4 (AC_MBSTATE_T):
4389 Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
4390 Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
4391 and mbstate_t, to a single-part test that simply defines mbstate_t.
4393 * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
4394 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
4395 to decide whether to define the BeOS workaround macro;
4396 this adjusts to the change to AC_MBSTATE_T.
4398 * m4/strerror_r.m4: New file.
4400 2000-07-05 Paul Eggert <eggert@twinsun.com>
4402 * lib/quotearg.c: Use double-quote to quote.
4404 * lib/quotearg.c (N_): New macro.
4405 (gettext_default): New function.
4406 (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
4407 "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
4410 * lib/quotearg.c (struct quoting_options):
4411 Simplify quote_these_too dimension.
4412 From Bruno Haible <haible@clisp.cons.org>.
4414 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
4415 Test for mbstate_t only if the test
4416 for an object-type mbstate_t fails.
4418 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
4420 2000-07-03 Paul Eggert <eggert@twinsun.com>
4422 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
4423 Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
4425 * lib/quotearg.c (mbrtowc):
4426 Assign to *pwc, and return 1 only if result is nonzero.
4427 (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
4429 2000-07-02 Paul Eggert <eggert@twinsun.com>
4431 * lib/quotearg.c (mbstate_t):
4432 Do not define; it should be defined with AC_CHECK_TYPE.
4434 2000-06-26 Paul Eggert <eggert@twinsun.com>
4436 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
4437 a bug in glibc 2.1.3.
4439 * lib/xmalloc.c: Fix inaccurate comment for xrealloc.
4441 2000-06-19 Paul Eggert <eggert@twinsun.com>
4443 * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
4444 inclusion of wctype.h to work around solaris2.6 namespace pollution.
4445 (ISPRINT): Likewise.
4446 Reported by Tom Tromey.
4448 2000-06-15 Paul Eggert <eggert@twinsun.com>
4450 * lib/human.c (adjust_value): New function.
4451 (human_readable_inexact): Apply rounding style even when printing
4454 * lib/human.c: Avoid shadowing warnings.
4457 2000-06-14 Paul Eggert <eggert@twinsun.com>
4459 * lib/human.c (human_readable_inexact): Allow an input block size
4460 that is not a multiple of the output block size, and vice versa.
4462 * lib/getdate.y (get_date): Apply relative times after time zone
4463 indicator, not before.
4465 2000-05-31 Paul Eggert <eggert@twinsun.com>
4467 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
4468 and thus don't need AC_CANONICAL_HOST.
4470 (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
4471 (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
4472 (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
4473 CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
4474 changed. Instead of inspecting the output of getconf, try to
4475 compile the test program without and with the macro definition.
4476 (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
4477 getconf. Instead, check for the needed flags by compiling test
4480 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
4482 * config.guess, config.sub: Remove these files, for similar reasons.
4484 2000-05-03 Paul Eggert <eggert@twinsun.com>
4486 * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
4487 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
4488 bug. This avoids a clash when files like regex.c that define
4491 2000-05-02 Paul Eggert <eggert@twinsun.com>
4493 * m4/largefile.m4 (AC_SYS_LARGEFILE):
4494 Define _GNU_SOURCE if this is needed to make
4495 ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
4496 inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
4498 * lib/quotearg.c (mbrtowc, mbstat_t):
4499 Add definitions if !HAVE_MBSTATE_T_OBJECT.
4500 (<wctype.h>): Include if HAVE_WCTYPE_H.
4501 (iswprint): Define to 1 if we lack it
4503 2000-04-18 Paul Eggert <eggert@twinsun.com>
4505 * m4/mbstate_t.m4: New file.
4507 2000-04-17 Bruno Haible <haible@clisp.cons.org>
4509 * tests/ignfail.sh: Test for uid 0 along with user "root".
4511 2000-04-05 Paul Eggert <eggert@twinsun.com>
4513 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
4514 Don't use -n32 on IRIX if the installer said
4517 2000-02-28 Paul Eggert <eggert@twinsun.com>
4519 * lib/quotearg.c (ALERT_CHAR): New macro.
4520 (quotearg_buffer_restyled): Use it.
4522 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4524 * src/list.c (tartime): Fix off-by-one error when copying year if
4527 2000-02-18 Paul Eggert <eggert@twinsun.com>
4529 * lib/getdate.y: Handle two-digit years with leading zeros correctly.
4530 (textint): New typedef.
4531 (parser_control): Changed from struct parser_control to typedef
4532 (for consistency). Member year changed from int to textint. All
4534 (YYSTYPE): Removed; replaced by %union with int and textint
4536 (tID): Removed; not used.
4537 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
4538 tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
4539 tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
4540 (tSNUMBER, tUNUMBER): Now of type <textintval>.
4541 (date, number, to_year): Use width of number in digits, not its
4542 value, to determine whether it's a 2-digit year, or a 2-digit
4544 (yylex): Store number of digits of numeric tokens. Return '?' for
4545 unknown identifiers, rather than (unused) tID.
4547 2000-01-16 Paul Eggert <eggert@twinsun.com>
4549 * lib/quotearg.c (quotearg_buffer_restyled):
4550 Do not quote alert, backslash, formfeed,
4551 and vertical tab unnecessarily in shell quoting style.
4553 2000-01-15 Paul Eggert <eggert@twinsun.com>
4556 Change quoting to be compatible with future autoconf versions.
4558 2000-01-11 Paul Eggert <eggert@twinsun.com>
4560 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
4562 2000-01-07 Paul Eggert <eggert@twinsun.com>
4564 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
4566 Fix bug with fnmatch.h dependency, as follows:
4567 * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
4568 * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
4570 * src/common.h (apply_nonancestor_delayed_set_stat):
4571 Renamed from apply_delayed_set_stat.
4572 (apply_delayed_set_stat, decode_mode, chmod_error_details,
4573 chown_error_details, close_warn, closedir_warn, mkdir_error,
4574 read_error_details, read_fatal_details, read_warn_details,
4575 seek_error_details, seek_warn_details, utime_error,
4576 write_error_details, write_fatal_details): New decls.
4578 Make diagnostic messages more regular.
4579 * src/create.c (dump_file): Quote file names with colons if possible.
4580 * src/compare.c (diff_archive): Likewise.
4581 * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
4582 * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
4583 * src/mangle.c (extract_mangle): Likewise.
4584 * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
4586 * src/buffer.c (archive_write_error, flush_archive, close_archive,
4587 new_volume, xclose):
4588 Use error message functions to report errors consistently.
4589 * src/compare.c (diff_sparse_files, diff_archive): Likewise.
4590 * src/create.c (finish_sparse_file, dump_file): Likewise.
4591 * src/extract.c (set_mode, set_stat, extract_sparse_file,
4592 extract_archive): Likewise.
4593 * src/list.c (list_archive): Likewise.
4594 * src/update.c (append_file): Likewise.
4595 * src/compare.c (diff_init, diff_sparse_files):
4596 Use xalloc_die to report memory exhaustion.
4597 * src/incremen.c (gnu_restore): Likewise.
4598 * src/list.c (read_header): Likewise.
4599 * src/mangle.c (extract_mangle): Likewise.
4600 * src/misc.c (maybe_backup_file): Likewise.
4601 * src/tar.c (decode_options): Likewise.
4602 * src/compare.c (read_and_process, fill_in_sparse_array,
4604 Use consistent terminology for unexpected-EOF message.
4605 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
4606 * src/list.c (list_archive, read_header, skip_file,
4607 skip_extended_headers): Likewise.
4608 * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
4609 (xdup2): Regularize messages with rest of tar.
4611 * src/buffer.c (flush_read): Don't read past EOF.
4613 * src/extract.c (extr_init):
4614 If we run out of memory, invoke apply_delayed_set_stat.
4615 (prepare_to_extract): Don't complain if we can't remove ".".
4616 (apply_delayed_set_stat): New function.
4617 (apply_nonancestor_delayed_set_stat):
4618 Renamed from apply_delayed_set_stat. All uses changed.
4619 Don't remove head if it doesn't apply.
4621 * src/create.c (find_new_file_size):
4622 Return size instead of storing through pointer.
4623 All callers changed.
4624 (deal_with_sparse): Don't keep reading after read errors.
4625 (finish_sparse_file): Just abort if there is an internal error.
4626 (dump_file): Fix typo: stat_warn and stat_error were interchanged.
4627 Don't restore access times on directories during incremental dumps
4628 until after dealing with the directory.
4629 If ignoring failed reads, count closedir, read, and unknown
4630 file errors as warnings, not errors.
4631 Fix buffer overrun problem when dumping sparse files.
4633 * src/list.c (read_and):
4634 Invoke apply_nonancestor_delayed_set_stat on file names
4635 after handling them.
4636 (decode_mode): Remove; moved to misc.c.
4638 * src/misc.c (safer_rmdir): New function.
4639 (remove_any_file): Use it to avoid problems with rmdir(".").
4640 (maybe_backup_file): Regularize diagnostics.
4641 (undo_backup_file): Likewise.
4642 (decode_mode): Moved here from list.c.
4643 (chmod_error_details, chown_error_details, close_fatal,
4644 close_warn, closedir_warn, mkdir_error, read_error_details,
4645 read_warn_details, read_fatal_details, seek_error_details,
4646 seek_warn_details, utime_error, write_error_details,
4647 write_fatal_details): New functions.
4649 * src/delete.c (save_record): Remove static variable (now local).
4650 (move_archive): Don't position before start of archive.
4651 (write_record): Abort if count is zero at inopportune time.
4654 * src/tar.c (decode_options): --delete and -f - are now
4655 incompatible, since we didn't have time to fix their bugs.
4657 * tests/Makefile.am (TESTS): Remove delete02.sh.
4658 * tests/ignfail.sh: Adjust to new quoting scheme again.
4660 2000-01-06 Paul Eggert <eggert@twinsun.com>
4662 * lib/getdate.y: Sync tm_diff with the GNU C Library.
4663 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
4664 (tm_diff): Renamed from difftm. All uses changed.
4665 Replace body with that taken from GNU C Library 2.1.3pre1.
4666 (get_date): Prefer tm_gmtoff to tm_diff if available.
4668 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
4670 * tests/incremen.sh: Invoke stat on newly created file so that its
4671 ctime is updated on Nextstep.
4673 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
4675 * lib/getdate.y (get_date):
4676 Fix typo when checking for time_t overflow in time zone calculations.
4678 1999-12-13 Paul Eggert <eggert@twinsun.com>
4680 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
4682 * README-alpha: New file.
4683 * README: New sections for gzip and bzip2, Solaris.
4684 Remove mention of BACKLOG.
4686 * configure.in (AC_C_BACKSLASH_A): Add.
4687 (AC_CHECK_HEADERS): Add wchar.h.
4688 (AC_CHECK_FUNCS): Add mbrtowc.
4689 (AC_FUNC_CLOSEDIR_VOID): Add.
4691 * tests/Makefile.am (TESTS): Add delete02.sh.
4692 (POSTPONED_TESTS): Remove.
4693 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
4696 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
4698 * tests/ignfail.sh (err): Adjust to new quoting scheme.
4700 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
4702 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
4704 * src/tar.c ("quotearg.h"): New include.
4705 (usage): Now has __attribute__ ((noreturn)).
4706 (confirm): Report errno if we can't open tty.
4707 (confirm, decode_options):
4708 Quote arbitrary strings in diagnostics.
4709 (OVERWRITE_OPTION): New constant.
4710 (long_options, usage, decode_options): New --overwrite option.
4711 (decode_options): --keep-old-files, --overwrite, and --unlink-first
4712 are now mutually exclusive.
4713 Don't assume that gettext preserves errno.
4714 (main): Set default quoting style to escape_quoting_style.
4716 * src/update.c (<quotearg.h>): New include.
4718 Don't assume that gettext preserves errno.
4719 Quote arbitrary strings in diagnostics.
4720 Check for close error.
4722 * src/names.c (<quotearg.h>): New include.
4723 (name_init, name_next, name_close, names_notfound,
4724 collect_and_sort_names): Don't assume that gettext preserves
4725 errno. Quote arbitrary strings in diagnostics.
4726 (excluded_name): Fix typo that caused empty patterns to be
4729 * src/misc.c (<quotearg.h>): New include.
4730 (quote_copy_string): Quote only newline and backslash; the output is no
4731 longer meant for humans, and is locale-independent.
4732 (contains_dot_dot): New function.
4733 (remove_any_file): Don't use lstat; just rmdir the file and then use
4734 unlink if the rmdir fails because the file isn't a directory.
4735 Check for readdir and closedir errors.
4736 (maybe_backup_file): Report "stat" for stat errors.
4737 (maybe_backup_file, chdir_do):
4738 Quote arbitrary strings in diagnostics.
4739 (maybe_backup_file, undo_last_backup):
4740 Don't assume that gettext preserves errno.
4741 (call_arg_error, call_arg_fatal, call_arg_warn,
4742 chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
4743 mknod_error, open_error, open_fatal, open_warn, opendir_error,
4744 opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
4745 readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
4746 stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
4747 write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
4749 * src/system.h (__attribute__): New macro.
4750 (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
4751 (S_ISDOOR): New macro.
4752 (closedir): New macro, if CLOSEDIR_VOID.
4754 * src/rmt.c, src/rtapelib.c (decode_oflag):
4755 O_APPEND might not be defined.
4757 * src/list.c: (read_and, list_archive):
4758 Quote arbitrary strings in diagnostics.
4759 (from_header): Use locale_quoting_style to quote diagnostics.
4760 (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
4762 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
4764 * src/Makefile.am: Use ## for copyright comments.
4766 * src/extract.c (<quotearg.h>): New include.
4767 (enum permstatus): New enum.
4768 (struct delayed_set_stat): file_name is now at end of buffer, to avoid
4769 two mallocs. New members file_name_len, invert_permissions, permstatus.
4770 (extr_init): Remove hack that silently adjusted newdir_umask.
4771 (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
4772 Use these args to decide whether and how to set modes.
4773 (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
4774 Don't assume that gettext preserves errno.
4775 (set_stat): Remove arg symlink_flag; subsumed by typeflag.
4776 (delay_set_stat, repair_delayed_set_stat): New functions.
4777 (make_directories): Avoid mkdir where last part of path is "..".
4778 Create a struct delayed_set_stat for each directory made.
4779 (prepare_to_extract): Renamed from unlink_destination, and
4780 return 0 immediately if to_stdout_option; all callers changed.
4781 (maybe_recoverable): New parameter interdir_made.
4782 Add support for --overwrite.
4783 (extract_sparse_file, extract_archive):
4784 Quote arbitrary strings in diagnostics.
4785 (extract_archive): By default, warn about ".." in member names, and skip them.
4786 Don't open files with O_NONBLOCK or O_APPEND.
4787 Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
4788 overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
4789 minus the current umask. Keep track of intermediate directories made,
4790 to avoid looping when making x/../x when x doesn't exist; the
4791 earlier code solved this in a different way that didn't fit well
4792 into the new scheme. Don't extract permissions onto existing
4793 directories unless --overwrite is given. Do not add -wx------
4794 permissions to new directories permanently; just do it temporarily.
4795 Remove no-longer-needed hack with MSDOS and directory time stamps.
4796 (apply_delayed_set_stat): New argument specifies which directories to
4797 fix statuses of. Do not wait until the end of extraction to fix
4798 statuses; instead, fix a directory's status once we exit that directory.
4799 This requires less memory and does the right thing in some cases
4800 where the old method didn't.
4801 (fatal_exit): New function.
4803 * src/incremen.c (<quotearg.h>): New include.
4804 (get_directory_contents, gnu_restore):
4805 Check for readdir and closedir errors.
4806 (get_directory_contents, read_directory_file, gnu_restore):
4807 Quote arbitrary strings in diagnostics.
4808 (get_directory_contents, read_directory_file, write_directory_file):
4809 Don't assume that gettext preserves errno.
4811 * src/create.c (<quotearg.h>): New include.
4812 (start_header): Use `member names' to refer to archive member names, not
4813 `archive names'. Warn about `..' in member names.
4814 (finish_sparse_file, dump_file):
4815 Quote arbitrary strings in diagnostics.
4816 (finish_sparse_file, dump_file):
4817 Don't assume that gettext preserves errno.
4818 (dump_file): Don't use `access' to determine whether a directory is readable;
4819 this isn't reliable if tar is setuid. Use `opendir' instead.
4820 Check for readdir and closedir failures.
4821 Don't dump sockets as if they were fifos; just warn and skip.
4823 * src/delete.c (move_archive):
4824 Don't report fatal error merely because sizes don't fit
4825 into struct mtop values; fall back on lseek instead.
4826 Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
4827 Say `reposition' instead of `re-position'.
4828 (delete_archive_members):
4829 Set archive to STDOUT_FILENO before outputting trailing buffer.
4831 * src/compare.c (<quotearg.h>): New include.
4832 (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
4833 and `Cannot' others.
4834 (report_difference, diff_archive):
4835 Quote arbitrary strings in diagnostics.
4836 (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
4837 Don't assume that gettext preserves errno.
4838 (diff_archive): Don't open regular files with O_NONBLOCK.
4839 Preserve access times of files if --atime.
4841 * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
4842 (FATAL_ERROR, USAGE): Don't return 0.
4843 (enum old files): New enum.
4844 (old_files_option): New variable, replacing keep_old_files_option and
4845 unlink_first_option.
4846 (apply_delayed_set_stat): Now takes char const * param.
4847 (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
4848 closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
4849 open_fatal, open_warn, opendir_error, opendir_warn, read_error,
4850 read_fatal, readdir_error, readdir_warn, readlink_error,
4851 readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
4852 truncate_error, truncate_warn, unlink_error, waitpid_error,
4853 write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
4856 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
4857 archive_write_error, archive_read_error, flush_archive, close_archive,
4858 init_volume_number, new_volume):
4859 Don't assume that gettext preserves errno.
4861 (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
4862 (open_archive): Reject multivolume verify attempts a bit earlier.
4863 Rename local variable `access', in case it's defined by system header.
4865 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
4866 `Could not' sometimes and `Cannot' others.
4868 (open_archive, flush_read, flush_archive, close_archive, new_volume):
4869 Quote arbitrary strings in diagnostics.
4871 (read_error): Set archive to STDOUT_FILENO temporarily when writing
4874 (init_volume_number): Check for input and output errors in volno_file.
4876 (new_volume): Use new fatal_exit function to exit, and new xfork
4879 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
4881 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
4883 * doc/tar.texi: Add --overwrite.
4884 --absolute-names rejects ".." in names.
4886 * lib/quotearg.c: Add support for multibyte characters.
4888 (ISPRINT): New macro.
4889 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
4890 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
4891 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
4892 (quotearg_buffer_restyled): New function, with most of the old
4893 quotearg_buffer's contents.
4894 Major rewrite to support multibyte characters.
4895 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
4897 * m4/c-bs-a.m4: New file.
4899 * lib/Makefile.am: Use ## for copyright notice.
4901 * scripts/Makefile.am: Use ## on copyright notice.
4904 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
4906 1999-12-05 Paul Eggert <eggert@twinsun.com>
4908 * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
4909 src/ChangeLog, tests/ChangeLog: Remove these files.
4910 * ChangeLog.1: New file, incorporating the above files, plus old
4912 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
4914 1999-12-05 Dale Worley <worley@ariadne.com>
4916 * src/compare.c (<utime.h>, struct utimbuf): Add.
4917 (diff_archive): Restore access times if --atime.
4918 * doc/tar.texi: Explain that --atime also preserves modification time.
4920 1999-12-04 Gerhard Poul <gpoul@gnu.org>
4922 * ABOUT-NLS: Update to latest version from ftp.gnu.org.
4923 * BACKLOG, TODO: Remove.
4924 * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
4925 * README: Bring up to date.
4927 1999-12-03 Paul Eggert <eggert@twinsun.com>
4929 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
4931 * src/compare.c (diff_archive):
4932 Do not set errno to EPIPE; we no longer use perror.
4934 * src/create.c (dump_file):
4935 If a parent directory said that a file should be there but it is
4936 absent, diagnose it as being removed in the meantime.
4937 Do not pass meaningless errno to ERROR when reporting that the
4938 file changed as we read it.
4939 Report that a file changed if its ctime changes; this is more
4940 sensitive than mtime+size, and more accurate.
4942 * src/incremen.c (enum children): New type.
4943 (struct directory): Change old char allnew member to new enum children
4946 (get_directory_contents): When doing an incremental dump that does
4947 not cross filesystem boundaries, dump the mount points, even though
4948 they are in a different filesystem. This is for convenience when
4949 restoring, and for consistency with non-incremental dumps.
4950 This requires a 3-way flag for keeping track of which children we want,
4951 so we use enum children rather than boolean.
4953 * src/open3.c (modes): Remove.
4954 (open3): Remove unportable assumptions about flag encodings.
4955 Use `stat' instead of `access' for testing file existence,
4956 to avoid problems with setuid programs.
4958 * src/names.c (name_next): If file names are given both in the
4959 command line (e.g. via -C) and in a file (via -T), do not
4960 ignore the command-line names.
4962 * m4/uintmax_t.m4: Backport to autoconf 2.13.
4964 * doc/tar.texi: Clarify getdate authorship.
4966 1999-11-23 Paul Eggert <eggert@twinsun.com>
4968 * lib/Makefile.am (DISTCLEANFILES): New macro.
4970 * configure.in (tar_fnmatch_hin):
4971 Remove; it runs afoul of a bug in autoconf 2.13.
4972 Instead, always link fnmatch.h to some file, even if it's a throwaway.
4974 1999-11-19 Paul Eggert <eggert@twinsun.com>
4976 * m4/largefile.m4: Update serial.
4978 1999-11-18 Paul Eggert <eggert@twinsun.com>
4980 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
4981 the QNX shell, which doesn't propagate exit status of failed
4982 commands inside shell assignments.
4984 1999-11-07 Paul Eggert <eggert@twinsun.com>
4986 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
4988 * configure.in (AC_PREREQ): Bump to 2.13.
4989 (ALL_LINGUAS): Add pt_BR, ja.
4990 (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
4991 (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
4992 for AIX crossbuilds.
4994 * doc/tar.texi: New node create options for --ignore-failed-read.
4995 Remove unused version control symbols.
4996 Modernize texinfo usage.
4998 * src/tar.c (usage): Add examples.
5000 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
5001 Include fnmatch.h when testing fnmatch.
5003 * src/common.h (collect_and_sort_names): New decl.
5005 * src/list.c (from_header):
5006 Handle 32-bit two's complement negative time stamps
5007 even if the leading octal digit is 2 or 3.
5009 * src/extract.c (set_stat): Remove duplicate code.
5011 * src/create.c (to_chars): Remove trailing newline from warning.
5012 (dump_file): Ignore doors.
5013 (finish_header): Report block numbers with origin 0, not origin 1.
5015 * src/rmt.c: Include getopt.h.
5016 (long_opts): New constant.
5017 (usage): New function.
5018 (main): Implement --help and --version.
5019 Output usage message if arguments are bad.
5021 1999-10-10 Paul Eggert <eggert@twinsun.com>
5023 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
5025 * README: Remove --with-dmalloc.
5026 Add --disable-largefile.
5027 Remove old NeXT dirent problems, or AIX valloc problems.
5028 Remove old union wait advice, and old %lld advice.
5029 Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
5031 * doc/tar.texi: Clarify documentation for portable file names.
5033 * configure.in (AM_WITH_DMALLOC): Remove.
5034 (ALL_LINGUAS): Add ja.
5036 * src/tar.c (decode_options):
5037 Invalid dates are now treated as (time_t) -1.
5038 Redo version message to conform to GNU standards.
5040 * src/create.c (dump_file):
5041 Fix typo: last two args to dump_file were interchanged.
5042 * src/update.c (update_archive): Likewise.
5044 * src/common.h (tartime): New decl.
5046 * src/list.c (tartime): Now extern.
5047 (read_and): Invalid headers cause errors, not warnings.
5049 1999-10-03 Paul Eggert <eggert@twinsun.com>
5051 * lib/getdate.y (__attribute__):
5052 Don't use if GCC claims to be before 2.8; this is
5053 needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
5055 1999-09-25 Paul Eggert <eggert@twinsun.com>
5057 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
5058 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
5060 * tests/incremen.sh: Add yet another sleep.
5062 1999-09-24 Paul Eggert <eggert@twinsun.com>
5064 * NEWS: A read error now causes a nonzero exit status.
5066 * src/create.c (to_chars): Fix base-256 output.
5068 * src/buffer.c (write_error):
5069 Read error is an error, not just a warning.
5071 1999-09-24 Paul Eggert <eggert@twinsun.com>
5073 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
5075 * src/tar.c (<time.h>): Include.
5076 (time): Declare if not defined.
5077 (confirm): Don't read past EOF.
5078 (long_options, usage): Add --no-same-owner, --no-same-permissions.
5079 (main): Use clock_gettime if available.
5081 * tests/Makefile.am (TESTS): Add incremen.sh
5082 (INCLUDES): Add -I../lib, for fnmatch.h.
5084 * src/update.c (update_archive):
5085 Remove call to name_expand; had no effect.
5086 Use chdir_do to change into directory.
5087 Use deref_stat instead of stat.
5088 Use add_avoided_name to mark names to be avoided; the old method of
5089 setting a bit with the name caused all descendants of that name to
5090 be avoided, in some circumstances.
5092 * tests/incremen.sh: Remove unnecessary sleeps.
5094 * src/names.c (name_next): Go back to using plain chdir.
5095 (name_gather): Use chdir_arg to keep track of arguments to chdir.
5096 (addname): Likewise.
5097 (name_match): Use chdir_do to act on chdir args.
5098 (merge_sort): Moved here from incremen.c.
5099 (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
5101 (name_expand): Remove.
5102 (name_from_list): Skip fake names.
5103 Use chdir_do to act on chdir args.
5104 (struct avoided_name): New struct.
5105 (avoided_names): New var.
5106 (add_avoided_name, is_avoided_name): New functions.
5108 * src/system.h (stat, lstat): Define in terms of statx on
5109 STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
5110 (UCHAR_MAX): New macro.
5111 (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
5113 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
5115 * src/incremen.c (<time.h>): Remove include; no longer used.
5116 (time): Remove decl.
5118 (get_directory_contents): Use deref_stat.
5119 Consider a subdirectory to be all new only if
5120 listed_incremental_option or if it its timestamp is newer than the
5122 (add_hierarchy_to_namelist, merge_sort): Move to names.c.
5123 (read_directory_file): Now extern. Do not set time_now.
5124 (write_directory_file): Renamed from write_dir_file.
5125 Use start_time instead of time_now.
5126 (compare_names, collect_and_sort_names): Move to names.c.
5128 * src/mangle.c (<time.h>): Remove; not used.
5129 (time): Do not declare.
5131 * src/misc.c (chdir_from_initial_wd): Remove.
5132 (deref_stat): New function.
5133 (struct wd): New struct.
5134 (wd, wds, wd_alloc): New variables.
5135 (chdir_arg, chdir_do): New function.
5137 * src/compare.c (get_stat_data): Use deref_stat.
5139 * src/common.h (name_expand): Remove.
5141 * src/list.c (time): Declare if not defined.
5142 (base_64_digits): Moved here from create.c.
5143 (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
5145 (read_and): Don't get time from header unless we need it now;
5146 as getting time can cause duplicate diagnostics if bogus.
5147 Remove "Hmm, " from diagnostic.
5148 Use "Skipping to next header" uniformly.
5149 (from_header): Renamed from from_chars. All uses changed.
5150 Allow different forms for unportable 2's complement numbers.
5151 Don't check for extended forms when parsing checksums.
5152 Parse base-256 output.
5153 (gid_from_header): Renamed from gid_from_chars. All uses changed.
5154 (major_from_header): Renamed from major_from_chars. All uses changed.
5155 (minor_from_header): Renamed from minor_from_chars. All uses changed.
5156 (mode_from_header): Renamed from mode_from_chars. All uses changed.
5157 (off_from_header): Renamed from off_from_chars. All uses changed.
5158 (size_from_header): Renamed from size_from_chars. All uses changed.
5159 (time_from_header): Renamed from time_from_chars. All uses changed.
5160 Warn about future timestamps.
5161 (uid_from_header): Renamed from uid_from_chars. All uses changed.
5162 (uintmax_from_header): Renamed from uintmax_from_chars.
5164 (tartime): New function, incorporating isotime.
5166 (print_header): Use tartime.
5168 * src/create.c (to_chars): Fix typo in decl.
5169 Don't assign through char const *.
5170 Rename name_expand back to collect_and_sort_names.
5172 * src/extract.c (<time.h>): No need to include.
5173 (time): No need to declare.
5174 (now): Remove variable.
5175 (extr_init): Don't initialize `now'.
5176 Increment same_permissions_option and same_owner_option if we_are_root
5177 is nonzero; this supports the new --no-same-owner option.
5178 (set_stat): Use start_time instead of `now'.
5180 * src/create.c (struct link): Remove unused linkcount member.
5181 (base_64_digits): Move to list.c.
5182 (base_8_digits): Remove.
5183 (to_octal): New function, with some of old contents of to_base.
5185 (to_base256): New function.
5186 (to_chars): Use base 256, not base 64, for huge values.
5187 (mode_to_chars): Don't use two's complement in GNU format or POSIX
5189 (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
5190 it means we have an incremental dump where we don't know whether this
5191 is a top-level call.
5192 Use deref_stat instead of statx / stat / lstat.
5193 Cast result of alloca.
5194 Check for dates if 0 < top_level, not if listed_incremental_option.
5195 Move multiple-link check after directory check.
5196 Do not dump avoided names.
5197 Dump hard links to symbolic names as links, not as separate
5199 start_header cannot return a null pointer, so don't test for it.
5200 Likewise for find_next_block.
5202 * src/buffer.c, src/common.h (<human.h>): Include.
5203 (read_error): Read error is an error, not just a warning.
5204 (print_total_written): Also print human-readable byte count, and
5206 (open_archive, flush_write): Use start_time, not current time.
5207 (flush_read): Report about garbage bytes ignored at end of archive,
5208 but act on non-garbage bytes (instead of ignoring them).
5209 (new_volume): Use WARN for warnings.
5212 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
5214 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
5216 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
5218 * lib/Makefile.am (noinst_HEADERS):
5219 Rename fnmatch.h to fnmatch.hin; add human.h.
5220 (libtar_a_SOURCES): Add human.c, xstrtoul.c.
5221 (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
5223 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
5225 * lib/fnmatch.c (strchrnul):
5226 Define to __strchrnul if _LIBC, to our own replacement otherwise.
5227 Do not define if !_LIBC and if it already exists.
5228 (internal_fnmatch): Use it.
5230 * configure.in (tar_LDADD): New variable, used only when linking tar.
5231 (rmt_LDADD): Similarly, for rmt.
5232 (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
5233 fnmatch.c; otherwise, use the system fnmatch.h.
5235 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
5236 Modernize sample backup script.
5238 * THANKS: Martin Goik's email address has changed.
5240 * m4/fnmatch.m4: New file.
5242 1999-09-03 Paul Eggert <eggert@twinsun.com>
5244 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
5247 1999-08-29 Paul Eggert <eggert@twinsun.com>
5249 * lib/getdate.y (get_date):
5250 Rename outermost local `probe' to `quarter'.
5251 Rename latter local `tm' to probe_tm.
5252 From: Jim Meyering <meyering@ascend.com>
5253 Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
5255 1999-08-28 Paul Eggert <eggert@twinsun.com>
5257 * lib/getdate.y (PC): New macro; use it when possible.
5258 (number): Handle `Nov 11 1996' example correctly.
5259 See Risks Digest 20.55 (1999-08-27)
5260 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
5262 1999-08-23 Paul Eggert <eggert@twinsun.com>
5264 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
5266 Remove minor cases of lint from many source files: this includes
5267 unnecessary casts, uses of NULL, etc.
5269 * configure.in (AC_PROG_YACC): Remove.
5270 (YACC): Always use bison.
5271 (AC_STRUCT_TIMEZONE): Add.
5272 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
5274 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
5277 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
5278 ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
5280 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
5282 * src/common.h (merge_sort): Remove decl; no longer exported.
5284 * src/system.h (voidstar): Remove.
5285 (memcpy, memcmp): Cast args.
5286 ("xalloc.h"): Add include.
5287 (xmalloc, xrealloc): Remove decl.
5289 * src/mangle.c (time): Do not declare if defined.
5290 (first_mangle, mangled_num): Remove.
5292 * src/list.c (from_chars): Report out-of-range values more precisely.
5293 (off_from_chars): Do not allow negative offsets.
5294 (uid_from_chars): Allow negative uids.
5296 * src/create.c (linklist): Now static.
5297 (to_chars): Fix wording of message to match from_chars.
5299 * src/misc.c (merge_sort): Move to incremen.c.
5300 * src/incremen.c (merge_sort): Move here from misc.c; now static.
5301 It's too painful to make it both generic and portable.
5302 (read_directory_file): "timestamp" -> "time stamp" in messages.
5304 * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
5305 (usage): Fix misspelling.
5306 (OPTION_STRING): -y is now -I.
5307 (decode_options): Use -1, not EOF, for getopt_long result.
5308 Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
5309 Handle operands after any "--" argument.
5310 (main): Report any output errors.
5312 * src/rmt.c (main): status is ssize_t, not long.
5314 * src/names.c (name_gather): Handle trailing -C option correctly.
5315 (addname): use memcpy, not strncpy, to copy a string of known length.
5316 (name_match): Handle trailing -C option correctly.
5317 Propagate -C option to following files.
5318 (name_match, name_scan): Remove redundant matching code.
5320 * src/buffer.c (open_archive): Use American spelling in diagnostic.
5322 * lib/getdate.y: Major rewrite. Add copyright notice.
5323 (<stdio.h>): Include only if testing.
5325 (ISLOWER): New macro.
5326 (<string.h>): Include if HAVE_STRING_H, not USG.
5328 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
5330 (EPOCH_YEAR): Renamed from EPOCH.
5331 (table): Renamed from TABLE.
5332 (meridian): Now an anonymous enum.
5333 (struct parser_control): New type.
5334 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
5335 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
5336 (%pure_parser): Added, so that the parser is pure.
5337 (%union): Removed; the type is now just plain int.
5338 All %type directives removed.
5339 (tLOCAL_ZONE): New %token.
5340 (month_day_table): Renamed from MonthDayTable.
5341 (gmtime, localtime, mktime, time): Declare only if not defined.
5342 (meridian_table): New table.
5343 (dst_table): New table.
5344 (units_table): renamed from UnitsTable.
5345 (relative_time_table): Renamed from OtherTable.
5346 (time_zone_table): Renamed from TimezoneTable. Modernized.
5347 (military_table): Renamed from MilitaryTable.
5348 (to_hour): Renamed from ToHour.
5349 (to_year): Renamed from ToYear.
5350 (lookup_zone): New function.
5351 (LookupWord): Renamed from lookup_word. Use lookup_zone for time
5353 (yylex): Now reentrant. All callers changed.
5354 (get_date): Add support for local time zone abbreviations.
5357 1999-08-20 Paul Eggert <eggert@twinsun.com>
5359 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
5361 * src/create.c (to_chars): Generate GNU base-64 representation
5362 if we are generating an old or new GNU format tar file for a
5363 number that can't be represented with the POSIX format.
5365 * configure.in (AC_CHECK_FUNCS): Add fchdir.
5366 (AM_FUNC_GETLINE): Add.
5367 (LIBOBJS): Add getline.o to workaround comment.
5368 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
5369 * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
5370 * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
5371 (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
5372 * lib/getline.c, lib/getline.h, lib/save-cwd.c,
5373 lib/save-cwd.h, m4/getline.m4: New files.
5375 * src/misc.c (<save-cwd.h>): Include.
5376 (chdir_from_initial_wd): New function.
5378 * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
5379 (name_gather): Handle `-C x -C y' correctly.
5380 Do not rely on addname to handle -C.
5381 (addname): New CHANGE_DIR parameter. All callers changed.
5382 Remove ugly calls to getcwd; no longer needed.
5383 (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
5385 * src/incremen.c (listed_incremental_stream): New var.
5386 (read_directory_file): Remove arbitrary limits on file name length.
5387 Do not attempt to get the working directory; we can bypass this
5388 on fchdir hosts. Open the listed_incremental_option file for both
5389 read and write instead of opening it twice. Check for I/O errors
5390 when doing I/O to this file. Check for invalid data in the file,
5391 and report line numbers of invalid data.
5392 (write_dir_file): Likewise.
5393 (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
5394 Do not invoke write_dir_file; that's our caller's responsibility.
5396 * src/list.c (max): New macro.
5397 (isotime): Now takes time_t, not time_t *. Report the decimal values
5398 of times that can't be broken down.
5399 (print_header): Don't assume that major and minor device numbers can
5402 * src/common.h (struct name): change_dir is now char const *.
5403 (write_directory_file): Remove unused decl.
5404 (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
5405 chars; the old `sizeof (b)' broke when b was a pointer not an array.
5406 (chdir_from_initial_wd): New decl.
5407 (addname): New 2nd arg.
5409 * THANKS: Torsten Lull -> Catrin Urbanneck
5411 1999-08-18 Paul Eggert <eggert@twinsun.com>
5413 * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
5414 Don't depend on ac_cv_func variables.
5415 From Albert Chin-A-Young <china@thewrittenword.com>.
5417 1999-08-18 Paul Eggert <eggert@twinsun.com>
5419 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
5421 * m4/signedchar.m4: New file.
5422 * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
5423 * src/system.h (signed_char): New macro.
5424 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
5425 * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
5427 * src/create.c (write_eot): Write at least two zero blocks.
5429 * src/extract.c (extract_archive): Fix sparse array bug:
5430 we did not find end of array correctly.
5432 * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
5433 Don't assume find_next_block yields nonnull.
5434 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
5435 * src/list.c (skip_extended_headers): Likewise.
5437 * src/list.c (read_and, list_archive): Simplify code.
5438 (read_header): Fix computation of signed checksums on machines where
5440 Do not consider a block to be zero unless all its bytes are zero,
5441 even the checksum bytes. Do not attempt to parse the checksum of
5442 a zero block. Fix memory leak with long names and links.
5443 (from_chars): Accommodate a buggy tar that outputs leading NUL
5444 if the previous field overflows.
5446 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
5447 \?, for portability to non-ASCII hosts.
5449 1999-08-16 Paul Eggert <eggert@twinsun.com>
5451 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
5453 * src/extract.c (make_directories): Do not chown intermediate
5454 directories, even if we are root.
5456 * src/list.c (read_header): Fix bugs when interpreting
5457 POSIX-compliant headers that do not contain null bytes in the
5458 header or link names.
5460 1999-08-14 Paul Eggert <eggert@twinsun.com>
5462 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
5464 * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
5465 (AC_HEADER_SYS_WAIT): Add.
5466 (AC_REPLACE_FUNCS): Add waitpid.
5467 (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
5468 * lib/waitpid.c: New file.
5469 * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
5470 * src/system.h (WCOREDUMP): Remove; no longer used.
5471 (WIFSTOPPED): Likewise.
5472 (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
5473 * src/buffer.c (child_open_for_compress): Undo previous change.
5474 (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
5475 (new_volume): Likewise.
5477 * src/buffer.c, src/extract.c, src/incremen.c (time):
5478 Don't declare if defined.
5479 * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
5480 * src/incremen.c (read_directory_file):
5481 Invoke `time' the same way everyone else does.
5482 Check validity of --listed-incremental file contents a bit better.
5483 Do not worry about --after-date-option; tar.c now checks this.
5484 * src/list.c (isotime): Report ??? if localtime returns null.
5485 Don't assume years fit into four digits.
5486 Don't append trailing newline.
5487 (print_header): Report ??? if localtime returns null;
5488 Don't assume years fit into four digits.
5490 * src/compare.c (diff_archive): Do not fall back on absolute name
5491 when --absolute-names is not specified.
5493 * src/create.c (start_header):
5494 Include text of ignored filesystem prefix in warning.
5495 (create_archive): Check for excluded names when doing incremental
5496 pass through directory.
5497 (dump_file): Do not dump old files explicitly given on command line
5498 when using --listed-incremental. Do not strip ./ prefix from names.
5500 * src/tar.c: -g now implies after_date_option = 1.
5501 -g and -N are now incompatible options.
5503 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
5505 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
5507 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
5508 incremental headers as POSIX prefixes.
5510 1999-08-11 Paul Eggert <eggert@twinsun.com>
5512 * NEWS, configure.in: Version 1.13.6.
5514 * configure.in (ALL_LINGUAS): Add pt_BR.
5515 * po/pt_BR.po: New file.
5517 * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
5518 Renamed from tar.info and header.texi; adjust actions so that
5519 they work in other directories.
5521 * doc/tar.texi: Add -y and --bzip2.
5522 Patterns containing / now exclude only file names whose prefix match.
5524 * lib/exclude.h (excluded_filename): New option parameter.
5525 (add_exclude_file): New ADD_FUNC parameter.
5526 (excluded_pathname): Remove decl.
5527 * lib/exclude.c (_GNU_SOURCE):
5528 Remove; no longer needed since we don't use FNM_ macros.
5529 (excluded_filename): Renamed from excluded_filename_opts.
5530 (excluded_filename, excluded_pathname): Remove.
5531 (add_exclude_file): New ADD_FUNC parameter.
5533 * po/POTFILES.in: Add lib/quotearg.c.
5535 * src/buffer.c (_GNU_SOURCE): Define.
5536 (<fnmatch.h>): Include unconditionally.
5537 (child_open_for_compress): Dup after closing, to avoid possible file
5538 descriptor exhaustion.
5539 (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
5540 (flush_read): Likewise.
5542 * src/common.h (LG_8, LG_64): New macros.
5543 (excluded_with_slash, excluded_without_slash): New vars.
5545 (base_64_digits): New decl.
5546 (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
5547 off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
5549 GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
5550 OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
5552 Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
5553 off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
5554 GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
5555 SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
5556 respectively. All definitions and uses changed.
5557 (excluded_name): New decl.
5559 * src/compare.c (diff_archive):
5560 Open files with O_NONBLOCK instead of O_NDELAY.
5562 * src/create.c (base_64_digits): New constant.
5563 (base_8_digits): New macro.
5564 (MAX_VAL_WITH_DIGITS): New macro.
5565 (to_base): First half of old to_oct. Support base 64 too.
5566 (to_chars): Other half of old to_oct, for 64-bit support.
5567 (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
5568 (gid_substitute, uid_substitute): Look up names dynamically if
5569 GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
5570 (mode_to_chars): Renamed from mode_to_oct.
5571 Support negative values in all the _to_chars functions.
5572 (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
5573 Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
5574 (dump_file): Inspect entire pathname, not just new file name
5575 component, when deciding whether to exclude it.
5577 * src/extract.c (extract_archive):
5578 Open files with O_NONBLOCK instead of O_NDELAY.
5580 * src/incremen.c (get_directory_contents):
5581 Inspect entire pathname, not just new file name
5582 component, when deciding whether to exclude it.
5584 * src/list.c (<fnmatch.h>): Do not include.
5585 (from_chars): Renamed from from_oct. New parameter specifying
5586 the negative of the minimum allowed value. Support negative
5588 (base64_map): New var.
5589 (base64_init): New function.
5590 (print_header): Output numeric uids and gids if numeric_owner_option.
5592 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
5594 * src/names.c (_GNU_SOURCE): Define.
5595 (<fnmatch.h>): Include unconditionally.
5596 (excluded_name): New function, taking over duties of excluded_pathname.
5599 * src/rmt.c (decode_oflag): New function.
5600 (main): Use it to support symbolic open flags.
5602 * src/rtapelib.c (encode_oflag): New function.
5603 (rmt_open__): Do not allow newlines in the path.
5604 Propagate errno correctly.
5605 Decode symbolic open flags, if present.
5607 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
5610 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
5611 New -y or --bzip2 option.
5612 (add_filtered_exclude): New function.
5613 (decode_options): Put excluded patterns with / into
5614 excluded_with_slash, and without / into excluded_without_slash.
5615 Compare newer_mtime_option to its new initial value
5616 TYPE_MINIMUM (time_t) when deciding whether more than one
5617 threshold date was specified.
5619 1999-07-20 Paul Eggert <eggert@twinsun.com>
5621 * NEWS, configure.in: Version 1.13.5.
5623 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
5625 * src/buffer.c (new_volume): Likewise.
5626 * src/incremen.c (read_directory_file): Likewise.
5627 * src/tar.c (decode_options):
5628 ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
5631 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
5632 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
5634 * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
5635 (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
5636 (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
5637 Define to 0 if the corresponding S_IF* macro is not defined.
5638 (mkfifo): Do not define if already defined, or if S_IFIFO
5641 * src/compare.c (diff_archive): Use HAVE_READLINK, not
5642 S_ISLNK, to determine whether to invoke readlink.
5643 * src/create.c (dump_file): Likewise.
5645 * src/extract.c (set_mode):
5646 Do not chmod unless we are root or the -p option was given;
5647 this matches historical practice.
5648 (unlink_destination): New function, which checks for unlink failures.
5649 (maybe_recoverable): Stay quiet if -U.
5650 (extract_archive): Use O_EXCL if unlink_first_option.
5651 Report unlink failures.
5652 Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
5653 Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
5656 * src/incremen.c (get_directory_contents): Depend on
5657 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
5659 * src/list.c: Remove S_IS* ifdefs.
5660 * src/misc.c (maybe_backup_file): Likewise.
5662 * src/misc.c (maybe_backup_file):
5663 "Virtual memory exhausted" -> "Memory exhausted",
5664 to conform to the other places this message is issued.
5666 * src/mangle.c (extract_mangle):
5667 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
5669 * src/rtapelib.c (rmt_open__):
5670 Remove typo that caused us to omit the first char
5673 1999-07-16 Paul Eggert <eggert@twinsun.com>
5675 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
5677 * doc/tar.texi: A path name is excluded if any of its file name
5678 components matches an excluded pattern, even if the path name was
5679 specified on the command line.
5680 * src/create.c (create_archive): Likewise.
5681 * src/list.c (read_and): Likewise.
5682 * src/update.c (update_archive): Likewise.
5683 * lib/exclude.h (excluded_pathname): New decl.
5684 * lib/exclude.c (_GNU_SOURCE): Define.
5685 (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
5686 (excluded_filename_opts): New function.
5687 (excluded_pathname): New function.
5689 * lib/Makefile.am (EXTRA_DIST):
5690 xstrtol.c moved here from libtar_a_SOURCES.
5691 (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
5692 Remove xstrtoul.c; no longer needed.
5693 * lib/xstrtol.c: Remove.
5695 * src/tar.c (decode_options):
5696 Set newer_time_option to TYPE_MINIMUM, so that
5697 negative timestamps are handled correctly.
5698 Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
5699 uniformity (and so that we don't need to have the other fns).
5700 (main): Remove call to init_total_written; no longer needed.
5702 * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
5703 checks for unsigned long and long long.
5704 * src/arith.c: Remove.
5705 * src/Makefile.am (tar_SOURCES): Remove arith.c.
5706 * po/POTFILES.in: Remove src/arith.c.
5707 * src/arith.h: Use double, to simplify configuration gotchas.
5708 (tarlong): Now double.
5709 (TARLONG_FORMAT): New macro.
5710 (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
5711 LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
5712 zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
5713 add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
5714 zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
5715 mult_tarlong, print_tarlong): Remove. All callers replaced with
5718 * src/common.h (init_total_written): Remove decl.
5720 * src/buffer.c (total_written):
5721 Remove; replaced with prev_written + bytes_written.
5722 (prev_written): New var.
5723 (init_total_written): Remove.
5724 (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
5726 * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
5727 Make sure that we can shift, multiply
5728 and divide unsigned long long values; Ultrix cc can't do it.
5730 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
5731 Check for any unknown bits, not just unknown bits left of the leftmost
5734 * lib/quotearg.c (quotearg_buffer):
5735 Don't quote spaces if C quoting style.
5736 * src/list.c (from_oct):
5737 Use C quoting style for error; omit trailing NULs.
5739 1999-07-14 Paul Eggert <eggert@twinsun.com>
5741 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
5743 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
5744 <inttypes.h> defines strtoumax as a macro (and not as a function).
5745 HP-UX 10.20 does this.
5747 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
5748 * PORTS, README, TODO, doc/tar.texi: Likewise.
5750 1999-07-12 Paul Eggert <eggert@twinsun.com>
5752 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
5753 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
5755 * src/list.c (decode_header):
5756 Do not assume that S_IFBLK and S_IFCHR are defined.
5758 * src/create.c (start_header): Do not assume S_IFMT is defined.
5759 (dump_file): Remove unnecessary check for screwy apollo lossage.
5760 Do not assume S_IFBLK and S_IFCHR are defined.
5762 * src/extract.c (extract_archive):
5763 Test whether S_IFCHR and S_IFBLK are nonzero,
5764 not whether they are defined, for consistency with other tests.
5766 * src/buffer.c (is_regular_file):
5767 Don't succeed on files that we can't access due to
5768 permissions problems.
5769 (open_archive): Fix wording on fatal error message.
5770 Don't bother to stat /dev/null if the archive is not a character
5773 * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
5774 Report an error, not a warning, for I/O errors.
5775 (process_rawdata, process_dumpdir, diff_sparse_files):
5776 Change ungrammatical "Data differs" to "Contents differ".
5777 (get_stat_data): Find hidden files on AIX.
5778 Accept file name as argument; all uses changed.
5779 (get_stat_data, diff_archive): Use system error message for
5780 nonexistent files rather than rolling our own.
5781 (diff_archive): Unknown file types are errors, not warnings.
5782 Normalize spelling of message to "File type differs".
5783 Use get_stat_data to get link status, for consistency.
5784 Do not inspect st_rdev for fifos.
5785 Do not assume st_mode values contain only file types and mode bits.
5786 Check for mode changes and device number changes separately.
5788 * src/update.c (append_file):
5789 Open the file before statting it, to avoid a race.
5790 Complain about file shrinkage only when we reach EOF.
5792 1999-07-08 Paul Eggert <eggert@twinsun.com>
5794 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
5796 * configure.in (AC_EXEEXT): Add.
5798 * lib/Makefile.am (noinst_HEADERS):
5799 Add basename.h, exclude.h. Remove full-write.h.
5800 (libtar_a_SOURCES): Add exclude.c.
5802 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
5804 * lib/full-write.c: Include safe-read.h instead of full-write.h.
5805 * lib/safe-read.h (safe_read): New decl.
5806 * src/rmt.c: Include safe-read.h.
5807 * src/rtapelib.c: Include basename.h, save-read.h.
5808 (rmt_open__): Use base_name to compute base name.
5811 Include basename.h, exclude.h; don't include full-write.h.
5812 (exclude_option): Remove decl.
5813 (excluded): New decl.
5814 (add_exclude, add_exclude_file, check_exclude): Remove decls.
5816 * src/list.c (read_and):
5817 Use excluded_filename instead of check_exclude.
5818 Check base name of incoming file name, not entire file name, when
5819 deciding whether to exclude it.
5821 * src/create.c (finish_sparse_file):
5822 Use excluded_filename instead of check_exclude.
5823 Don't bother to stat excluded file names.
5824 * src/incremen.c (get_directory_contents): Likewise.
5826 * src/names.c (exclude_pool, exclude_pool_size,
5827 allocated_exclude_pool_size, simple_exclude_array,
5828 simple_excludes, allocated_simple_excludes,
5829 pattern_exclude_array, pattern_excludes,
5830 allocated_pattern_excludes, add_exclude, add_exclude_file,
5832 Remove; now done in ../lib/exclude.c.
5834 * src/tar.c (decode_options): Initialize `excluded'.
5835 Use new add_exclude_file and add_exclude functions.
5837 1999-07-05 Paul Eggert <eggert@twinsun.com>
5839 * m4/gettext.m4: Use changequote rather than [[ ]].
5841 * lib/safe-read.c: Renamed from lib/full-read.c.
5842 (safe_read): Renamed from full_read. All uses changed.
5843 * lib/safe-read.h, lib/full-write.h: New files.
5844 * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
5845 (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
5846 * lib/full-write.c: Include full-write.h.
5847 * src/common.h: Include full-write.h, safe-read.h.
5848 * src/system.h: (full_read, full_write): Remove decls.
5850 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
5852 * src/system.h (bindtextdomain, textdomain): undef before
5853 defining, to avoid preprocessor warnings with --disable-nls
5854 on hosts whose locale.h includes libintl.h.
5856 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
5857 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
5858 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
5861 1999-07-02 Paul Eggert <eggert@twinsun.com>
5863 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
5864 * m4/mktime.m4: New file.
5865 * m4/Makefile.am.in, m4/README: Remove these files.
5866 * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
5867 remove README, Makefile.am.in.
5868 (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
5869 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
5872 * src/tar.c: Include signal.h.
5873 (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
5874 (main): Ensure SIGCHLD is not ignored.
5876 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
5877 MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
5878 OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
5879 RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
5880 VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
5881 OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
5882 OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
5883 OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
5884 they don't overlap with char codes. Use an enum instead of a lot
5887 * src/system.h (ISASCII): Remove.
5888 (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
5889 S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
5890 S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
5891 MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
5892 LONG_MAX): New macros.
5894 * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
5895 (read_directory_file): Cast ISSPACE arg to unsigned char.
5896 * src/misc.c (ISPRINT): Remove; now in system.h.
5897 (remove_any_file): Add brackets to pacify gcc -Wall.
5898 * src/list.c: Don't include <ctype.h>; system.h already does this.
5899 (ISODIGIT, ISSPACE): Remove; now in system.h.
5900 (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
5902 (from_oct): Cast ISSPACE arg to unsigned char.
5904 * src/create.c (mode_to_oct): Translate modes from internal to
5906 * src/list.c (mode_from_oct): Translate modes from external to
5907 internal form. Do not complain about unrecognized mode bits.
5908 * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
5909 TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
5911 * src/extract.c: (extr_init, make_directories, extract_archive):
5912 Do not assume mode bits have traditional Unix values.
5913 * src/list.c (decode_mode): Likewise.
5914 * src/create.c (start_header, dump_file): Likewise.
5915 * src/buffer.c (child_open_for_compress,
5916 child_open_for_uncompress, open_archive, (close_archive): Likewise.
5917 * src/compare.c (diff_archive): Likewise.
5919 * src/extract.c (set_mode): Use %04 not %0.4 format.
5920 (extract_sparse_file): Do not use data_block uninitialized.
5921 Check for lseek failures.
5923 * src/rtapelib.c (rmt_lseek__):
5924 Convert lseek whence values to portable integers on the wire.
5925 * src/rmt.c (main): Likewise. Check for whence values out of range.
5927 * src/create.c (finish_sparse_file): Use lseek whence macros
5928 instead of integers.
5929 * src/buffer.c (backspace_output): Likewise.
5930 * src/compare.c (diff_archive, verify_volume): Likewise.
5931 * src/delete.c (move_archive): Likewise.
5932 * src/extract.c (extract_sparse_file): Likewise.
5934 * src/create.c (dump_file): Do not invoke finish_sparse_file
5935 on a negative file descriptor.
5937 * src/buffer.c: Add braces to pacify gcc -Wall.
5939 * src/compare.c (diff_sparse_files): Report lseek errors.
5941 * configure.in (ALL_LINGUAS): Add cs, es, ru.
5943 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
5945 * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
5946 message to be internationalized; \a doesn't work with msgfmt.
5948 * src/tar.c (long_options, main, usage, OPTION_STRING):
5949 Remove -E or --ending-file.
5950 * src/list.c (read_and): Likewise.
5951 * src/common.h (ending_file_option): Likewise.
5952 * src/buffer.c (close_archive): Likewise.
5954 * tests/after: Don't run two commands together in a pipeline,
5955 as some old shells mishandle pipeline exit status.
5957 1999-06-28 Paul Eggert <eggert@twinsun.com>
5959 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
5960 * NEWS: Describe changes since 1.12.
5961 * README: Update bug reporting address; move paxutils ref to NEWS.
5963 Handle EINTR correctly.
5964 * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
5965 * lib/full-read.c, lib/full-write.c: New files.
5966 * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
5967 Prefer full_read to read and full_write to write.
5968 * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
5969 * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
5971 * src/extract.c (extract_sparse_file): Likewise.
5972 * src/rmt.c (get_string, main, report_error_message,
5973 report_numbered_error): Likewise.
5974 * src/rmt.h (rmtread, rmtwrite): Likewise.
5975 * src/rtapelib.c (do_command, get_status_string, rmt_read__,
5976 rmt_write__, rmt_ioctl__): Likewise.
5977 * src/update.c (append_file): Likewise.
5978 * src/system.h (full_read, full_write): New decls.
5980 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
5981 lib/xmalloc.c, src/arith.c, src/misc.c.
5983 * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
5984 New macros. All uses of STDIN and STDOUT changed.
5985 * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
5986 instead of 0 and STDOUT_FILENO instead of 1.
5987 * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
5988 instead of fileno (stdin) and fileno (stdout) or 0 and 1.
5990 * src/rmt.c (private_strerror): Avoid const. Translate results.
5992 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
5993 in the presence of NFS clock skew.
5995 1999-06-25 Paul Eggert <eggert@twinsun.com>
5997 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
5999 * src/buffer.c (write_archive_buffer): New function.
6000 (child_open_for_compress, flush_write, flush_read): Use it to write
6002 (open_archive): Report error if fstat of archive fails.
6003 Improve efficiency of check for /dev/null.
6004 Also, fix some corner cases with remote archives and /dev/null checking.
6005 (close_archive): Test for input fifo only if not remote.
6006 Truncate output archive only if it's not remote.
6008 * src/misc.c (remove_any_file):
6009 Don't terminate if you see . or ..; just skip them.
6011 1999-06-18 Paul Eggert <eggert@twinsun.com>
6013 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
6015 Output sizes using a format that's more compatible with
6016 traditional tar (and with GNU Emacs).
6017 * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
6018 MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
6019 Don't subtract 1 from size.
6020 * src/create.c (to_oct): Prepend leading zeros, not spaces.
6021 Output a trailing NUL unless the value won't fit without it.
6022 (finish_header): No need to append NUL to chksum, now that
6025 1999-06-16 Paul Eggert <eggert@twinsun.com>
6027 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
6029 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
6030 @INTLLIBS@ might invoke rpl_realloc.
6032 * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
6033 (intconv): Remove; use xstrto* fns instead.
6034 ("xstrtol.h"): Include.
6035 (check_decimal): Remove.
6036 (long_options, usage, OPTION_STRING, decode_options):
6037 Remove -y, --bzip2, --unbzip2.
6038 (decode_options): Use xget_version instead of get_version.
6039 Check for overflow with -b and -L and RECORD_SIZE_OPTION.
6040 Replace invocations of check_decimal with xstrtoumax.
6042 * tests/preset.in (echo_n, echo_c): Remove.
6044 * tests/after: Don't rely on $echo_c and $echo_n.
6046 * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
6047 lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
6048 lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
6049 lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
6050 m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
6051 m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
6052 m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
6053 m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
6054 m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
6055 m4/xstrtoumax.m4: New files.
6057 * configure.in(fp_PROG_ECHO): Remove; no longer needed.
6058 (AC_SYS_LARGEFILE): Renamed from AC_LFS.
6059 (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
6060 (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
6061 (AC_CHECK_FUNCS): Remove lchown.
6062 (AC_REPLACE_FUNCS): Remove basename, dirname.
6063 Add lchown, strtol, strtoul.
6064 (jm_FUNC_MKTIME): Add.
6065 (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
6066 are also built via the ANSI2KNR-filtering rules.
6067 Use a no-op line to work around bug in automake 1.4 with malloc and
6069 (AC_OUTPUT): Add m4/Makefile.
6071 * lib/Makefile.am (EXTRA_DIST):
6072 Add lchown.c, malloc.c, mktime.c, realloc.c,
6073 strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
6074 (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
6075 (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
6076 xstrtoul.c, xstrtoumax.c. Remove getversion.c.
6077 ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
6079 * src/system.h (uintmax_t): Don't declare; configure now does this.
6081 * src/common.h (backup_type): New decl.
6082 * src/common.h, src/misc.c, src/tar.c:
6083 Move include of backupfile.h to common.h.
6085 * src/misc.c (maybe_backup_file):
6086 Pass backup_type to find_backup_file_name.
6088 * src/list.c (print_header): Change sizes of uform and gform from 11 to
6089 UINTMAX_STRSIZE_BOUND.
6091 * doc/tar.texi: Remove --bzip2.
6092 Fix @xref typos reported by latest makeinfo.
6094 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
6096 (M4DIR, ACINCLUDE_INPUTS): New macros.
6097 ($(srcdir)/acinclude.m4): New rule.
6099 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
6100 HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
6101 now generated automatically by autoconf.
6103 1999-05-15 Paul Eggert <eggert@twinsun.com>
6105 * doc/tar.texi: Remove -y.
6107 1999-04-09 Paul Eggert <eggert@twinsun.com>
6109 * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
6110 (we were allocating too much storage).
6111 (uintmax_t): Don't declare; configure now does this.
6113 * ABOUT-NLS: Update to gettext 0.10.35 edition.
6115 1999-03-22 Paul Eggert <eggert@twinsun.com>
6117 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
6119 * acinclude.m4 (AC_LFS_FLAGS):
6120 Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
6121 (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
6122 (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
6124 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
6125 New macros; needed for latest GNU xmalloc.c.
6127 * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
6128 (libtar_a_SOURCES): Add quotearg.c.
6129 * list.c: Include <quotearg.h>.
6130 (from_oct): Add forward decl.
6131 (read_header): Return HEADER_FAILURE if we can't parse the checksum.
6132 (from_oct): Report an error only if TYPE is nonzero.
6133 Quote any funny characters in bad header.
6135 1999-03-20 Paul Eggert <eggert@twinsun.com>
6137 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
6139 * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
6140 (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
6142 (AC_LFS): Simplify AIX revision number test.
6144 1999-03-17 Paul Eggert <eggert@twinsun.com>
6146 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
6148 * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
6149 Remove; it doesn't work that well
6150 with AC_CANONICAL_HOST.
6151 (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
6153 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
6155 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
6157 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
6159 * tar.texi: Fix bug-report addr.
6161 * README: Remove --with-included-malloc.
6162 Upgrade version numbers of build software.
6164 1999-03-07 Paul Eggert <eggert@twinsun.com>
6166 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
6168 * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
6169 where bindtextdomain and gettext require -lintl.
6170 (AC_LFS_FLAGS): Simplify so that it only gets the flags;
6171 `no' means it failed.
6172 (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
6173 (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
6174 _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
6175 to add anything to the command line (it's all in config.h).
6176 Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
6178 1999-03-01 Paul Eggert <eggert@twinsun.com>
6180 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
6182 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
6184 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
6185 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
6186 uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
6187 like OFF_MAX, which are not reliable
6188 (e.g. OFF_MAX in AIX 4.2 is incorrect).
6189 * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
6190 SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
6192 * src/incremen.c (get_directory_contents):
6193 Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
6194 Have statx depend on STX_HIDDEN, not AIX.
6196 * src/create.c (to_oct):
6197 New parameter substitute, giving a substitute value to use
6198 when the original value is out of range. Do not append a space to the
6199 output; modern tars don't. When a value is out of range, specify the
6200 maximum value, not the number of bits.
6201 (GID_NOBODY, UID_NOBODY): New macros.
6202 (gid_to_oct, uid_to_oct): Use them as substitutes.
6203 (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
6204 (dump_file): Check whether the file changed as we read it.
6206 * src/rmt.c (main): Remove suspicious AIX/386 code.
6208 1999-02-19 Paul Eggert <eggert@twinsun.com>
6210 * intl/localealias.c (read_alias_file): Don't assume that memcpy
6211 returns a type compatible with char *; it doesn't on SunOS
6212 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
6214 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
6216 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
6217 * doc/tar.texi: Add --bzip2, --unbzip2 options.
6219 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
6221 (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
6222 (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
6223 * acinclude.m4 (AM_WITH_NLS):
6224 Update to latest gettext version (serial 5).
6225 (AC_LFS_FLAGS): New macro
6226 (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
6227 working only with unset variables. Append to CFLAGS, not CPPFLAGS.
6228 Work properly in cross-compilation scenario, by checking for getconf
6229 with AC_CHECK_TOOL and by ditching uname in favor of
6230 AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
6232 * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
6233 replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
6234 * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
6235 since getdate.y now uses ANSI code.
6237 * config.guess, config.sub: New files; taken from automake 1.4.
6239 * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
6240 intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
6241 intl/explodename.c, intl/finddomain.c, intl/gettext.c,
6242 intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
6243 intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
6244 intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
6245 Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
6247 1999-02-01 Paul Eggert <eggert@twinsun.com>
6249 * src/tar.c: Update copyright.
6253 1999-02-01 Paul Eggert <eggert@twinsun.com>
6255 * NEWS, configure.in: Version 1.12.64004
6257 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
6259 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
6261 * src/extract.c (extract_archive): Fix bug when extracting sparse
6262 files: they were trashing the tar file header.
6264 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
6265 Add -y or --bzip2 or --bunzip2 option.
6267 1999-01-30 Paul Eggert <eggert@twinsun.com>
6269 * src/names.c (cached_no_such_uname, cached_no_such_gname,
6270 cached_no_such_uid, cached_no_such_gid): New vars.
6271 (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
6272 Cache failures, too.
6274 * src/tar.c (decode_options):
6275 Don't pass names longer than UNAME_FIELD_SIZE to
6276 uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
6278 1999-01-27 Paul Eggert <eggert@twinsun.com>
6280 * NEWS, configure.in: Version 1.12.64003
6282 * src/buffer.c (backspace_output, close_archive): Cast
6283 rmtlseek position arg to off_t, for benefit of K&R compilers
6285 * src/compare.c (verify_volume): Likewise.
6287 * NEWS, configure.in: Version 1.12.64002
6289 * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
6290 off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
6291 Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
6292 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
6293 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
6294 uid_from_oct): Likewise.
6296 1999-01-25 Paul Eggert <eggert@twinsun.com>
6298 * incremen.sh: Fix timing bug in regression test.
6300 1999-01-22 Paul Eggert <eggert@twinsun.com>
6302 * NEWS, configure.in: Update version
6304 * Makefile.am (localedir): Change to $(datadir)/locale.
6305 (DEFS): New macro, defining LOCALEDIR.
6306 (tar.o, tar._o, rmt.o, rmt._o): Remove.
6307 (INCLUDES): Add -I..
6309 * Makefile.am (localedir): Change to $(datadir)/locale.
6311 1999-01-21 Paul Eggert <eggert@twinsun.com>
6313 * NEWS, README, configure.in: Unofficial version 1.12.64001.
6315 * tests/Makefile.am (localedir): Change to $(datadir)/locale.
6316 * src/Makefile.am (localedir): Likewise.
6317 (DEFS): New macro, defining LOCALEDIR.
6318 (tar.o, tar._o, rmt.o, rmt._o): Remove.
6319 (INCLUDES): Add `-I..'.
6321 * tests/incremen.sh: Fix timing bug.
6323 1999-01-20 Paul Eggert <eggert@twinsun.com>
6325 * NEWS, README, configure.in: Unofficial version 1.12.64000.
6326 `lfs.7' changed to `64000' in version number
6327 to conform to gnits standards.
6329 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
6330 mkinstalldirs, ansi2knr.c: Update to latest public versions.
6332 Rebuild with automake 1.4 and autoconf 2.13, to work around some
6335 1998-12-07 Paul Eggert <eggert@twinsun.com>
6337 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
6339 * src/list.c (read_header):
6340 Accept file names as specified by POSIX.1-1996 section 10.1.1.
6342 1998-11-30 Paul Eggert <eggert@twinsun.com>
6344 * configure.in: Quote the output of uname.
6346 * src/extract.c (set_stat): chmod after chown even when not root;
6347 if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
6349 1998-11-15 Paul Eggert <eggert@twinsun.com>
6351 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
6353 * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
6354 ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
6356 1998-10-28 Paul Eggert <eggert@twinsun.com>
6358 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
6360 * src/system.h (voidstar): Use void * if __STDC__ is defined,
6363 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
6364 On many installations, rexec is disabled.
6366 1998-08-07 Paul Eggert <eggert@twinsun.com>
6368 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
6370 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
6371 for nameless users and groups.
6373 1998-02-17 Paul Eggert <eggert@twinsun.com>
6375 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
6376 * NEWS, README: Add explanation of why this isn't an official version.
6378 1998-02-02 Paul Eggert <eggert@twinsun.com>
6380 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
6381 This is an unofficial version.
6383 1997-12-17 Paul Eggert <eggert@twinsun.com>
6385 * src/incremen.c (ST_DEV_MSB): New macro.
6386 (NFS_FILE_STAT): Use most significant bit of st_dev,
6387 even if it's unsigned.
6389 1997-12-08 Paul Eggert <eggert@twinsun.com>
6391 * src/system.h (ST_NBLOCKS): Fix typo in definition.
6393 1997-11-19 Paul Eggert <eggert@twinsun.com>
6395 * configure.in (HAVE_INTTYPES_H):
6396 Don't ignore cache variable if it's already set.
6398 1997-11-10 Paul Eggert <eggert@twinsun.com>
6400 * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
6401 * src/delete.c (records_read): Now off_t.
6402 (move_archive): Don't assume mt_count is of type daddr_t.
6404 1997-10-30 Paul Eggert <eggert@twinsun.com>
6406 * configure.in (CPPFLAGS, LDFLAGS, LIBS):
6407 Set to appropriate values if large file support
6408 needs explicit enabling.
6409 (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
6411 New macros to configure.
6412 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
6414 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
6415 major_t, minor_t, ssize_t): New macros.
6417 * src/arith.h (TARLONG_FORMAT):
6418 Fix typo: %uld -> %lu. Use unsigned when long long
6420 (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
6421 (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
6423 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
6424 2nd arg is now unsigned long.
6426 * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
6427 (prepare_record_buffer): Arg is now size_t.
6428 Remove now-useless casts.
6430 (main): Use `long' for status, so that it can store ssize_t.
6431 Use daddr_t, mode_t, size_t, off_t when appropriate.
6432 Convert daddr_t and off_t values ourselves, since they might be longer
6433 than long. Convert other types using `long' primitives.
6434 When processing MTIOCTOP, do not try to pass resulting
6435 count back, since it won't work (it could be too large) and it's
6436 not expected anyway.
6439 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
6440 now-useless casts. Use unsigned long to print *_t types, except use
6441 STRINGIFY_BIGINT for off_t.
6442 (update_archive): Cast -1 to dev_t when necessary.
6444 * src/tar.c (check_decimal):
6445 Now returns 1 if successful, 0 otherwise, and returns
6446 uintmax_t value into new arg. Check for arithmetic overflow.
6447 (decode_options): Avoid overflow if record_size fits in size_t but not int.
6448 Check for overflow on user or group ids.
6450 * src/compare.c (diff_init, process_rawdata, read_and_process,
6451 diff_sparse_files, diff_archive):
6452 Use off_t, pid_t, size_t, ssize_t when appropriate.
6453 Remove now-useless casts. Use unsigned long to print *_t types,
6454 except use STRINGIFY_BIGINT for off_t.
6456 (process_noop, process_rawdata, process_dumpdir, read_and_process):
6457 Size arg is now size_t.
6459 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
6460 when allocating buffer.
6463 (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
6464 Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
6465 Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
6468 (get_status_string, get_status_off): New function.
6469 (get_status): Now returns long, so that it can store ssize_t.
6470 Invoke get_status_string to do the real work.
6471 (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
6472 (rmt_lseek__): Now returns off_t, using new get_status_off function.
6473 (rmt_ioctl__): Convert mt_count by hand,
6474 since it might be longer than long.
6476 * src/mangle.c (extract_mangle):
6477 Check for overflow when converting off_t to size_t.
6478 Use off_t, size_t when appropriate. Remove now-useless casts.
6480 * src/system.h (mode_t): Remove; now done by autoconf.
6481 (ST_NBLOCKS): Do not overflow if st_size is near maximum.
6482 Return number of ST_NBLOCKSIZE-byte blocks,
6483 not number of 512-byte blocks;
6484 this also helps to avoid overflow.
6485 (st_blocks): Declare if needed.
6486 (ST_NBLOCKSIZE): New macro.
6487 (<limits.h>, <inttypes.h>): Include if available.
6488 (CHAR_BIT): New macro.
6489 (uintmax_t): New typedef.
6490 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
6491 UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
6492 OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
6494 * src/names.c (name_init):
6495 Fix typo in error message: FILE* was passed, but char*
6498 (read_name_from_file, name_gather, addname, name_match, name_scan,
6499 add_exclude): Use size_t when appropriate. Remove now-useless casts.
6501 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
6503 * src/extract.c (newdir_umask, current_umask): Now mode_t.
6504 (extract_sparse_file): Args now use off_t.
6506 (set_mode, set_stat, make_directories, extract_sparse_file,
6507 extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
6508 now-useless casts. Use unsigned long to print *_t types, except use
6509 STRINGIFY_BIGINT for off_t.
6511 * src/misc.c (quote_copy_string):
6512 Use size_t when appropriate. Remove now-useless casts.
6514 * src/list.c (read_and, list_archive, read_header, decode_mode,
6515 print_header, print_for_mkdir):
6516 Use mode_t, off_t, size_t when appropriate. Remove
6517 now-useless casts. Use unsigned long to print *_t types, except use
6518 STRINGIFY_BIGINT for off_t.
6520 (read_header): Check for overflow when converting header size.
6522 (from_oct): Now static. Now returns uintmax_t. `where' arg is now
6523 const char *. Size arg is now size_t. Now takes new type and maxval
6524 args. Compute result using uintmax_t, not long. Report error if
6525 field does not contain octal number in range.
6526 (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
6527 off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
6528 uintmax_from_oct): New functions.
6530 (stringify_uintmax_t_backwards): New function.
6532 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
6533 (skip_file): Offset arg is now off_t.
6535 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
6536 real_s_totsize, real_s_sizeleft, current_block_ordinal):
6538 (write_error): Arg is now ssize_t.
6539 (child_pid): Now pid_t.
6540 (available_space_after): Now size_t.
6542 (child_open_for_compress, child_open_for_uncompress, flush_write,
6543 open_archive, flush_write, write_error, flush_read, close_archive):
6544 Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
6545 casts. Use unsigned long to print *_t types, except use
6546 STRINGIFY_BIGINT for off_t.
6548 * src/delete.c (records_read): Now daddr_t.
6549 (move_archive): Arg is now daddr_t. Check for overflow when
6551 (move_archive, delete_archive_members): Use daddr_t, off_t when
6552 appropriate. Remove now-useless casts.
6554 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
6555 (rmt_lseek): Now returns off_t.
6557 * src/create.c (to_oct):
6558 Now static. Value arg is now uintmax_t. Accept new args
6559 giving name of type of octal field, for error messages. Report an
6560 error if the value is too large to fit in the field.
6561 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
6562 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
6564 (write_eot, write_long, finish_header, deal_with_sparse,
6565 finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
6566 appropriate. Remove now-useless casts. Use unsigned long to print
6567 *_t types, except use STRINGIFY_BIGINT for off_t.
6569 (find_new_file_size): 1st arg is now off_t*.
6570 (finish_sparse_file): Args now use off_t, not long.
6571 Check for lseek error.
6572 (create_archive, dump_file): Cast -1 to dev_t when necessary.
6573 (dump_file): Device arg is now dev_t.
6574 Avoid overflow when testing whether file has holes
6575 by using the new ST_NBLOCKSIZE macro.
6577 * src/incremen.c (struct accumulator, add_to_accumulator,
6578 get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
6579 Use size_t for sizes.
6580 (struct directory, get_directory_contents, add_hierarchy_to_namelist):
6581 Use dev_t, ino_t for devices and inodes.
6582 (gnu_restore): Use off_t for file offsets.
6583 (struct directory): Use char for flags. Add new flag `nfs'.
6585 (NFS_FILE_STAT): New macro.
6586 (note_directory): Accept struct stat * instead of
6587 device and inode number. All callers changed.
6588 (note_directory, get_directory_contents):
6589 Use NFS_FILE_STAT to determine whether directory is an NFS directory.
6590 (write_dir_file): Cast time_t to unsigned long before printing as %lu.
6592 * src/common.h (record_size, struct name, struct sp_array,
6593 available_space_after):
6594 Use size_t for sizes.
6595 (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
6596 Use off_t for file offsets.
6597 (struct name): dir_contents is now const char *, not char *.
6598 (dump_file, get_directory_contents): Use dev_t for devices.
6599 (to_oct): Remove decl.
6600 (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
6601 UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
6602 GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
6603 OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
6604 UINTMAX_FROM_OCT): New macros.
6605 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
6606 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
6607 stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
6608 minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
6609 time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
6610 (print_for_mkdir): 2nd arg is now mode_t.
6612 See ChangeLog.1 for earlier changes.
6616 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software
6619 This file is part of GNU tar.
6621 GNU tar is free software; you can redistribute it and/or modify
6622 it under the terms of the GNU General Public License as published by
6623 the Free Software Foundation; either version 2, or (at your option)
6626 GNU tar is distributed in the hope that it will be useful,
6627 but WITHOUT ANY WARRANTY; without even the implied warranty of
6628 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6629 GNU General Public License for more details.
6631 You should have received a copy of the GNU General Public License
6632 along with GNU tar; see the file COPYING. If not, write to
6633 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
6634 Boston, MA 02110-1301, USA.
6638 version-control: never