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