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