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