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