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