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