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