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