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