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