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