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