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