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