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