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