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