1 2005-12-06 Sergey Poznyakoff <gray@gnu.org.ua>
3 * doc/tar.texi: Document --to-command and --info-script
4 options. Add missing xrefs.
5 * src/buffer.c (new_volume): Use sys_exec_info_script() instead of
7 * src/common.h (archive_format_string,subcommand_string)
8 (sys_exec_info_script): New prototypes.
9 * src/system.c (sys_exec_info_script): New function.
10 * src/tar.c (archive_format_string): Remove static qualifier.
11 (subcommand_string): New function.
13 2005-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
15 * src/extract.c: Fix restoring of directory timestamps from
17 (directories_first): New variable.
18 (prepare_to_extract): Set directories_first
19 (extract_archive): Call apply_nonancestor_delayed_set_stat() only
20 if not extracting from an incremental archive
21 (extract_dir): Obtain root_device here, to make sure it works
24 * src/incremen.c (purge_directory): Skip the member and return if
25 the archive is not in incremental format.
26 * tests/incr02.at: New testcase
27 * tests/Makefile.am: Add incr02.at
28 * tests/testsuite.at: Likewise
30 * THANKS: Add Guerkan Karaman.
33 2005-11-30 Paul Eggert <eggert@cs.ucla.edu>
35 * doc/tar.texi (Option Summary): Rewrite the
36 --atime-preserve=system description in response to Ian Turner's
39 2005-11-30 Ian Turner <ian@zmanda.com>
41 * doc/tar.texi (Extracting Specific Files): Remove obsolescent
44 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
46 * NEWS: New option --atime-preserve=system, which uses O_NOATIME.
47 * THANKS: Add Ian Turner.
49 * configure.ac: Prefer AC_CHECK_HEADERS_ONCE to AC_CHECK_HEADERS.
50 Check for stropts.h and sys/filio.h too, for _FIOSATIME.
51 * doc/tar.texi: Change "modification time" to "data modification
52 time", "change time" to "status change time", and "filesystem" to
53 "file system", so that we use terminology consistent with POSIX.
54 Use American spacing rather than French for sentence ends.
55 "non-dependable" -> "undependable".
56 (Option Summary, Attributes): Explain better the pitfalls of the
57 --atime-preserve option, and suggest read-only mounts,loopback
58 mounts, and noatime mounts for older systems.
59 * doc/value.texi (op-atime-preserve-system): Renamed from
60 op-atime-preserver-system to fix a misspelling.
61 * src/common.h (enum atime_preserve): Use lower case for enum values.
62 * src/compare.c: Don't include utimens.h; no longer needed.
63 (diff_file): Use set_file_atime rather than utimens; avoid closing
64 diff_handle until after this, so that we can set the file time stamp
65 via the file descriptor rather than via its name.
66 * src/create.c: Don't include utimens.h; no longer needed.
67 (dump_regular_finish): Remove. All callers now do its work inline.
68 (dump_dir): New arg FD. All callers changed.
69 Use fdsavedir rather than savedir.
70 (unknown_file_error): Arg is a const pointer now.
71 (dump_file0): 2nd arg is a const pointer now.
72 Treat directories more like files, with respect to --atime-preserve.
73 For example, also warn if a directory changes while we are dumping it.
74 Prefer file descriptors to file names when retrieving/setting file
75 attributes; this saves path-resolution time and allows us to avoid
76 changing mtime/ctime on Solaris when restoring atime as root.
77 Use O_DIRECTORY when opening directories, to avoid some race conditions.
78 Do not reset atime if mtime has changed. Report an error if
79 we cannot reset atime.
81 * lib/.cvsignore: Add malloc.h, regcomp.c, regex.c, regex.h,
82 regex_internal.c, regex_internal.h, regexc.c; used by rpmatch.
84 2005-11-29 Ian Turner <ian@zmanda.com>
86 First cut at adding support for --atime-preserve=system.
87 * doc/tar.texi (Option Summary): First cut at documenting it.
88 All other uses of --atime-preserve changed to --atime-preserve=replace.
89 * doc/value.texi (op-atime-preserve-replace, op-atime-preserver-system):
91 (op-atime-preserve): Mention METHOD.
92 * src/common.h (atime_preserve): New enum.
93 (atime_preserve_option): Now of the enum type rather than bool.
95 * src/compare.c (diff_file): Read with O_NOATIME if asked for.
96 * src/create.c (dump_file0): Read regular and CTG files with O_NOATIME
98 * src/tar.c (usage): Mention new usage.
99 (parse_opt): Parse new usage.
101 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
103 * THANKS: Convert back to UTF-8, sort (using LC_ALL=C on Debian
104 stable), and consistently use tabs rather than spaces.
106 2005-11-27 Sergey Poznyakoff <gray@gnu.org.ua>
108 * src/xheader.c: Remove parts of code prematurely introduced
109 yesterday. Thanks Eric Blake.
111 2005-11-26 Sergey Poznyakoff <gray@gnu.org.ua>
113 * src/xheader.c (xheader_format_name): Fix memory leak.
115 2005-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
117 * gnulib.modules: Add rpmatch
118 * lib/stdopen.h, lib/stdopen.c: New file. Imported from coreutils.
119 * lib/Makefile.tmpl: Add stdopen.h, stdopen.c
120 * po/POTFILES.in: Add rpmatch.c
121 * src/tar.c (confirm): Rewritten using rpmatch.
122 (decode_options): Minor optimizations
123 (main): Call stdopen() to ensure the first three descriptors are
126 * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at,
127 tests/multiv04.at, tests/sparsemv.at, tests/sparsemvp.at,
128 tests/star/multi-fail.at: Close stdin so that if something fails
129 causing tar to ask for the next volume, it won't hang the
132 * src/buffer.c (flush_write,flush_read): Change data type.
133 (flush_archive): Compute actual buffer fill level before calling
135 (close_archive): Call flush_archive again if the first call
136 resulted in partially filled buffer.
137 (try_new_volume): Rewritten handling of initial headers.
138 (add_chunk_header): New function. Write an additional header
139 before the continuation chunk. The purpose of the header is to
140 allow third-party tars to extract the member.
141 (simple_flush_write): Take an argument.
142 (_gnu_flush_write): Correctly handle partially filled buffers.
143 * src/common.h (flush_read,flush_write): Functions, again.
144 (write_extended): Changed declaration
145 (xheader_format_name): New declaration
146 * src/create.c (write_extended): Change type and meaning of
147 the first argument. All callers updated
148 * src/xheader.c (xheader_format_name): Remove static
149 qualifier. Change last argument.
150 Correct buffer size calculation (allocated too much space).
151 (xheader_write): Increase global_header_count here ...
152 (xheader_write_global): ... instead of here
154 * tests/testsuite.at (AT_TAR_CHECK): Define TEST_TAR_FORMAT
155 * tests/multiv01.at: Update
156 * tests/multiv02.at: Update
157 * tests/multiv03.at: Update
158 * tests/sparsemvp.at: Update
159 * tests/star/multi-fail.at: Update
161 * scripts/tarcat: Handle archives in pax format. Improve handling
162 of traditional archives.
163 * doc/tar.texi (Tarcat): New node
165 2005-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
167 Fix splitting of sparse files between the volumes.
169 * src/buffer.c (try_new_volume): Bugfix. Always check
170 continued_file_name. If it is absent, the volume is out
172 (add_multi_volume_header): Create GNU.volume.filename keyword in
174 * src/sparse.c (sparse_dump_region): Call mv_size_left.
175 (sparse_dump_file): Enclose the loop in mv_begin/mv_end.
176 * src/system.c: Do not pad compressed output if it goes to
178 * src/xheader.c (xhdr_tab): New keyword GNU.volume.filename.
180 * tests/sparsemv.at: New testcase
181 * tests/sparsemvp.at: New testcase
182 * tests/Makefile.am: Add sparsemv.at and sparsemvp.at.
183 * tests/testsuite.at: Likewise.
185 2005-11-09 Sergey Poznyakoff <gray@gnu.org.ua>
187 * src/buffer.c: Rewritten in a more modular fashion to provide
188 GNU extensions (multi-volume archives and archive labels) in
190 NOTICE, that some of the aspects (e.g. splitting the archive
191 on the extended header boundary) are still not solved, others
192 (splitting a sparse file between the volume) require additional
193 testing. Wait for the next commit.
195 (volume_label,continued_file_name,continued_file_size)
196 (continued_file_offset): New globals.
197 (save_name,save_totsize,save_sizeleft): Make static
198 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
199 (open_archive,flush_write,flush_read): Rewritten
201 * src/common.h (save_name,save_sizeleft,save_totsize): Remove
203 (volume_label,continued_file_name,continued_file_size): New
205 (flush_read,flush_write): Pointers to functions
206 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
207 (write_extended): New function.
209 * src/compare.c, src/create.c, src/extract.c, src/incremen.c,
210 src/list.c: Use mv_.* functions uniformly instead of fiddling
211 with the global variables.
212 * src/sparse.c: Use mv_.* functions where necessary.
213 * src/tar.c (decode_options): Allow to use --multi-volume and
214 --label with pax archives.
215 * src/xheader.c (xhdr_tab): Support for new GNU keywords.
217 * tests/delete01.at, tests/delete02.at, tests/delete03.at,
218 tests/delete04.at, tests/delete05.at, tests/extrac01.at,
219 tests/extrac02.at, tests/extrac03.at, tests/extrac04.at,
220 tests/extrac05.at, tests/incr01.at, tests/incremental.at,
221 tests/listed01.at, tests/listed02.at, tests/long01.at,
222 tests/longv7.at, tests/multiv01.at, tests/multiv02.at,
223 tests/multiv03.at, tests/multiv04.at, tests/options.at,
224 tests/options02.at, tests/same-order01.at, tests/same-order02.at,
225 tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
226 tests/star/multi-fail.at (AT_KEYWORDS): Improve to allow execution
227 of related tests in groups.
229 * doc/tar.texi: Update
231 2005-11-07 Paul Eggert <eggert@cs.ucla.edu>
233 * src/xheader.c (struct xhdr_tab.coder): Last arg is void const *,
234 not void *, to avoid create.c warning from GCC "passing argument 3
235 of 'xheader_store' discards qualifiers from pointer target type".
236 (dummy_coder, atime_coder, gid_coder, gname_coder, linkpath_coder):
237 (ctime_coder, mtime_coder, path_coder, size_coder, uid_coder):
238 (uname_coder, sparse_size_coder, sparse_numblocks_coder):
239 (sparse_offset_coder, sparse_numbytes_coder, dumpdir_coder):
240 (xheader_store): Likewise.
241 * src/common.h (xheader_store): Likewise.
243 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
244 and Paul Eggert <eggert@cs.ucla.edu>
246 * src/tar.c (NS_PRECISION_FORMAT_MASK): New macro.
247 (tar_timespec_cmp): New function. Wrapper over
248 timespec_cmp using the timespec precision provided by the
249 current archive format.
250 * src/common.h (tar_timespec_cmp): New declaration.
251 * src/compare.c (diff_file): Use tar_timespec_cmp.
252 * src/extract.c (file_newer_p): Likewise.
253 * src/update.c (update_archive): Likewise.
254 * tests/truncate.at: Reverted changes
255 * tests/update.at: Reverted changes
257 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
259 Support for incremental formats in pax archives.
260 Fixed POSIX compatibility of `sparse' extended header keywords.
262 * src/common.h (dumpdir_size,get_gnu_dumpdir)
263 (xheader_string_begin,xheader_string_add)
264 (xheader_string_end): New functions.
265 * src/create.c (dump_dir0): Handle incremental backups in pax
267 * src/incremen.c (dumpdir_size, get_gnu_dumpdir): New functions.
268 (purge_directory): Use stat_info.dumpdir instead of getting its
270 * src/list.c (list_archive): Handle incremental backups in pax
272 (decode_header): Initialize stat_info.dumpdir
273 * src/sparse.c (sparse_diff_file): Bugfix: set seekable.
274 (pax_dump_header): Store sparse map in GNU.sparse.map. If this
275 variable has been explicitely deleted, use GNU.sparse.offset/
276 GNU.sparse.numbytes variables.
277 * src/tar.c (decode_options): Incremental options are allowed with
279 (tar_stat_destroy): Free dumpdir
280 * src/tar.h (struct tar_stat_info.dumpdir): New member.
281 * src/xheader.c (xheader_keyword_deleted_p): Remove static
283 (struct xhdr_tab.decoder): Change prototype. POSIX allows string
284 values to contain embedded nulls, so take an extra argument
285 specifying the length of the string.
286 (decx,decg,dummy_decoder,atime_decoder,gid_decoder)
287 (gname_decoder,linkpath_decoder,ctime_decoder,mtime_decoder)
288 (path_decoder,size_decoder,uid_decoder,uname_decoder)
289 (sparse_size_decoder,sparse_numblocks_decoder)
290 (sparse_offset_decoder,sparse_numbytes_decoder): Likewise.
291 (decode_record): Pass value length to the handler
292 (run_override_list): Pass value length to the decoder
293 (xheader_print_n): New function
294 (xheader_print): Rewritten using xheader_print_n
295 (xheader_finish): Do not rely om strlen to compute the length of
296 the collected string: it can contain embedded nulls
297 (xheader_string_begin,xheader_string_add,xheader_string_end): New
299 (sparse_map_decoder,dumpdir_coder,dumpdir_decoder): New
300 functions. Handle GNU.sparse.map and GNU.dumpdir variables.
301 (xhdr_tab): Add new variables.
303 * tests/incr01.at: Test gnu, oldgnu, and posix formats
304 * tests/incremental.at: Likewise
306 2005-11-06 Paul Eggert <eggert@cs.ucla.edu>
308 * NEWS: Minor language and white space fixes.
310 * tests/truncate.at: Create files whose time stamps must fall on
311 1-second boundaries. This prevents tests from failing on hosts
312 like Solaris 8 that have nanosecond-resolution file time stamps.
313 * tests/update.at: Likewise.
315 * src/xheader.c (strtoimax, strtoumax): Remove decls; now done
318 2005-11-06 Sergey Poznyakoff <gray@gnu.org.ua>
320 * doc/tar.texi: Properly document incremental dumps
321 * doc/value.texi: Likewise.
322 * doc/snapshot.texi: Likewise.
324 2005-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
326 Improve listed incremental format:
328 * src/common.h (update_parent_directory): New prototype.
329 * src/create.c (dump_file): Call update_parent_directory.
330 * src/incremen.c (struct directory.mtime): New member.
331 (note_directory): Take additional arguments. All callers updated.
332 (scan_directory): Updated to use more metadata. In particular,
333 this allows to correctly detect renamed files.
334 (read_directory_file,write_directory_file)
335 (write_directory_file_entry): Support new directory file format.
336 * tests/listed01.at: Sleep 1 sec before creating second file.
337 * tests/listed02.at: Never skip the test. It should work on any
340 * doc/snapshot.texi: New file
341 * doc/tar.texi: Update.
342 * doc/Makefile.am: Update.
344 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
346 * src/extract.c (set_stat): Rewrite to avoid bug in Forte
347 Developer 7 C 5.4 Patch 111708-09 (2004-02-19).
349 2005-11-04 Sergey Poznyakoff <gray@gnu.org.ua>
351 * bootstrap: Fix quoting in help output.
352 (update_po): Use backward-compatible wget option --cache instead
353 of deprecated -C to accomodate for wget 1.10.
354 Changes proposed by Eric Blake
355 * THANKS: Add Eric Blake
357 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
359 * doc/tar.texi: Consistently put two spaces after sentences,
360 and put commas after "i.e." and "e.g.". This is the usual GNU
363 * lib/.cvsignore: Add creat-safer.c, fcntl--.h, fcntl-safer.h,
364 open-safer.c, openat-die.c, verify.h, to accommodate recent gnulib
367 2005-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
369 * src/compare.c (diff_dumpdir): Pass a valid device number to
370 get_directory_contents.
372 * THANKS: Add John Thomas McDole
374 * bootstrap: If file `.bootstrap' exists in the cwd and is
375 readable, prepend its contents to the command line
377 2005-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
379 * tests/link01.at: Skip test if ln fails (suppose the OS does
380 not support hard links).
382 2005-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
384 * src/tar.c (decode_options): Report error if -A or -r is used
385 together with compression option.
387 2005-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
389 * doc/tar.texi: Use @option and @kbd consistently.
390 Document new options.
392 2005-09-28 Sergey Poznyakoff <gray@gnu.org.ua>
395 * src/common.h (show_stored_names_option): New variable
396 * src/list.c (print_header): If show_stored_names_option is given,
397 list member names as stored in the archive. Patch proposed by Erik
398 Cumps <erik.cumps@icos.be>
399 * src/tar.c: Implement --show-stored-names option
401 * src/common.h (test_label_option): New variable;
402 * src/list.c (print_header): Special handling if test_label_option
404 * src/names.c (all_names_found): If test_label_option is set
406 * src/tar.c: New option --test-label tests the archive volume
407 label. The option proposed by Wouter Verhelst <wouter@nixsys.be>
409 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
411 * tests/Makefile.am (clean-local): Don't attempt to run
412 $(TESTSUITE) if it doesn't exist. Problem reported by
415 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
417 Don't filter time stamps through the resolution supported
418 by struct stat; keep them to full nanosecond resolution.
419 This affects behavior only on older hosts or file systems
420 that have lower-resolution time stamps.
421 * src/common.h (OLDER_STAT_TIME): Parenthesize arg.
422 (OLDER_TAR_STAT_TIME): New macro.
423 (code_timespec): New function.
424 (BILLION, LOG10_BILLION, TIMESPEC_STRSIZE_BOUND): New constants.
425 * src/compare.c (diff_file): Use full time stamp resolution.
426 * src/create.c (start_header, dump_file0): Likewise.
427 (start_header, dump_file0): Adjust to new structure layout.
428 (dump_regular_finish): Simplify by using timespec_cmp.
429 * src/extract.c (struct delayed_set_stat): Don't store stat info
430 that we don't need, to save space. All uses changed.
431 (struct delayed_set_stat, struct delayed_link, file_newer_p):
432 (create_placeholder_file, extract_link, apply_delayed_links):
433 Use full time stamp resolution.
434 (check_time): Use code_timespec rather than rolling our own code.
435 (set_stat, delay_set_stat): Arg now points to tar_stat_info to
436 avoid losing time information. All callers changed.
437 * src/list.c (read_and, decode_header, print_heaeder):
438 Use full time stamp resolution.
439 * src/misc.c (code_timespec): New function.
440 * src/tar.h (struct tar_stat_info): Record atime, mtime, ctime
441 separately, for benefit of hosts with lower resolution.
442 * src/update.c (update_archive): Use full time stamp resolution.
443 * src/xheader.c (code_time): Use new code_timespec function
445 (atime_coder, atime_decoder, ctime_coder, ctime_decoder):
446 (mtime_coder, mtime_decoder): Use full time stamp resolution.
448 Report time stamps to full resolution in environment.
449 Report memory allocation failures rather than ignoring them.
450 * src/system.c (time_to_env): New function.
451 (oct_to_env, str_to_env, chr_to_env): Report memory allocation failures.
452 (stat_to_env): Report full resolution in time stamps.
454 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
456 Merge changes from gnulib for file system sub-second time stamps.
457 * configure.ac: Remove checks for struct stat.st_spare1, struct
458 stat.st_atim.tv_nsec, struct stat.st_atimespec.tv_nsec, struct
459 stat.st_atimensec, as gnulib now does this for us.
460 Similarly for LIB_CLOCK_GETTIME.
461 * gnulib.modules: Add stat-time.
462 * lib/.cvsignore: Add stat-time.h.
463 * src/common.h: Include stat-time.h.
464 (timespec_lt): Remove. All callers changed to use timespec_cmp.
465 (get_stat_atime, get_stat_ctime, get_stat_mtime):
466 (set_stat_atime, set_stat_ctime, set_stat_mtime):
467 Remove; now defined by stat-time.h.
469 2005-09-14 Sergey Poznyakoff <gray@gnu.org.ua>
471 * src/incremen.c (list_dumpdir): New function. Used to dump
472 contents of GNUTYPE_DUMPDIR blocks.
473 * src/common.h (list_dumpdir): Likewise.
474 * src/list.c (list_archive): Use list_dumpdir() to display
475 GNUTYPE_DUMPDIR blocks. Do that only if two or more -v options are
478 2005-09-12 Paul Eggert <eggert@cs.ucla.edu>
480 * lib/.cvsignore: Adjust to current gnulib and modules used.
481 Add getdelim.c, getdelim.h, mbchar.c, mbchar.h, mbuiter.h, memchr.c,
482 pipe-safer.c, size_max.h, strdup.c, strdup.h, strnlen.h, strnlen1.c,
483 strnlen1.h, unistd--.h.
484 Remove getndelim2.c, getndelim2.h, pathmax.h, sysexits.h, xstrdup.c.
486 Treat fishy-looking hard links like fishy-looking symlinks.
487 * src/extract.c (struct delayed_set_stat): Rename after_symlinks
488 member to after_links. All uses changed.
489 (struct delayed_link): Renamed from struct delayed_symlink.
490 All uses changed. New member is_symlink.
491 (delayed_link_head): Renamed from delayed_symlink_head. All uses
493 (create_placeholder_file): New function, taken from extract_symlink.
494 (extract_link): Create placeholders for fishy-looking hard links.
495 (extract_symlink): Move code into create_placeholder_file.
496 (apply_delayed_links): Renamed from apply_delayed_symlinks.
497 All uses changed. Create both hard links and symlinks.
499 2005-09-03 Paul Eggert <eggert@cs.ucla.edu>
501 * README-alpha: Modernize description of software required for
504 2005-09-03 Sergey Poznyakoff <gray@gnu.org.ua>
506 * gnulib.modules: Add strdup
507 * src/incremen.c (purge_directory): Do not dereference symbolic
508 links. Bug reported by Ralph Corderoy <ralph@inputplus.co.uk> and
509 David Brown <davidb@davidb.org>
510 * tests/incr01.at: New test.
511 * tests/Makefile.am: Add incr01.at
512 * tests/testsuite.at: Likewise
515 2005-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
517 * src/incremen.c (read_directory_file): Use strtoumax to read
518 snapshot file contents.
519 (write_directory_file_entry): Use umaxtostr().
521 2005-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
523 * src/create.c (file_dumpable_p,dump_file0): Fix handling of
524 sparse files to /dev/null with --totals option.
525 * tests/update.at: Remove dependency on file order.
527 2005-07-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
529 * doc/tar.texi: Fix typo.
531 2005-07-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
533 * tests/pipe.at: Pipe the output from `tar xfv' through sort.
535 2005-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
537 * src/sparse.c (tar_sparse_init): Fill structure with zeros. Call
538 sparse_select_optab(). All callers updated.
539 (sparse_member_p, sparse_fixup_header): Use tar_sparse_init().
541 2005-06-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
543 * src/sparse.c (pax_sparse_member_p): Checking member size
544 vs. file size is not reliable enough. Use sparse_map_avail.
546 * tests/star/gtarfail.at: Adapt to the new output format
547 * tests/star/gtarfail2.at: Likewise
548 * tests/star/multi-fail.at: Likewise
549 * tests/star/pax-big-10g.at: Likewise
550 * tests/star/ustar-big-2g.at: Likewise
551 * tests/star/ustar-big-8g.at: Likewise
553 * tests/sparse03.at: New test.
554 * tests/Makefile.am: Add sparse03.at
555 * tests/testsuite.at: Likewise
557 * src/xheader.c (size_decoder): Do not set archive_file_size.
559 Fix bugs introduced yesterday:
561 * src/sparse.c (tar_sparse_init): Initialize
563 (sparse_scan_file): Initialize archive_file_size to 0. The
564 variable keeps size of the file *as stored in the archive*, not
565 the size reported by stat.
567 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
569 A sweep of the sparse code prompted by a bug report by Jim Meyering.
570 * src/sparse.c: Include <inttostr.h>.
571 (struct tar_sparse_file): offset and dumped_size are off_t, not
572 size_t. optab is now const *.
573 (dump_zeros): Return bool success flag, not off_t.
575 Use a constant-zero buffer rather than clearing a buffer each time.
576 Don't mess up if write fails.
577 (dump_zeros, check_sparse_region):
578 Don't assume off_t is no wider than size_t.
579 (tar_sparse_init): Don't bother clearing a field that is already clear.
580 (zero_block_p): First arg is const *, not *.
581 (clear_block, SPARSES_INIT_COUNT): Remove.
582 (sparse_add_map): First arg is now struct start_stat_info *, not
583 struct tar_sparse_file *. All callers changed.
584 Use x2nrealloc to check for size_t overflow.
585 (parse_scan_file): Cache commonly-used parts of file.
586 Use an auto buffer, not a static one.
587 Don't bother clearing the buffer; not needed.
588 Don't bother clearing items that are already clear.
589 (oldgnu_optab, star_optab, pax_optab): Now const.
590 (sparse_dump_region): Don't bother clearing the buffer before
591 reading into it; just clear the parts that aren't read into.
592 (sparse_dump_file): Clear the whole local variable 'file'.
593 (diff_buffer): Remove; now a local var.
594 (check_sparse_region): Don't bother clearing buffer before
595 reading into it. Don't assume off_t is promoted to long.
596 (oldgnu_get_sparse_info, star_get_sparse_info):
597 Use an auto status, not static.
598 * src/tar.h (struct tar_stat_info): had_trailing_slash is
600 * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder):
601 Rewrite to avoid cast.
602 (sparse_offset_decoder, sparse_numbytes_decoder):
603 Diagnose excess entries rather than crashing.
605 2005-06-22 Jim Meyering <jim@meyering.net>
607 * src/common.h (timespec_lt): Add a return type: bool.
609 2005-06-21 Paul Eggert <eggert@cs.ucla.edu>
611 Further improvements inspired by Jim Meyering's fixes.
613 * NEWS: Better support for full-resolution time stamps.
614 The -v option now prints time stamps only to 1-minute resolution.
615 * gnulib.modules: Add utimens.
616 * lib/.cvsignore: Add imaxtostr.c, inttostr.c, inttostr.h,
617 offtostr.c, umaxtostr.c, utimens.c, utimens.h. Remove paxconvert.c.
618 * lib/Makefile.tmpl (libtar_a_SOURCES): Remove paxconvert.c.
619 * lib/paxconvert.c: Remove; superseded by umaxtostr.c.
620 * po/POTFILES.in: Remove lib/paxconvert.c. Add lib/xalloc-die.c,
622 * src/buffer.c (set_start_time, compute_duration, start_time):
623 Use gettime rather than rolling our own code.
624 * src/common.h (OLDGNU_NAME_FIELD_SIZE, MAXOCTAL11, MAXOCTAL7): Remove.
625 (newer_ctime_option): Remove.
626 (timespec_lt): New function.
627 (OLDER_STAT_TIME): Use it.
628 (string_to_chars): First arg is char const *, not char *.
629 (tartime): Time arg is now struct timespec. New bool arg.
631 (code_ns_fraction): New decl.
632 (sys_stat_nanoseconds): Remove decl.
633 (get_stat_atime, get_stat_ctime, get_stat_mtime): New functions.
634 (set_stat_atime, set_stat_ctime, set_stat_mtime): New functions.
635 * src/compare.c: Include utimens.h rather than rolling our own.
636 (diff_dir, diff_file, diff_link, diff_symlink, diff_special):
638 (diff_dumpdir, diff_multivol): Prototype.
639 (diff_file): Support higher-resolution time stamps.
640 * src/create.c: Include utimens.h rather than rolling our own.
641 (MAX_OCTAL_VAL): New macro.
642 (tar_copy_str, string_to_chars): Don't bother to zero-fill;
643 the destination is already zeroed.
644 (string_to_chars): First arg is char const *.
645 (start_private_header): Use MINOR_TO_CHARS, not MAJOR_TO_CHARS,
646 for minor device number.
647 (write_header_name, dump_hard_link, dump_file0):
648 Simplify test for old GNU format.
649 (start_header): Put in placeholders for uid, etc., even when
650 using extended headers, for benefit of older "tar" implementations.
651 Don't assume uintmax_t is wider than 32 bits.
652 Output extended header for mtime if needed.
653 (dump_regular_finish, dump_file0):
654 Support extended time stamp resolution.
655 * src/extract.c: Include utimens.h rather than rolling our own.
656 (check_time): Support extended time stamp resolution.
657 * src/list.c: Include <inttostr.h>.
658 (tartime): Use umaxtostr rather than stringify_uintmax_t_backwards.
659 * src/xheader.c: Include <inttostr.h>.
660 Do not include <xstrtol.h>.
661 (strtoimax) [!HAVE_DECL_STRTOIMAX && !defined strtoimax]: New decl.
662 (strtoumax) [!HAVE_DECL_STRTOUMAX && !defined strtoumax]: New decl.
663 (BILLION, LOG10_BILLION): New constants.
664 (to_decimal): Remove; superseded by inttostr. All callers changed
666 (xheader_format_name): Don't assume pids and uintmax_t values
667 fit in 63 bytes (!) when printed.
668 (decode_record): Don't bother to check for ERANGE; an out of range
669 value must be treater than len_max anyway.
670 If the length is out of range, output it in the diagnostic.
671 (format_uintmax): Remove; all callers changed to use umaxtostr.
672 (xheader_print): Don't assume sizes can be printed in 99 bytes (!).
673 (out_of_range_header): New function.
674 (decode_time): Use it.
675 (code_time): Accept struct timespec, not time_t and unsigned long.
676 All callers changed. Size sbuf properly, and remove unnecessary check.
677 Don't assume time stamps can fit in 199 bytes.
678 Handle negative time stamps. Handle fractional time stamps
679 more consistently. Don't output unnecessary trailing zeros.
680 (decode_time): Yield struct timespec, not time_t and unsigned long.
682 Handle negative time stamps. Truncate towards minus infinity
683 consistently. Improve overflow checks, and output a better
684 diagnostic on overflow.
685 (code_num): Don't assume uintmax_t can be printed in 99 bytes (!).
686 (decode_num): New function, for better diagnostics.
687 (atime_coder, atime_decoder, gid_decoder, ctime_coder):
688 (ctime_decoder, mtime_coder, mtime_decoder, size_decoder):
689 (uid_decoder, sparse_size_decoder, sparse_numblocks_decoder):
690 (sparse_offset_decoder, sparse_numbytes_decoder):
691 Use decode_num, etc., instead of xstrtoumax, etc.
693 2005-06-21 Jim Meyering <jim@meyering.net>
695 Carefully crafted invalid headers can cause buffer overrun.
696 Invalid header fields go undiagnosed.
697 Some valid time strings are ignored.
699 * src/xheader.c (sparse_numblocks_decoder): Remove unchecked use
700 of `calloc'. Use xcalloc instead.
701 (decode_time, gid_decoder, size_decoder, uid_decoder):
702 (sparse_size_decoder, sparse_offset_decoder, sparse_numblocks_decoder):
703 Ensure that the result of calling xstrtoumax is no larger than
704 the maximum value for the target type. Upon any failure, exit with
706 (sparse_numblocks_decoder): Avoid buffer overrun/heap corruption:
707 use x2nrealloc, rather than `n *= 2' and xrealloc(p, n,....
708 (decode_time): Rewrite to accept time strings like
709 1119018481.000000000. Before, such strings were always ignored.
711 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
713 * src/create.c (dump_file0): Check for is_avoided_name()
714 first. Fixes bug reported by Martin Lohmeier
715 <martin@mein-horde.de>
716 * tests/update.at: New file
717 * tests/Makefile.am (TESTSUITE_AT): Add update.at
718 * tests/testsuite.at: Likewise
720 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
722 * configure.ac (AC_STRUCT_ST_BLKSIZE)
723 (AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
725 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
727 * src/names.c (excluded_name): excluded_filename ->
728 excluded_file_name, because the name was changed in gnulib.
730 2005-05-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
732 * src/tar.c (read_name_from_file,update_argv): Automatically
733 detect nul-terminated list files.
736 2005-05-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
738 * scripts/backup.sh.in: Bugfixes.
740 2005-05-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
742 * scripts/backup.in: Minor fixes
743 * scripts/backup.sh.in (mt_begin,mt_rewind)
744 (mt_offline,mt_status): Use $MT to invoke mt
745 (init_common): Set --rsh-command option for mt if TAPE_FILE is a
747 * doc/tar.texi: Document new backup scripts behavior
749 2005-05-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
751 * lib/.cvsignore: Updated
752 * lib/Makefile.tmpl: Add new paxutils files
753 * po/POTFILES.in: Likewise
754 * src/buffer.c: Update invocations of safer_name_suffix()
755 * src/create.c: Likewise
756 * src/extract.c: Likewise
757 * src/xheader.c: Likewise
758 * src/common.h: Include paxlib.h instead of paxerror.h
759 (safer_name_suffix,removed_prefixes_p): Removed. The functions are
760 imported from paxutils
761 * src/names.c (hash_string_hasher,hash_string_compare)
762 (hash_string_insert,hash_string_lookup,removed_prefixes_p)
763 (safer_name_suffix): Moved to paxutils
765 2005-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
767 * bootstrap (copy_files): Accept optional third argument: a prefix
768 to be appended to destination file names.
769 Import paxutils/paxlib files.
770 * configure.ac: Remove checking for LIB_SETSOCKOPT, it is handled
772 * lib/Makefile.tmpl (libtar_a_SOURCES): Add paxerror.c paxexit.c
774 * po/POTFILES.in: Likewise.
775 * src/common.h: Remove defines and declarations imported from
777 * src/misc.c: Likewise
778 * src/list.c (stringify_uintmax_t_backwards): Moved to paxutils
780 2005-05-17 Paul Eggert <eggert@cs.ucla.edu>
782 * src/misc.c (remove_any_file): Fix typo in previous change.
784 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
786 Port to Solaris 10's treatment of unlinking directories.
787 * gnulib-modules: Add unlinkdir.
788 * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c.
789 * src/common.h (we_are_root): Remove extern decl; it's now static.
790 * src/extract.c (we_are_root): Now static.
791 * src/misc.c: Include <unlinkdir.h>.
792 (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
794 * ChangeLog, ChangeLog.1, Makefile.am, NEWS, PORTS, README,
795 README-alpha, TODO, bootstrap, configure.ac, doc/Makefile.am,
796 doc/convtexi.pl, doc/fdl.texi, doc/gendocs_template,
797 lib/Makefile.tmpl, lib/prepargs.c, lib/waitpid.c, po/POTFILES.in,
798 scripts/Makefile.am, scripts/backup-specs, scripts/backup.in,
799 scripts/backup.sh.in, scripts/restore.in, src/Makefile.am,
800 src/arith.h, src/buffer.c, src/common.h, src/compare.c,
801 src/create.c, src/delete.c, src/extract.c, src/incremen.c,
802 src/list.c, src/mangle.c, src/misc.c, src/names.c, src/sparse.c,
803 src/system.c, src/tar.c, src/tar.h, src/update.c, src/utf8.c,
804 src/xheader.c, tests/Makefile.am, tests/append.at,
805 tests/append01.at, tests/comprec.at, tests/delete01.at,
806 tests/delete02.at, tests/delete03.at, tests/delete04.at,
807 tests/delete05.at, tests/extrac01.at, tests/extrac02.at,
808 tests/extrac03.at, tests/extrac04.at, tests/extrac05.at,
809 tests/gzip.at, tests/ignfail.at, tests/incremental.at,
810 tests/link01.at, tests/listed01.at, tests/listed02.at,
811 tests/long01.at, tests/longv7.at, tests/multiv01.at,
812 tests/multiv02.at, tests/multiv03.at, tests/multiv04.at,
813 tests/old.at, tests/options.at, tests/options02.at, tests/pipe.at,
814 tests/recurse.at, tests/same-order01.at, tests/same-order02.at,
815 tests/shortrec.at, tests/sparse01.at, tests/sparse02.at,
816 tests/testsuite.at, tests/truncate.at, tests/version.at,
817 tests/volume.at, tests/star/gtarfail.at, tests/star/gtarfail2.at,
818 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
819 tests/star/quicktest.sh, tests/star/ustar-big-2g.at,
820 tests/star/ustar-big-8g.at:
821 Update FSF postal mail address.
823 2005-05-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
827 * bootstrap: Install files from paxutils/doc
828 * doc/Makefile.am (tar_TEXINFOS): Add genfile.texi
829 * doc/tar.texi (Genfile): New appendix
830 * src/compare.c (diff_file): diff_handle was not initialized
831 * src/create.c (dump_regular_file): Correctly pad archive members
832 that shrunk during archiving. Repored by Frank Heckenbach.
833 * src/extract.c (file_newer_p): Return false if file does not
835 (prepare_to_extract): Correct warning wording.
836 * tests/truncate.at: New test case
837 * tests/Makefile.am: Add truncate.at
838 * tests/testsuite.at: Likewise.
840 * doc/.cvsignore: Updated
841 * lib/.cvsignore: Updated
842 * tests/.cvsignore: Updated
844 2005-05-02 Paul Eggert <eggert@cs.ucla.edu>
846 * tests/multivol04.at: Tell awk to read from /dev/null.
848 Adjust to recent gnulib changes.
849 * lib/.cvsignore: Add dup-safer.c, fd-safer.c, unistd-safer.h.
850 * src/common.h (initial_umask): New var.
851 * src/create.c (start_ueader): Use it, and adjust to new modechange
853 (hash_link): unsigned -> size_t parameters and result.
854 * src/incremen.c (hash_directory): Likewise.
855 * src/names.c (hash_string_hasher): Likewise.
856 * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
858 2005-04-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
860 * tests/Makefile.am: Add shortrec.at.
862 2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
864 * src/buffer.c (reading_from_pipe): Remove. All uses removed.
865 (short_read): Don't warn about short reads; they're normal.
866 * tests/shortrec.at: New file.
867 * tests/testsuite.at: Include it.
869 * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
870 it is sometimes left behind as a garbage file (maybe due to the
873 2005-04-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
875 * src/list.c: Handle Solaris 'X' type flag
876 * src/tar.h (SOLARIS_XHDTYPE): New define
878 2005-04-06 Sergey Poznyakoff <gray@mirddin.farlep.net>
880 * src/tar.c: Minor fixes to text messages. Proposed by Benno
882 * src/extract.c: Likewise
883 (extract_file): Assign orig_file_name
884 to save_name uniformly over the program. This fixes matching
885 directory names at the start of an archive volume.
886 * src/buffer.c (flush_write): Warn when the name of the archive
887 straddling volume boundary is longer than 100 characters. Earlier
888 behavior was to issue a fatal error.
889 (struct zip_magic): Reverted part of changes from 2005-04-04.
890 They make the maintenance too costly. Removing `unsigned'
891 qualifier from `magic' member should be enough.
892 * src/compare.c (diff_init): Read directory file if in listed
893 incremental. This prevents spurious 'Contents differ' diagnostics.
894 (diff_archive): Minor fixes to text messages
895 (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
896 to save_name uniformly over the program. This fixes matching
897 directory names at the start of an archive volume.
898 * src/create.c: Assign orig_file_name
899 to save_name uniformly over the program. This fixes matching
900 directory names at the start of an archive volume.
901 * src/list.c: Likewise
903 * tests/multiv03.at: Modified to match the new behavior
904 * tests/multiv04.at: New file. Test splittind directory members between
906 * tests/Makefile.am: Add multiv04.at
907 * tests/testsuite.at: Likewise.
909 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
911 * configure.ac (AC_CONFIG_AUX_DIR): Rename from config to build-aux,
912 for reasons discussed in the thread beginning at
913 <http://lists.gnu.org/archive/html/bug-gnulib/2005-03/msg00119.html>.
914 * .cvsignore: Remove config; add build-aux.
916 * src/buffer.c (struct zip_magic): Use char arrays, not pointers.
917 The unsigned char * pointer ran afoul of pedantic C compilers, and
918 we didn't need pointers anyway. Put the size field before the
919 data to avoid unnecessary padding. All uses changed.
920 (magic) Make it const, since it doesn't change. All uses changed.
922 2005-04-02 Paul Eggert <eggert@cs.ucla.edu>
924 * src/xheader.c (decode_record): Don't dump core when given
925 a corrupted extended header. Problem reported by Jim Meyering.
926 Also, check for other ways that the header might be invalid,
927 e.g., missing newline at end. Do not allow keys with nulls.
928 Allow blanks before and after length, as POSIX requires.
929 Do not allow leading "-" in length. Check for length overflow.
930 (xheader_decode, xheader_decode_global): Let decode_record
931 check for exhaustion of record.
932 (xheader_read): Null-terminate the extended record;
933 decode_record relies on this.
935 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
937 * bootstrap (TP_URL): Change from
938 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
939 <http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
940 some redirection glitches.
941 Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
942 * doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
943 * lib/.cvsignore: Add intprops.h (new gnulib file).
945 2005-03-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
947 * src/list.c (print_header): Print UID/GID in case of
948 empty user/group name. This could occur when dumping
949 files belonging to non-existing users and when listing
951 Reported by Igor Lautar.
953 * src/create.c: Correctly parse empty uname/gname
954 * src/sparse.c (sparse_scan_file): Bugfix. offset had
957 * scripts/backup.in: Use `head -n 1'. Provide missing
958 argument to ${MT_STATUS}. Proposed by Jan Merka.
959 * scripts/backup.sh.in: Likewise. Fixed typo in
960 MT_OFFLINE assignment.
961 * scripts/restore.in (restore_fs): Use root_fs
963 2005-02-15 Sergey Poznyakoff <gray@Mirddin.farlep.net>
965 * src/create.c: Replace strdup with xstrdup
966 * src/names.c: Likewise
967 * src/tar.c: Likewise
969 * tests/append01.at: Added reference to bug-tar archive
970 * tests/listed02.at: Use -print with find.
972 2005-02-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
974 * THANKS: Added Tim Adye. Fixed UTF.
975 * src/list.c (read_header): Removed assignment to
976 oldgnu_header.isextended. It was breaking append mode.
978 * tests/append01.at: New test.
979 * tests/Makefile.am: Added append01.at
980 * tests/testsuite.at: Likewise
982 2005-02-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
984 * gnulib.modules: New file. List of required gnulib
986 * bootstrap: Merge list of required modules from
987 paxutils with that from tar proper.
988 * src/tar.c: Various fixes in help and diagnostic messages.
990 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
992 * src/common.h (EXTRACT_OVER_PIPE): New macro
993 * src/compare.c: Code clean up.
994 * src/extract.c (extract_archive): Do not check for
995 EXTRACT_OVER_PIPE, decode_options() does this.
996 * src/misc.c (exec_error,fork_error,dup2_error)
997 (pipe_error): Removed unneeded functions.
998 * src/system.c (sys_exec_command): Use xclose, xpipe,
999 xfork, xdup2 and exec_fatal.
1000 * src/tar.c (options): Improved sorting. Document --backup=off.
1001 (decode_options): Clear backup_option if necessary.
1003 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1005 Initial implementation of --to-command option proposed
1008 * bootstrap: Get setenv module from gnulib
1009 * src/buffer.c: Do not use 8-bit chars in comments
1010 * src/common.h (to_command_option)
1011 (ignore_command_error_option): New globals
1012 (sys_exec_command,sys_wait_command): New commands
1013 * src/extract.c (extract_file): Handle to_command_option
1014 Fix error recovery: decrease `size' by `written', not
1015 by `count', otherwise tar misses the next header
1016 Do not diagnose write error if to_command_option
1017 is set, since the command may have exited prematurely.
1018 It would be better to check for sigpipe, though.
1019 (prepare_to_extract): Handle to_command_option
1020 * src/misc.c (exec_error, fork_error, dup_error)
1021 (pipe_error): New functions
1022 * src/system.c (sys_exec_command)
1023 (sys_wait_command): New functions
1024 * src/tar.c: Handle new options --to-command,
1025 --ignore-command-error
1026 * THANKS: Added Hansjoerg Lipp
1028 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
1030 * src/list.c (from_header): New arg OCTAL_ONLY, normally false.
1031 All uses changed. Fix typo that sometimes suppressed all "Archive
1032 contains obsolescent base-64 headers" warnings, not just the first
1034 (tar_checksum): Accept only octal checksums, since they aren't
1035 supposed to overflow into weird formats.
1037 Adjust to gnulib changes.
1038 * lib/.cvsignore: Add chdir-long.c, chdir-long.h, memrchr.c,
1039 memrchr.h, openat.c, openat.h. Remove pathmax.h (added by
1040 mistake, perhaps?), sysexit.h (my typo), xstrdup.c (gnulib removed
1041 this file). Sort entries.
1043 2005-02-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1045 * src/extract.c: Further rewrite.
1046 * src/buffer.c: Removed unused variables.
1047 * src/list.c: Likewise
1048 * src/tar.c (update_argv): Changed type to void
1050 * src/common.h (OLDGNU_NAME_FIELD_SIZE): New constant
1051 * src/create.c (start_private_header,write_header_name)
1052 (dump_hard_link): Restore compatibility with 1.13.25
1053 * src/extract.c (extract_archive): Rewritten
1054 * src/list.c: Add translators' comments
1055 * src/tar.c (options) Minor spelling fix
1056 * tests/star/quicktest.sh: Determine path to the tar executable.
1058 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1060 * po/POTFILES.in: Added tests/genfile.c
1061 * src/buffer.c (short_read): Use ngettext()
1062 (new_volume): use quote().
1063 * src/create.c: Use quote()
1064 * src/extract.c: Likewise
1065 * src/xheader.c: Likewise
1066 * src/misc.c: Add comments to translators
1068 * tests/same-order01.at: sort ls output
1069 * tests/sparse01.at (RE_CHECK): Added missing space
1071 * tests/sparse02.at: Test extracting sparse files over a pipe.
1072 * tests/Makefile.am: Added sparse02.at
1073 * tests/testsuite.at: Likewise
1074 * tests/listed02.at: Skip the test on filesystems that do not
1075 update ctime of a file when renaming it. To be reverted when
1076 the new incremental mode is ready.
1077 * tests/sparse01.at: Extract and compare sparse file
1079 2005-02-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1081 * src/sparse.c: Extract sparse files even if the output
1084 2005-02-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1086 * bootstrap: Add a comment to lib/Makefile.am saying that this
1087 is an autogenerated file.
1088 Exit with code 1 if any of autotools fails.
1089 * lib/Makefile.tmpl: Insert Emacs magic to the first line.
1090 * tests/Makefile.am: Add append.at
1092 * m4/.cvsignore: Ignore all *.m4 files
1094 2005-01-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1096 Rewritten handling of -T (--files-from) option. Now it
1097 inserts the file names immediately into argv array which allows
1099 1) any valid tar options (including another -T) to be used in the file
1100 2) any number of -T options to be given in command line
1102 * configure.ac: Raised version number to 1.15.2
1103 * src/common.h: Include obstack.h
1104 (files_from_option): Removed
1105 (unquote_option): New variable
1106 (stat_fatal): New function
1107 (name_close): Removed function.
1108 * src/incremen.c: Remove inclusion of obstack.h
1109 * src/xheader.c: Likewise.
1110 * src/misc.c (stat_fatal): New function
1111 * src/names.c (name_file): Removed variable.
1112 (read_name_from_file): Removed function. All callers changed.
1113 (name_close): Removed function. All callers changed.
1114 * src/tar.c: New options --unquote (--no-unquote) and
1116 (add_file_id,read_name_from_file,update_argv): New functions
1117 (parse_opt): Rewritten handling of -T option. Handle hidden
1118 --HANG option for debugging purposes.
1119 (decode_options): Init unquote_option to true. Init argv_stk.
1120 Remove unneeded references to files_from_option
1122 * doc/tar.texi: Document new options.
1123 Moved rendition macros and option value definitions into
1125 * doc/rendition.texi: New file
1126 * doc/value.texi: New file
1127 * doc/Makefile.am: Updated
1129 2005-01-13 Paul Eggert <eggert@cs.ucla.edu>
1131 * tests/testsuite.at (RE_CHECK): Use "join - file", not
1132 "join file -", to work around a bug in Solaris 8 join.
1133 Problem reported by Tomohiro Suzuki.
1135 2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1137 * src/list.c (read_header): Fixed calculation of the
1138 size for GNU long name/link. Tar was reading one block
1139 more if name_size was divisible by 512. Thanks Josef
1141 * tests/long01.at: New file. Test listing of GNU long names
1143 * tests/pipe.at: Sort tar output.
1144 * tests/Makefile.am: Added long01.at
1145 * tests/testsuite.at: Likewise.
1146 * THANKS: Added Josef Bauer
1147 * lib/.cvsignore: Updated
1148 * m4/.cvsignore: Updated
1151 2005-01-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1153 * directory: Updated for 1.15.1
1154 * doc/Makefile.am: Use gendocs.sh to generate web documentation
1155 * doc/gendocs_template: Template file for gendocs.sh
1156 * doc/tar.texi: Updated docs for --[no-]same-permissions
1157 * src/tar.c: Reworded docstrings for --[no-]same-permissions
1159 2005-01-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1161 * bootstrap: Create m4/paxutils.m4
1162 * configure.ac: Call tar_PAXUTILS
1163 * tests/options02.at: Test that tar correctly handles non-option
1164 arguments interspersed with options.
1165 * tests/Makefile.am: Add options02.at
1166 * tests/testsuite.at: Likewise
1167 * tests/listed02.at: Do not create useless directory
1169 2005-01-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1171 * src/tar.c (parse_opt): Bugfix: Use ARGP_KEY_ARG. Thanks
1172 Mike Frysinger <vapier@gentoo.org> for reporting.
1174 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
1176 * lib/Makefile.tmpl (localedir.h): Omit needless quotes and a
1177 needless sed command. Problem reported by Paul Jarc.
1179 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
1181 Accommodate latest gnulib.
1182 * doc/.cvsignore: Add getdate.texi.
1183 * bootstrap: Do not treat alloca-opt specially; this is no
1184 longer needed (and breaks builds) with latest gnulib.
1186 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1188 * src/tar.c (main): Reverted recent changes (#ifdef).
1190 2004-12-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1192 * configure.ac: Raise version number to 1.15.1
1194 * NEWS: Entry for 1.15.1
1195 * src/buffer.c: Bugfix. Changes introduced 2004-11-26
1196 broke extraction from stdin.
1197 * src/list.c (from_header, tar_checksum): Changed declaration.
1198 All callers updated.
1199 * src/common.h: Likewise
1200 * src/tar.c (main): Protect invocation of setlocale by
1203 * tests/comprec.at: New test
1204 * tests/pipe.at: New test
1205 * tests/Makefile.am (comprec.at,pipe.at): New tests
1206 * tests/testsuite.at: Likewise
1207 * tests/gzip.at: Use AT_GZIP_PREREQ
1208 * tests/star/pax-big-10g.at: Likewise
1209 * tests/star/ustar-big-2g.at: Likewise
1210 * tests/star/ustar-big-8g.at: Likewise
1212 * tests/extrac04.at: Discard stderr from sort, on some
1213 systems it spits out lots of irrelevant info.
1214 * tests/listed02.at: Likewise
1216 * doc/index.html.in: Rewritten in xhtml to follow recent
1220 2004-12-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1222 Released version 1.15. Sources up to this point are
1223 tagged release_1_15.
1225 * configure.ac: Raised version number to 1.15
1227 * directory: Updated
1228 * bootstrap (update_po): Give -r to wget. Always remove index.html
1229 Ignore alloca-opt module (it duplicates alloca)
1231 * tests/Makefile.am: Distribute star/quicktest.sh
1232 * tests/star/README: Document quicktest.sh
1233 * tests/star/qucktest.sh: Removed.
1234 * tests/star/quicktest.sh: New file.
1236 2004-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1239 * doc/tar.texi: Document auto-detection of compressed archive
1241 * src/tar.c (decode_options): Ignore --seek if used with --delete.
1242 Delete.c is based on the assumption that the archive is being
1243 actually read, not lseeked.
1245 * tests/delete05.at: New file
1246 * tests/extrac02.at: Fixed typo in AT_SETUP
1247 * tests/Makefile.am: Added delete05.at
1248 * tests/testsuite.at: Likewise.
1250 2004-12-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1252 * src/delete.c (delete_archive_members): Bugfix: when
1253 attempting to delete an nonexistent member, the last
1254 blocking_factor blocks were zeroed.
1256 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1258 * TODO: Mention sub-second resolution, lutimes, lchmod.
1260 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
1262 Adjust to recent gnulib changes.
1263 * doc/getdate.texi: Remove, since bootstrap gets it from gnulib now.
1264 * .cvsignore: Add rmt, rmt/*, rmt/*/*.
1265 * lib/.cvsignore: Add allocsa.c, allocsa.h, allocsa.valgrind,
1266 charset.alias, config.charset, getcwd.c, getcwd.h, localcharset.c,
1267 localcharset.h, ref-add.sed, ref-add.sin, ref-del.sed,
1268 ref-del.sin, setenv.c, setenv.h, unsetenv.c. Remove pathmax.h,
1270 * m4/.cvsignore: Add allocsa.m4, eealloc.m4, getcwd-path-max.m4,
1271 localcharset.m4, realloc.m4, setenv.m4. Remove malloc.m4,
1272 pathmax.m4, realloc.m4.
1274 2004-11-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1276 * configure.ac: Raised version number to 1.14.91
1277 * scripts/tarcat: New file
1278 * scripts/Makefile.am: Added tarcat
1279 * src/buffer.c (hit_eof): Changed type to boolean
1280 (read_full_records,reading_from_pipe): New variables
1281 (check_compressed_archive,open_compressed_archive): New functions
1282 (open_archive): Autodetect compressed archives and act accordingly.
1283 Set reading_from_pipe. This fixes controversial set of changes
1284 introduced 2004-05-11,2004-03-22.
1285 * src/list.c (tar_checksum): New function
1286 (read_header): Use tar_checksum().
1287 * src/common.h (tar_checksum): New function
1289 * tests/star/README: Updated
1293 2004-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1295 * src/tar.c (decode_options): Fixed -o semantics. Thanks
1296 Jean Delvare <khali@linux-fr.org>
1298 2004-10-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1300 * bootstrap: Add localcharset
1301 * lib/Makefile.tmpl: Initialize SUFFIXES and CLEANFILES since the
1302 makefile snippet from localcharset uses '+=' on them.
1303 * src/Makefile.am (LDADD): Add LIBICONV
1304 * src/list.c (decode_header): Set uname/gname to NULL if their
1305 header counterparts are empty
1306 * src/tar.c (options): Use OPTION_NO_TRANS
1307 * src/utf8.c: Use locale_charset() from gnulib
1309 * tests/star/README: Updated
1314 2004-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1316 * THANKS: Added Bryan Ford
1317 * doc/Makefile.am (.text): Fixed rule
1318 * po/POTFILES.in: Added argp-help.c
1320 2004-10-04 Bryan Ford <baford@mit.edu>
1322 * src/tar.c: New option --exclude-caches, to exclude
1323 cache directories automatically on archive creation.
1324 Cache directories are directories containing a
1325 standardized tag file, as specified at:
1326 http://www.brynosaurus.com/cachedir/spec.html
1327 * src/common.h: New variable exclude_caches_option.
1328 * src/create.c: New function check_cache_directory(),
1329 called from dump_dir0() if exclude_caches_option is set,
1330 to check for a cache directory tag and exclude the directory
1331 if such a tag is found.
1332 * doc/tar.texi: Updated accordingly.
1334 2004-09-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1336 * doc/tar.texi: Minor fix
1337 * src/tar.c (options): Minor fix
1339 2004-09-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1342 * lib/Makefile.tmpl: Added 'rtapelib.o: localedir.h' dependency
1343 * src/common.h: Comment WANT_DIRECTORY_REMOVE_OPTION.
1344 * src/extract.c: Normalized use of remove_any_file().
1345 * src/misc.c: Likewise.
1346 * src/tar.c (parse_opt): Emit warning if -l option is used.
1347 (show_default_settings): REMOTE_SHELL may be undefined
1349 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1351 Test suite rewritten in autotest.
1353 * configure.ac: Updated for autotest
1354 * src/tar.c (argp_program_version): Modified.
1355 * tests/Makefile.am: Rewritten for autotest.
1357 * tests/.cvsignore: Updated
1358 * tests/append.at: New file
1359 * tests/atlocal.in: New file
1360 * tests/delete01.at: New file
1361 * tests/delete02.at: New file
1362 * tests/delete03.at: New file
1363 * tests/delete04.at: New file
1364 * tests/extrac01.at: New file
1365 * tests/extrac02.at: New file
1366 * tests/extrac03.at: New file
1367 * tests/extrac04.at: New file
1368 * tests/extrac05.at: New file
1369 * tests/gzip.at: New file
1370 * tests/ignfail.at: New file
1371 * tests/incremental.at: New file
1372 * tests/link01.at: New file
1373 * tests/listed01.at: New file
1374 * tests/listed02.at: New file
1375 * tests/longv7.at: New file
1376 * tests/multiv01.at: New file
1377 * tests/multiv02.at: New file
1378 * tests/multiv03.at: New file
1379 * tests/old.at: New file
1380 * tests/options.at: New file
1381 * tests/recurse.at: New file
1382 * tests/same-order01.at: New file
1383 * tests/same-order02.at: New file
1384 * tests/sparse01.at: New file
1385 * tests/testsuite.at: New file
1386 * tests/version.at: New file
1387 * tests/volume.at: New file
1388 * tests/star/gtarfail.at: New file
1389 * tests/star/gtarfail2.at: New file
1390 * tests/star/multi-fail.at: New file
1391 * tests/star/pax-big-10g.at: New file
1392 * tests/star/ustar-big-2g.at: New file
1393 * tests/star/ustar-big-8g.at: New file
1395 * tests/preset.in: Removed
1396 * tests/before: Removed
1397 * tests/after: Removed
1398 * tests/version.sh: Removed.
1399 * tests/append.sh: Removed.
1400 * tests/delete01.sh: Removed.
1401 * tests/delete02.sh: Removed.
1402 * tests/delete03.sh: Removed.
1403 * tests/delete04.sh: Removed.
1404 * tests/extrac01.sh: Removed.
1405 * tests/extrac02.sh: Removed.
1406 * tests/extrac03.sh: Removed.
1407 * tests/extrac04.sh: Removed.
1408 * tests/extrac05.sh: Removed.
1409 * tests/gzip.sh: Removed.
1410 * tests/incremen.sh: Removed.
1411 * tests/ignfail.sh: Removed.
1412 * tests/link01.sh: Removed.
1413 * tests/listed01.sh: Removed.
1414 * tests/listed02.sh: Removed.
1415 * tests/longv7.sh: Removed.
1416 * tests/multiv01.sh: Removed.
1417 * tests/multiv02.sh: Removed.
1418 * tests/multiv03.sh: Removed.
1419 * tests/old.sh: Removed.
1420 * tests/options.sh: Removed.
1421 * tests/same-order01.sh: Removed.
1422 * tests/same-order02.sh: Removed.
1423 * tests/volume.sh: Removed.
1424 * tests/recurse.sh: Removed.
1425 * tests/sparse01.sh: Removed.
1426 * tests/star/gtarfail.sh: Removed.
1427 * tests/star/gtarfail2.sh: Removed.
1428 * tests/star/multi-fail.sh: Removed.
1429 * tests/star/ustar-big-2g.sh: Removed.
1430 * tests/star/ustar-big-8g.sh: Removed.
1431 * tests/star/pax-big-10g.sh: Removed.
1433 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1435 * bootstrap: Install genfile.c from paxutils
1436 * tests/genfile.c: Removed. Integrated into
1438 * tests/mksparse.c: Removed. Integrated into
1439 (paxutils) genfile.c
1440 * tests/Makefile.am: Removed mksparse
1441 * tests/sparse01.sh: Use genfile instead of mksparse
1443 2004-09-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1445 Started merging with cpio into paxutils. Sources before
1446 this point are tagged alpha-1_14_90
1448 * Makefile.am: Updated for use with paxutils
1449 * README-alpha: Likewise
1450 * bootstrap: Likewise
1451 * configure.ac: Likewise
1452 * lib/Makefile.tmpl: Likewise
1453 * po/POTFILES.in: Likewise
1454 * src/Makefile.am: Likewise
1455 * src/buffer.c: Likewise
1456 * src/common.h: Likewise
1457 * src/compare.c: Likewise
1458 * src/create.c: Likewise
1459 * src/delete.c: Likewise
1460 * src/extract.c: Likewise
1461 * src/incremen.c: Likewise
1462 * src/list.c: Likewise
1463 * src/mangle.c: Likewise
1464 * src/misc.c: Likewise
1465 * src/names.c: Likewise
1466 * src/sparse.c: Likewise
1467 * src/system.c: Likewise
1468 * src/tar.c: Likewise
1469 * src/update.c: Likewise
1470 * src/utf8.c: Likewise
1471 * src/xheader.c: Likewise
1473 * src/system.h: Removed
1474 * src/rmt.c: Removed
1475 * src/rmt.h: Removed
1476 * src/rtapelib.c: Removed
1478 2004-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1480 * tests/listed02.sh: Do not depend on any particular ordering
1483 2004-09-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1485 * doc/tar.texi: Document the use of -C option in
1486 file lists. Document --seek option.
1487 * configure.ac: New option --with-rmt. New configuration variable
1488 DEFAULT_RMT_DIR. Removed DEFAULT_RMT_COMMAND.
1489 * src/Makefile.am: Install rmt into rmtdir
1490 * src/tar.c (usage): Minor fix.
1494 2004-09-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1496 * configure.ac: Raised version number to 1.14.90
1497 * src/common.h (is_individual_file): New prototype
1498 * src/create.c (dump_file0): Fix bug introduced
1500 * src/names.c (register_individual_file)
1501 (is_individual_file): New functions.
1502 * tests/listed01.sh: Use genfile instead of dd.
1503 * tests/listed02.sh: New file.
1504 * tests/Makefile.am: Added listed02.sh
1508 2004-08-31 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1510 * src/sparse.c (sparse_add_map): Fixed improper initializations
1511 of sparse_map_size. We assume that whatever number it contains
1512 describes adequately the current size of sparse_map. The only
1513 number we need to reset is sparse_map_avail.
1514 * src/compare.c (verify_volume): Call set_next_block_after
1515 if read_header returns HEADER_FAILURE
1516 Destroy and reinitialize content of current_stat_info and
1517 extended_header after each iteration (bug reported by
1518 John L. Males <jlmales@yahoo.com>).
1519 Issue a warning if the created archive contains some members
1520 whose file names were stripped off their leading prefixes.
1521 This is a temporary fix of the issue reported by Bdale Garbee
1522 <bdale@gag.com> (Refs: Debian bug 230064, Message-Id
1523 <87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)
1525 * src/names.c (removed_prefixes_p): New function.
1527 * src/buffer.c: When computing write rate do not take
1528 into account the time needed to verify the archive(s).
1529 The bug reported by John L. Males <jlmales@yahoo.com>
1530 (set_start_time,compute_duration): New functions.
1531 (print_total_written): Use the result of compute_duration().
1532 (close_archive): Call compute_duration.
1533 * src/common.h (set_start_time, removed_prefixes_p): New prototypes.
1534 * src/list.c (decode_header): Fixed initialization
1535 of stat_info->is_sparse
1536 * src/tar.c (main): Call set_start_time().
1538 * src/misc.c (unquote_string): Unquote '\a' and '\v'.
1539 Reported by Helmut Waitzmann <helmut.waitzmann@web.de>.
1544 2004-08-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1546 * src/tar.c: Fix copy-n-paste errors in the license
1548 2004-08-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1550 * scripts/backup.in: Renamed LIBPATH to LIBDIR.
1551 Use ROOT_FS with -C option. Do not send mail
1552 if ADMINISTRATOR is set to NONE.
1553 * scripts/backup.sh.in (test_root): Append / to
1554 ROOT_FS if it does not already end in it.
1555 * scripts/restore.in: Renamed LIBPATH to LIBDIR.
1556 New option -a (--all). Do not start restore unless
1557 -a or patterns are given.
1558 (restore_fs,restore_files): Fixed use of --listed option.
1559 * doc/tar.texi: Updated
1562 2004-08-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1564 * src/tar.c (find_argp_option): Fixed typo
1566 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
1568 Merge argp, getopt, xalloc changes from gnulib.
1569 * bootstrap (gnulib_modules): Add xalloc-die.
1570 Remove code to test for patches; we don't have patches now.
1571 Set LC_ALL=C so that file names sort consistently.
1572 Prefer the gnulib copies of gettext.m4, glibc21.m4,
1573 lib-ld.m4, lib-prefix.m4, po.m4 too.
1575 * patches/getopt.diff: Remove; gnulib now works unpatched.
1576 * configure.ac (_getopt_long_only_r): Remove check.
1577 gl_ARGP now does this for us.
1578 * lib/.cvsignore: Add fnmatch.h, getopt_.h, sysexit.h,
1580 * src/extract.c: Adjust to changes to gnulib xalloc module.
1581 (extr_init): Remove assignment to xalloc_fail_func; no longer needed.
1582 (xalloc_die): New function.
1584 2004-08-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1588 * src/buffer.c (flush_write): Limit filenames
1589 of the members that straddle multivolume archive
1590 boundary to 100 characters.
1591 (flush_read): Use strncmp when comparing multivolume member
1593 * tests/multiv03.sh: New file
1594 * tests/Makefile.am: Added multiv03.sh
1596 2004-08-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1598 * src/list.c (read_and): Call decode_header before
1599 calling skip_member()
1600 (skip_member): Use is_sparse field to determine if the
1601 member is a sparse file.
1603 * tests/Makefile.am: Added extrac05.sh
1604 * tests/extrac05.sh: New file
1605 * tests/append.sh: Rearranged leading comments. Added explicit
1606 references to report messages wherever available.
1607 * tests/delete01.sh: Likewise
1608 * tests/delete02.sh: Likewise
1609 * tests/delete03.sh: Likewise
1610 * tests/delete04.sh: Likewise
1611 * tests/extrac01.sh: Likewise
1612 * tests/extrac02.sh: Likewise
1613 * tests/extrac03.sh: Likewise
1614 * tests/extrac04.sh: Likewise
1615 * tests/gzip.sh: Likewise
1616 * tests/ignfail.sh: Likewise
1617 * tests/incremen.sh: Likewise
1618 * tests/link01.sh: Likewise
1619 * tests/listed01.sh: Likewise
1620 * tests/longv7.sh: Likewise
1621 * tests/multiv01.sh: Likewise
1622 * tests/multiv02.sh: Likewise
1623 * tests/old.sh: Likewise
1624 * tests/options.sh: Likewise
1625 * tests/recurse.sh: Likewise
1626 * tests/same-order01.sh: Likewise
1627 * tests/same-order02.sh: Likewise
1628 * tests/sparse01.sh: Likewise
1629 * tests/version.sh: Likewise
1630 * tests/volume.sh: Likewise
1632 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1634 * bootstrap: Extended --update-po option to take an
1635 optional argument specifying the po file to update.
1636 * src/create.c: Improved compatibility with 1.13.25
1637 * tests/link01.sh: New file.
1638 * tests/Makefile.am: Added link01.sh
1640 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
1644 * patches/argp.diff: Remove; no longer needed.
1646 * lib/.cvsignore: Add stat-macros.h.
1647 Remove addext.c, malloc.c, realloc.c.
1649 * src/extract.c: Include <getcwd.h>.
1650 (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
1651 * src/extract.c (make_directories):
1652 FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
1653 * src/misc.c (must_be_dot_or_slash): Likewise.
1654 * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
1656 * src/tar.c (parse_opt): Likewise.
1657 * src/incremen.c (purge_directory): Fix format buffer typos in warning
1659 * src/tar.c (options): Add missing initializers to pacify gcc.
1660 (decode_options): Remove unused var.
1662 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
1664 * bootstrap (gnulib_modules): Add getpagesize.
1665 * configure.ac (valloc): Remove check; valloc no longer used.
1666 * lib/.cvsignore: Add getpagesize.h.
1667 * m4/.cvsignore: Add getpagesize.m4.
1668 * src/buffer.c (record_buffer): New var.
1669 (open_archive): Don't use valloc; on older or buggy hosts, you can't
1670 free the result. Use page_aligned_alloc instead.
1671 * src/compare.c (diff_init): Likewise.
1672 * src/buffer.c (open_archive): Record the pointer to be freed
1674 (close_archive): Free record_buffer.
1675 * src/common.h (page_aligned_alloc): New decl.
1676 * src/misc.c (quote_n, quote): Remove these redundant functions.
1677 (ptr_align): New function, from coreutils/src/system.h.
1678 (page_aligned_alloc): New function.
1679 * src/system.h (valloc): Remove.
1681 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
1683 * src/extract.c (extract_archive): Do not report an error
1684 when hard-linking X to X when X exists. Problem reported by
1686 * lib/.cvsignore: Add fchown-stub.c.
1688 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1691 * src/common.h (root_device): New global.
1692 (gnu_restore): Renamed to purge_directory().
1693 * src/extract.c (extr_init): Save the device number
1695 (extract_archive): Renamed gnu_restore() to purge_directory().
1696 * src/incremen.c (gnu_restore): Renamed to purge_directory().
1697 Do not attempt to purge the directory if it is on a different
1698 device and one_file_system_option is set.
1700 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1702 * doc/tar.texi: The actual default for exclude patterns
1703 is --no-anchored. Fixed.
1704 * src/tar.c (options): Likewise.
1705 Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
1707 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1709 * doc/tar.texi: Fixed several inconsistencies.
1710 * src/tar.c: Fixed docstring for --checkpoint option.
1712 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1714 * src/buffer.c (seek_archive): New function
1715 * src/common.h (seek_archive): New function
1716 (seekable_archive): New global.
1717 * src/list.c (skip_file): Use seek_archive() if
1719 * src/tar.c (struct fmttab): Accept 'pax' as alias
1721 (options): New option -n (--seek).
1722 * src/update.c: Determine type of the archive before
1727 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1729 * bootstrap: New option --update-po
1730 * src/tar.c: New option -H (short alias to --format)
1731 * doc/tar.texi: Document -H option
1732 * src/names.c (safer_name_suffix): Fixed bug introduced
1735 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1737 * bootstrap: Apply patches from patch subdirectory
1739 * patches/argp.diff: New file
1740 * patches/getopt.diff: New file
1741 * configure.ac: Check for _getopt_long_only_r and
1742 force using included version of getopt if the function
1744 * src/tar.c: Use argp for command line parsing.
1745 * src/system.h: Minor formatting fix
1746 * m4/.cvsignore: Updated
1747 * lib/.cvsignore: Updated
1748 * doc/tar.texi: Minor fix.
1749 * src/extract.c: Fix improper use of 'path' term
1750 * src/incremen.c: Likewise
1751 * src/list.c: Likewise
1752 * src/misc.c: Likewise
1753 * src/names.c: Likewise
1754 * src/rmt.h: Likewise
1755 * src/rtapelib.c: Likewise
1756 * src/update.c: Likewise
1757 * src/xheader.c: Likewise
1758 * tests/star/README: Minor fix
1760 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1762 * configure.ac: Raised version number to 1.14.1
1763 * src/tar.c: Renamed --strip-path to --strip-components
1764 Changed improper use of _() to ngettext().
1765 * src/extract.c: Renamed strip_path_option to strip_components_option
1766 * src/common.h: Likewise.
1768 * doc/tar.texi: Updated
1770 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1772 * src/system.c (sys_child_open_for_uncompress): Do not
1773 set read_full_records_option: the compressed archive is
1774 likely not to contain integer number of records. Should
1775 the user wish to use reblocking, he may always give tar
1776 -B option. This is a minor improvement over the change
1778 * src/buffer.c (open_archive): Removed assignment to
1779 read_full_records_option.
1781 * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
1782 as the format argument, rather than a possibly-translated variable
1783 string. Patch provided by Jim Meyering <jim@meyering.net>
1784 * src/tar.c (decode_options): Fixed typo in the comment.
1785 * tests/star/README: Minor correction
1787 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1789 * directory: New file. GNU directory entry for tar.
1790 * doc/Makefile.am: Rewritten. Added rules for generating
1791 documentation for the project's website.
1792 * doc/.cvsignore: Updated
1793 * doc/index.html.in: New file.
1795 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1797 * configure.ac: Raised version number to 1.14
1799 * tests/after: Added copyleft statement
1800 * tests/before: Added copyleft statement
1801 * tests/preset.in: Added copyleft statement
1803 Tar 1.14 is released. Sources up to this point are tagged
1806 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1808 * configure.ac: Fixed prerequisite headers for sys/buf.h
1810 * src/system.h: Likewise.
1811 * tests/after (compare): Fixed argument quoting under eval
1812 * tests/before: Quote TAR_ARCHIVE_FORMATS
1814 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1819 * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
1820 DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
1821 the pathname of the rmt utility.
1822 New option --enable-backup-scripts.
1823 * doc/tar.texi: Updated
1824 * scripts/Makefile.am: Install the scripts only if requested
1826 * scripts/backup.in: Fixed --version output.
1827 Fixed initialization of the listing files and printing
1828 the time of the last previous level dump.
1829 * scripts/restore.in: Fixed --version output.
1830 * src/Makefile.am (localedir.h rule): Generate correct
1831 DEFAULT_RMT_COMMAND variable.
1832 * src/common.h (rmt_command_option): New variable.
1833 * src/list.c (read_and): Print block number before
1834 issuing 'Skipping to next header' diagnostics, if
1835 requested by block_number_option.
1836 * src/rtapelib.c: Use rmt_command_option instead of
1837 hardcoded "/etc/rmt".
1838 * src/tar.c: New option --rmt-command.
1839 (decode_options): Handle --rmt-command. Initialize
1840 rmt_command_option to DEFAULT_RMT_COMMAND.
1842 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1844 * doc/tar.texi: Further update.
1846 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1848 * configure.ac: Minor fix
1849 * scripts/Makefile.am: Updated
1850 * scripts/backup-specs: Updated
1851 * scripts/backup.in: Minor fixes
1852 * scripts/backup.sh: Removed
1853 * scripts/backup.sh.in: New file. Source for backup.sh
1854 * scripts/restore.in: New file
1855 * scripts/.cvsignore: Updated
1856 * scripts/WARNING: Removed
1857 * doc/tar.texi: Updated
1860 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1862 * src/names.c (name_gather): Bugfix: Honor single -C with
1864 * tests/same-order01.sh: New file
1865 * tests/same-order02.sh: New file
1866 * tests/Makefile.am: Updated
1868 * tests/append.sh: Added copyleft header
1869 * tests/delete01.sh: Likewise
1870 * tests/delete02.sh: Likewise
1871 * tests/delete04.sh: Likewise
1872 * tests/extrac01.sh: Likewise
1873 * tests/extrac02.sh: Likewise
1874 * tests/extrac03.sh: Likewise
1875 * tests/extrac04.sh: Likewise
1876 * tests/gzip.sh: Likewise
1877 * tests/ignfail.sh: Likewise
1878 * tests/incremen.sh: Likewise
1879 * tests/multiv01.sh: Likewise
1880 * tests/old.sh: Likewise
1881 * tests/options.sh: Likewise
1882 * tests/recurse.sh: Likewise
1883 * tests/version.sh: Likewise
1884 * tests/volume.sh: Likewise
1885 * tests/star/gtarfail.sh: Likewise
1886 * tests/star/gtarfail2.sh: Likewise
1887 * tests/star/multi-fail.sh: Likewise
1888 * tests/star/pax-big-10g.sh: Likewise
1889 * tests/star/qucktest.sh: Likewise
1890 * tests/star/ustar-big-2g.sh: Likewise
1891 * tests/star/ustar-big-8g.sh: Likewise
1893 * doc/.cvsignore: Updated
1895 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1897 * configure.ac: Check whether date accepts +format argument
1898 (for backup scripts).
1899 * scripts/level-0: Removed
1900 * scripts/level-1: Removed
1901 * scripts/weekly.new: Removed
1902 * scripts/dump-remind: Removed
1903 * scripts/backup.in: New file
1904 * scripts/backup.sh: New file
1905 * scripts/dump-remind.in: New file
1906 * scripts/backup-specs: Updated
1907 * scripts/Makefile.am: Updated for new directory contents.
1908 * scripts/.cvsignore: Updated
1910 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1913 * doc/tar.texi: Updated
1914 * src/tar.c: --utc implies -vv
1916 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1918 * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
1919 does not define it if it fails to find iconv.h.
1921 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1923 * bootstrap: Use gnulib-tool to generate lib/Makefile.am
1924 and parts of configure.ac
1925 * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
1926 * lib/Makefile.am: Removed
1927 * lib/Makefile.tmpl: New file.
1928 * lib/.cvsignore: Updated
1929 * m4/.cvsignore: Updated
1930 * src/xheader.c: Include stpcpy.h
1932 * src/create.c: Produce an error, not warning, if the
1933 filename is too long.
1934 * tests/longv7.sh: Synchronized with the recent changes.
1936 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1938 * configure.ac: Fixed test for iconv_t
1939 * src/rmt.h: Bugfix by Jürgen Weigert
1940 * THANKS: Add Jürgen Weigert
1941 * tests/star/README: Fixed typo
1943 2004-04-04 Paul Eggert <eggert@twinsun.com>
1945 Merge getdate documentation changes from coreutils.
1947 * doc/getdate.texi: Update from coreutils CVS.
1948 * doc/tar.texi: Fix getdate menu to match getdate.texi's.
1950 Merge recent gnulib changes, and remove some lint.
1952 Improve support for nanosecond-resolution time stamps.
1953 * bootstrap: Add gettime, timespec modules.
1954 * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
1955 * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
1957 * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
1958 * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
1959 st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
1960 * src/common.h (newer_mtime_option): Now a struct timespec, not
1961 time_t. All uses changed.
1962 (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
1963 * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
1964 * src/incremen.c (scan_path): Likewise.
1965 * src/list.c (read_and): Likewise.
1966 * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
1967 whether newer_mtime_option is initialized.
1968 * src/tar.c (decode_options): Likewise.
1969 * src/tar.c (decode_options): Adjust to new signature for get_date.
1971 * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
1972 result of safe_read, full_write, and similar functions.
1973 Detect safe_read error by comparing to SAFE_READ_ERROR;
1974 detect full_write error by comparing to 0.
1976 * src/common.h (write_error_details, sys_write_archive_buffer):
1978 * src/misc.c (write_error_details): Likewise.
1979 * src/rmt.c (main): Likewise.
1980 * src/rmt.h (rmt_read__, rmt_write__): Likewise.
1981 * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
1982 * src/sparse.c (sparse_scan_file, sparse_dump_region,
1983 check_sparse_region, check_data_region): Likewise.
1984 * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
1985 sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
1986 * src/update.c (append_file): Likewise.
1988 * src/buffer.c (clear_read_error_count): Use explicit (void)
1989 to indicate a function with no arguments.
1990 * src/create.c (check_links): Likewise.
1991 * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
1992 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
1993 sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
1994 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
1996 * src/utf8.c (get_input_charset): Likewise.
1997 * src/xheader.c (xheader_ghdr_name, xheader_write_global,
1998 xheader_decode_global, extended_header_init): Likewise.
1999 * tests/mksparse.c (usage): Likewise.
2001 * src/buffer.c (new_volume): Rename local variables to avoid
2003 * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
2004 sparse_file_p, sparse_member_p, sparse_fixup_header,
2005 sparse_dump_file, sparce_extract_file, sparse_skip_file,
2006 sparse_diff_file): Likewise.
2007 * src/compare.c (diff_archive): Likewise.
2008 * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
2009 dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
2011 * src/extract.c (repair_delayed_set_stat): Likewise.
2012 * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
2014 * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
2015 tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
2016 sparse_dump_file, sparse_file_p, sparse_member_p,
2017 sparse_fixup_header, sparse_extract_file, sparse_skip_file,
2018 check_data_region, sparse_diff_file): Likewise.
2019 * src/system.c (sys_stat_nanoseconds): Likewise.
2020 * src/xheader.c (xheader_format_name): Likewise.
2022 * src/common.h (enum old_files): Remove comma before }; not portable.
2024 * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
2025 * src/rmt.c (usage): Likewise.
2026 * src/xheader.c (xheader_set_single_keyword): Likewise.
2027 * tests/genfile.c (usage): Likewise.
2028 * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
2031 * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
2033 * src/names.c (uname_to_uid, gname_to_gid): Likewise.
2034 * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
2035 langtab.charset, charset_lookup): Likewise.
2037 * src/common.h (name_init): Remove unused args. All callers changed.
2038 * src/names.c (name_init): Likewise.
2040 * src/common.h (usage, xheader_write, xheader_write_global,
2041 sys_reset_uid_gid): New decls.
2043 * src/compare.c (report_difference, process_noop): Add
2044 __attribute__ ((unused)) for unused attributes.
2045 * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
2047 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
2048 gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
2049 path_coder, size_coder, uid_coder, uname_coder,
2050 sparse_numblocks_coder): Likewise.
2052 * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
2053 dump_file0): Now static.
2054 * src/utf8.c (charset_lookup): Likewise.
2055 * src/xheader.c (xheader_protected_pattern_p,
2056 xheader_protected_keyword_p, xheader_set_single_keyword,
2057 xheader_keyword_deleted_p, xheader_keyword_override_p,
2058 xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
2060 * tests/genfile.c (usage): Likewise.
2061 * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
2064 * src/create.c (hash_link): Rewrite to avoid cast.
2066 * src/extract.c (file_newer_p): Use parameter, not global var.
2067 * src/misc.c (write_error_details): Likewise.
2069 * src/extract.c (prepare_to_extract): Remove directory arg; not
2070 used. All callers changed.
2072 * src/misc.c (close_fatal): Remove; not used.
2073 * src/system.c (sys_utimes): Likewise.
2075 * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
2077 * src/rmt.c (main): Update copyright date to 2004.
2078 * src/tar.c (decode_options): Likewise.
2080 * src/rtapelib.c (get_status_string): Don't lose errno when
2081 skipping the error messages.
2082 (get_status): Report an error if atol returns a negative number.
2084 * src/utf8.c (struct langtab, langtab, charset_lookup,
2085 get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
2087 (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
2088 Use macros, not definitions, to avoid type clashes with system
2090 (charset_lookup): Local var is now auto, not static.
2091 (utf8_convert): Use ICONV_CONST instead of const, to avoid
2094 * src/utf8.c (langtab): Initialize all elements of struct, to
2096 * src/xheader.c (xhdr_tab): Likewise.
2098 * src/xheader.c: Include fnmatch.h, since we use fnmatch.
2100 * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
2102 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
2105 * configure.ac: Raised version number to 1.13.94
2106 * src/system.h: Protect inclusion of <sys/time.h>
2108 Declare time() if HAVE_DECL_TIME is 0
2109 * tests/.cvsignore: Added mksparse
2111 * tests/sparse01.sh: New file
2112 * tests/multiv02.sh: New file
2113 * tests/Makefile.am: Add sparse01.sh and multiv02.sh
2114 * tests/longv7.sh: Added missing call to 'after'
2116 * src/common.h: Added missing prototypes
2117 * src/compare.c (diff_archive): Use is_sparse member
2118 instead of GNUTYPE_SPARSE.
2119 * src/create.c: Removed unused variables
2120 * src/extract.c (extract_archive): Use sparse_member_p instead
2122 Removed unused variables
2123 * src/list.c (decode_header): Use sparse_fixup_header to correct
2125 (print_header): Do not rely on GNUTYPE_SPARSE type.
2126 Use st->stat.st_size to print real file size.
2127 (skip_member): Assign stat_info.file_name to save_name. This fixes
2128 bug reported by Mads Martin Joergensen <mmj@suse.de>
2129 Use sparse_skip_file() to skip sparse members.
2130 * src/rtapelib.c: include "common.h"
2131 * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
2132 (struct tar_sparse_optab.fixup_header): New member
2133 (tar_sparse_member_p): New function.
2134 (tar_sparse_init): Return true if decode_header is not provided
2135 (tar_sparse_fixup_header)
2136 (sparse_member_p,sparse_fixup_header)
2138 (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
2139 (star_fixup_header, pax_sparse_member_p): New function
2140 (pax_decode_header): Remove
2141 * src/system.h: Include <sys/time.h> and <utime.h> when available
2142 * src/tar.c (usage): Prototype moved to common.h
2143 * src/tar.h (struct tar_stat_info.is_sparse): New member
2144 * src/utf8.c (utf8_convert): Changed prototype
2145 (get_input_charset): Removed unused variable
2146 * src/xheader.c: include <fnmatch.h>
2147 (size_decoder): Assign to both st->archive_file_size and
2149 (st->stat.st_size): Assign to st->stat.st_size
2150 (sparse_numbytes_decoder): Removed unused variable
2151 * src/.cvsignore: Added .gdbinit
2152 * THANKS: Added Mads Martin Joergensen
2154 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2156 * src/create.c (write_long_name): Do not allow more than
2157 NAME_FIELD_SIZE-1 characters in a file name for V7 format
2159 * tests/longv7.sh: New file.
2160 * tests/Makefile.am: Add longv7.sh
2162 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2164 * src/buffer.c (open_archive): Clear read_full_records_option
2165 if reading from a pipe.
2166 (short_read): Display warning about the deduced record size
2168 * tests/star/pax-big-10g.sh: Updated to match the above changes.
2169 * tests/star/ustar-big-2g.sh: Likewise.
2170 * tests/star/ustar-big-8g.sh: Likewise.
2172 * configure.ac: Added gl_FUNC_STRTOULL
2173 * src/create.c (start_header): Check for GNU_FORMAT
2174 if incremental_option is set.
2175 * src/xheader.c (to_decimal): New function.
2176 (xheader_format_name): Use to_decimal() instead of snprintf.
2177 * tests/listed01.sh: Use genfile instead of dd
2178 * tests/multiv01.sh: Likewise.
2180 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2182 * src/list.c (read_and): Stop processing the archive after
2183 encountering a single zero record. Many old archives contain
2184 arbitrary garbage after it.
2185 The warning is issued anyway.
2187 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2189 * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
2190 conversion buffer was not null terminated. Fix provided
2191 by Leland Lucius <llucius@tiny.net>
2192 * THANKS: Added Leland Lucius
2193 * src/utf8.c (utf8_convert): Indentation fix.
2195 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2197 * src/buffer.c (flush_read): Bugfix: the
2198 condition at line 714 included
2200 || (status > 0 && !read_full_records_option)
2202 which is grossly wrong, since even if new_volume() below succeeds,
2203 the subsequent call to rmtread will overwrite the chunk of data
2204 already read in the buffer and thus spoil everything.
2205 * src/system.c (sys_child_open_for_uncompress): Minor stylistic
2207 * tests/star/multi-fail.sh: New test.
2208 * tests/Makefile.am: Added multi-fail.sh
2209 * tests/star/README: Updated
2211 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2214 * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
2215 * src/common.h (utc_option): new global
2216 (enum old_files.KEEP_NEWER_FILES): New element
2217 * src/extract.c: Handle --keep-newer-files option
2218 * src/list.c (tartime): Print UTC if --utc was given.
2219 * src/tar.c: New options: --utc and keep-newer-files
2221 * tests/Makefile.am: Added new tests
2222 * tests/after: Rewritten
2223 * tests/before: Rewritten
2224 * tests/preset.in: Rewritten
2225 * tests/delete03.sh: Accommodate for the new testsuite logic
2226 * tests/gzip.sh: Likewise
2227 * tests/incremen.sh: Likewise
2228 * tests/listed01.sh: Likewise
2229 * tests/multiv01.sh: Likewise
2230 * tests/old.sh: Likewise
2231 * tests/options.sh: Likewise
2232 * tests/version.sh: Likewise
2233 * tests/volume.sh: Likewise
2235 * tests/star: New directory
2236 * tests/star/README: New file
2237 * tests/star/gtarfail.sh: New file
2238 * tests/star/gtarfail2.sh: New file
2239 * tests/star/pax-big-10g.sh: New file
2240 * tests/star/qucktest.sh: New file
2241 * tests/star/ustar-big-2g.sh: New file
2242 * tests/star/ustar-big-8g.sh: New file
2244 2004-02-26 Paul Eggert <eggert@twinsun.com>
2246 * doc/tar.texi (dircategory Individual utilities): Append period,
2247 as suggested by Karl Berry.
2249 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2251 * src/list.c (decode_header): Call xheader_decode before
2252 the assignment to current_stat_info.archive_file_size.
2254 2004-02-23 Paul Eggert <eggert@twinsun.com>
2256 * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
2258 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2263 * tests/before: Move testing of the prerequisite archive formats
2264 to the separate function 'prereq'. Do not expect any arguments
2265 * tests/delete03.sh: Use prereq() instead of passing arguments
2267 * tests/incremen.sh: Likewise.
2268 * tests/listed01.sh: Likewise.
2269 * tests/multiv01.sh: Likewise.
2271 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2273 Added UTF-8 support. Finished global extended header
2277 * configure.ac: Detect libiconv
2278 * src/utf8.c: New file. Conversions to and from utf-8.
2279 * src/Makefile.am: Added utf8.c
2280 * src/create.c (write_header_name) In pax format, use
2281 "path" keyword if the file name is not ASCII
2282 (start_header): Likewise for uname and gname.
2283 * src/list.c: Decode encountered global headers.
2284 * src/xheader.c: Use keywords from the global
2286 Correctly handle UTF-8 conversions.
2287 (xheader_list_destroy): New function.
2288 (xheader_set_single_keyword,xheader_set_keyword_equal): Added
2289 missing gettext markers
2290 (decode_record): Rewritten using caller-provided handler and
2292 * tests/listed01.sh: Give credit to Andreas Schuldei.
2294 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2296 * src/create.c (dump_file0): The conditional at line
2297 1296 prevented incremental backups on individual files
2298 from working, as reported by Andreas Schuldei
2299 <andreas@schuldei.org>.
2301 This is due to the condition
2303 (0 < top_level || !incremental_option)
2305 Removing it makes incremental backups work for individual
2306 files as well as for directories. On the other hand, it does
2307 not affect other functionality, as shown by the reasoning below:
2309 To begin with, the two parts of this condition are mutually
2310 superfluous, because
2312 1) when top_level < 0, incremental_option == 1
2313 so the condition yields false
2314 2) when top_level >= 0, incremental_option == 0
2315 so the condition yields true.
2317 In other words, it is completely equivalent to
2319 (!incremental_option)
2321 Now, let's consider the effect of its removal. There are two cases:
2323 1) when incremental_option==1
2324 This means incremental backup in progress. In this case dump_file
2325 is invoked only for directories or for files marked with 'Y' by
2326 get_directory_contents. The latter are those that did not meet the
2327 condition in incremen.c:242, which is exactly the same condition
2328 as this at create.c:1296. So, for these files the check
2329 (!incremental_option) is useless, since the rest of the
2330 conditional will yield false anyway. On the other hand, if
2331 dump_file is invoked on a directory, the conditional will yield
2332 false due to !S_ISDIR assertion, so these will be processed as usual.
2334 Thus, for this case the extra condition (!incremental_option) is
2335 irrelevant, and its removal won't alter the behavior of tar,
2336 *except* that it will enable incremental backups on individual
2337 files, which is the wanted effect.
2339 2) when incremental_option==0
2340 In this case the condition yields true and its removal does not
2341 affect the functionality.
2344 * configure.ac: Raised patchlevel to 93
2345 * src/incremen.c: Minor stylistic fixes.
2346 * tests/listed01.sh: New test. Check listed incremental
2347 backups on individual files.
2348 * tests/Makefile.am: Added listed01.sh
2350 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2352 * src/common.h (simple_finish_header,start_private_header): New
2354 (xheader_ghdr_name): Changed declaration
2355 * src/create.c (start_private_header): Removed static qualifier.
2356 (write_extended): Removed superfluous last argument. Use
2358 (simple_finish_header): New function.
2359 (finish_header): Use simple_finish_header() to break recursive
2360 dependency between this function and write_extended().
2361 * src/tar.c (assert_format): Do not bail out if several
2362 --format arguments are given. This is a common case when
2363 TAR_OPTIONS are used.
2364 (decode_options): New option --show-defaults displays the
2365 compiled-in defaults.
2366 Use POSIX format if no --format option was given and
2367 --pax-option was specified.
2368 Do not allow to use --pax-option unless the archive format is
2369 set to POSIX (or reading subcommand is requested).
2371 * src/update.c (update_archive): Write global extended header if
2373 * src/xheader.c (xheader_format_name): Bugfix.
2374 (xheader_xhdr_name): Changed the default extended header name
2375 to '%d/PaxHeaders.%p/%f', as POSIX requires.
2376 (xheader_ghdr_name): Removed unused argument.
2377 (xheader_write,xheader_write_global): New function.
2378 (xheader_decode): Modified to honor overrides whatever
2379 the current archive format is.
2381 * src/delete.c (delete_archive_members): Call xheader_decode
2383 * src/list.c (decode_header): Likewise.
2384 * src/incremen.c (sort_obstack): Fixed typo in the comment
2386 * doc/tar.texi: Document new default for extended
2389 * tests/before: Accept an optional list of allowed archive
2390 formats. Exit with the status 77 if the current archive
2391 format does not match any of them.
2392 * tests/delete03.sh: Require gnu, oldgnu or posix format
2393 * tests/incremen.sh: Require gnu or oldgnu format
2394 * tests/multiv01.sh: Likewise
2396 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2398 * doc/tar.texi (Option Summary): Documented --pax-option
2399 * src/tar.c: Likewise.
2401 * src/create.c (to_chars): Added a comment.
2402 * src/tar.h: Comment to GNU_FORMAT
2404 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2407 * configure.ac: Added stpcpy
2408 * bootstrap: Likewise
2409 * lib/Makefile.am: Likewise
2410 * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
2412 * src/create.c (write_extended): Call xheader_xhdr_name
2413 instead of using hardcoded "././@PaxHeader" name.
2414 * src/tar.c: New option --pax-option (equivalent to -o option
2416 * src/xheader.c: Implement pax -o option. Fixed misleading
2417 heading comment (introduced 2003-09-02).
2418 * src/incremen.c: Minor fixes
2419 * m4/.cvsignore: Updated
2421 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2423 * src/incremen.c: Removed accumulator stuff in favor of obstack.
2424 (get_directory_contents): Split into two functions
2425 * src/update.c: Minor changes
2426 * doc/tar.texi: Fixed typo
2428 2004-02-15 Paul Eggert <eggert@twinsun.com>
2430 Fix Debian bug 230872, originally reported by Jeff King in
2431 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
2433 * doc/tar.texi (posix compliance): Remove. The whole section
2434 was a misunderstanding of what POSIXLY_CORRECT is supposed to
2435 mean. The GNU Coding Standards says that POSIXLY_CORRECT
2436 is for disabling extensions that are incompatible with POSIX:
2437 it is not for disabling compatible extensions. All references
2438 to this section removed.
2439 (posix): This format is created only if the posix format is
2440 specified; it is no longer created if gnu format is specified
2441 and POSIXLY_CORRECT is set.
2442 * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
2443 POSIX does not specify the behavior of tar, so we should
2444 not worry about POSIXLY_CORRECT here.
2446 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2448 * Makefile.am: Removed m4
2449 * configure.ac: Require automake-1.8/autoconf-2.59. Removed
2451 * README-alpha: Updated
2452 * bootstrap: Updated TP URL, improved help output. Default
2453 to :ext:anoncvs and set CVS_RSH, unless already set.
2454 * m4/Makefile.am: Removed
2456 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2458 * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
2459 Use $option instead of $1 so all options will be parsed.
2461 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2463 Started rewriting buffer.c ...
2465 * bootstrap: New option --no-po
2466 * src/buffer.c (new_volume,check_label_pattern): Changed return type.
2467 (time_to_start_writing): Changed data type
2468 (file_to_switch_to): Removed. Variable never assigned to.
2469 (open_archive) Moved option compatibility checks to tar.c
2470 Other minor changes.
2471 * src/common.h (maybe_backup_file): Changed return type
2472 * src/misc.c: Likewise.
2473 * src/create.c: Updated invocations of safer_name_suffix
2474 * src/extract.c: Likewise
2475 * src/delete.c: Updated assignment to write_archive_to_stdout
2476 * src/tar.c (decode_options): More option compatibility checks
2477 (moved from buffer.c)
2478 * src/update.c (time_to_start_writing): Changed data type.
2479 * tests/recurse.sh: New test case.
2480 * tests/mksparse.c: New file.
2481 * tests/Makefile.am: Added recurse.sh and mksparse.c
2483 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2485 * src/sparse.c (sparse_diff_file): Bugfix. Thanks
2486 Martin Simmons for the patch.
2487 * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
2488 <pius@pld-linux.org> for the patch.
2490 2003-12-26 Paul Eggert <eggert@twinsun.com>
2492 Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
2493 and translation website.
2495 * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
2496 intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
2497 isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
2498 a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
2499 files are replaced by autoreconf. Also, there seems to be a bug
2500 in gettext/autoconf/automake if we try to omit these files after
2501 autoreconf has replaced them, even though the gettext manual says
2502 they're optional. So give up and just include them for now, even
2503 though they make 'configure' longer and slower.
2505 Change translation URL from
2506 <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
2507 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
2508 accommodate translator website revamp.
2510 Fail if autoreconf fails.
2512 * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
2513 signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
2514 ignore files now supplied by gettext 0.13.1.
2516 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2518 Synchronized with the backup repository on Mirddin
2520 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2522 * configure.ac: Check for varios members of struct stat
2523 that may represent file modification times with a subsecond
2525 Check for utimes (for future use)
2526 * src/buffer.c (short_read): Issue a warning on short reads.
2527 * src/common.h (sys_stat_nanoseconds): New function
2528 * src/create.c (dump_file0): Use sys_stat_nanoseconds().
2529 * src/list.c (read_and): Treat only two successive zero
2530 filled blocks as an EOF indicator. Issue a warning if
2531 a single one is encountered.
2532 * src/system.c (sys_stat_nanoseconds): New function
2533 * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
2535 * src/xheader.c (code_time,decode_time): Support for subsecond
2537 (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
2538 (mtime_coder,mtime_decoder): Update invocations of code_time and
2540 (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
2541 (sparse_numblocks_decoder,sparse_offset_decoder)
2542 (sparse_numbytes_decoder): Updated
2544 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2546 * src/names.c (safer_name_suffix): Reverted change made
2547 2003-11-14. Reason: Discussion with Paul Eggert and
2548 Jean-Louis Martineau. See also ChangeLog entry from
2550 * tests/delete03.sh: Likewise.
2551 * tests/extrac04.sh: Likewise.
2552 * tests/multiv01.sh: Likewise.
2554 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2556 * src/incremen.c (write_directory_file): Use sys_truncate
2557 * src/list.c (print_header): Use archive_file_size member
2558 when printing real file size.
2559 * src/sparse.c (sparse_scan_file): Correctly handle files with
2561 (sparse_dump_region,sparse_extract_region): Allow for zero size
2564 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2566 * configure.ac: Raised version number to 1.13.92
2567 * src/list.c (decode_header): Discern between pax and ustar
2569 Initialize current_stat_info.archive_file_size.
2571 NOTE: Modifications from this date on are temporarily
2572 stored on local CVS on mirddin. This repository will
2573 be synchronized with Savannah as soon as the latter
2574 becomes operational again.
2576 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2579 * src/sparse.c: Initial implementation of GNU/pax sparse
2581 * src/common.h (xheader_store): Changed prototype.
2582 * src/create.c: Update calls to xheader_store
2583 * src/extract.c (extract_archive): Check reported size vs.
2584 archive file size to determine if we have to do with a
2586 * src/tar.c (usage): Cleaned up the sample argument to --newer
2588 (decode_options): Allow --sparse for POSIX_FORMAT archives.
2589 * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
2591 Implemented GNU.sparse.* keywords.
2593 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2595 * configure.ac: Check for setlocale. Thanks Bruno Haible for
2598 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2600 * src/create.c (write_gnu_long_link): Use oldgnu
2601 magic with @LongLink blocks.
2603 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2605 * src/tar.h: Support for star sparse format.
2606 * src/sparse.c: Likewise.
2608 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2610 * src/sparse.c (sparse_diff_file): New function
2611 * src/common.h (sys_compare_uid,sys_compare_gid): New functions
2612 (sys_compare_uid_gid): Removed.
2613 (sys_compare_links,report_difference): Changed prototype
2614 (sparse_diff_file): New function
2615 * src/system.c (sys_compare_uid,sys_compare_gid): New functions
2616 (sys_compare_uid_gid): Removed.
2617 (sys_compare_links): Changed declaration
2618 * src/compare.c (diff_archive): Use sparse_diff_file.
2620 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2622 Rewritten sparse file handling.
2624 * src/sparse.c: New file. Provides a universal framework
2625 for various methods for sparse files handling.
2626 * src/Makefile.am: Added sparse.c
2627 * src/common.h (struct sp_array,sparsearray,sp_array_size)
2628 (init_sparsearray,fill_in_sparse_array): Removed
2629 (enum dump_status): New data type
2630 (pad_archive,close_diag,open_diag,read_diag_details)
2631 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
2633 (sparse_file_p,sparse_dump_file,sparse_extract_file): New
2635 (print_header): Changed prototype declaration.
2636 * src/tar.h (struct sp_array): Declaration from common.h
2637 (struct tar_stat_info): New members archive_file_size,
2638 sparse_map_avail,sparse_map.
2639 * src/create.c: Major rewrite.
2640 * src/extract.c: Use new sparse file interface.
2641 * src/compare.c (diff_sparse_files): Temporary placeholder.
2643 * src/buffer.c: Minor changes
2644 * src/tar.c: Likewise.
2645 * src/list.c: Likewise.
2646 * src/misc.c (close_diag,open_diag,read_diag_details)
2647 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
2648 diagnostics functions.
2649 * src/incremen.c: Use new diagnostics functions.
2650 * src/names.c: Likewise.
2652 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2654 * configure.ac: Fixed check for setsockopt
2656 * src/create.c: Do not zero-terminate name field if
2657 the name is exactly 100 characters long.
2658 (write_ustar_long_name): Fixed cheking for unsplittable
2661 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2663 * src/create.c (start_header): Removed debugging hook
2664 (dump_file): Fixed handling of linkname field.
2665 * src/names.c (safer_name_suffix): If the input
2666 file name ends with a slash, output one should do so
2668 * doc/tar.texi: Documented --format=ustar
2670 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2672 * src/tar.h (archive_format): USTAR_FORMAT: New type.
2673 * src/create.c: Added POSIX.1-1988 support.
2674 * src/names.c (safer_name_suffix): Skip leading ./
2675 * src/tar.c: New option --format=ustar forces
2676 POSIX.1-1988 archive format.
2677 * tests/delete03.sh: Updated.
2678 * tests/extrac04.sh: Updated.
2679 * tests/multiv01.sh: Updated.
2681 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2683 * src/list.c (read_and): Initialize current_stat_info
2684 and extended_header at the start of the loop.
2685 * src/names.c (all_names_found): Check if the argument
2686 contains valid filename. Fixes coredump on `not_a_tar_file'
2687 * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
2688 (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
2689 Fixes `pax-big-10g' bug.
2691 2003-11-12 Paul Eggert <eggert@twinsun.com>
2693 Fix some C compatibility bugs reported by Joerg Schilling.
2695 * src/common.h (stripped_prefix_len): Fix misspelling
2696 "stripped_path_len" in declaration.
2697 * src/rmt.c (main): Use "return FOO;" rather than
2698 "exit (FOO);"; we no longer have to worry about
2699 pre-ANSI hosts that mishandled returned values from "main".
2700 * src/tar.c (main): Likewise. This avoids warnings on some
2702 * src/system.c: Include signal.h, for 'kill'.
2703 * src/system.h (DEV_BSIZE): Remove.
2704 (DEFAULT_ST_BLKSIZE): New macro.
2705 (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
2706 * src/tar.c (enum): Remove comma just before }.
2708 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2710 * src/list.c (decode_header): Initialize st_atime and
2713 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2715 * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
2716 Bunk <bunk@fs.tum.de> for reporting.
2717 * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
2718 <martin@xemacs.org> for spotting.
2720 2003-11-04 Paul Eggert <eggert@twinsun.com>
2722 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
2725 2003-10-26 Paul Eggert <eggert@twinsun.com>
2727 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
2728 Bug reported by Christian Weisgerber.
2730 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2734 * src/tar.c (decode_options): Removed superfluous archive format
2736 * doc/tar.texi: Documented new features.
2738 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2741 * THANKS: Added Wojciech Polak
2742 * configure.ac: Added checks for missing functions. Raised
2743 version number to indicate alpha release.
2744 * lib/Makefile.am: Added missing headers
2745 * lib/waitpid.c: Added missing includes.
2746 * src/extract.c: Likewise.
2747 * src/names.c: Removed spurious includes.
2748 * src/xheader.c: Likewise.
2749 * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
2750 macro overriding broken mkdir prototypes.
2752 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2754 * configure.ac: Check for dev_t and ino_t.
2755 * m4/Makefile.am: Added missing files.
2756 * src/system.c: New file.
2757 * src/Makefile.am: Added system.c
2758 * src/common.h: Prototypes for functions from system.c
2759 * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
2760 * src/buffer.c: Moved system dependencies to system.c
2761 * src/compare.c: Likewise.
2762 * src/create.c: Likewise.
2763 * src/delete.c: Likewise.
2764 * src/extract.c: Likewise.
2765 * src/rtapelib.c: Likewise.
2767 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2769 Implemented --occurrence option.
2772 * src/tar.c: New option --occurrence.
2773 * src/common.h (occurrence_option): New global
2774 (struct name): Changed `found' member to `uintmax_t
2776 (names_done): Removed
2777 (all_names_found): Changed prototype.
2778 (ISFOUND,WASFOUND): New macros
2779 * src/delete.c (delete_archive_members): Honor --occurrence
2781 * src/list.c (read_and): Likewise.
2782 * src/names.c: Count number of occurrences of each name in the
2784 (name_match): Honor --occurrence option.
2785 (names_done): Removed
2786 (all_names_found,names_notfound): Rewritten.
2788 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2790 * src/tar.c: Removed extra precaution regarding
2791 subcommand_option == CAT_SUBCOMMAND
2792 * lib/Makefile.am: Updated
2794 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2796 * src/common.h (names_done): New function.
2797 * src/names.c: Likewise.
2798 * src/list.c (read_and): Use all_names_found() as `while'
2800 * src/tar.c: New option --first-copy
2803 2003-09-24 Paul Eggert <eggert@twinsun.com>
2805 * src/rmt.c (main): Don't translate Copyright string; international
2806 law says the word "Copyright" should be in English.
2807 * src/tar.c (decode_options): Likewise.
2809 2003-09-22 Paul Eggert <eggert@twinsun.com>
2811 * doc/tar.texi (extracting untrusted archives): New section.
2813 * src/common.h (stripped_path_len): Renamed from cut_path_elements.
2814 Return size_t, not pointer, so that we don't have to worry about
2815 violating the C standard by converting char const * to char *.
2816 All callers changed.
2817 * src/names.c (stripped_path_len): Likewise. Strip file system
2818 prefix, too. Count adjacent slashes as if they were one slash;
2819 that is the POSIX standard.
2821 2003-09-17 Paul Eggert <eggert@twinsun.com>
2823 * README-alpha: Document maintainer tool assumptions a bit. GNU
2824 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
2825 Debian bug 211447. Fix minor misspellings/whitespace nits.
2827 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
2828 gl_USE_SYSTEM_EXTENSIONS.
2830 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
2831 * m4/.cvsignore: Add restrict.m4, time_r.m4.
2833 2003-09-17 Paul Eggert <eggert@twinsun.com>
2835 * bootstrap: Don't use "for option; do";
2836 Solaris 8 /bin/sh doesn't like that.
2838 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2840 * README-alpha: Updated
2841 * bootstrap: Updated
2843 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2845 * README-alpha: Updated
2846 * bootstrap: Updated
2847 * po/POTFILES.in: Added src/xheader.c
2848 * src/common.h (cut_path_elements): Added proto.
2850 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2852 * src/buffer.c: Use ngettext where appropriate.
2853 * src/compare.c: Likewise.
2854 * src/create.c: Likewise.
2855 * src/misc.c: Likewise.
2856 * src/tar.c: Likewise.
2857 * src/update.c: Likewise.
2859 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2861 * .cvsignore: Added *.shar.gz
2864 * src/common.h (strip_path_elements): New variable.
2865 * src/extract.c (extract_archive): Implemented --strip-path
2866 * src/names.c (cut_path_elements): New function.
2867 * src/tar.c: New option --strip-path=NUM.
2868 (decode_options) Assign boolean values to bool variables.
2870 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2872 * src/delete.c: Fixed deletion from the POSIX archives.
2873 * src/list.c (read_header): Minor change.
2874 * src/tar.c (main): Do not check for volume_label_option
2875 if subcommand_option is not CREATE_SUBCOMMAND.
2876 * src/xheader.c (xheader_decode): Store the header as
2877 well (for eventual delete).
2879 * tests/incremen.sh: Explicitly request GNU format. This will
2880 disappear when GNU extended header keywords are working.
2881 * tests/multiv01.sh: Likewise
2882 * tests/volume.sh: Likewise
2884 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2886 * src/create.c: Support for "linkpath" extended keyword.
2887 * src/xheader.c (decode_record): Reversed the return
2890 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2892 * configure.ac: Allow to redefine the default output format.
2893 * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
2894 (archive_format_string): New function.
2895 (usage): Updated help output.
2900 2003-09-02 Paul Eggert <eggert@twinsun.com>
2902 * src/common.h (destroy_stat, xheader_decode, xheader_store,
2903 xheader_read, xheader_finish, xheader_destroy): Add decls;
2906 * src/create.c (write_extended): Remove unused local 'bufsize'.
2908 * src/delete.c (delete_archive_members): Handle case of
2909 HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
2910 * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
2911 occurs, as it's not possible.
2912 * src/update.c (update_archive): Likewise.
2914 Use "const" when possible in new code.
2915 * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
2916 (fmttab): Now const. All uses changed.
2917 * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
2918 (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
2919 decode_record, xheader_store, xheader_print, code_string, code_time,
2920 code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
2921 gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
2922 linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
2923 mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
2924 uid_coder, uid_decoder, uname_coder, uname_decoder):
2925 Use pointers to const when possible.
2926 (xhdr_tab): Now const.
2928 * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
2929 (set_archive_format): Report an error if no format name matches,
2930 instead of returning an undefined value.
2932 * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
2933 atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
2934 ctime_decoder, mtime_decoder, path_decoder, size_decoder,
2935 uid_decoder, uname_decoder): Remove unused keyword arg.
2938 * src/tar.c (set_archive_format): Now static.
2939 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
2941 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
2942 atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
2943 linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
2944 ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
2945 size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
2946 Remove forward decls; no longer needed.
2947 (xhdr_tab): Move to end, so that the forward decls aren't needed.
2948 Add a forward declaration.
2950 Use 'bool' in new code, when appropriate.
2951 * src/xheader.c (decode_record): Return bool, not int.
2952 * src/common.h (read_header): Since it accepts bool, change
2953 all callers to use false and true rather than 0 and 1.
2955 * src/xheader.c (decode_record): Fix misspelling in diagnostic
2956 "extended headed" -> "extended header".
2958 GNU coding style fixes.
2959 * src/xheader.c (decode_record, xheader_decode):
2960 Do not use decls like "char *p, *q;".
2963 (xheader_store): Avoid parentheses around object operand of sizeof.
2965 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2967 * src/create.c (start_header): Store long file names
2968 in "path" keyword of an extended header if in POSIX
2970 (finish_header): print header before calling write_extended().
2971 * src/list.c (list_archive): Always decode the header. This
2972 is necessary so the extended header is processed and the correct
2973 filename is printed no matter what the state of verbose_option.
2974 * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
2975 for the time being).
2977 2003-09-01 Paul Eggert <eggert@twinsun.com>
2979 Update from gnulib, and correct fnmatch to fnmatch-gnu.
2980 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
2982 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
2984 * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
2985 * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
2986 copying rules from gnulib module descriptions.
2987 (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
2988 Update from gnulib modules alloca, fnmatch, getline, stdbool.
2989 * m4/.cvsignore: Add utimes-null.m4. Sort.
2991 2003-09-01 Sergey Poznyakoff
2993 Added initial support for creating POSIX headers.
2995 * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
2996 (string_to_chars): New functions
2997 (struct xheader): Changed structure
2998 (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
3000 * src/create.c (string_to_chars): New function.
3001 (write_extended): New function
3002 (start_header): Create extended POSIX headers if necessary.
3003 (finish_header): Likewise.
3004 * src/list.c (print_header): Take user/group from
3006 * src/names.c (gid_to_gname,gname_to_gid)
3007 (uid_to_uname,uname_to_uid): Changed prototypes.
3008 * src/tar.c: New option --format.
3009 * src/tar.h (OLDGNU_COMPATIBILITY): Removed
3010 (struct extra_header): Removed unused structure.
3011 (union block.extra_header): Removed unused member.
3012 * src/xheader.c: Implemented coder functions.
3013 * bootstrap: Added obstack.
3014 * lib/.cvsignore: Likewise.
3015 * configure.ac: Added 'gl_OBSTACK'
3016 * m4/Makefile.am: Added new files.
3017 * m4/.cvsignore: Likewise.
3018 * TODO: Minor formatting change
3020 2003-08-31 Sergey Poznyakoff
3022 Added initial support for POSIX extended and STAR headers
3023 (only for listing/extracting).
3025 * src/xheader.c: New file.
3026 * src/Makefile.am: Added xheader.c
3027 * src/tar.h (struct star_header): New datatype
3028 (XHDTYPE,XGLTYPE): New defines
3029 (enum archive_format:STAR_FORMAT): New member
3030 (struct tar_stat_info): New datatype.
3031 (union block.star_header): New member.
3032 * src/common.h (orig_file_name,current_file_name)
3033 (current_trailing_slash,current_link_name): Removed variables.
3034 (current_stat_info): New variable
3035 (current_stat): Removed
3036 (extended_header): New variable
3037 (decode_header): Changed prototype.
3038 * src/list.c (decode_header): Added initial support for POSIX extended
3040 (skip_member): Check oldgnu_header only if current_format is set
3042 * src/buffer.c: Use current_stat_info
3043 * src/compare.c: Likewise.
3044 * src/create.c: Likewise.
3045 * src/delete.c: Likewise.
3046 * src/incremen.c: Likewise.
3047 * src/mangle.c: Likewise.
3048 * src/update.c: Likewise.
3049 * src/extract.c: Likewise.
3050 (make_directories): Improved check for the existence of the directory
3051 * src/tar.c (destroy_stat): New function.
3053 2003-08-29 Paul Eggert <eggert@twinsun.com>
3055 * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
3056 was worth (e.g., different users in en_GB disagree about -ize
3058 * po/en_GB.po: Remove.
3060 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3064 * src/tar.c: Removed support for the obsolete command line
3066 * doc/tar.texi: Removed references to the obsolete command
3069 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3073 * doc/tar.texi: Updated
3074 * src/common.h (check_links_option): New variable
3075 (orig_file_name): New variable
3076 (check_links): New proto.
3077 * src/create.c (struct link.nlink): New member
3078 (link_table): Static for the module.
3079 (dump_file): Update `link' member when adding new links
3081 (check_links): New function.
3082 * src/list.c (print_header): Use orig_file_name.
3083 * src/tar.c: New option --check-links. Changed semantics of
3084 -o to comply to UNIX98 when extracting and to its previous
3085 semantics otherwise.
3086 (main): Call check_links if --check-links. was given.
3088 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3090 * src/list.c (print_header): Revised
3091 * NEWS: Started the entry for 1.13.26
3092 * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
3094 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3096 * .cvsignore: Added to the repository.
3097 * doc/.cvsignore: Likewise.
3098 * lib/.cvsignore: Likewise.
3099 * m4/.cvsignore: Likewise.
3100 * po/.cvsignore: Likewise.
3101 * scripts/.cvsignore: Likewise.
3102 * src/.cvsignore: Likewise.
3103 * tests/.cvsignore: Likewise.
3105 * lib/Makefile.am: Added exitfail.[hc]
3106 * src/misc.c (chdir_do): Fixed call to restore_cwd
3107 * src/buffer.c (flush_read): Fixed behavior on short
3108 reads right after opening the new archive (multiv01.sh test).
3109 (new_volume): Special handling for "-".
3110 * src/list.c (print_header): Print trailing slash if
3111 current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
3112 * tests/multiv01.sh: Minor changes.
3113 * m4/Makefile.am: Added missing files.
3115 2003-07-05 Paul Eggert <eggert@twinsun.com>
3117 Finish the checkin begin yesterday.
3119 * NEWS: Document the user-visible changes installed in the last
3122 * TODO: New file (actually, resurrected; but with new contents).
3124 * src/list.c (read_and): Give full type for procedure arg.
3125 (read_header): Strip trailing slashes, setting current_trailing_slash.
3126 (tartime): Avoid int overflow when printing year (!).
3127 (print_header): New arg specifying block ordinal. All uses changed.
3128 Print link as 'h' type. Give labels for long links and names.
3130 * src/misc.c (contains_dot_dot): Moved to names.c
3131 (must_be_dot_or_slash): New function.
3132 (safer_rmdir): Use it.
3133 (remove_any_file): Now takes enum as option, not boolean.
3134 Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
3135 to unlink a directory.
3136 (deref_stat): Accept bool, not int.
3138 * src/names.c (namelist_match): Allow partial matches only if
3140 (hash_string_hasher): Renamed from hash_avoided_name.
3141 (hash_string_compare): Renamed from compare_avoided_anames.
3142 (hash_string_insert, hash_string_lookup): New functions.
3143 (add_avoided_name, is_avoided_name): Use them.
3144 (safer_name_suffix): New function.
3145 (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
3147 * src/rmt.c: Don't include print-copyr.h.
3148 (prepare_input_buffer): New arg FD.
3149 Do not read more than INT_MAX bytes at once,
3150 since it breaks on some brain damaged Tru64 hosts.
3152 when retrying instead of subtracting 1024; for speed.
3153 (main): Use gettext to translate (C), not print_copyright.
3155 * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
3156 now that gnulib handles this.
3157 Include <stddef.h> and <limits.h> unconditionally, now that we assume
3159 Assume that offsetof is defined in stddef.h.
3160 Do not include <sys/param.h>.
3161 (realloc, lseek): Do not declare.
3162 (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
3163 (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
3164 declarations, since we now assume C89 or better.
3165 (PARAMS): Remove, as we now assume C89. All uses changed.
3166 (bindtextdomain, textdomain): Include <gettext.h> to define.
3167 Include <unlocked-io.h>.
3168 (valloc): Define if not defined, and if valloc is not declared.
3169 (xstrdup): Remove decl.
3171 * src/tar.c: Do not include <print-copyr.h>.
3172 Include <getdate.h>.
3173 (get_date): Remove decl.
3174 (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
3175 IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
3176 NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
3177 SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
3178 (long_options, decode_options): Use them.
3179 (OVERWRITE_DIR_OPTION): Remove.
3180 (long_options): New options --index-file, --no-overwrite-dir.
3181 Remove --overwrite-dir option.
3182 (usage): Use PACKAGE_BUGREPORT.
3183 (decode_options): Terminate new argv properly.
3184 Use PACKAGE_NAME, PACKAGE_VERSION.
3185 If verbose, report how we grokked any textual date option.
3186 (main): Add support for index-file.
3188 * tests/Makefile.am: Convert to UTF-8.
3189 (AUTOMAKE_OPTIONS): Remove.
3190 (TESTS): Add delete04.sh, multiv01.sh, options.sh.
3191 (INCLUDES): Remove ../intl.
3192 (LDADD): Don't link libtar.a twice.
3194 * tests/genfile.c: Convert to UTF-8.
3195 Don't include <print-copyr.h>.
3196 (DEFAULT_PATTERN): Renamed from DEFAULT.
3197 (ZEROS_PATTERN): Renamed from ZEROS.
3198 (main): Use gettext to translate (C), not print_copyright.
3200 2003-07-04 Paul Eggert <eggert@twinsun.com>
3202 Revamp to meet current standards of autoconf, automake,
3203 gettext, and gnulib, and incorporate new translations.
3205 * config/config.guess, config/config.sub, config/depcomp,
3206 config/install-sh, config/mdate-sh, config/missing,
3207 config/mkinstalldirs, config/texinfo.texi:
3208 Moved here from parent directory, or from doc.
3209 * config.hin: Renamed from config.h.in.
3210 * config/config.rpath: New file.
3212 * intl: Remove this subdirectory.
3214 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
3216 * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
3217 lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
3218 lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
3219 lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
3220 lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
3221 m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
3224 * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
3225 lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
3226 lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
3227 m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
3228 m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
3229 m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
3230 m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
3231 m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
3232 m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
3233 m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
3234 m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
3235 m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
3236 m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
3237 m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
3238 m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
3239 m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
3240 po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
3241 po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
3242 po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
3244 * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
3245 lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
3246 lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
3247 lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
3248 lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
3249 lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
3250 lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
3251 lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
3252 lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
3253 lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
3254 lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
3255 lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
3256 lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
3257 m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
3258 m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
3259 m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
3260 m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
3261 m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
3263 Upgrade to latest version from external source. The file "bootstrap"
3264 now grabs these automatically, so we needn't keep track of them
3265 in this change long any longer.
3267 * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
3268 (SUBDIRS): Remove intl.
3269 * PORTS: Update for star, Macintosh.
3270 * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
3271 Bison 1.875, gettext 0.12.1.
3272 * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
3273 * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
3274 (AC_CONFIG_AUX_DIR): New.
3275 (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
3277 (AC_PREREQ): Bump from 2.52 to 2.57.
3278 (AC_GNU_SOURCE): New.
3279 (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
3280 we no longer support K&R C.
3282 (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
3283 sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
3284 (AC_MBSTATE_T): Remove.
3285 (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
3286 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
3287 HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
3288 (AM_STDBOOL_H): Add.
3289 (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
3290 jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
3291 (AC_CHECK_TYPE): Remove ssize_t.
3292 (gt_TYPE_SSIZE_T): Add.
3293 (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
3294 jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
3295 AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
3296 AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
3297 jm_FUNC_MKTIME, jm_FUNC_REALLOC):
3298 Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
3299 (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
3300 (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
3301 (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
3302 napms, poll, select, strstr, usleep.
3303 (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
3304 rmdir, strcasecmp, strncasecmp, strtol, strtoul.
3305 (AM_GNU_GETTEXT): Use external and need-ngettext options.
3306 (AM_GNU_GETTEXT_VERSION): New.
3307 (AC_OUTPUT): Remove intl/Makefile.
3309 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3310 ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
3311 * doc/fdl.texi: Update to current GNU version.
3312 * doc/gettext.texi: Update to current coreutils version,
3313 plus a copyright notice.
3314 * doc/tar.texi: Switch to new method for doing copyright notices.
3315 Use @acronym instead of @sc where appropriate.
3316 Remove empty examples. Give a few more examples.
3318 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3319 (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
3320 are built up in pieces with +=.
3321 (noinst_HEADERS, INCLUDES): Remove.
3322 (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
3323 (libtar_a_LIBADD): Use $ rather than @.
3324 (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
3326 * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
3327 bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
3328 ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
3329 intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
3330 isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
3331 memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
3332 pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
3333 safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
3334 stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
3335 strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
3336 unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
3337 Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
3338 prereq.m4, xstrtoimax.m4.
3340 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
3341 be translated, since it's not a user-visible tool.
3343 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3345 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3346 (INCLUDES): Remove ../intl. Put top-srcdir before ., for
3347 consistency with coreutils.
3348 (LDADD): Link LIBINTL after libtar.a, since
3349 it's now external and should stand by itself.
3351 * src/buffer.c (print_total_written): Adjust to new human.h
3353 (child_open_for_compress): Do not increase size to BLOCKSIZE.
3354 (open_archive): Open index file name.
3355 Strip trailing slahes from file names.
3356 (flush_write): Set size to 0 if not saving names.
3357 (flush_write, flush_read): Use safer_name_suffix rather than
3360 * src/common.h: Include <quote.h>.
3361 (absolute_names_option, atime_preserve_option, backup_option,
3362 block_number_option, checkpoint_option, dereference_option,
3363 force_local_option, ignore_failed_read_option, ignore_zeros_option,
3364 incremental_option, interactive_option, multi_volume_option,
3365 numeric_owner_option, one_file_system_option, recursive_unlink_option,
3366 read_full_records_option, remove_files_option, same_order_option,
3367 show_omitted_dirs_option, sparse_option, starting_file_option,
3368 to_stdout_option, totals_option, touch_option, verify_option,
3369 dev_null_output, now_verifying, we_are_root): Now bool, not int.
3370 (current_trailing_slash, index_file_name, recent_long_name_blocks,
3371 recent_long_link_blocks): New vars.
3372 (NO_OVERWRITE_DIR_OLD_FILES): New constant.
3373 (OVERWRITE_OLD_DIRS): Remove.
3374 (enum remove_option): New enum.
3375 (remove_any_file): Use it as option arg, not int.
3376 (is_avoided_name, contains_dot_dot): Return bool, not int.
3377 (safer_name_suffix): New decl.
3379 * src/compare.c (now_verifying): Now bool, not int.
3380 (fill_in_sparse_array): Move to extract.c. Now returns bool;
3381 all callers changed to test for failure.
3382 (diff_sparse_files): Take size from current_stat, not from param.
3383 (diff_archive): Do not count trailing slashes in archives.
3384 (verify_volume): Test for header failure after loop, not before.
3386 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
3387 All callers changed.
3388 (start_header): Clear devmajor and devminor fields, too.
3389 (finish_header): New arg block_ordinal.
3390 (init_sparsearray): Now extern. Set sp_array_size to
3391 SPARSES_IN_OLDGNU_HEADER if it is zero.
3392 (dump_file): Keep link table as a hash.
3393 Do not count "file changed as we read it" as a failure.
3395 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
3396 Move extern decl to common.h.
3398 * src/extract.c (we_are_root): Now bool, not int.
3399 (check_time): Warn about implausibly old time stamps.
3400 (set_stat): Use utimbuf, not stat_info.
3401 (prepare_to_extract): New arg DIRECTORY.
3402 (fill_in_sparse_array): Moved here from compare.c.
3403 (extract_sparse_file): Now returns off_t, giving size left.
3404 Truncate file at end.
3405 (extract_archive): Use safer_name_suffix rather than rolling our own.
3406 Use fill_in_sparse_array rather than rolling our own.
3407 Strip trailing slashes more effectively.
3408 Check for unsafe names.
3410 * src/incremen.c (struct directory): nfs and found are now of type
3412 (gnu_restore): Now takes directory name as argument, not offset
3413 of directory name in a global. All uses changed.
3414 (CURRENT_FILE_NAME): Remove.
3417 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
3420 2002-09-30 Paul Eggert <eggert@twinsun.com>
3422 * src/rmt.c (prepare_input_buffer): Renamed form
3423 prepare_record_buffer. All uses changed. Do not assume that
3424 size_t is the same width as int.
3426 2002-03-29 Paul Eggert <eggert@twinsun.com>
3428 * src/incremen.c (get_directory_contents):
3429 If ignore_failed_read_option, only warn about
3430 get_directory_contents failures. Fix suggested by
3433 2002-01-31 Mark W. Eichin <eichin@thok.org>
3435 * src/buffer.c (child_open_for_compress): Don't try to read
3436 past the end of the buffer.
3438 2001-10-11 Jim Meyering <meyering@lucent.com>
3440 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
3441 and quote_n (1, ... to avoid clobbering a buffer.
3443 2001-09-26 Paul Eggert <eggert@twinsun.com>
3445 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
3447 * src/buffer.c (flush_read): Don't diagnose partial blocks before
3448 end of file; just ignore them silently.
3450 * src/list.c (read_header): Don't keep around extended name
3451 and link info indefinitely; keep it only for the next file.
3452 This fixes a bug introduced in 1.13.24, and removes the need
3453 for some static variables. Set recent_long_name and
3454 recent_long_link to zero if there were no long links; this
3455 avoids a violation of ANSI C rules for pointers in delete.c.
3456 * THANKS: Add Christian Laubscher.
3458 2001-09-26 Jim Meyering <meyering@lucent.com>
3460 * doc/tar.texi (Remote Tape Server): is know -> is known
3462 2001-09-25 Paul Eggert <eggert@twinsun.com>
3464 * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
3465 <iconv.h> may define EILSEQ (e.g. libiconv). Define a
3466 replacement EILSEQ to be ENOENT, not EINVAL, since callers may
3467 want to distinguish EINVAL and EILSEQ.
3469 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
3471 * src/extract.c (maybe_recoverable):
3472 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
3474 2001-09-22 Paul Eggert <eggert@twinsun.com>
3476 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
3478 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
3481 * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
3482 * PORTS: Add copyright notice, 'star' reference.
3483 * README-alpha: Add copyright notice, autoconf 2.52 patch.
3484 * THANKS: Add Christophe Kalt.
3485 * config.sub: Upgrade to 2001-09-14 version.
3487 * configure.ac (ALL_LINGUAS): Add ko.
3488 * po/ko.po: Resurrected file.
3490 * doc/convtexi.pl: Add coding advice for Emacs.
3492 * doc/getdate.texi: Add copyright notice.
3494 * doc/mdate-sh: Upgrade to automake 1.5 version.
3496 * doc/tar.texi (extracting files): Mention --to-stdout.
3497 (Option Summary, Dealing with Old Files): New option --overwrite-dir.
3498 (Overwrite Old Files): Likewise.
3500 * lib/Makefile.am (noinst_HEADERS):
3501 Remove copysym.h. Add print-copyr.h, unicodeio.h.
3502 (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
3504 * lib/copysym.c, lib/copysym.h: Remove.
3505 * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
3506 lib/unicodeio.h: New files.
3508 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3509 lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
3511 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
3512 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
3514 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
3515 * m4/isc-posix.m4: Remove.
3517 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
3519 * po/POTFILES.in: Add copyright notice.
3521 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
3523 * tests/Makefile.am (LDADD): Likewise.
3525 * src/buffer.c (write_archive_buffer, close_archive):
3526 If an archive is a socket, treat it like a FIFO.
3527 (records_read, records_written): New vars.
3528 (write_archive_to_stdout): Now bool, not int.
3529 (open_archive, flush_write, flush_read): Keep records_read and
3530 records_written up to date.
3532 * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
3533 (write_archive_to_stdout): Now bool, not int.
3534 (enum read_header): New value HEADER_SUCCESS_EXTENDED.
3535 (read_header): Now takes bool arg. Existing callers modified
3536 to pass 0, unless otherwise specified.
3538 * src/delete.c (records_read): Remove; now a global.
3539 (acting_as_filter): Now bool, not int.
3540 (recent_long_name, recent_long_link, recent_long_name_blocks,
3541 recent_long_link_blocks, records_read, records_written): New decls.
3542 (records_skipped): New var.
3543 (move_archive): Don't divide by zero if arg is 0.
3544 Use the above vars to compute how far to move.
3545 (write_recent_blocks): New function.
3546 (delete_archive_member): Pass 1 to read_header, so that it doesn't
3547 read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
3548 Keep track of how many records have been skipped.
3549 Let the buffer code count records.
3550 When copying a header, copy any extended headers that came before it.
3552 * src/extract.c (extract_archive): When marking a directory to be
3553 updated after symlinks, stat all directories after it in the
3554 delayed-set-stat list too, since they will be checked after
3555 symlinks. Add support for --overwrite-dir.
3557 * src/list.c (recent_long_name, recent_long_link,
3558 recent_long_name_blocks, recent_long_link_blocks): New vars.
3559 (read_and): Pass 0 to read_header.
3560 (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
3561 headers into new vars. Null-terminate incoming symbolic links.
3563 * src/rmt.c: Include print-copyr.h, not copysym.h.
3564 (main): Use print_copyright, not copyright_symbol.
3565 * src/tar.c (decode_options): Likewise.
3566 (OVERWRITE_DIR_OPTION): New constant.
3567 (long_options, usage, decode_options): Add --overwrite-dir.
3569 * src/tar.h: Put copyright notice into documentation.
3571 * tests/Makefile.am (TESTS): Add delete03.sh.
3572 * tests/delete03.sh: New file.
3574 * tests/genfile.c: Include print-copyr.h, not copysym.h.
3575 (main): Use print_copyright, not copyright_symbol.
3576 Include <argmatch.h>.
3577 (pattern_strings): Remove.
3578 (pattern_args, pattern_types): New constants.
3579 (main): Use XARGMATCH, not argmatch.
3581 2001-09-20 Jim Meyering <meyering@lucent.com>
3583 * lib/xstrtol.c (strtoimax): Guard declaration with
3584 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
3585 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
3586 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
3587 (strtoumax): Likewise, for completeness (it wasn't necessary).
3588 * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
3589 Check for declaration of strtoimax.
3590 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
3591 Check for declaration of strtoumax.
3593 2001-09-16 Paul Eggert <eggert@twinsun.com>
3595 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
3597 2001-09-14 Paul Eggert <eggert@twinsun.com>
3599 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
3601 * README-alpha: Describe automake patch.
3603 * configure.ac (LIBOBJS):
3604 Remove automake 1.4 workaround, as we're using 1.5 now.
3605 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
3607 * lib/copysym.c: Include stddef.h, for size_t.
3608 Include langinfo.h if needed.
3609 Use locale_charset only if USE_INCLUDED_LIBINTL;
3610 if not, use nl_langinfo (CODESET) if available.
3612 2001-09-13 Paul Eggert <eggert@twinsun.com>
3614 * config.guess, config.sub: Sync with canonical versions.
3616 * configure.ac (jm_PREREQ_XGETCWD): Add.
3618 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
3619 (libtar_a_SOURCES): Add copysym.c.
3620 * copysym.c, copysym.h: New files.
3622 * lib/error.c: Sync with fileutils version.
3624 * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
3625 * m4/getcwd.m4: New file.
3626 * m4/uintmax_t.m4: Remove.
3628 * m4/gettext.m4 (AM_WITH_NLS):
3629 Fix bug with calculating version of Bison 1.29.
3630 Reported by Karl Berry.
3632 * src/Makefile.am (datadir): Remove.
3634 * src/rmt.c: Include copysym.h.
3635 (main): Use copyright_symbol to translate copyright notice,
3637 * src/tar.c: Likewise.
3638 * tests/genfile.c: Likewise.
3640 * src/system.h (MB_LEN_MAX): New symbol.
3642 2001-09-11 Paul Eggert <eggert@twinsun.com>
3644 * src/extract.c (struct delayed_set_stat): New member
3646 (delay_set_stat): Initialize it to 0.
3647 (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
3648 taking an extra stat ourselves. All callers changed.
3649 (set_stat): Likewise.
3650 (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
3651 If false, stop when encountering a struct whose 'after_symlinks'
3652 member is true. Otherwise, go through all structures but check
3653 them more carefully. All callers changed.
3654 (extract_archive): When extracting a deferred symlink, if its parent
3655 directory's status needs fixing, then mark the directory as needing
3656 to be fixed after symlinks.
3657 (extract_finish): Fix status of ordinary directories, then apply
3658 delayed symlinks, then fix the status of directories that are
3659 ancestors of delayed symlinks.
3661 * src/rtapelib.c (rexec):
3662 Remove declaration; it ran afoul of prototypes on Crays.
3663 Reported by Wendy Palm of Cray.
3665 2001-09-06 Paul Eggert <eggert@twinsun.com>
3667 * lib/strtoimax.c (HAVE_LONG_LONG):
3668 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
3669 (strtoimax): Use sizeof (long), not
3670 sizeof strtol (ptr, endptr, base),
3671 to work around bug in IBM C compiler.
3673 2001-09-04 Paul Eggert <eggert@twinsun.com>
3675 * lib/xgetcwd.c: Include "xalloc.h".
3676 (xgetcwd): Do not return NULL when memory is exhausted; instead,
3677 report an error and exit.
3679 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
3680 (jm_PREREQ): Use it.
3682 2001-09-03 Paul Eggert <eggert@twinsun.com>
3684 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
3685 (jm_PREREQ_XGETCWD): New macro.
3687 * lib/exclude.c (fnmatch_no_wildcards):
3688 Fix typo that caused us to do case-folding
3689 search even when that was not desired. This occurred only in the
3692 * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
3693 Do not include xalloc.h.
3694 (INITIAL_BUFFER_SIZE): New symbol.
3695 Do not use xmalloc / xrealloc, since the caller is responsible for
3696 handling errors. Preserve errno around `free' during failure.
3697 Do not overrun buffer when using getwd.
3699 * lib/xgetcwd.c (xgetcwd):
3700 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
3701 to decide whether to use getcwd (NULL, 0).
3703 2001-09-02 Paul Eggert <eggert@twinsun.com>
3705 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
3707 2001-09-01 Jim Meyering <meyering@lucent.com>
3709 * exclude.c: Use `""', not `<>' to #include non-system header files.
3710 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
3711 and strncasecmp as r-values. Unixware didn't have declarations.
3713 2001-08-31 Jim Meyering <meyering@lucent.com>
3715 * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
3716 Use an initial, malloc'd, buffer of length 128 rather than
3717 a statically allocated one of length 1024.
3719 2001-08-30 Paul Eggert <eggert@twinsun.com>
3721 * lib/utime.c: Include full-write.h.
3722 * lib/xstrtol.c (strtoimax): New decl.
3724 2001-08-29 Paul Eggert <eggert@twinsun.com>
3726 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
3728 * src/create.c (dump_file): Relativize link names before dumping.
3729 This fixes a bug reported by Jose Pedro Oliveira.
3731 * src/create.c (dump_file): Use offsetof when computing sizes for
3732 struct hack; this avoids wasted space in some cases.
3733 * src/incremen.c (note_directory, find_directory): Likewise.
3734 * src/names.c (name_gather, addname): Likewise.
3736 * src/extract.c (extract_archive): Use strcpy, not memcpy,
3737 for consistency with other code that does similar things.
3738 * src/names.c (name_gather): Likewise.
3740 * src/names.c (read_name_from_file, name_next, name_gather,
3741 add_hierarchy_to_namelist): Avoid quadratic behavior when
3742 reallocating buffers. Check for buffer size overflow.
3743 (addname): Avoid unnecessary clearing of memory.
3745 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
3747 * src/extract.c (delay_set_stat): Fix off-by-one error in file
3748 name size allocation that caused core dumps.
3750 2001-08-28 Paul Eggert <eggert@twinsun.com>
3752 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
3754 * configure.ac (GNU_SOURCE): Define to 1, not /**/.
3755 (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
3756 (daddr_t): Remove; no longer used.
3757 (jm_PREREQ_HUMAN): Add.
3759 * acconfig.h: Remove; no longer needed.
3761 * config.guess, config.sub:
3762 New files, from automake 1.5. Gettext 0.10.39 needs them.
3763 * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
3765 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
3766 (SUBDIRS): Put intl before lib, as gettext requires.
3768 * ABOUT-NLS: Upgrade to gettext 0.10.39.
3769 * intl: Upgrade entire directory to gettext 0.10.39.
3770 * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
3771 New files, from gettext 0.10.39.
3772 * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
3773 Upgrade to gettext 0.10.39,
3774 * po/Makefile.in.in: Likewise, except fix a typo in its copying
3776 * po/cat-id-tbl.c, po/stamp-cat-id:
3777 Remove; no longer used by gettext 0.10.39.
3778 * po/ChangeLog: New file.
3780 * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
3781 $(srcdir)/tar.texi: Likewise.
3782 * doc/freemanuals.texi: New file.
3783 * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
3784 `fileds' -> `fields'
3785 * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
3787 * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
3788 (noinst_HEADERS): Add quote.h.
3789 (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
3791 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
3793 * lib/full-write.c, lib/savedir.c: Comment fix.
3795 * lib/pathmax.h: Remove.
3797 * lib/quote.c, lib/quote.h: New files.
3799 * lib/xgetcwd.c: Don't include pathmax.h.
3800 Include stdlib.h and unistd.h if available.
3802 (xmalloc, xstrdup, free): Remove decls.
3803 (xgetcwd): Don't assume sizes fit in unsigned.
3804 Check for overflow when computing sizes.
3805 Simplify reallocation code.
3807 * lib/xmalloc.c: Quote failure tests.
3809 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
3811 * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
3812 similar to strtol.c.
3813 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
3814 (verify): New macro.
3815 (strtoumax, uintmax_t, strtoull, strtol): Remove.
3816 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
3817 (strtoimax): Renamed from strtoumax. All uses of unsigned values
3818 changed to signed values. Check sizes at compile-time, not
3819 run-time. Prefer strtol to strtoll if both work.
3822 * lib/xstrtol.h (xstrtoimax): New decl.
3824 * m4/Makefile.am (EXTRA_DIST):
3825 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
3826 longlong.m4, xstrtoimax.m4.
3828 * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
3829 Remove; now done by autoconf.
3830 (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
3831 Use AC_CHECK_TYPE instead of merely looking for the header.
3833 * m4/uintmax_t.m4: Use shorter comment.
3835 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
3836 Quote first arg of AC_DEFUN.
3837 Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
3838 is needed to parse the include file.
3839 Simplify logic behind the args to AC_REPLACE.
3841 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
3843 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
3846 Use "Copyright %d" to simplify the translator's job in the future.
3847 Advise translator about circle-C.
3848 * src/tar.c: (decode_options): Likewise.
3849 * tests/genfile.c (main): Likewise.
3851 2001-08-28 Jim Meyering <meyering@lucent.com>
3853 * lib/argmatch.c: Include "quote.h".
3854 (argmatch_invalid): Quote the context.
3856 * lib/dirname.c (dir_name): Fix typo on PC platforms.
3858 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
3859 Use single-quote for local .h files.
3861 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
3863 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
3866 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
3867 invoking mktime the last time.
3869 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
3871 * lib/rename.c: Major rewrite by Volker Borchert to use system
3872 rename function, but to work around problems with trailing
3875 * lib/strtoll.c: New file, from glibc.
3876 * lib/strtoul.c: Update from glibc.
3878 * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
3879 Add support for signed numbers, too.
3880 (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
3882 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
3884 (strtoumax, uintmax_t, strtoull, strtoul): New macros.
3885 (main): Use generic names in debugging output.
3886 * lib/strtoimax.c: Plus add the following changes of my own:
3887 (main): Use accurate names in debugging output.
3889 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
3892 * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
3893 m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
3894 m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
3895 m4/utime.m4, m4/utimes.m4:
3896 Quote the first argument in each use of AC_DEFUN.
3898 * m4/getline.m4: Don't use string.h.
3900 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
3902 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
3904 2001-08-27 Paul Eggert <eggert@twinsun.com>
3906 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
3908 The biggest change is the new --exclude semantics and options.
3909 The basic idea was suggested by Gerhard Poul; thanks!
3911 * NEWS: Describe new --exclude semantics and options, and bug fixes.
3912 * README: ignfail.sh fails on some NFS hosts.
3913 * NEWS, README, lib/xstrtol.h: Add copyright notice.
3915 * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
3916 (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
3917 Remove; the automake bug has been fixed.
3918 * acinclude.m4: Remove.
3920 * configure.ac: Renamed from configure.in.
3921 (AC_PREREQ): Bump from 2.13 to 2.52.
3922 (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
3923 1997-05-30) has an encoding error.
3924 (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
3925 (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
3927 * doc/fdl.texi: Update to current GNU version.
3929 * doc/tar.texi: Put leading '*' in direntry.
3930 Accommodate new gfdl sectioning.
3931 New option --recursion (the default) that is the inverse of
3934 New options --anchored, --ignore-case, --wildcards,
3935 --wildcards-match-slash, and their negations (e.g., --no-anchored).
3936 Along with --recursion and --no-recursion, these control how exclude
3937 patterns are interpreted. The default interpretation of exclude
3938 patterns is now --no-anchored --no-ignore-case --recursion
3939 --wildcards --wildcards-match-slash.
3941 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
3943 * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
3944 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
3945 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
3946 Include if available.
3947 (<xalloc.h>): Include
3948 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
3949 (verify): New macro. Use it to verify that EXCLUDE macros do not
3950 collide with FNM macros.
3951 (struct patopts): New struct.
3952 (struct exclude): Use it, as exclude patterns now come with options.
3953 (new_exclude): Support above changes.
3954 (new_exclude, add_exclude_file):
3955 Initial size must now be a power of two to simplify overflow checking.
3956 (free_exclude, fnmatch_no_wildcards): New function.
3957 (excluded_filename): No longer requires options arg, as the options
3958 are determined by add_exclude. Now returns bool, not int.
3959 (excluded_filename, add_exclude):
3960 Add support for the fancy new exclusion options.
3961 (add_exclude, add_exclude_file): Now takes int options arg.
3962 Check for arithmetic overflow when computing sizes.
3963 (add_exclude_file): xrealloc might modify errno, so don't
3964 realloc until after errno might be used.
3966 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
3968 (free_exclude): New decl.
3969 (add_exclude, add_exclude_file): Now takes int options arg.
3970 (excluded_filename): No longer requires options arg, as the options
3971 are determined by add_exclude. Now returns bool, not int.
3973 * lib/prepargs.c: Include <string.h>; required for C99 since
3977 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
3979 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
3980 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
3982 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
3983 Remove inttypes_h.m4, largefile.m4, mktime.m4.
3985 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
3986 subsumed by Autoconf 2.50.
3988 * m4/error.m4: Upgrade to serial 2.
3990 * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
3991 remove test for GNU C library. It's not correct, as some
3992 older glibcs are buggy.
3994 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
3996 * m4/prereq.m4: Upgrade to serial 20, but then:
3997 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
3998 (jm_PREREQ_EXCLUDE): New macro.
3999 (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
4002 * m4/realloc.m4: Upgrade to serial 4.
4004 * m4/strerror_r.m4: Revert to serial 1002.
4006 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
4008 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
4010 * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
4011 (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
4012 it is now subsumed by autoconf. Add inttypes.h.
4014 * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4015 po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
4017 * src/buffer.c (new_volume): Stop if the script exits with an error.
4019 * src/common.h (excluded_with_slash, excluded_without_slash):
4020 Remove, replacing by:
4021 (excluded): New decl.
4022 (link_error): New decl.
4023 (excluded_name): Now returns bool.
4026 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
4027 Support hard links to symbolic links.
4029 (struct delayed_symlink): Remove 'names' member, replacing it with
4030 'sources' and 'target' member. All uses changed.
4032 (struct string_list): New type.
4034 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
4035 for struct hack; this avoids wasted space in some cases.
4037 (extract_archive): Fix test for absolute pathnames and/or "..".
4038 Use link_error to report errors for links.
4039 Remove redundant trailing '/' at "really_dir", for all uses, not
4040 just before invoking mkdir.
4041 If overwriting old files, do not worry so much about existing
4043 Fix mode computation in the case where the directory exists.
4045 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
4046 link, make a copy of the symbolic link.
4048 * src/incremen.c (get_directory_contents):
4049 If ignore_failed_read_option, only warn about
4052 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
4053 However, check for error even for '-' or '+' case.
4055 (print_header): Try parsing uids and gids as unsigned integers first,
4056 and as a uid_t or gid_t only if that fails. This adds support for
4057 listing positive uids and gids that are greater than UID_MAX and
4060 * src/misc.c (link_error): New function.
4062 * src/names.c (collect_and_sort_names):
4063 If ignore_failed_read_option, only warn about
4066 (excluded_name): Now returns bool. Simplify, as the fancy
4067 features are now all in excluded_filename.
4069 * src/rtapelib.c (base_name): Remove decl, as system.h now
4072 * src/system.h: Include stddef.h if available.
4073 (offsetof): Declare if stddef.h doesn't.
4075 Include <dirname.h>.
4076 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
4078 * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
4079 NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
4080 NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
4081 WILDCARDS_MATCH_SLASH_OPTION):
4084 (long_options, usage, decode_options): Add support for --anchored,
4085 --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
4086 --no-wildcards-match-slash, --recursion, --wildcards,
4087 --wildcards-match-slash.
4089 (decode_options): Implement the new way of interpreting exclude
4092 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
4094 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
4095 just print error messages suggesting alternatives.
4097 (add_filtered_exclude): Remove.
4099 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
4101 * tests/extrac04.sh (out): Remove
4102 directory/subdirectory/file1, as the new semantics for
4103 --exclude exclude it.
4105 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
4107 2001-08-12 Paul Eggert <eggert@twinsun.com>
4109 * lib/addext.c (<errno.h>): Include.
4110 (errno): Declare if not defined.
4111 (addext): Work correctly on the Hurd, where pathconf returns -1 and
4112 leaves errno alone, because there is no limit. Also, work even if
4113 size_t is narrower than long.
4115 2001-07-08 Paul Eggert <eggert@twinsun.com>
4117 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
4119 2001-05-10 Paul Eggert <eggert@twinsun.com>
4121 * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
4122 Include <backupfile.h> and <dirname.h> after size_t is defined.
4123 (addext): Use base_len to trim redundant trailing slashes instead of
4126 * lib/backupfile.c (ISSLASH, base_name):
4127 Remove decls; now in dirname.h.
4128 Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
4130 (find_backup_file_name): Rename locals to avoid new functions.
4131 Use base_len instead of rolling it ourselves.
4132 Work even if dirlen is 0.
4133 Use a dir of '.' if given the empty string.
4136 Do not include <stdio.h>, <assert.h>; no longer needed.
4137 (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
4138 Include <string.h>, <dirname.h>.
4139 (base_name): Allow file names ending in slashes, other than names
4140 that are all slashes. In this case, return the basename followed
4143 * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
4144 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
4145 (dir_len): Renamed from dirlen.
4146 All callers changed.
4148 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
4150 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
4152 2001-02-16 Paul Eggert <eggert@twinsun.com>
4154 * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
4155 Do not declare or define if HAVE_MBRTOWC,
4156 since the test for HAVE_MBRTOWC now requires proper declarations.
4158 * lib/alloca.c (malloc): Undef before defining.
4160 2001-02-13 Paul Eggert <eggert@twinsun.com>
4162 * src/compare.c (read_and_process): Use off_t for size.
4163 From Maciej W. Rozycki.
4165 2001-01-26 Paul Eggert <eggert@twinsun.com>
4167 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
4169 2001-01-12 Paul Eggert <eggert@twinsun.com>
4171 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
4173 * lib/savedir.h (savedir): Remove size arg.
4175 * doc/tar.texi: Add @setchapternewpage odd.
4176 Remove -I as an alias for -T, for now.
4178 Update copyright. Remove "Published by".
4179 Dates beginning with / or . are taken to be file names.
4181 * src/tar.c (<time.h>): Do not include;
4182 (time): Do not declare.
4183 (usage): Remove -I as an alias for -T.
4184 (OPTION_STRING): Remove -I.
4185 (decode_options): Dates that look like an absolute path name,
4186 or that start with '.', are presumed to be file names whose
4188 Remove 'I' as an aliase for 'T'.
4191 * src/extract.c (<time.h>): Do not include; system.h now does this.
4192 (make_directories): Skip filesystem prefixes.
4193 Don't assume '/' is the only separator.
4194 (extract_sparse_file): Use new full_write semantics.
4195 On write error, return instead of invoking skip_file.
4196 Do not free sparsearray; caller does this now.
4197 (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
4199 (extract_archive): Don't assume file name lengths fit in int.
4200 Report what got stripped from member name; it might be more than '/'.
4201 Use new full_write semantics.
4202 Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
4204 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
4206 * src/buffer.c (<time.h>): Do not include; system.h now does this.
4207 (time): Remove decl; likewise.
4208 (child_open_for_uncompress): Use new full_write semantics.
4209 (flush_write): Use ISSLASH instead of testing for '/'.
4210 (flush_read): Likewise.
4212 * src/rmt.h (_remdev): Look for / anywhere in Path.
4214 * src/misc.c (contains_dot_dot): Skip filesystem prefix.
4215 Don't assume '/' is the only separator.
4216 (safer_rmdir): Don't assume '/' is the only separator.
4218 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
4220 * lib/dirname.h (dirlen): New decl.
4222 * src/incremen.c (get_directory_contents):
4223 Remove path_size arg; all callers changed.
4224 Don't assume '/' is the only directory separator.
4225 (gnu_restore): Work even if file name length doesn't fit in int.
4227 * lib/addext.c (ISSLASH): New macro.
4228 (addext): Trim any redundant trailing slashes.
4230 * src/names.c (name_next):
4231 Don't assume '/' is the only directory separator.
4232 (namelist_match): Likewise.
4233 (add_hierarchy_to_namelist): Remove dirsize arg.
4234 Do not assume '/' is the only directory separator.
4235 (new_name): Likewise.
4237 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
4238 (libtar_a_SOURCES): Add dirname.c.
4240 * src/create.c (relativize):
4241 New function, with much of old start_header's guts.
4242 Handle filesystem prefixes.
4243 (start_header): Use this new function.
4244 (init_sparsearray): Don't bother to zero out the new array;
4246 (deal_with_sparse): Fix array allocation bug.
4247 (create_archive): Don't assume '/' is the only separator.
4248 (dump_file): Likewise.
4249 Don't worry about leading / in symlink targets.
4251 * lib/savedir.c (savedir):
4252 Remove size arg; it wasn't portable. All callers changed.
4254 * lib/utime.c (utime_null): Adjust to new full_write convention.
4256 * configure.in (YACC): Avoid portability problem with Ultrix sh.
4258 * lib/backupfile.c: Include <dirname.h>.
4259 (ISSLASH): New macro.
4260 (find_backup_file_name): Use dirlen to calculate directory lengths.
4261 (max_backup_version): Strip redundant trailing slashes.
4263 * src/common.h: Include <full-write.h>.
4264 (get_directory_contents): No longer has size arg.
4265 (gnu_restore): Arg is size_t, not int.
4267 * src/system.h: Include <time.h>.
4268 (time): Declare if not defined.
4270 * lib/full-write.c: Include full-write.h, not safe-read.h.
4271 full_write returns size_t, with short writes meaning failure.
4272 All callers changed.
4274 * src/rtapelib.c: Include full-write.h.
4276 * src/rmt.c: Include full-write.h.
4277 (main): Update copyright.
4279 * doc/getdate.texi: Mention that only English is supported.
4280 Show how to use "date" so that the output is acceptable to getdate.
4281 Mention Z as an abbreviation for UTC.
4283 * lib/full-write.h: New file.
4285 * src/list.c: system.h now does time.h stuff.
4288 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
4290 Do not include string.h, strings.h, or assert.h; no longer needed.
4291 (strrchr, memrchr, malloc): Remove decls; no longer needed.
4293 (base_name): New decl.
4294 (BACKSLASH_IS_PATH_SEPARATOR): Remove.
4295 (dir_name_r): Remove.
4296 (dirlen): New function.
4297 (dir_name): Use dirlen instead of dir_name_r.
4298 (<string.h>, <strings.h>): Include only if test program.
4299 (main): Use "return 0", not "exit (0)".
4301 2000-12-08 Paul Eggert <eggert@twinsun.com>
4303 * lib/dirname.h: New file.
4305 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
4307 * lib/fnmatch.c: Do not comment out all the code if we are using
4308 the GNU C library, because in some cases we are replacing buggy
4309 code in the GNU C library itself.
4311 2000-10-30 Paul Eggert <eggert@twinsun.com>
4313 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
4315 2000-10-29 Paul Eggert <eggert@twinsun.com>
4317 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
4319 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
4321 2000-10-28 Paul Eggert <eggert@twinsun.com>
4323 * doc/tar.texi: --no-recursion now applies to extraction, too.
4324 * src/create.c (dump_file): no_recurse_option -> ! recursion_option
4325 * src/names.c (namelist_match, excluded_name):
4326 Do not match subfiles of a directory
4327 if --no-recursion is specified.
4328 * src/tar.c (NO_RECURSE_OPTION): Remove.
4329 (long_options): Have getopt set the --no-recursion flag.
4330 (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
4331 Remove case for NO_RECURSE_OPTION.
4332 * src/common.h (recursion_option):
4333 Renamed from no_recurse_option, with sense
4334 negated, and with FNM_LEADING_DIR being the nonzero value.
4336 * names.c (namelist_match): New function.
4337 (name_match, name_scan): Use it to eliminate duplicate code.
4338 (names_notfound): Remove special case for Amiga.
4340 2000-10-27 Paul Eggert <eggert@twinsun.com>
4342 * src/misc.c (read_error_details, read_warn_details,
4343 read_fatal_details): Don't assume size_t is unsigned long.
4345 * src/buffer.c (flush_read): If read_full_records_option, try to
4346 fill the input buffer, as --delete -f - needs this.
4348 2000-10-24 Paul Eggert <eggert@twinsun.com>
4350 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
4352 * src/buffer.c (check_label_pattern):
4353 Make sure header name is a string before
4354 passing it to fnmatch.
4355 (init_volume_number): Check for global_volno overflow.
4356 (new_volume): Check for global_volno overflow.
4358 * src/tar.c (decode_options):
4359 Check that volume label is not too long to overflow
4360 name in tar header block.
4362 * Makefile.am (EXTRA_DIST): Remove rebox.el.
4364 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
4365 (AC_FUNC_STRERROR_R): Use this instead.
4367 2000-10-23 Paul Eggert <eggert@twinsun.com>
4369 * src/extract.c: Include <time.h>, since we invoke "time".
4371 * lib/prepargs.c (prepend_default_options):
4372 Don't use NULL, for portability.
4374 * m4/fnmatch.m4: Add "working" to message.
4376 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
4378 (getpwuid, getgrgid): Declare only if system headers don't.
4379 (gid_to_gname): Don't invoke setgrent.
4380 (namelist): Now static, not global.
4381 (nametail): New var. All uses of namelast changed to use
4382 nametail, with one extra level of indirection.
4383 (name_gather): Use memcpy instead of strncpy + assignment of NUL.
4384 (name_match): Set nametail too, when setting namelist to null.
4385 (add_hierarchy_to_namelist): Change type of dir arg from char * to
4386 struct name *, so that we don't have to look up the name again
4387 here. Get change_dir from dir rather than as a separate arg. Add
4388 dirsize arg, and pass it along to get_directory_contents. Remove
4389 unnecessary check of directory type.
4390 (new_name): Do not append a slash if PATH already ends in one.
4391 (avoided_names, struct avoided_name): Remove.
4392 (avoided_name_table): New var, replacing avoided_names.
4393 (hash_avoided_name, compare_avoided_names): New function.
4394 (add_avoided_name, is_avoided_name): Use hash table rather than
4397 * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
4398 (child_open_for_compress, child_open_for_uncompress,
4399 close_archive): Propagate any failure of the compression process
4401 (open_archive, flush_write, flush_read, close_archive): Do not
4402 allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
4403 -1. Instead, allocate an array with the size that's needed.
4404 (open_archive): Don't bother checking S_ISCHR of /dev/null.
4405 (backspace_output): Don't try to backspace past start of archive.
4406 (close_archive): Remove special case for DELETE_SUBCOMMAND.
4408 * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
4409 DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
4410 HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
4411 HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
4412 PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
4413 WITH_DMALLOC, WITH_REGEX):
4414 Remove; now generated automatically.
4416 * configure.in (_GNU_SOURCE): Define to empty, not 1, for
4417 compatibility for glibc fragments.
4418 (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
4419 HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
4420 DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
4421 that we needn't put an entry into acconfig.h.
4422 (ALL_LINGUAS): Add da.
4423 (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
4424 (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
4426 (AC_MBSTATE_T): Add.
4427 (RMT): Append $(EXEEXT).
4428 (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
4429 (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
4430 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
4431 HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
4432 (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
4433 (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
4434 (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
4435 Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
4436 (EMUL_OPEN3): Remove; no longer needed.
4437 (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
4439 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
4441 * src/common.h: Do not include basename.h.
4442 * src/rtapelib.c (base_name): Do not include basename.h;
4443 declare base_name instead.
4445 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
4447 * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
4448 lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
4449 * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
4450 Adjust to the above changes.
4452 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
4454 * src/open3.c: Remove.
4456 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
4457 (tar_SOURCES): Remove open3.c.
4458 (INCLUDES): Remove -I.., as automake does that.
4459 (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
4461 The following changes are to put LOCALEDIR into localedir.h instead
4462 of passing it on the command line.
4464 (DISTCLEANFILES): New macro.
4465 (localedir.h): New rule.
4466 (rmt.o tar.o): Now depend on localedir.h.
4468 * tests/delete02.sh, tests/extrac04.sh: New files.
4470 * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
4471 (TESTS): Add extrac04.sh, and restore delete02.sh.
4472 (DEFS): Remove; LOCALEDIR is now done via localedir.h.
4473 (INCLUDES): Remove -I.. as automake does this now.
4475 * src/rtapelib.c (rexec): Don't declare unless using it.
4476 (do_command): Simplify signal-handling code slightly.
4478 * src/delete.c (blocks_needed): Remove. All uses changed to use
4479 blocking_factor - new_blocks.
4480 (acting_as_filter): New var.
4481 (write_record, delete_archive_members): Use acting_as_filter
4482 rather than archive == STDIN_FILENO to detect whether we're acting
4483 as a filter, as open can return STDIN_FILENO in some cases.
4484 (delete_archive_members): Ignore zero blocks if
4485 ignore_zeros_option is nonzero. Fix bug that messed up last
4486 output block: write_eot can't be used here, as it gets confused
4487 when the input is at end of file.
4489 * src/compare.c (diff_archive): Do not impose an arbitrary limit on
4490 symbolic link contents length. Pass directory size to
4491 get_directory_contents.
4493 * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
4494 m4/strerror_r.m4: New files.
4495 * m4/signedchar.m4: Remove this file.
4496 * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
4497 * m4/Makefile.am (EXTRA_DIST): Likewise.
4499 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
4501 * po/da.po: New translation file.
4503 * src/mangle.c (extract_mangle):
4504 Fix diagnostic with wrong number of %s'es.
4506 * lib/fnmatch.c (fnmatch):
4507 Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
4508 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
4510 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
4511 fall off a device's end. Detect this.
4513 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
4515 (open): Remove macro; we no longer support EMUL_OPEN3. Do not
4516 include <pathmax.h> and directory include files like <dirent.h>;
4517 no longer used. Include <savedir.h> instead.
4518 (closedir, signed_char): remove macro; no longer used.
4519 (bool, false, true): Include <stdbool.h> if you have the include
4520 file, otherwise define.
4523 (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
4524 opendir_warn, readdir_error): Remove; no longer needed.
4525 (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
4526 before deciding whether we're trying to remove ".".
4527 (remove_any_file): Try unlink first if we are not root. Use
4528 savedir when recursively removing directories, to avoid exhausting
4530 (savedir_error, savedir_warn, symlink_error): New functions.
4532 * src/list.c: (read_and): Do not invoke
4533 apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
4534 responsible for that. Do not invoke apply_delayed_set_stat; our
4535 caller is now responsible for that.
4536 (read_header): Use signed char instead of signed_char. Prevent
4537 later references to current_header from mistakenly treating it as
4539 (from_header): Quote invalid base-64 strings in diagnostics.
4540 (time_from_header): Do not warn about future timestamps in
4541 archive; check_time now does that.
4542 (print_header): Quote unknown file types.
4543 (skip_member): New function, replacing skip_extended_headers and
4544 now skipping the whole member instead of just the extended
4545 headers. All callers changed. This makes the code handle
4546 extended headers uniformly, and fixes some bugs.
4548 * src/update.c (update_archive): Use skip_member.
4550 * src/extract.c (we_are_root): Now global.
4551 (struct delayed_symlink): New type.
4552 (delayed_symlink_head): New var.
4553 (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
4554 not apply_delayed_set_stat.
4555 (set_mode, set_stat): Pointer args are now const pointers.
4556 (check_time): New function.
4557 (set_stat): Warn if setting a file's timestamp to be the future.
4558 (make_directories): Do not save and restore errno.
4559 (maybe_recoverable): Set errno to ENOENT if we cannot make missing
4560 intermediate directories.
4561 (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
4562 not in caller. Extract potentially dangerous symbolic links more
4563 carefully, deferring their creation until the end, and using a
4564 regular file placeholder in the meantime. Do not remove trailing
4565 / and /. from file names. Do not bother checking for ".." when
4566 checking whether a directory loops back on itself, as loopbacks
4567 can occur with symlinks too. Also, in that case, do not bother
4568 saving and restoring errno; just set it to EEXIST.
4569 (apply_nonancestor_delayed_set_stat): A prefix is a potential
4570 ancestor if it ends in slash too (as well as ending in a char just
4572 (apply_delayed_set_stat): Remove.
4573 (apply_delayed_symlinks, extract_finish): New functions.
4575 * doc/fdl.texi: New file.
4576 * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
4577 ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
4578 * doc/tar.texi: Add Free Documentation License. New section
4579 "Overwrite Old Files", and revamp that section to make it easier to
4580 follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
4581 documentation into getdate.texi. Fix several minor typos. Describe
4582 TAR_OPTIONS. Describe incompatibility between incremental backups and
4583 --atime-preserve. Describe incompatibility between --verify and other
4584 options. Mention that tar normally removes symbolic links rather than
4585 following them, when extracting a file of the same name.
4587 * THANKS: Add gpoul. Change skip's address.
4589 * po/POTFILES.in: Add lib/human.c.
4591 * src/common.h (namelist, namelast): Remove decls.
4592 (we_are_root, extract_finish, skip_member, savedir_error,
4593 savedir_warn, symlink_error, gnu_list_name): New decls.
4594 (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
4595 skip_extended_headers, is_dot_or_dotdot, closedir_error,
4596 closedir_warn, opendir_error, opendir_warn, readdir_error,
4597 readdir_warn): Remove decls.
4598 (get_directory_contents): New off_t arg.
4599 (addname): Now returns struct name *.
4601 * src/tar.h, tests/genfile.c: Fix comments.
4603 * src/create.c: Include hash.h.
4604 (gnu_list_name): Remove decl.
4605 (struct link): Remove "next" member.
4607 (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
4608 consistency with other diagnostics.
4609 (deal_with_sparse): Check for I/O error when closing the file.
4610 (create_archive): Do not allocate an array of size PATH_MAX, as
4611 PATH_MAX might be (size_t) -1. Instead, allocate an array with
4612 the size that's needed.
4613 (hash_link, compare_links): New functions.
4614 (dump_file): Do not exhaust open file descriptors when descending
4615 deeply into a directory, by using savedir rather than
4616 opendir/readdir. Do not zero-fill the name buffer unnecessarily.
4617 Hash the set of links already created, instead of using a linked
4618 list. Fix some bugs in outputting sparse files which caused the
4619 sparse tables to be incorrect. When a file unexpectedly shrinks,
4620 output zeros rather than garbage. Do not allocate an array of
4621 size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
4622 allocate an array with the size that's needed.
4624 * src/incremen.c: Include hash.h.
4625 (struct directory): Remove "next", "dir_text". Change "name" to
4626 be char[1] with struct hack, not const char *. Add "found".
4627 (directory_list): Remove. Replaced by directory_table.
4628 (directory_table): New var.
4629 (nfs_string): Renamed from nfs.
4630 (hash_directory, compare_directories): New functions.
4631 (note_directory): Now returns struct directory *. First arg is
4632 now const pointer. struct stat arg is now dev_t, ino_t, nfs.
4633 Remove text arg. New "found" arg, basically corresponding to the
4634 old text arg not being null. All callers changed.
4635 (note_directory, find_directory): Use hash table rather than
4637 (get_directory_contents): New arg "device". Use savedir to do the
4638 hard work. Save the nfs-ness of stat_data, since it might change
4639 under us. Use note_directory instead of find_directory to save
4640 some work. When adding an "A" record, do it with
4641 add_to_accumulator instead of cheating with strcat.
4642 (read_directory_file): Use "+" flag before device to indicate
4643 whether it was NFS. Fix typo in checking for strtoul error.
4644 (write_directory_file_entry): New function.
4645 (write_directory_file): Use it, and use the hash routines to
4646 traverse the directory table.
4647 (gnu_restore): Use savedir rather than opendir/readdir.
4649 * src/tar.c: Include localedir.h, prepargs.h.
4650 (long_options): Now static.
4651 (long_options, usage, decode_options): -j is now short for
4652 --bzip2, and -I is now an alias for -T.
4653 (decode_options, main): argv is not const pointer now.
4654 (decode_options): Invoke prepend_default_options to support
4655 TAR_OPTIONS. In diagnostic, mention the string that was the
4656 invalid blocking factor, tape length, group, owner, or record
4657 size. --delete is no longer incompatible with -f -, undoing
4659 (main): Invoke extract_finish at end of extraction.
4661 * src/rmt.c: Include localedir.h.
4662 (main): Update copyright date to 2000.
4664 * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
4665 following changes: Use @sc where appropriate. Document the ranges of
4666 supported times more precisely. Add Eggert to getdate authors.
4667 Document old Latin 12m/12pm tradition. Remove list of alphabetic time
4668 zone names, as it wasn't correct and people shouldn't be relying on it
4669 anyway. Relative items also account for non-DST adjustments. Fix
4672 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
4674 * tests/ignfail.sh: opendir -> savedir in diagnostics.
4676 * tests/preset.in: Set LANGUAGE to the empty string, for some
4679 2000-10-20 Paul Eggert <eggert@twinsun.com>
4681 * m4/fnmatch.m4: Mention the GNU C library.
4683 2000-10-19 Paul Eggert <eggert@twinsun.com>
4685 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
4688 2000-10-17 Paul Eggert <eggert@twinsun.com>
4690 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
4693 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
4694 (CHAR_BIT): Define if not defined.
4696 2000-09-09 Paul Eggert <eggert@twinsun.com>
4698 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
4700 2000-08-07 Paul Eggert <eggert@twinsun.com>
4702 * lib/xmalloc.c: Memory exhausted -> memory exhausted
4704 * lib/xalloc.h (xalloc_msg_memory_exhausted):
4705 change to array from char *.
4707 2000-08-06 Paul Eggert <eggert@twinsun.com>
4709 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
4710 compatibility with glibc 2.1.3 strftime.c.
4712 2000-07-31 Paul Eggert <eggert@twinsun.com>
4714 * lib/quotearg.c (quotearg_n_options):
4715 Don't make the initial slot vector a constant,
4716 since it might get modified.
4718 * lib/quotearg.c: Add support for more than one preallocated slot.
4720 2000-07-30 Paul Eggert <eggert@twinsun.com>
4722 * lib/quotearg.c (quotearg_n_options):
4723 Preallocate a slot 0 buffer, so that the caller
4724 can always quote one small component of a "memory exhausted" message
4727 2000-07-23 Paul Eggert <eggert@twinsun.com>
4730 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
4731 mbstate_t is always defined.
4733 Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
4734 some GCC installations, and this configuration error is likely to be
4737 2000-07-22 Paul Eggert <eggert@twinsun.com>
4740 When the system forces us to redefine mbstate_t, shadow its mbsinit
4741 function. From Bruno Haible.
4743 2000-07-14 Paul Eggert <eggert@twinsun.com>
4745 * lib/xmalloc.c: Simplify exhausted message.
4747 * lib/quotearg.h: Update copyright date; from Jim Meyering.
4749 2000-07-13 Paul Eggert <eggert@twinsun.com>
4751 * lib/quotearg.h (enum quoting style):
4752 New constant clocale_quoting_style.
4755 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
4756 Add support for clocale_quoting_style, undoing previous change to
4757 locale_quoting_style.
4759 2000-07-10 Paul Eggert <eggert@twinsun.com>
4762 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
4763 since otherwise we don't need it.
4764 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
4765 since we don't do multibytes in that case.
4766 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
4767 invoke multibyte primitives.
4769 * m4/mbstate_t.m4 (AC_MBSTATE_T):
4770 Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
4771 Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
4772 and mbstate_t, to a single-part test that simply defines mbstate_t.
4774 * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
4775 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
4776 to decide whether to define the BeOS workaround macro;
4777 this adjusts to the change to AC_MBSTATE_T.
4779 * m4/strerror_r.m4: New file.
4781 2000-07-05 Paul Eggert <eggert@twinsun.com>
4783 * lib/quotearg.c: Use double-quote to quote.
4785 * lib/quotearg.c (N_): New macro.
4786 (gettext_default): New function.
4787 (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
4788 "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
4791 * lib/quotearg.c (struct quoting_options):
4792 Simplify quote_these_too dimension.
4793 From Bruno Haible <haible@clisp.cons.org>.
4795 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
4796 Test for mbstate_t only if the test
4797 for an object-type mbstate_t fails.
4799 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
4801 2000-07-03 Paul Eggert <eggert@twinsun.com>
4803 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
4804 Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
4806 * lib/quotearg.c (mbrtowc):
4807 Assign to *pwc, and return 1 only if result is nonzero.
4808 (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
4810 2000-07-02 Paul Eggert <eggert@twinsun.com>
4812 * lib/quotearg.c (mbstate_t):
4813 Do not define; it should be defined with AC_CHECK_TYPE.
4815 2000-06-26 Paul Eggert <eggert@twinsun.com>
4817 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
4818 a bug in glibc 2.1.3.
4820 * lib/xmalloc.c: Fix inaccurate comment for xrealloc.
4822 2000-06-19 Paul Eggert <eggert@twinsun.com>
4824 * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
4825 inclusion of wctype.h to work around solaris2.6 namespace pollution.
4826 (ISPRINT): Likewise.
4827 Reported by Tom Tromey.
4829 2000-06-15 Paul Eggert <eggert@twinsun.com>
4831 * lib/human.c (adjust_value): New function.
4832 (human_readable_inexact): Apply rounding style even when printing
4835 * lib/human.c: Avoid shadowing warnings.
4838 2000-06-14 Paul Eggert <eggert@twinsun.com>
4840 * lib/human.c (human_readable_inexact): Allow an input block size
4841 that is not a multiple of the output block size, and vice versa.
4843 * lib/getdate.y (get_date): Apply relative times after time zone
4844 indicator, not before.
4846 2000-05-31 Paul Eggert <eggert@twinsun.com>
4848 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
4849 and thus don't need AC_CANONICAL_HOST.
4851 (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
4852 (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
4853 (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
4854 CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
4855 changed. Instead of inspecting the output of getconf, try to
4856 compile the test program without and with the macro definition.
4857 (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
4858 getconf. Instead, check for the needed flags by compiling test
4861 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
4863 * config.guess, config.sub: Remove these files, for similar reasons.
4865 2000-05-03 Paul Eggert <eggert@twinsun.com>
4867 * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
4868 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
4869 bug. This avoids a clash when files like regex.c that define
4872 2000-05-02 Paul Eggert <eggert@twinsun.com>
4874 * m4/largefile.m4 (AC_SYS_LARGEFILE):
4875 Define _GNU_SOURCE if this is needed to make
4876 ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
4877 inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
4879 * lib/quotearg.c (mbrtowc, mbstat_t):
4880 Add definitions if !HAVE_MBSTATE_T_OBJECT.
4881 (<wctype.h>): Include if HAVE_WCTYPE_H.
4882 (iswprint): Define to 1 if we lack it
4884 2000-04-18 Paul Eggert <eggert@twinsun.com>
4886 * m4/mbstate_t.m4: New file.
4888 2000-04-17 Bruno Haible <haible@clisp.cons.org>
4890 * tests/ignfail.sh: Test for uid 0 along with user "root".
4892 2000-04-05 Paul Eggert <eggert@twinsun.com>
4894 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
4895 Don't use -n32 on IRIX if the installer said
4898 2000-02-28 Paul Eggert <eggert@twinsun.com>
4900 * lib/quotearg.c (ALERT_CHAR): New macro.
4901 (quotearg_buffer_restyled): Use it.
4903 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4905 * src/list.c (tartime): Fix off-by-one error when copying year if
4908 2000-02-18 Paul Eggert <eggert@twinsun.com>
4910 * lib/getdate.y: Handle two-digit years with leading zeros correctly.
4911 (textint): New typedef.
4912 (parser_control): Changed from struct parser_control to typedef
4913 (for consistency). Member year changed from int to textint. All
4915 (YYSTYPE): Removed; replaced by %union with int and textint
4917 (tID): Removed; not used.
4918 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
4919 tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
4920 tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
4921 (tSNUMBER, tUNUMBER): Now of type <textintval>.
4922 (date, number, to_year): Use width of number in digits, not its
4923 value, to determine whether it's a 2-digit year, or a 2-digit
4925 (yylex): Store number of digits of numeric tokens. Return '?' for
4926 unknown identifiers, rather than (unused) tID.
4928 2000-01-16 Paul Eggert <eggert@twinsun.com>
4930 * lib/quotearg.c (quotearg_buffer_restyled):
4931 Do not quote alert, backslash, formfeed,
4932 and vertical tab unnecessarily in shell quoting style.
4934 2000-01-15 Paul Eggert <eggert@twinsun.com>
4937 Change quoting to be compatible with future autoconf versions.
4939 2000-01-11 Paul Eggert <eggert@twinsun.com>
4941 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
4943 2000-01-07 Paul Eggert <eggert@twinsun.com>
4945 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
4947 Fix bug with fnmatch.h dependency, as follows:
4948 * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
4949 * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
4951 * src/common.h (apply_nonancestor_delayed_set_stat):
4952 Renamed from apply_delayed_set_stat.
4953 (apply_delayed_set_stat, decode_mode, chmod_error_details,
4954 chown_error_details, close_warn, closedir_warn, mkdir_error,
4955 read_error_details, read_fatal_details, read_warn_details,
4956 seek_error_details, seek_warn_details, utime_error,
4957 write_error_details, write_fatal_details): New decls.
4959 Make diagnostic messages more regular.
4960 * src/create.c (dump_file): Quote file names with colons if possible.
4961 * src/compare.c (diff_archive): Likewise.
4962 * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
4963 * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
4964 * src/mangle.c (extract_mangle): Likewise.
4965 * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
4967 * src/buffer.c (archive_write_error, flush_archive, close_archive,
4968 new_volume, xclose):
4969 Use error message functions to report errors consistently.
4970 * src/compare.c (diff_sparse_files, diff_archive): Likewise.
4971 * src/create.c (finish_sparse_file, dump_file): Likewise.
4972 * src/extract.c (set_mode, set_stat, extract_sparse_file,
4973 extract_archive): Likewise.
4974 * src/list.c (list_archive): Likewise.
4975 * src/update.c (append_file): Likewise.
4976 * src/compare.c (diff_init, diff_sparse_files):
4977 Use xalloc_die to report memory exhaustion.
4978 * src/incremen.c (gnu_restore): Likewise.
4979 * src/list.c (read_header): Likewise.
4980 * src/mangle.c (extract_mangle): Likewise.
4981 * src/misc.c (maybe_backup_file): Likewise.
4982 * src/tar.c (decode_options): Likewise.
4983 * src/compare.c (read_and_process, fill_in_sparse_array,
4985 Use consistent terminology for unexpected-EOF message.
4986 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
4987 * src/list.c (list_archive, read_header, skip_file,
4988 skip_extended_headers): Likewise.
4989 * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
4990 (xdup2): Regularize messages with rest of tar.
4992 * src/buffer.c (flush_read): Don't read past EOF.
4994 * src/extract.c (extr_init):
4995 If we run out of memory, invoke apply_delayed_set_stat.
4996 (prepare_to_extract): Don't complain if we can't remove ".".
4997 (apply_delayed_set_stat): New function.
4998 (apply_nonancestor_delayed_set_stat):
4999 Renamed from apply_delayed_set_stat. All uses changed.
5000 Don't remove head if it doesn't apply.
5002 * src/create.c (find_new_file_size):
5003 Return size instead of storing through pointer.
5004 All callers changed.
5005 (deal_with_sparse): Don't keep reading after read errors.
5006 (finish_sparse_file): Just abort if there is an internal error.
5007 (dump_file): Fix typo: stat_warn and stat_error were interchanged.
5008 Don't restore access times on directories during incremental dumps
5009 until after dealing with the directory.
5010 If ignoring failed reads, count closedir, read, and unknown
5011 file errors as warnings, not errors.
5012 Fix buffer overrun problem when dumping sparse files.
5014 * src/list.c (read_and):
5015 Invoke apply_nonancestor_delayed_set_stat on file names
5016 after handling them.
5017 (decode_mode): Remove; moved to misc.c.
5019 * src/misc.c (safer_rmdir): New function.
5020 (remove_any_file): Use it to avoid problems with rmdir(".").
5021 (maybe_backup_file): Regularize diagnostics.
5022 (undo_backup_file): Likewise.
5023 (decode_mode): Moved here from list.c.
5024 (chmod_error_details, chown_error_details, close_fatal,
5025 close_warn, closedir_warn, mkdir_error, read_error_details,
5026 read_warn_details, read_fatal_details, seek_error_details,
5027 seek_warn_details, utime_error, write_error_details,
5028 write_fatal_details): New functions.
5030 * src/delete.c (save_record): Remove static variable (now local).
5031 (move_archive): Don't position before start of archive.
5032 (write_record): Abort if count is zero at inopportune time.
5035 * src/tar.c (decode_options): --delete and -f - are now
5036 incompatible, since we didn't have time to fix their bugs.
5038 * tests/Makefile.am (TESTS): Remove delete02.sh.
5039 * tests/ignfail.sh: Adjust to new quoting scheme again.
5041 2000-01-06 Paul Eggert <eggert@twinsun.com>
5043 * lib/getdate.y: Sync tm_diff with the GNU C Library.
5044 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
5045 (tm_diff): Renamed from difftm. All uses changed.
5046 Replace body with that taken from GNU C Library 2.1.3pre1.
5047 (get_date): Prefer tm_gmtoff to tm_diff if available.
5049 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
5051 * tests/incremen.sh: Invoke stat on newly created file so that its
5052 ctime is updated on Nextstep.
5054 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
5056 * lib/getdate.y (get_date):
5057 Fix typo when checking for time_t overflow in time zone calculations.
5059 1999-12-13 Paul Eggert <eggert@twinsun.com>
5061 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
5063 * README-alpha: New file.
5064 * README: New sections for gzip and bzip2, Solaris.
5065 Remove mention of BACKLOG.
5067 * configure.in (AC_C_BACKSLASH_A): Add.
5068 (AC_CHECK_HEADERS): Add wchar.h.
5069 (AC_CHECK_FUNCS): Add mbrtowc.
5070 (AC_FUNC_CLOSEDIR_VOID): Add.
5072 * tests/Makefile.am (TESTS): Add delete02.sh.
5073 (POSTPONED_TESTS): Remove.
5074 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
5077 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
5079 * tests/ignfail.sh (err): Adjust to new quoting scheme.
5081 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
5083 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
5085 * src/tar.c ("quotearg.h"): New include.
5086 (usage): Now has __attribute__ ((noreturn)).
5087 (confirm): Report errno if we can't open tty.
5088 (confirm, decode_options):
5089 Quote arbitrary strings in diagnostics.
5090 (OVERWRITE_OPTION): New constant.
5091 (long_options, usage, decode_options): New --overwrite option.
5092 (decode_options): --keep-old-files, --overwrite, and --unlink-first
5093 are now mutually exclusive.
5094 Don't assume that gettext preserves errno.
5095 (main): Set default quoting style to escape_quoting_style.
5097 * src/update.c (<quotearg.h>): New include.
5099 Don't assume that gettext preserves errno.
5100 Quote arbitrary strings in diagnostics.
5101 Check for close error.
5103 * src/names.c (<quotearg.h>): New include.
5104 (name_init, name_next, name_close, names_notfound,
5105 collect_and_sort_names): Don't assume that gettext preserves
5106 errno. Quote arbitrary strings in diagnostics.
5107 (excluded_name): Fix typo that caused empty patterns to be
5110 * src/misc.c (<quotearg.h>): New include.
5111 (quote_copy_string): Quote only newline and backslash; the output is no
5112 longer meant for humans, and is locale-independent.
5113 (contains_dot_dot): New function.
5114 (remove_any_file): Don't use lstat; just rmdir the file and then use
5115 unlink if the rmdir fails because the file isn't a directory.
5116 Check for readdir and closedir errors.
5117 (maybe_backup_file): Report "stat" for stat errors.
5118 (maybe_backup_file, chdir_do):
5119 Quote arbitrary strings in diagnostics.
5120 (maybe_backup_file, undo_last_backup):
5121 Don't assume that gettext preserves errno.
5122 (call_arg_error, call_arg_fatal, call_arg_warn,
5123 chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
5124 mknod_error, open_error, open_fatal, open_warn, opendir_error,
5125 opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
5126 readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
5127 stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
5128 write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
5130 * src/system.h (__attribute__): New macro.
5131 (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
5132 (S_ISDOOR): New macro.
5133 (closedir): New macro, if CLOSEDIR_VOID.
5135 * src/rmt.c, src/rtapelib.c (decode_oflag):
5136 O_APPEND might not be defined.
5138 * src/list.c: (read_and, list_archive):
5139 Quote arbitrary strings in diagnostics.
5140 (from_header): Use locale_quoting_style to quote diagnostics.
5141 (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
5143 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
5145 * src/Makefile.am: Use ## for copyright comments.
5147 * src/extract.c (<quotearg.h>): New include.
5148 (enum permstatus): New enum.
5149 (struct delayed_set_stat): file_name is now at end of buffer, to avoid
5150 two mallocs. New members file_name_len, invert_permissions, permstatus.
5151 (extr_init): Remove hack that silently adjusted newdir_umask.
5152 (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
5153 Use these args to decide whether and how to set modes.
5154 (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
5155 Don't assume that gettext preserves errno.
5156 (set_stat): Remove arg symlink_flag; subsumed by typeflag.
5157 (delay_set_stat, repair_delayed_set_stat): New functions.
5158 (make_directories): Avoid mkdir where last part of path is "..".
5159 Create a struct delayed_set_stat for each directory made.
5160 (prepare_to_extract): Renamed from unlink_destination, and
5161 return 0 immediately if to_stdout_option; all callers changed.
5162 (maybe_recoverable): New parameter interdir_made.
5163 Add support for --overwrite.
5164 (extract_sparse_file, extract_archive):
5165 Quote arbitrary strings in diagnostics.
5166 (extract_archive): By default, warn about ".." in member names, and skip them.
5167 Don't open files with O_NONBLOCK or O_APPEND.
5168 Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
5169 overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
5170 minus the current umask. Keep track of intermediate directories made,
5171 to avoid looping when making x/../x when x doesn't exist; the
5172 earlier code solved this in a different way that didn't fit well
5173 into the new scheme. Don't extract permissions onto existing
5174 directories unless --overwrite is given. Do not add -wx------
5175 permissions to new directories permanently; just do it temporarily.
5176 Remove no-longer-needed hack with MSDOS and directory time stamps.
5177 (apply_delayed_set_stat): New argument specifies which directories to
5178 fix statuses of. Do not wait until the end of extraction to fix
5179 statuses; instead, fix a directory's status once we exit that directory.
5180 This requires less memory and does the right thing in some cases
5181 where the old method didn't.
5182 (fatal_exit): New function.
5184 * src/incremen.c (<quotearg.h>): New include.
5185 (get_directory_contents, gnu_restore):
5186 Check for readdir and closedir errors.
5187 (get_directory_contents, read_directory_file, gnu_restore):
5188 Quote arbitrary strings in diagnostics.
5189 (get_directory_contents, read_directory_file, write_directory_file):
5190 Don't assume that gettext preserves errno.
5192 * src/create.c (<quotearg.h>): New include.
5193 (start_header): Use `member names' to refer to archive member names, not
5194 `archive names'. Warn about `..' in member names.
5195 (finish_sparse_file, dump_file):
5196 Quote arbitrary strings in diagnostics.
5197 (finish_sparse_file, dump_file):
5198 Don't assume that gettext preserves errno.
5199 (dump_file): Don't use `access' to determine whether a directory is readable;
5200 this isn't reliable if tar is setuid. Use `opendir' instead.
5201 Check for readdir and closedir failures.
5202 Don't dump sockets as if they were fifos; just warn and skip.
5204 * src/delete.c (move_archive):
5205 Don't report fatal error merely because sizes don't fit
5206 into struct mtop values; fall back on lseek instead.
5207 Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
5208 Say `reposition' instead of `re-position'.
5209 (delete_archive_members):
5210 Set archive to STDOUT_FILENO before outputting trailing buffer.
5212 * src/compare.c (<quotearg.h>): New include.
5213 (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
5214 and `Cannot' others.
5215 (report_difference, diff_archive):
5216 Quote arbitrary strings in diagnostics.
5217 (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
5218 Don't assume that gettext preserves errno.
5219 (diff_archive): Don't open regular files with O_NONBLOCK.
5220 Preserve access times of files if --atime.
5222 * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
5223 (FATAL_ERROR, USAGE): Don't return 0.
5224 (enum old files): New enum.
5225 (old_files_option): New variable, replacing keep_old_files_option and
5226 unlink_first_option.
5227 (apply_delayed_set_stat): Now takes char const * param.
5228 (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
5229 closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
5230 open_fatal, open_warn, opendir_error, opendir_warn, read_error,
5231 read_fatal, readdir_error, readdir_warn, readlink_error,
5232 readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
5233 truncate_error, truncate_warn, unlink_error, waitpid_error,
5234 write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
5237 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
5238 archive_write_error, archive_read_error, flush_archive, close_archive,
5239 init_volume_number, new_volume):
5240 Don't assume that gettext preserves errno.
5242 (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
5243 (open_archive): Reject multivolume verify attempts a bit earlier.
5244 Rename local variable `access', in case it's defined by system header.
5246 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
5247 `Could not' sometimes and `Cannot' others.
5249 (open_archive, flush_read, flush_archive, close_archive, new_volume):
5250 Quote arbitrary strings in diagnostics.
5252 (read_error): Set archive to STDOUT_FILENO temporarily when writing
5255 (init_volume_number): Check for input and output errors in volno_file.
5257 (new_volume): Use new fatal_exit function to exit, and new xfork
5260 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
5262 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
5264 * doc/tar.texi: Add --overwrite.
5265 --absolute-names rejects ".." in names.
5267 * lib/quotearg.c: Add support for multibyte characters.
5269 (ISPRINT): New macro.
5270 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
5271 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
5272 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
5273 (quotearg_buffer_restyled): New function, with most of the old
5274 quotearg_buffer's contents.
5275 Major rewrite to support multibyte characters.
5276 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
5278 * m4/c-bs-a.m4: New file.
5280 * lib/Makefile.am: Use ## for copyright notice.
5282 * scripts/Makefile.am: Use ## on copyright notice.
5285 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
5287 1999-12-05 Paul Eggert <eggert@twinsun.com>
5289 * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
5290 src/ChangeLog, tests/ChangeLog: Remove these files.
5291 * ChangeLog.1: New file, incorporating the above files, plus old
5293 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
5295 1999-12-05 Dale Worley <worley@ariadne.com>
5297 * src/compare.c (<utime.h>, struct utimbuf): Add.
5298 (diff_archive): Restore access times if --atime.
5299 * doc/tar.texi: Explain that --atime also preserves modification time.
5301 1999-12-04 Gerhard Poul <gpoul@gnu.org>
5303 * ABOUT-NLS: Update to latest version from ftp.gnu.org.
5304 * BACKLOG, TODO: Remove.
5305 * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
5306 * README: Bring up to date.
5308 1999-12-03 Paul Eggert <eggert@twinsun.com>
5310 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
5312 * src/compare.c (diff_archive):
5313 Do not set errno to EPIPE; we no longer use perror.
5315 * src/create.c (dump_file):
5316 If a parent directory said that a file should be there but it is
5317 absent, diagnose it as being removed in the meantime.
5318 Do not pass meaningless errno to ERROR when reporting that the
5319 file changed as we read it.
5320 Report that a file changed if its ctime changes; this is more
5321 sensitive than mtime+size, and more accurate.
5323 * src/incremen.c (enum children): New type.
5324 (struct directory): Change old char allnew member to new enum children
5327 (get_directory_contents): When doing an incremental dump that does
5328 not cross filesystem boundaries, dump the mount points, even though
5329 they are in a different filesystem. This is for convenience when
5330 restoring, and for consistency with non-incremental dumps.
5331 This requires a 3-way flag for keeping track of which children we want,
5332 so we use enum children rather than boolean.
5334 * src/open3.c (modes): Remove.
5335 (open3): Remove unportable assumptions about flag encodings.
5336 Use `stat' instead of `access' for testing file existence,
5337 to avoid problems with setuid programs.
5339 * src/names.c (name_next): If file names are given both in the
5340 command line (e.g. via -C) and in a file (via -T), do not
5341 ignore the command-line names.
5343 * m4/uintmax_t.m4: Backport to autoconf 2.13.
5345 * doc/tar.texi: Clarify getdate authorship.
5347 1999-11-23 Paul Eggert <eggert@twinsun.com>
5349 * lib/Makefile.am (DISTCLEANFILES): New macro.
5351 * configure.in (tar_fnmatch_hin):
5352 Remove; it runs afoul of a bug in autoconf 2.13.
5353 Instead, always link fnmatch.h to some file, even if it's a throwaway.
5355 1999-11-19 Paul Eggert <eggert@twinsun.com>
5357 * m4/largefile.m4: Update serial.
5359 1999-11-18 Paul Eggert <eggert@twinsun.com>
5361 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
5362 the QNX shell, which doesn't propagate exit status of failed
5363 commands inside shell assignments.
5365 1999-11-07 Paul Eggert <eggert@twinsun.com>
5367 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
5369 * configure.in (AC_PREREQ): Bump to 2.13.
5370 (ALL_LINGUAS): Add pt_BR, ja.
5371 (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
5372 (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
5373 for AIX crossbuilds.
5375 * doc/tar.texi: New node create options for --ignore-failed-read.
5376 Remove unused version control symbols.
5377 Modernize texinfo usage.
5379 * src/tar.c (usage): Add examples.
5381 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
5382 Include fnmatch.h when testing fnmatch.
5384 * src/common.h (collect_and_sort_names): New decl.
5386 * src/list.c (from_header):
5387 Handle 32-bit two's complement negative time stamps
5388 even if the leading octal digit is 2 or 3.
5390 * src/extract.c (set_stat): Remove duplicate code.
5392 * src/create.c (to_chars): Remove trailing newline from warning.
5393 (dump_file): Ignore doors.
5394 (finish_header): Report block numbers with origin 0, not origin 1.
5396 * src/rmt.c: Include getopt.h.
5397 (long_opts): New constant.
5398 (usage): New function.
5399 (main): Implement --help and --version.
5400 Output usage message if arguments are bad.
5402 1999-10-10 Paul Eggert <eggert@twinsun.com>
5404 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
5406 * README: Remove --with-dmalloc.
5407 Add --disable-largefile.
5408 Remove old NeXT dirent problems, or AIX valloc problems.
5409 Remove old union wait advice, and old %lld advice.
5410 Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
5412 * doc/tar.texi: Clarify documentation for portable file names.
5414 * configure.in (AM_WITH_DMALLOC): Remove.
5415 (ALL_LINGUAS): Add ja.
5417 * src/tar.c (decode_options):
5418 Invalid dates are now treated as (time_t) -1.
5419 Redo version message to conform to GNU standards.
5421 * src/create.c (dump_file):
5422 Fix typo: last two args to dump_file were interchanged.
5423 * src/update.c (update_archive): Likewise.
5425 * src/common.h (tartime): New decl.
5427 * src/list.c (tartime): Now extern.
5428 (read_and): Invalid headers cause errors, not warnings.
5430 1999-10-03 Paul Eggert <eggert@twinsun.com>
5432 * lib/getdate.y (__attribute__):
5433 Don't use if GCC claims to be before 2.8; this is
5434 needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
5436 1999-09-25 Paul Eggert <eggert@twinsun.com>
5438 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
5439 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
5441 * tests/incremen.sh: Add yet another sleep.
5443 1999-09-24 Paul Eggert <eggert@twinsun.com>
5445 * NEWS: A read error now causes a nonzero exit status.
5447 * src/create.c (to_chars): Fix base-256 output.
5449 * src/buffer.c (write_error):
5450 Read error is an error, not just a warning.
5452 1999-09-24 Paul Eggert <eggert@twinsun.com>
5454 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
5456 * src/tar.c (<time.h>): Include.
5457 (time): Declare if not defined.
5458 (confirm): Don't read past EOF.
5459 (long_options, usage): Add --no-same-owner, --no-same-permissions.
5460 (main): Use clock_gettime if available.
5462 * tests/Makefile.am (TESTS): Add incremen.sh
5463 (INCLUDES): Add -I../lib, for fnmatch.h.
5465 * src/update.c (update_archive):
5466 Remove call to name_expand; had no effect.
5467 Use chdir_do to change into directory.
5468 Use deref_stat instead of stat.
5469 Use add_avoided_name to mark names to be avoided; the old method of
5470 setting a bit with the name caused all descendants of that name to
5471 be avoided, in some circumstances.
5473 * tests/incremen.sh: Remove unnecessary sleeps.
5475 * src/names.c (name_next): Go back to using plain chdir.
5476 (name_gather): Use chdir_arg to keep track of arguments to chdir.
5477 (addname): Likewise.
5478 (name_match): Use chdir_do to act on chdir args.
5479 (merge_sort): Moved here from incremen.c.
5480 (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
5482 (name_expand): Remove.
5483 (name_from_list): Skip fake names.
5484 Use chdir_do to act on chdir args.
5485 (struct avoided_name): New struct.
5486 (avoided_names): New var.
5487 (add_avoided_name, is_avoided_name): New functions.
5489 * src/system.h (stat, lstat): Define in terms of statx on
5490 STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
5491 (UCHAR_MAX): New macro.
5492 (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
5494 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
5496 * src/incremen.c (<time.h>): Remove include; no longer used.
5497 (time): Remove decl.
5499 (get_directory_contents): Use deref_stat.
5500 Consider a subdirectory to be all new only if
5501 listed_incremental_option or if it its timestamp is newer than the
5503 (add_hierarchy_to_namelist, merge_sort): Move to names.c.
5504 (read_directory_file): Now extern. Do not set time_now.
5505 (write_directory_file): Renamed from write_dir_file.
5506 Use start_time instead of time_now.
5507 (compare_names, collect_and_sort_names): Move to names.c.
5509 * src/mangle.c (<time.h>): Remove; not used.
5510 (time): Do not declare.
5512 * src/misc.c (chdir_from_initial_wd): Remove.
5513 (deref_stat): New function.
5514 (struct wd): New struct.
5515 (wd, wds, wd_alloc): New variables.
5516 (chdir_arg, chdir_do): New function.
5518 * src/compare.c (get_stat_data): Use deref_stat.
5520 * src/common.h (name_expand): Remove.
5522 * src/list.c (time): Declare if not defined.
5523 (base_64_digits): Moved here from create.c.
5524 (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
5526 (read_and): Don't get time from header unless we need it now;
5527 as getting time can cause duplicate diagnostics if bogus.
5528 Remove "Hmm, " from diagnostic.
5529 Use "Skipping to next header" uniformly.
5530 (from_header): Renamed from from_chars. All uses changed.
5531 Allow different forms for unportable 2's complement numbers.
5532 Don't check for extended forms when parsing checksums.
5533 Parse base-256 output.
5534 (gid_from_header): Renamed from gid_from_chars. All uses changed.
5535 (major_from_header): Renamed from major_from_chars. All uses changed.
5536 (minor_from_header): Renamed from minor_from_chars. All uses changed.
5537 (mode_from_header): Renamed from mode_from_chars. All uses changed.
5538 (off_from_header): Renamed from off_from_chars. All uses changed.
5539 (size_from_header): Renamed from size_from_chars. All uses changed.
5540 (time_from_header): Renamed from time_from_chars. All uses changed.
5541 Warn about future timestamps.
5542 (uid_from_header): Renamed from uid_from_chars. All uses changed.
5543 (uintmax_from_header): Renamed from uintmax_from_chars.
5545 (tartime): New function, incorporating isotime.
5547 (print_header): Use tartime.
5549 * src/create.c (to_chars): Fix typo in decl.
5550 Don't assign through char const *.
5551 Rename name_expand back to collect_and_sort_names.
5553 * src/extract.c (<time.h>): No need to include.
5554 (time): No need to declare.
5555 (now): Remove variable.
5556 (extr_init): Don't initialize `now'.
5557 Increment same_permissions_option and same_owner_option if we_are_root
5558 is nonzero; this supports the new --no-same-owner option.
5559 (set_stat): Use start_time instead of `now'.
5561 * src/create.c (struct link): Remove unused linkcount member.
5562 (base_64_digits): Move to list.c.
5563 (base_8_digits): Remove.
5564 (to_octal): New function, with some of old contents of to_base.
5566 (to_base256): New function.
5567 (to_chars): Use base 256, not base 64, for huge values.
5568 (mode_to_chars): Don't use two's complement in GNU format or POSIX
5570 (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
5571 it means we have an incremental dump where we don't know whether this
5572 is a top-level call.
5573 Use deref_stat instead of statx / stat / lstat.
5574 Cast result of alloca.
5575 Check for dates if 0 < top_level, not if listed_incremental_option.
5576 Move multiple-link check after directory check.
5577 Do not dump avoided names.
5578 Dump hard links to symbolic names as links, not as separate
5580 start_header cannot return a null pointer, so don't test for it.
5581 Likewise for find_next_block.
5583 * src/buffer.c, src/common.h (<human.h>): Include.
5584 (read_error): Read error is an error, not just a warning.
5585 (print_total_written): Also print human-readable byte count, and
5587 (open_archive, flush_write): Use start_time, not current time.
5588 (flush_read): Report about garbage bytes ignored at end of archive,
5589 but act on non-garbage bytes (instead of ignoring them).
5590 (new_volume): Use WARN for warnings.
5593 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
5595 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
5597 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
5599 * lib/Makefile.am (noinst_HEADERS):
5600 Rename fnmatch.h to fnmatch.hin; add human.h.
5601 (libtar_a_SOURCES): Add human.c, xstrtoul.c.
5602 (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
5604 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
5606 * lib/fnmatch.c (strchrnul):
5607 Define to __strchrnul if _LIBC, to our own replacement otherwise.
5608 Do not define if !_LIBC and if it already exists.
5609 (internal_fnmatch): Use it.
5611 * configure.in (tar_LDADD): New variable, used only when linking tar.
5612 (rmt_LDADD): Similarly, for rmt.
5613 (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
5614 fnmatch.c; otherwise, use the system fnmatch.h.
5616 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
5617 Modernize sample backup script.
5619 * THANKS: Martin Goik's email address has changed.
5621 * m4/fnmatch.m4: New file.
5623 1999-09-03 Paul Eggert <eggert@twinsun.com>
5625 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
5628 1999-08-29 Paul Eggert <eggert@twinsun.com>
5630 * lib/getdate.y (get_date):
5631 Rename outermost local `probe' to `quarter'.
5632 Rename latter local `tm' to probe_tm.
5633 From: Jim Meyering <meyering@ascend.com>
5634 Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
5636 1999-08-28 Paul Eggert <eggert@twinsun.com>
5638 * lib/getdate.y (PC): New macro; use it when possible.
5639 (number): Handle `Nov 11 1996' example correctly.
5640 See Risks Digest 20.55 (1999-08-27)
5641 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
5643 1999-08-23 Paul Eggert <eggert@twinsun.com>
5645 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
5647 Remove minor cases of lint from many source files: this includes
5648 unnecessary casts, uses of NULL, etc.
5650 * configure.in (AC_PROG_YACC): Remove.
5651 (YACC): Always use bison.
5652 (AC_STRUCT_TIMEZONE): Add.
5653 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
5655 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
5658 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
5659 ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
5661 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
5663 * src/common.h (merge_sort): Remove decl; no longer exported.
5665 * src/system.h (voidstar): Remove.
5666 (memcpy, memcmp): Cast args.
5667 ("xalloc.h"): Add include.
5668 (xmalloc, xrealloc): Remove decl.
5670 * src/mangle.c (time): Do not declare if defined.
5671 (first_mangle, mangled_num): Remove.
5673 * src/list.c (from_chars): Report out-of-range values more precisely.
5674 (off_from_chars): Do not allow negative offsets.
5675 (uid_from_chars): Allow negative uids.
5677 * src/create.c (linklist): Now static.
5678 (to_chars): Fix wording of message to match from_chars.
5680 * src/misc.c (merge_sort): Move to incremen.c.
5681 * src/incremen.c (merge_sort): Move here from misc.c; now static.
5682 It's too painful to make it both generic and portable.
5683 (read_directory_file): "timestamp" -> "time stamp" in messages.
5685 * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
5686 (usage): Fix misspelling.
5687 (OPTION_STRING): -y is now -I.
5688 (decode_options): Use -1, not EOF, for getopt_long result.
5689 Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
5690 Handle operands after any "--" argument.
5691 (main): Report any output errors.
5693 * src/rmt.c (main): status is ssize_t, not long.
5695 * src/names.c (name_gather): Handle trailing -C option correctly.
5696 (addname): use memcpy, not strncpy, to copy a string of known length.
5697 (name_match): Handle trailing -C option correctly.
5698 Propagate -C option to following files.
5699 (name_match, name_scan): Remove redundant matching code.
5701 * src/buffer.c (open_archive): Use American spelling in diagnostic.
5703 * lib/getdate.y: Major rewrite. Add copyright notice.
5704 (<stdio.h>): Include only if testing.
5706 (ISLOWER): New macro.
5707 (<string.h>): Include if HAVE_STRING_H, not USG.
5709 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
5711 (EPOCH_YEAR): Renamed from EPOCH.
5712 (table): Renamed from TABLE.
5713 (meridian): Now an anonymous enum.
5714 (struct parser_control): New type.
5715 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
5716 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
5717 (%pure_parser): Added, so that the parser is pure.
5718 (%union): Removed; the type is now just plain int.
5719 All %type directives removed.
5720 (tLOCAL_ZONE): New %token.
5721 (month_day_table): Renamed from MonthDayTable.
5722 (gmtime, localtime, mktime, time): Declare only if not defined.
5723 (meridian_table): New table.
5724 (dst_table): New table.
5725 (units_table): renamed from UnitsTable.
5726 (relative_time_table): Renamed from OtherTable.
5727 (time_zone_table): Renamed from TimezoneTable. Modernized.
5728 (military_table): Renamed from MilitaryTable.
5729 (to_hour): Renamed from ToHour.
5730 (to_year): Renamed from ToYear.
5731 (lookup_zone): New function.
5732 (LookupWord): Renamed from lookup_word. Use lookup_zone for time
5734 (yylex): Now reentrant. All callers changed.
5735 (get_date): Add support for local time zone abbreviations.
5738 1999-08-20 Paul Eggert <eggert@twinsun.com>
5740 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
5742 * src/create.c (to_chars): Generate GNU base-64 representation
5743 if we are generating an old or new GNU format tar file for a
5744 number that can't be represented with the POSIX format.
5746 * configure.in (AC_CHECK_FUNCS): Add fchdir.
5747 (AM_FUNC_GETLINE): Add.
5748 (LIBOBJS): Add getline.o to workaround comment.
5749 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
5750 * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
5751 * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
5752 (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
5753 * lib/getline.c, lib/getline.h, lib/save-cwd.c,
5754 lib/save-cwd.h, m4/getline.m4: New files.
5756 * src/misc.c (<save-cwd.h>): Include.
5757 (chdir_from_initial_wd): New function.
5759 * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
5760 (name_gather): Handle `-C x -C y' correctly.
5761 Do not rely on addname to handle -C.
5762 (addname): New CHANGE_DIR parameter. All callers changed.
5763 Remove ugly calls to getcwd; no longer needed.
5764 (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
5766 * src/incremen.c (listed_incremental_stream): New var.
5767 (read_directory_file): Remove arbitrary limits on file name length.
5768 Do not attempt to get the working directory; we can bypass this
5769 on fchdir hosts. Open the listed_incremental_option file for both
5770 read and write instead of opening it twice. Check for I/O errors
5771 when doing I/O to this file. Check for invalid data in the file,
5772 and report line numbers of invalid data.
5773 (write_dir_file): Likewise.
5774 (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
5775 Do not invoke write_dir_file; that's our caller's responsibility.
5777 * src/list.c (max): New macro.
5778 (isotime): Now takes time_t, not time_t *. Report the decimal values
5779 of times that can't be broken down.
5780 (print_header): Don't assume that major and minor device numbers can
5783 * src/common.h (struct name): change_dir is now char const *.
5784 (write_directory_file): Remove unused decl.
5785 (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
5786 chars; the old `sizeof (b)' broke when b was a pointer not an array.
5787 (chdir_from_initial_wd): New decl.
5788 (addname): New 2nd arg.
5790 * THANKS: Torsten Lull -> Catrin Urbanneck
5792 1999-08-18 Paul Eggert <eggert@twinsun.com>
5794 * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
5795 Don't depend on ac_cv_func variables.
5796 From Albert Chin-A-Young <china@thewrittenword.com>.
5798 1999-08-18 Paul Eggert <eggert@twinsun.com>
5800 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
5802 * m4/signedchar.m4: New file.
5803 * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
5804 * src/system.h (signed_char): New macro.
5805 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
5806 * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
5808 * src/create.c (write_eot): Write at least two zero blocks.
5810 * src/extract.c (extract_archive): Fix sparse array bug:
5811 we did not find end of array correctly.
5813 * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
5814 Don't assume find_next_block yields nonnull.
5815 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
5816 * src/list.c (skip_extended_headers): Likewise.
5818 * src/list.c (read_and, list_archive): Simplify code.
5819 (read_header): Fix computation of signed checksums on machines where
5821 Do not consider a block to be zero unless all its bytes are zero,
5822 even the checksum bytes. Do not attempt to parse the checksum of
5823 a zero block. Fix memory leak with long names and links.
5824 (from_chars): Accommodate a buggy tar that outputs leading NUL
5825 if the previous field overflows.
5827 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
5828 \?, for portability to non-ASCII hosts.
5830 1999-08-16 Paul Eggert <eggert@twinsun.com>
5832 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
5834 * src/extract.c (make_directories): Do not chown intermediate
5835 directories, even if we are root.
5837 * src/list.c (read_header): Fix bugs when interpreting
5838 POSIX-compliant headers that do not contain null bytes in the
5839 header or link names.
5841 1999-08-14 Paul Eggert <eggert@twinsun.com>
5843 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
5845 * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
5846 (AC_HEADER_SYS_WAIT): Add.
5847 (AC_REPLACE_FUNCS): Add waitpid.
5848 (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
5849 * lib/waitpid.c: New file.
5850 * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
5851 * src/system.h (WCOREDUMP): Remove; no longer used.
5852 (WIFSTOPPED): Likewise.
5853 (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
5854 * src/buffer.c (child_open_for_compress): Undo previous change.
5855 (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
5856 (new_volume): Likewise.
5858 * src/buffer.c, src/extract.c, src/incremen.c (time):
5859 Don't declare if defined.
5860 * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
5861 * src/incremen.c (read_directory_file):
5862 Invoke `time' the same way everyone else does.
5863 Check validity of --listed-incremental file contents a bit better.
5864 Do not worry about --after-date-option; tar.c now checks this.
5865 * src/list.c (isotime): Report ??? if localtime returns null.
5866 Don't assume years fit into four digits.
5867 Don't append trailing newline.
5868 (print_header): Report ??? if localtime returns null;
5869 Don't assume years fit into four digits.
5871 * src/compare.c (diff_archive): Do not fall back on absolute name
5872 when --absolute-names is not specified.
5874 * src/create.c (start_header):
5875 Include text of ignored filesystem prefix in warning.
5876 (create_archive): Check for excluded names when doing incremental
5877 pass through directory.
5878 (dump_file): Do not dump old files explicitly given on command line
5879 when using --listed-incremental. Do not strip ./ prefix from names.
5881 * src/tar.c: -g now implies after_date_option = 1.
5882 -g and -N are now incompatible options.
5884 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
5886 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
5888 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
5889 incremental headers as POSIX prefixes.
5891 1999-08-11 Paul Eggert <eggert@twinsun.com>
5893 * NEWS, configure.in: Version 1.13.6.
5895 * configure.in (ALL_LINGUAS): Add pt_BR.
5896 * po/pt_BR.po: New file.
5898 * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
5899 Renamed from tar.info and header.texi; adjust actions so that
5900 they work in other directories.
5902 * doc/tar.texi: Add -y and --bzip2.
5903 Patterns containing / now exclude only file names whose prefix match.
5905 * lib/exclude.h (excluded_filename): New option parameter.
5906 (add_exclude_file): New ADD_FUNC parameter.
5907 (excluded_pathname): Remove decl.
5908 * lib/exclude.c (_GNU_SOURCE):
5909 Remove; no longer needed since we don't use FNM_ macros.
5910 (excluded_filename): Renamed from excluded_filename_opts.
5911 (excluded_filename, excluded_pathname): Remove.
5912 (add_exclude_file): New ADD_FUNC parameter.
5914 * po/POTFILES.in: Add lib/quotearg.c.
5916 * src/buffer.c (_GNU_SOURCE): Define.
5917 (<fnmatch.h>): Include unconditionally.
5918 (child_open_for_compress): Dup after closing, to avoid possible file
5919 descriptor exhaustion.
5920 (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
5921 (flush_read): Likewise.
5923 * src/common.h (LG_8, LG_64): New macros.
5924 (excluded_with_slash, excluded_without_slash): New vars.
5926 (base_64_digits): New decl.
5927 (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
5928 off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
5930 GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
5931 OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
5933 Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
5934 off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
5935 GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
5936 SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
5937 respectively. All definitions and uses changed.
5938 (excluded_name): New decl.
5940 * src/compare.c (diff_archive):
5941 Open files with O_NONBLOCK instead of O_NDELAY.
5943 * src/create.c (base_64_digits): New constant.
5944 (base_8_digits): New macro.
5945 (MAX_VAL_WITH_DIGITS): New macro.
5946 (to_base): First half of old to_oct. Support base 64 too.
5947 (to_chars): Other half of old to_oct, for 64-bit support.
5948 (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
5949 (gid_substitute, uid_substitute): Look up names dynamically if
5950 GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
5951 (mode_to_chars): Renamed from mode_to_oct.
5952 Support negative values in all the _to_chars functions.
5953 (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
5954 Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
5955 (dump_file): Inspect entire pathname, not just new file name
5956 component, when deciding whether to exclude it.
5958 * src/extract.c (extract_archive):
5959 Open files with O_NONBLOCK instead of O_NDELAY.
5961 * src/incremen.c (get_directory_contents):
5962 Inspect entire pathname, not just new file name
5963 component, when deciding whether to exclude it.
5965 * src/list.c (<fnmatch.h>): Do not include.
5966 (from_chars): Renamed from from_oct. New parameter specifying
5967 the negative of the minimum allowed value. Support negative
5969 (base64_map): New var.
5970 (base64_init): New function.
5971 (print_header): Output numeric uids and gids if numeric_owner_option.
5973 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
5975 * src/names.c (_GNU_SOURCE): Define.
5976 (<fnmatch.h>): Include unconditionally.
5977 (excluded_name): New function, taking over duties of excluded_pathname.
5980 * src/rmt.c (decode_oflag): New function.
5981 (main): Use it to support symbolic open flags.
5983 * src/rtapelib.c (encode_oflag): New function.
5984 (rmt_open__): Do not allow newlines in the path.
5985 Propagate errno correctly.
5986 Decode symbolic open flags, if present.
5988 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
5991 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
5992 New -y or --bzip2 option.
5993 (add_filtered_exclude): New function.
5994 (decode_options): Put excluded patterns with / into
5995 excluded_with_slash, and without / into excluded_without_slash.
5996 Compare newer_mtime_option to its new initial value
5997 TYPE_MINIMUM (time_t) when deciding whether more than one
5998 threshold date was specified.
6000 1999-07-20 Paul Eggert <eggert@twinsun.com>
6002 * NEWS, configure.in: Version 1.13.5.
6004 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
6006 * src/buffer.c (new_volume): Likewise.
6007 * src/incremen.c (read_directory_file): Likewise.
6008 * src/tar.c (decode_options):
6009 ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
6012 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
6013 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
6015 * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
6016 (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
6017 (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
6018 Define to 0 if the corresponding S_IF* macro is not defined.
6019 (mkfifo): Do not define if already defined, or if S_IFIFO
6022 * src/compare.c (diff_archive): Use HAVE_READLINK, not
6023 S_ISLNK, to determine whether to invoke readlink.
6024 * src/create.c (dump_file): Likewise.
6026 * src/extract.c (set_mode):
6027 Do not chmod unless we are root or the -p option was given;
6028 this matches historical practice.
6029 (unlink_destination): New function, which checks for unlink failures.
6030 (maybe_recoverable): Stay quiet if -U.
6031 (extract_archive): Use O_EXCL if unlink_first_option.
6032 Report unlink failures.
6033 Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
6034 Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
6037 * src/incremen.c (get_directory_contents): Depend on
6038 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
6040 * src/list.c: Remove S_IS* ifdefs.
6041 * src/misc.c (maybe_backup_file): Likewise.
6043 * src/misc.c (maybe_backup_file):
6044 "Virtual memory exhausted" -> "Memory exhausted",
6045 to conform to the other places this message is issued.
6047 * src/mangle.c (extract_mangle):
6048 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
6050 * src/rtapelib.c (rmt_open__):
6051 Remove typo that caused us to omit the first char
6054 1999-07-16 Paul Eggert <eggert@twinsun.com>
6056 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
6058 * doc/tar.texi: A path name is excluded if any of its file name
6059 components matches an excluded pattern, even if the path name was
6060 specified on the command line.
6061 * src/create.c (create_archive): Likewise.
6062 * src/list.c (read_and): Likewise.
6063 * src/update.c (update_archive): Likewise.
6064 * lib/exclude.h (excluded_pathname): New decl.
6065 * lib/exclude.c (_GNU_SOURCE): Define.
6066 (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
6067 (excluded_filename_opts): New function.
6068 (excluded_pathname): New function.
6070 * lib/Makefile.am (EXTRA_DIST):
6071 xstrtol.c moved here from libtar_a_SOURCES.
6072 (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
6073 Remove xstrtoul.c; no longer needed.
6074 * lib/xstrtol.c: Remove.
6076 * src/tar.c (decode_options):
6077 Set newer_time_option to TYPE_MINIMUM, so that
6078 negative timestamps are handled correctly.
6079 Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
6080 uniformity (and so that we don't need to have the other fns).
6081 (main): Remove call to init_total_written; no longer needed.
6083 * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
6084 checks for unsigned long and long long.
6085 * src/arith.c: Remove.
6086 * src/Makefile.am (tar_SOURCES): Remove arith.c.
6087 * po/POTFILES.in: Remove src/arith.c.
6088 * src/arith.h: Use double, to simplify configuration gotchas.
6089 (tarlong): Now double.
6090 (TARLONG_FORMAT): New macro.
6091 (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
6092 LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
6093 zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
6094 add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
6095 zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
6096 mult_tarlong, print_tarlong): Remove. All callers replaced with
6099 * src/common.h (init_total_written): Remove decl.
6101 * src/buffer.c (total_written):
6102 Remove; replaced with prev_written + bytes_written.
6103 (prev_written): New var.
6104 (init_total_written): Remove.
6105 (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
6107 * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
6108 Make sure that we can shift, multiply
6109 and divide unsigned long long values; Ultrix cc can't do it.
6111 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
6112 Check for any unknown bits, not just unknown bits left of the leftmost
6115 * lib/quotearg.c (quotearg_buffer):
6116 Don't quote spaces if C quoting style.
6117 * src/list.c (from_oct):
6118 Use C quoting style for error; omit trailing NULs.
6120 1999-07-14 Paul Eggert <eggert@twinsun.com>
6122 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
6124 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
6125 <inttypes.h> defines strtoumax as a macro (and not as a function).
6126 HP-UX 10.20 does this.
6128 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
6129 * PORTS, README, TODO, doc/tar.texi: Likewise.
6131 1999-07-12 Paul Eggert <eggert@twinsun.com>
6133 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
6134 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
6136 * src/list.c (decode_header):
6137 Do not assume that S_IFBLK and S_IFCHR are defined.
6139 * src/create.c (start_header): Do not assume S_IFMT is defined.
6140 (dump_file): Remove unnecessary check for screwy apollo lossage.
6141 Do not assume S_IFBLK and S_IFCHR are defined.
6143 * src/extract.c (extract_archive):
6144 Test whether S_IFCHR and S_IFBLK are nonzero,
6145 not whether they are defined, for consistency with other tests.
6147 * src/buffer.c (is_regular_file):
6148 Don't succeed on files that we can't access due to
6149 permissions problems.
6150 (open_archive): Fix wording on fatal error message.
6151 Don't bother to stat /dev/null if the archive is not a character
6154 * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
6155 Report an error, not a warning, for I/O errors.
6156 (process_rawdata, process_dumpdir, diff_sparse_files):
6157 Change ungrammatical "Data differs" to "Contents differ".
6158 (get_stat_data): Find hidden files on AIX.
6159 Accept file name as argument; all uses changed.
6160 (get_stat_data, diff_archive): Use system error message for
6161 nonexistent files rather than rolling our own.
6162 (diff_archive): Unknown file types are errors, not warnings.
6163 Normalize spelling of message to "File type differs".
6164 Use get_stat_data to get link status, for consistency.
6165 Do not inspect st_rdev for fifos.
6166 Do not assume st_mode values contain only file types and mode bits.
6167 Check for mode changes and device number changes separately.
6169 * src/update.c (append_file):
6170 Open the file before statting it, to avoid a race.
6171 Complain about file shrinkage only when we reach EOF.
6173 1999-07-08 Paul Eggert <eggert@twinsun.com>
6175 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
6177 * configure.in (AC_EXEEXT): Add.
6179 * lib/Makefile.am (noinst_HEADERS):
6180 Add basename.h, exclude.h. Remove full-write.h.
6181 (libtar_a_SOURCES): Add exclude.c.
6183 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
6185 * lib/full-write.c: Include safe-read.h instead of full-write.h.
6186 * lib/safe-read.h (safe_read): New decl.
6187 * src/rmt.c: Include safe-read.h.
6188 * src/rtapelib.c: Include basename.h, save-read.h.
6189 (rmt_open__): Use base_name to compute base name.
6192 Include basename.h, exclude.h; don't include full-write.h.
6193 (exclude_option): Remove decl.
6194 (excluded): New decl.
6195 (add_exclude, add_exclude_file, check_exclude): Remove decls.
6197 * src/list.c (read_and):
6198 Use excluded_filename instead of check_exclude.
6199 Check base name of incoming file name, not entire file name, when
6200 deciding whether to exclude it.
6202 * src/create.c (finish_sparse_file):
6203 Use excluded_filename instead of check_exclude.
6204 Don't bother to stat excluded file names.
6205 * src/incremen.c (get_directory_contents): Likewise.
6207 * src/names.c (exclude_pool, exclude_pool_size,
6208 allocated_exclude_pool_size, simple_exclude_array,
6209 simple_excludes, allocated_simple_excludes,
6210 pattern_exclude_array, pattern_excludes,
6211 allocated_pattern_excludes, add_exclude, add_exclude_file,
6213 Remove; now done in ../lib/exclude.c.
6215 * src/tar.c (decode_options): Initialize `excluded'.
6216 Use new add_exclude_file and add_exclude functions.
6218 1999-07-05 Paul Eggert <eggert@twinsun.com>
6220 * m4/gettext.m4: Use changequote rather than [[ ]].
6222 * lib/safe-read.c: Renamed from lib/full-read.c.
6223 (safe_read): Renamed from full_read. All uses changed.
6224 * lib/safe-read.h, lib/full-write.h: New files.
6225 * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
6226 (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
6227 * lib/full-write.c: Include full-write.h.
6228 * src/common.h: Include full-write.h, safe-read.h.
6229 * src/system.h: (full_read, full_write): Remove decls.
6231 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
6233 * src/system.h (bindtextdomain, textdomain): undef before
6234 defining, to avoid preprocessor warnings with --disable-nls
6235 on hosts whose locale.h includes libintl.h.
6237 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
6238 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
6239 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
6242 1999-07-02 Paul Eggert <eggert@twinsun.com>
6244 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
6245 * m4/mktime.m4: New file.
6246 * m4/Makefile.am.in, m4/README: Remove these files.
6247 * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
6248 remove README, Makefile.am.in.
6249 (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
6250 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
6253 * src/tar.c: Include signal.h.
6254 (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
6255 (main): Ensure SIGCHLD is not ignored.
6257 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
6258 MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
6259 OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
6260 RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
6261 VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
6262 OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
6263 OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
6264 OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
6265 they don't overlap with char codes. Use an enum instead of a lot
6268 * src/system.h (ISASCII): Remove.
6269 (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
6270 S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
6271 S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
6272 MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
6273 LONG_MAX): New macros.
6275 * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
6276 (read_directory_file): Cast ISSPACE arg to unsigned char.
6277 * src/misc.c (ISPRINT): Remove; now in system.h.
6278 (remove_any_file): Add brackets to pacify gcc -Wall.
6279 * src/list.c: Don't include <ctype.h>; system.h already does this.
6280 (ISODIGIT, ISSPACE): Remove; now in system.h.
6281 (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
6283 (from_oct): Cast ISSPACE arg to unsigned char.
6285 * src/create.c (mode_to_oct): Translate modes from internal to
6287 * src/list.c (mode_from_oct): Translate modes from external to
6288 internal form. Do not complain about unrecognized mode bits.
6289 * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
6290 TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
6292 * src/extract.c: (extr_init, make_directories, extract_archive):
6293 Do not assume mode bits have traditional Unix values.
6294 * src/list.c (decode_mode): Likewise.
6295 * src/create.c (start_header, dump_file): Likewise.
6296 * src/buffer.c (child_open_for_compress,
6297 child_open_for_uncompress, open_archive, (close_archive): Likewise.
6298 * src/compare.c (diff_archive): Likewise.
6300 * src/extract.c (set_mode): Use %04 not %0.4 format.
6301 (extract_sparse_file): Do not use data_block uninitialized.
6302 Check for lseek failures.
6304 * src/rtapelib.c (rmt_lseek__):
6305 Convert lseek whence values to portable integers on the wire.
6306 * src/rmt.c (main): Likewise. Check for whence values out of range.
6308 * src/create.c (finish_sparse_file): Use lseek whence macros
6309 instead of integers.
6310 * src/buffer.c (backspace_output): Likewise.
6311 * src/compare.c (diff_archive, verify_volume): Likewise.
6312 * src/delete.c (move_archive): Likewise.
6313 * src/extract.c (extract_sparse_file): Likewise.
6315 * src/create.c (dump_file): Do not invoke finish_sparse_file
6316 on a negative file descriptor.
6318 * src/buffer.c: Add braces to pacify gcc -Wall.
6320 * src/compare.c (diff_sparse_files): Report lseek errors.
6322 * configure.in (ALL_LINGUAS): Add cs, es, ru.
6324 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
6326 * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
6327 message to be internationalized; \a doesn't work with msgfmt.
6329 * src/tar.c (long_options, main, usage, OPTION_STRING):
6330 Remove -E or --ending-file.
6331 * src/list.c (read_and): Likewise.
6332 * src/common.h (ending_file_option): Likewise.
6333 * src/buffer.c (close_archive): Likewise.
6335 * tests/after: Don't run two commands together in a pipeline,
6336 as some old shells mishandle pipeline exit status.
6338 1999-06-28 Paul Eggert <eggert@twinsun.com>
6340 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
6341 * NEWS: Describe changes since 1.12.
6342 * README: Update bug reporting address; move paxutils ref to NEWS.
6344 Handle EINTR correctly.
6345 * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
6346 * lib/full-read.c, lib/full-write.c: New files.
6347 * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
6348 Prefer full_read to read and full_write to write.
6349 * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
6350 * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
6352 * src/extract.c (extract_sparse_file): Likewise.
6353 * src/rmt.c (get_string, main, report_error_message,
6354 report_numbered_error): Likewise.
6355 * src/rmt.h (rmtread, rmtwrite): Likewise.
6356 * src/rtapelib.c (do_command, get_status_string, rmt_read__,
6357 rmt_write__, rmt_ioctl__): Likewise.
6358 * src/update.c (append_file): Likewise.
6359 * src/system.h (full_read, full_write): New decls.
6361 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
6362 lib/xmalloc.c, src/arith.c, src/misc.c.
6364 * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
6365 New macros. All uses of STDIN and STDOUT changed.
6366 * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
6367 instead of 0 and STDOUT_FILENO instead of 1.
6368 * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
6369 instead of fileno (stdin) and fileno (stdout) or 0 and 1.
6371 * src/rmt.c (private_strerror): Avoid const. Translate results.
6373 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
6374 in the presence of NFS clock skew.
6376 1999-06-25 Paul Eggert <eggert@twinsun.com>
6378 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
6380 * src/buffer.c (write_archive_buffer): New function.
6381 (child_open_for_compress, flush_write, flush_read): Use it to write
6383 (open_archive): Report error if fstat of archive fails.
6384 Improve efficiency of check for /dev/null.
6385 Also, fix some corner cases with remote archives and /dev/null checking.
6386 (close_archive): Test for input fifo only if not remote.
6387 Truncate output archive only if it's not remote.
6389 * src/misc.c (remove_any_file):
6390 Don't terminate if you see . or ..; just skip them.
6392 1999-06-18 Paul Eggert <eggert@twinsun.com>
6394 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
6396 Output sizes using a format that's more compatible with
6397 traditional tar (and with GNU Emacs).
6398 * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
6399 MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
6400 Don't subtract 1 from size.
6401 * src/create.c (to_oct): Prepend leading zeros, not spaces.
6402 Output a trailing NUL unless the value won't fit without it.
6403 (finish_header): No need to append NUL to chksum, now that
6406 1999-06-16 Paul Eggert <eggert@twinsun.com>
6408 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
6410 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
6411 @INTLLIBS@ might invoke rpl_realloc.
6413 * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
6414 (intconv): Remove; use xstrto* fns instead.
6415 ("xstrtol.h"): Include.
6416 (check_decimal): Remove.
6417 (long_options, usage, OPTION_STRING, decode_options):
6418 Remove -y, --bzip2, --unbzip2.
6419 (decode_options): Use xget_version instead of get_version.
6420 Check for overflow with -b and -L and RECORD_SIZE_OPTION.
6421 Replace invocations of check_decimal with xstrtoumax.
6423 * tests/preset.in (echo_n, echo_c): Remove.
6425 * tests/after: Don't rely on $echo_c and $echo_n.
6427 * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
6428 lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
6429 lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
6430 lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
6431 m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
6432 m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
6433 m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
6434 m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
6435 m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
6436 m4/xstrtoumax.m4: New files.
6438 * configure.in(fp_PROG_ECHO): Remove; no longer needed.
6439 (AC_SYS_LARGEFILE): Renamed from AC_LFS.
6440 (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
6441 (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
6442 (AC_CHECK_FUNCS): Remove lchown.
6443 (AC_REPLACE_FUNCS): Remove basename, dirname.
6444 Add lchown, strtol, strtoul.
6445 (jm_FUNC_MKTIME): Add.
6446 (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
6447 are also built via the ANSI2KNR-filtering rules.
6448 Use a no-op line to work around bug in automake 1.4 with malloc and
6450 (AC_OUTPUT): Add m4/Makefile.
6452 * lib/Makefile.am (EXTRA_DIST):
6453 Add lchown.c, malloc.c, mktime.c, realloc.c,
6454 strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
6455 (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
6456 (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
6457 xstrtoul.c, xstrtoumax.c. Remove getversion.c.
6458 ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
6460 * src/system.h (uintmax_t): Don't declare; configure now does this.
6462 * src/common.h (backup_type): New decl.
6463 * src/common.h, src/misc.c, src/tar.c:
6464 Move include of backupfile.h to common.h.
6466 * src/misc.c (maybe_backup_file):
6467 Pass backup_type to find_backup_file_name.
6469 * src/list.c (print_header): Change sizes of uform and gform from 11 to
6470 UINTMAX_STRSIZE_BOUND.
6472 * doc/tar.texi: Remove --bzip2.
6473 Fix @xref typos reported by latest makeinfo.
6475 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
6477 (M4DIR, ACINCLUDE_INPUTS): New macros.
6478 ($(srcdir)/acinclude.m4): New rule.
6480 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
6481 HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
6482 now generated automatically by autoconf.
6484 1999-05-15 Paul Eggert <eggert@twinsun.com>
6486 * doc/tar.texi: Remove -y.
6488 1999-04-09 Paul Eggert <eggert@twinsun.com>
6490 * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
6491 (we were allocating too much storage).
6492 (uintmax_t): Don't declare; configure now does this.
6494 * ABOUT-NLS: Update to gettext 0.10.35 edition.
6496 1999-03-22 Paul Eggert <eggert@twinsun.com>
6498 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
6500 * acinclude.m4 (AC_LFS_FLAGS):
6501 Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
6502 (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
6503 (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
6505 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
6506 New macros; needed for latest GNU xmalloc.c.
6508 * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
6509 (libtar_a_SOURCES): Add quotearg.c.
6510 * list.c: Include <quotearg.h>.
6511 (from_oct): Add forward decl.
6512 (read_header): Return HEADER_FAILURE if we can't parse the checksum.
6513 (from_oct): Report an error only if TYPE is nonzero.
6514 Quote any funny characters in bad header.
6516 1999-03-20 Paul Eggert <eggert@twinsun.com>
6518 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
6520 * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
6521 (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
6523 (AC_LFS): Simplify AIX revision number test.
6525 1999-03-17 Paul Eggert <eggert@twinsun.com>
6527 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
6529 * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
6530 Remove; it doesn't work that well
6531 with AC_CANONICAL_HOST.
6532 (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
6534 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
6536 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
6538 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
6540 * tar.texi: Fix bug-report addr.
6542 * README: Remove --with-included-malloc.
6543 Upgrade version numbers of build software.
6545 1999-03-07 Paul Eggert <eggert@twinsun.com>
6547 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
6549 * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
6550 where bindtextdomain and gettext require -lintl.
6551 (AC_LFS_FLAGS): Simplify so that it only gets the flags;
6552 `no' means it failed.
6553 (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
6554 (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
6555 _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
6556 to add anything to the command line (it's all in config.h).
6557 Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
6559 1999-03-01 Paul Eggert <eggert@twinsun.com>
6561 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
6563 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
6565 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
6566 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
6567 uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
6568 like OFF_MAX, which are not reliable
6569 (e.g. OFF_MAX in AIX 4.2 is incorrect).
6570 * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
6571 SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
6573 * src/incremen.c (get_directory_contents):
6574 Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
6575 Have statx depend on STX_HIDDEN, not AIX.
6577 * src/create.c (to_oct):
6578 New parameter substitute, giving a substitute value to use
6579 when the original value is out of range. Do not append a space to the
6580 output; modern tars don't. When a value is out of range, specify the
6581 maximum value, not the number of bits.
6582 (GID_NOBODY, UID_NOBODY): New macros.
6583 (gid_to_oct, uid_to_oct): Use them as substitutes.
6584 (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
6585 (dump_file): Check whether the file changed as we read it.
6587 * src/rmt.c (main): Remove suspicious AIX/386 code.
6589 1999-02-19 Paul Eggert <eggert@twinsun.com>
6591 * intl/localealias.c (read_alias_file): Don't assume that memcpy
6592 returns a type compatible with char *; it doesn't on SunOS
6593 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
6595 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
6597 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
6598 * doc/tar.texi: Add --bzip2, --unbzip2 options.
6600 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
6602 (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
6603 (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
6604 * acinclude.m4 (AM_WITH_NLS):
6605 Update to latest gettext version (serial 5).
6606 (AC_LFS_FLAGS): New macro
6607 (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
6608 working only with unset variables. Append to CFLAGS, not CPPFLAGS.
6609 Work properly in cross-compilation scenario, by checking for getconf
6610 with AC_CHECK_TOOL and by ditching uname in favor of
6611 AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
6613 * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
6614 replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
6615 * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
6616 since getdate.y now uses ANSI code.
6618 * config.guess, config.sub: New files; taken from automake 1.4.
6620 * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
6621 intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
6622 intl/explodename.c, intl/finddomain.c, intl/gettext.c,
6623 intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
6624 intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
6625 intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
6626 Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
6628 1999-02-01 Paul Eggert <eggert@twinsun.com>
6630 * src/tar.c: Update copyright.
6634 1999-02-01 Paul Eggert <eggert@twinsun.com>
6636 * NEWS, configure.in: Version 1.12.64004
6638 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
6640 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
6642 * src/extract.c (extract_archive): Fix bug when extracting sparse
6643 files: they were trashing the tar file header.
6645 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
6646 Add -y or --bzip2 or --bunzip2 option.
6648 1999-01-30 Paul Eggert <eggert@twinsun.com>
6650 * src/names.c (cached_no_such_uname, cached_no_such_gname,
6651 cached_no_such_uid, cached_no_such_gid): New vars.
6652 (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
6653 Cache failures, too.
6655 * src/tar.c (decode_options):
6656 Don't pass names longer than UNAME_FIELD_SIZE to
6657 uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
6659 1999-01-27 Paul Eggert <eggert@twinsun.com>
6661 * NEWS, configure.in: Version 1.12.64003
6663 * src/buffer.c (backspace_output, close_archive): Cast
6664 rmtlseek position arg to off_t, for benefit of K&R compilers
6666 * src/compare.c (verify_volume): Likewise.
6668 * NEWS, configure.in: Version 1.12.64002
6670 * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
6671 off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
6672 Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
6673 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
6674 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
6675 uid_from_oct): Likewise.
6677 1999-01-25 Paul Eggert <eggert@twinsun.com>
6679 * incremen.sh: Fix timing bug in regression test.
6681 1999-01-22 Paul Eggert <eggert@twinsun.com>
6683 * NEWS, configure.in: Update version
6685 * Makefile.am (localedir): Change to $(datadir)/locale.
6686 (DEFS): New macro, defining LOCALEDIR.
6687 (tar.o, tar._o, rmt.o, rmt._o): Remove.
6688 (INCLUDES): Add -I..
6690 * Makefile.am (localedir): Change to $(datadir)/locale.
6692 1999-01-21 Paul Eggert <eggert@twinsun.com>
6694 * NEWS, README, configure.in: Unofficial version 1.12.64001.
6696 * tests/Makefile.am (localedir): Change to $(datadir)/locale.
6697 * src/Makefile.am (localedir): Likewise.
6698 (DEFS): New macro, defining LOCALEDIR.
6699 (tar.o, tar._o, rmt.o, rmt._o): Remove.
6700 (INCLUDES): Add `-I..'.
6702 * tests/incremen.sh: Fix timing bug.
6704 1999-01-20 Paul Eggert <eggert@twinsun.com>
6706 * NEWS, README, configure.in: Unofficial version 1.12.64000.
6707 `lfs.7' changed to `64000' in version number
6708 to conform to gnits standards.
6710 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
6711 mkinstalldirs, ansi2knr.c: Update to latest public versions.
6713 Rebuild with automake 1.4 and autoconf 2.13, to work around some
6716 1998-12-07 Paul Eggert <eggert@twinsun.com>
6718 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
6720 * src/list.c (read_header):
6721 Accept file names as specified by POSIX.1-1996 section 10.1.1.
6723 1998-11-30 Paul Eggert <eggert@twinsun.com>
6725 * configure.in: Quote the output of uname.
6727 * src/extract.c (set_stat): chmod after chown even when not root;
6728 if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
6730 1998-11-15 Paul Eggert <eggert@twinsun.com>
6732 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
6734 * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
6735 ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
6737 1998-10-28 Paul Eggert <eggert@twinsun.com>
6739 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
6741 * src/system.h (voidstar): Use void * if __STDC__ is defined,
6744 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
6745 On many installations, rexec is disabled.
6747 1998-08-07 Paul Eggert <eggert@twinsun.com>
6749 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
6751 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
6752 for nameless users and groups.
6754 1998-02-17 Paul Eggert <eggert@twinsun.com>
6756 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
6757 * NEWS, README: Add explanation of why this isn't an official version.
6759 1998-02-02 Paul Eggert <eggert@twinsun.com>
6761 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
6762 This is an unofficial version.
6764 1997-12-17 Paul Eggert <eggert@twinsun.com>
6766 * src/incremen.c (ST_DEV_MSB): New macro.
6767 (NFS_FILE_STAT): Use most significant bit of st_dev,
6768 even if it's unsigned.
6770 1997-12-08 Paul Eggert <eggert@twinsun.com>
6772 * src/system.h (ST_NBLOCKS): Fix typo in definition.
6774 1997-11-19 Paul Eggert <eggert@twinsun.com>
6776 * configure.in (HAVE_INTTYPES_H):
6777 Don't ignore cache variable if it's already set.
6779 1997-11-10 Paul Eggert <eggert@twinsun.com>
6781 * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
6782 * src/delete.c (records_read): Now off_t.
6783 (move_archive): Don't assume mt_count is of type daddr_t.
6785 1997-10-30 Paul Eggert <eggert@twinsun.com>
6787 * configure.in (CPPFLAGS, LDFLAGS, LIBS):
6788 Set to appropriate values if large file support
6789 needs explicit enabling.
6790 (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
6792 New macros to configure.
6793 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
6795 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
6796 major_t, minor_t, ssize_t): New macros.
6798 * src/arith.h (TARLONG_FORMAT):
6799 Fix typo: %uld -> %lu. Use unsigned when long long
6801 (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
6802 (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
6804 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
6805 2nd arg is now unsigned long.
6807 * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
6808 (prepare_record_buffer): Arg is now size_t.
6809 Remove now-useless casts.
6811 (main): Use `long' for status, so that it can store ssize_t.
6812 Use daddr_t, mode_t, size_t, off_t when appropriate.
6813 Convert daddr_t and off_t values ourselves, since they might be longer
6814 than long. Convert other types using `long' primitives.
6815 When processing MTIOCTOP, do not try to pass resulting
6816 count back, since it won't work (it could be too large) and it's
6817 not expected anyway.
6820 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
6821 now-useless casts. Use unsigned long to print *_t types, except use
6822 STRINGIFY_BIGINT for off_t.
6823 (update_archive): Cast -1 to dev_t when necessary.
6825 * src/tar.c (check_decimal):
6826 Now returns 1 if successful, 0 otherwise, and returns
6827 uintmax_t value into new arg. Check for arithmetic overflow.
6828 (decode_options): Avoid overflow if record_size fits in size_t but not int.
6829 Check for overflow on user or group ids.
6831 * src/compare.c (diff_init, process_rawdata, read_and_process,
6832 diff_sparse_files, diff_archive):
6833 Use off_t, pid_t, size_t, ssize_t when appropriate.
6834 Remove now-useless casts. Use unsigned long to print *_t types,
6835 except use STRINGIFY_BIGINT for off_t.
6837 (process_noop, process_rawdata, process_dumpdir, read_and_process):
6838 Size arg is now size_t.
6840 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
6841 when allocating buffer.
6844 (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
6845 Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
6846 Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
6849 (get_status_string, get_status_off): New function.
6850 (get_status): Now returns long, so that it can store ssize_t.
6851 Invoke get_status_string to do the real work.
6852 (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
6853 (rmt_lseek__): Now returns off_t, using new get_status_off function.
6854 (rmt_ioctl__): Convert mt_count by hand,
6855 since it might be longer than long.
6857 * src/mangle.c (extract_mangle):
6858 Check for overflow when converting off_t to size_t.
6859 Use off_t, size_t when appropriate. Remove now-useless casts.
6861 * src/system.h (mode_t): Remove; now done by autoconf.
6862 (ST_NBLOCKS): Do not overflow if st_size is near maximum.
6863 Return number of ST_NBLOCKSIZE-byte blocks,
6864 not number of 512-byte blocks;
6865 this also helps to avoid overflow.
6866 (st_blocks): Declare if needed.
6867 (ST_NBLOCKSIZE): New macro.
6868 (<limits.h>, <inttypes.h>): Include if available.
6869 (CHAR_BIT): New macro.
6870 (uintmax_t): New typedef.
6871 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
6872 UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
6873 OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
6875 * src/names.c (name_init):
6876 Fix typo in error message: FILE* was passed, but char*
6879 (read_name_from_file, name_gather, addname, name_match, name_scan,
6880 add_exclude): Use size_t when appropriate. Remove now-useless casts.
6882 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
6884 * src/extract.c (newdir_umask, current_umask): Now mode_t.
6885 (extract_sparse_file): Args now use off_t.
6887 (set_mode, set_stat, make_directories, extract_sparse_file,
6888 extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
6889 now-useless casts. Use unsigned long to print *_t types, except use
6890 STRINGIFY_BIGINT for off_t.
6892 * src/misc.c (quote_copy_string):
6893 Use size_t when appropriate. Remove now-useless casts.
6895 * src/list.c (read_and, list_archive, read_header, decode_mode,
6896 print_header, print_for_mkdir):
6897 Use mode_t, off_t, size_t when appropriate. Remove
6898 now-useless casts. Use unsigned long to print *_t types, except use
6899 STRINGIFY_BIGINT for off_t.
6901 (read_header): Check for overflow when converting header size.
6903 (from_oct): Now static. Now returns uintmax_t. `where' arg is now
6904 const char *. Size arg is now size_t. Now takes new type and maxval
6905 args. Compute result using uintmax_t, not long. Report error if
6906 field does not contain octal number in range.
6907 (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
6908 off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
6909 uintmax_from_oct): New functions.
6911 (stringify_uintmax_t_backwards): New function.
6913 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
6914 (skip_file): Offset arg is now off_t.
6916 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
6917 real_s_totsize, real_s_sizeleft, current_block_ordinal):
6919 (write_error): Arg is now ssize_t.
6920 (child_pid): Now pid_t.
6921 (available_space_after): Now size_t.
6923 (child_open_for_compress, child_open_for_uncompress, flush_write,
6924 open_archive, flush_write, write_error, flush_read, close_archive):
6925 Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
6926 casts. Use unsigned long to print *_t types, except use
6927 STRINGIFY_BIGINT for off_t.
6929 * src/delete.c (records_read): Now daddr_t.
6930 (move_archive): Arg is now daddr_t. Check for overflow when
6932 (move_archive, delete_archive_members): Use daddr_t, off_t when
6933 appropriate. Remove now-useless casts.
6935 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
6936 (rmt_lseek): Now returns off_t.
6938 * src/create.c (to_oct):
6939 Now static. Value arg is now uintmax_t. Accept new args
6940 giving name of type of octal field, for error messages. Report an
6941 error if the value is too large to fit in the field.
6942 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
6943 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
6945 (write_eot, write_long, finish_header, deal_with_sparse,
6946 finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
6947 appropriate. Remove now-useless casts. Use unsigned long to print
6948 *_t types, except use STRINGIFY_BIGINT for off_t.
6950 (find_new_file_size): 1st arg is now off_t*.
6951 (finish_sparse_file): Args now use off_t, not long.
6952 Check for lseek error.
6953 (create_archive, dump_file): Cast -1 to dev_t when necessary.
6954 (dump_file): Device arg is now dev_t.
6955 Avoid overflow when testing whether file has holes
6956 by using the new ST_NBLOCKSIZE macro.
6958 * src/incremen.c (struct accumulator, add_to_accumulator,
6959 get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
6960 Use size_t for sizes.
6961 (struct directory, get_directory_contents, add_hierarchy_to_namelist):
6962 Use dev_t, ino_t for devices and inodes.
6963 (gnu_restore): Use off_t for file offsets.
6964 (struct directory): Use char for flags. Add new flag `nfs'.
6966 (NFS_FILE_STAT): New macro.
6967 (note_directory): Accept struct stat * instead of
6968 device and inode number. All callers changed.
6969 (note_directory, get_directory_contents):
6970 Use NFS_FILE_STAT to determine whether directory is an NFS directory.
6971 (write_dir_file): Cast time_t to unsigned long before printing as %lu.
6973 * src/common.h (record_size, struct name, struct sp_array,
6974 available_space_after):
6975 Use size_t for sizes.
6976 (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
6977 Use off_t for file offsets.
6978 (struct name): dir_contents is now const char *, not char *.
6979 (dump_file, get_directory_contents): Use dev_t for devices.
6980 (to_oct): Remove decl.
6981 (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
6982 UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
6983 GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
6984 OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
6985 UINTMAX_FROM_OCT): New macros.
6986 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
6987 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
6988 stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
6989 minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
6990 time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
6991 (print_for_mkdir): 2nd arg is now mode_t.
6993 See ChangeLog.1 for earlier changes.
6997 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software
7000 This file is part of GNU tar.
7002 GNU tar is free software; you can redistribute it and/or modify
7003 it under the terms of the GNU General Public License as published by
7004 the Free Software Foundation; either version 2, or (at your option)
7007 GNU tar is distributed in the hope that it will be useful,
7008 but WITHOUT ANY WARRANTY; without even the implied warranty of
7009 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7010 GNU General Public License for more details.
7012 You should have received a copy of the GNU General Public License
7013 along with GNU tar; see the file COPYING. If not, write to
7014 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
7015 Boston, MA 02110-1301, USA.
7019 version-control: never