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