1 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3 * bootstrap: Extended --update-po option to take an
4 optional argument specifying the po file to update.
5 * src/create.c: Improved compatibility with 1.13.25
6 * tests/link01.sh: New file.
7 * tests/Makefile.am: Added link01.sh
9 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
13 * patches/argp.diff: Remove; no longer needed.
15 * lib/.cvsignore: Add stat-macros.h.
16 Remove addext.c, malloc.c, realloc.c.
18 * src/extract.c: Include <getcwd.h>.
19 (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
20 * src/extract.c (make_directories):
21 FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
22 * src/misc.c (must_be_dot_or_slash): Likewise.
23 * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
25 * src/tar.c (parse_opt): Likewise.
26 * src/incremen.c (purge_directory): Fix format buffer typos in warning
28 * src/tar.c (options): Add missing initializers to pacify gcc.
29 (decode_options): Remove unused var.
31 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
33 * bootstrap (gnulib_modules): Add getpagesize.
34 * configure.ac (valloc): Remove check; valloc no longer used.
35 * lib/.cvsignore: Add getpagesize.h.
36 * m4/.cvsignore: Add getpagesize.m4.
37 * src/buffer.c (record_buffer): New var.
38 (open_archive): Don't use valloc; on older or buggy hosts, you can't
39 free the result. Use page_aligned_alloc instead.
40 * src/compare.c (diff_init): Likewise.
41 * src/buffer.c (open_archive): Record the pointer to be freed
43 (close_archive): Free record_buffer.
44 * src/common.h (page_aligned_alloc): New decl.
45 * src/misc.c (quote_n, quote): Remove these redundant functions.
46 (ptr_align): New function, from coreutils/src/system.h.
47 (page_aligned_alloc): New function.
48 * src/system.h (valloc): Remove.
50 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
52 * src/extract.c (extract_archive): Do not report an error
53 when hard-linking X to X when X exists. Problem reported by
55 * lib/.cvsignore: Add fchown-stub.c.
57 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
60 * src/common.h (root_device): New global.
61 (gnu_restore): Renamed to purge_directory().
62 * src/extract.c (extr_init): Save the device number
64 (extract_archive): Renamed gnu_restore() to purge_directory().
65 * src/incremen.c (gnu_restore): Renamed to purge_directory().
66 Do not attempt to purge the directory if it is on a different
67 device and one_file_system_option is set.
69 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
71 * doc/tar.texi: The actual default for exclude patterns
72 is --no-anchored. Fixed.
73 * src/tar.c (options): Likewise.
74 Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
76 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
78 * doc/tar.texi: Fixed several inconsistencies.
79 * src/tar.c: Fixed docstring for --checkpoint option.
81 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
83 * src/buffer.c (seek_archive): New function
84 * src/common.h (seek_archive): New function
85 (seekable_archive): New global.
86 * src/list.c (skip_file): Use seek_archive() if
88 * src/tar.c (struct fmttab): Accept 'pax' as alias
90 (options): New option -n (--seek).
91 * src/update.c: Determine type of the archive before
96 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
98 * bootstrap: New option --update-po
99 * src/tar.c: New option -H (short alias to --format)
100 * doc/tar.texi: Document -H option
101 * src/names.c (safer_name_suffix): Fixed bug introduced
104 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
106 * bootstrap: Apply patches from patch subdirectory
108 * patches/argp.diff: New file
109 * patches/getopt.diff: New file
110 * configure.ac: Check for _getopt_long_only_r and
111 force using included version of getopt if the function
113 * src/tar.c: Use argp for command line parsing.
114 * src/system.h: Minor formatting fix
115 * m4/.cvsignore: Updated
116 * lib/.cvsignore: Updated
117 * doc/tar.texi: Minor fix.
118 * src/extract.c: Fix improper use of 'path' term
119 * src/incremen.c: Likewise
120 * src/list.c: Likewise
121 * src/misc.c: Likewise
122 * src/names.c: Likewise
123 * src/rmt.h: Likewise
124 * src/rtapelib.c: Likewise
125 * src/update.c: Likewise
126 * src/xheader.c: Likewise
127 * tests/star/README: Minor fix
129 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
131 * configure.ac: Raised version number to 1.14.1
132 * src/tar.c: Renamed --strip-path to --strip-components
133 Changed improper use of _() to ngettext().
134 * src/extract.c: Renamed strip_path_option to strip_components_option
135 * src/common.h: Likewise.
137 * doc/tar.texi: Updated
139 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
141 * src/system.c (sys_child_open_for_uncompress): Do not
142 set read_full_records_option: the compressed archive is
143 likely not to contain integer number of records. Should
144 the user wish to use reblocking, he may always give tar
145 -B option. This is a minor improvement over the change
147 * src/buffer.c (open_archive): Removed assignment to
148 read_full_records_option.
150 * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
151 as the format argument, rather than a possibly-translated variable
152 string. Patch provided by Jim Meyering <jim@meyering.net>
153 * src/tar.c (decode_options): Fixed typo in the comment.
154 * tests/star/README: Minor correction
156 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
158 * directory: New file. GNU directory entry for tar.
159 * doc/Makefile.am: Rewritten. Added rules for generating
160 documentation for the project's website.
161 * doc/.cvsignore: Updated
162 * doc/index.html.in: New file.
164 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
166 * configure.ac: Raised version number to 1.14
168 * tests/after: Added copyleft statement
169 * tests/before: Added copyleft statemente
170 * tests/preset.in: Added copyleft statement
172 Tar 1.14 is released. Sources up to this point are tagged
175 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
177 * configure.ac: Fixed prerequisite headers for sys/buf.h
179 * src/system.h: Likewise.
180 * tests/after (compare): Fixed argument quoting under eval
181 * tests/before: Quote TAR_ARCHIVE_FORMATS
183 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
188 * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
189 DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
190 the pathname of the rmt utility.
191 New option --enable-backup-scripts.
192 * doc/tar.texi: Updated
193 * scripts/Makefile.am: Install the scripts only if requested
195 * scripts/backup.in: Fixed --version output.
196 Fixed initialization of the listing files and printing
197 the time of the last previous level dump.
198 * scripts/restore.in: Fixed --version output.
199 * src/Makefile.am (localedir.h rule): Generate correct
200 DEFAULT_RMT_COMMAND variable.
201 * src/common.h (rmt_command_option): New variable.
202 * src/list.c (read_and): Print block number before
203 issuing 'Skipping to next header' diagnostics, if
204 requested by block_number_option.
205 * src/rtapelib.c: Use rmt_command_option instead of
206 hardcoded "/etc/rmt".
207 * src/tar.c: New option --rmt-command.
208 (decode_options): Handle --rmt-command. Initialize
209 rmt_command_option to DEFAULT_RMT_COMMAND.
211 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
213 * doc/tar.texi: Further update.
215 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
217 * configure.ac: Minor fix
218 * scripts/Makefile.am: Updated
219 * scripts/backup-specs: Updated
220 * scripts/backup.in: Minor fixes
221 * scripts/backup.sh: Removed
222 * scripts/backup.sh.in: New file. Source for backup.sh
223 * scripts/restore.in: New file
224 * scripts/.cvsignore: Updated
225 * scripts/WARNING: Removed
226 * doc/tar.texi: Updated
229 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
231 * src/names.c (name_gather): Bugfix: Honor single -C with
233 * tests/same-order01.sh: New file
234 * tests/same-order02.sh: New file
235 * tests/Makefile.am: Updated
237 * tests/append.sh: Added copyleft header
238 * tests/delete01.sh: Likewise
239 * tests/delete02.sh: Likewise
240 * tests/delete04.sh: Likewise
241 * tests/extrac01.sh: Likewise
242 * tests/extrac02.sh: Likewise
243 * tests/extrac03.sh: Likewise
244 * tests/extrac04.sh: Likewise
245 * tests/gzip.sh: Likewise
246 * tests/ignfail.sh: Likewise
247 * tests/incremen.sh: Likewise
248 * tests/multiv01.sh: Likewise
249 * tests/old.sh: Likewise
250 * tests/options.sh: Likewise
251 * tests/recurse.sh: Likewise
252 * tests/version.sh: Likewise
253 * tests/volume.sh: Likewise
254 * tests/star/gtarfail.sh: Likewise
255 * tests/star/gtarfail2.sh: Likewise
256 * tests/star/multi-fail.sh: Likewise
257 * tests/star/pax-big-10g.sh: Likewise
258 * tests/star/qucktest.sh: Likewise
259 * tests/star/ustar-big-2g.sh: Likewise
260 * tests/star/ustar-big-8g.sh: Likewise
262 * doc/.cvsignore: Updated
264 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
266 * configure.ac: Check whether date accepts +format argument
267 (for backup scripts).
268 * scripts/level-0: Removed
269 * scripts/level-1: Removed
270 * scripts/weekly.new: Removed
271 * scripts/dump-remind: Removed
272 * scripts/backup.in: New file
273 * scripts/backup.sh: New file
274 * scripts/dump-remind.in: New file
275 * scripts/backup-specs: Updated
276 * scripts/Makefile.am: Updated for new directory contents.
277 * scripts/.cvsignore: Updated
279 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
282 * doc/tar.texi: Updated
283 * src/tar.c: --utc implies -vv
285 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
287 * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
288 does not define it if it fails to find iconv.h.
290 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
292 * bootstrap: Use gnulib-tool to generate lib/Makefile.am
293 and parts of configure.ac
294 * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
295 * lib/Makefile.am: Removed
296 * lib/Makefile.tmpl: New file.
297 * lib/.cvsignore: Updated
298 * m4/.cvsignore: Updated
299 * src/xheader.c: Include stpcpy.h
301 * src/create.c: Produce an error, not warning, if the
302 filename is too long.
303 * tests/longv7.sh: Synchronized with the recent changes.
305 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
307 * configure.ac: Fixed test for iconv_t
308 * src/rmt.h: Bugfix by Jürgen Weigert
309 * THANKS: Add Jürgen Weigert
310 * tests/star/README: Fixed typo
312 2004-04-04 Paul Eggert <eggert@twinsun.com>
314 Merge getdate documentation changes from coreutils.
316 * doc/getdate.texi: Update from coreutils CVS.
317 * doc/tar.texi: Fix getdate menu to match getdate.texi's.
319 Merge recent gnulib changes, and remove some lint.
321 Improve support for nanosecond-resolution time stamps.
322 * bootstrap: Add gettime, timespec modules.
323 * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
324 * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
326 * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
327 * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
328 st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
329 * src/common.h (newer_mtime_option): Now a struct timespec, not
330 time_t. All uses changed.
331 (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
332 * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
333 * src/incremen.c (scan_path): Likewise.
334 * src/list.c (read_and): Likewise.
335 * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
336 whether newer_mtime_option is initialized.
337 * src/tar.c (decode_options): Likewise.
338 * src/tar.c (decode_options): Adjust to new signature for get_date.
340 * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
341 result of safe_read, full_write, and similar functions.
342 Detect safe_read error by comparing to SAFE_READ_ERROR;
343 detect full_write error by comparing to 0.
345 * src/common.h (write_error_details, sys_write_archive_buffer):
347 * src/misc.c (write_error_details): Likewise.
348 * src/rmt.c (main): Likewise.
349 * src/rmt.h (rmt_read__, rmt_write__): Likewise.
350 * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
351 * src/sparse.c (sparse_scan_file, sparse_dump_region,
352 check_sparse_region, check_data_region): Likewise.
353 * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
354 sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
355 * src/update.c (append_file): Likewise.
357 * src/buffer.c (clear_read_error_count): Use explicit (void)
358 to indicate a function with no arguments.
359 * src/create.c (check_links): Likewise.
360 * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
361 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
362 sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
363 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
365 * src/utf8.c (get_input_charset): Likewise.
366 * src/xheader.c (xheader_ghdr_name, xheader_write_global,
367 xheader_decode_global, extended_header_init): Likewise.
368 * tests/mksparse.c (usage): Likewise.
370 * src/buffer.c (new_volume): Rename local variables to avoid
372 * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
373 sparse_file_p, sparse_member_p, sparse_fixup_header,
374 sparse_dump_file, sparce_extract_file, sparse_skip_file,
375 sparse_diff_file): Likewise.
376 * src/compare.c (diff_archive): Likewise.
377 * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
378 dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
380 * src/extract.c (repair_delayed_set_stat): Likewise.
381 * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
383 * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
384 tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
385 sparse_dump_file, sparse_file_p, sparse_member_p,
386 sparse_fixup_header, sparse_extract_file, sparse_skip_file,
387 check_data_region, sparse_diff_file): Likewise.
388 * src/system.c (sys_stat_nanoseconds): Likewise.
389 * src/xheader.c (xheader_format_name): Likewise.
391 * src/common.h (enum old_files): Remove comma before }; not portable.
393 * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
394 * src/rmt.c (usage): Likewise.
395 * src/xheader.c (xheader_set_single_keyword): Likewise.
396 * tests/genfile.c (usage): Likewise.
397 * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
400 * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
402 * src/names.c (uname_to_uid, gname_to_gid): Likewise.
403 * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
404 langtab.charset, charset_lookup): Likewise.
406 * src/common.h (name_init): Remove unused args. All callers changed.
407 * src/names.c (name_init): Likewise.
409 * src/common.h (usage, xheader_write, xheader_write_global,
410 sys_reset_uid_gid): New decls.
412 * src/compare.c (report_difference, process_noop): Add
413 __attribute__ ((unused)) for unused attributes.
414 * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
416 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
417 gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
418 path_coder, size_coder, uid_coder, uname_coder,
419 sparse_numblocks_coder): Likewise.
421 * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
422 dump_file0): Now static.
423 * src/utf8.c (charset_lookup): Likewise.
424 * src/xheader.c (xheader_protected_pattern_p,
425 xheader_protected_keyword_p, xheader_set_single_keyword,
426 xheader_keyword_deleted_p, xheader_keyword_override_p,
427 xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
429 * tests/genfile.c (usage): Likewise.
430 * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
433 * src/create.c (hash_link): Rewrite to avoid cast.
435 * src/extract.c (file_newer_p): Use parameter, not global var.
436 * src/misc.c (write_error_details): Likewise.
438 * src/extract.c (prepare_to_extract): Remove directory arg; not
439 used. All callers changed.
441 * src/misc.c (close_fatal): Remove; not used.
442 * src/system.c (sys_utimes): Likewise.
444 * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
446 * src/rmt.c (main): Update copyright date to 2004.
447 * src/tar.c (decode_options): Likewise.
449 * src/rtapelib.c (get_status_string): Don't lose errno when
450 skipping the error messages.
451 (get_status): Report an error if atol returns a negative number.
453 * src/utf8.c (struct langtab, langtab, charset_lookup,
454 get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
456 (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
457 Use macros, not definitions, to avoid type clashes with system
459 (charset_lookup): Local var is now auto, not static.
460 (utf8_convert): Use ICONV_CONST instead of const, to avoid
463 * src/utf8.c (langtab): Initialize all elements of struct, to
465 * src/xheader.c (xhdr_tab): Likewise.
467 * src/xheader.c: Include fnmatch.h, since we use fnmatch.
469 * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
471 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
474 * configure.ac: Raised version number to 1.13.94
475 * src/system.h: Protect inclusion of <sys/time.h>
477 Declare time() if HAVE_DECL_TIME is 0
478 * tests/.cvsignore: Added mksparse
480 * tests/sparse01.sh: New file
481 * tests/multiv02.sh: New file
482 * tests/Makefile.am: Add sparse01.sh and multiv02.sh
483 * tests/longv7.sh: Added missing call to 'after'
485 * src/common.h: Added missing prototypes
486 * src/compare.c (diff_archive): Use is_sparse member
487 instead of GNUTYPE_SPARSE.
488 * src/create.c: Removed unused variables
489 * src/extract.c (extract_archive): Use sparse_member_p instead
491 Removed unused variables
492 * src/list.c (decode_header): Use sparse_fixup_header to correct
494 (print_header): Do not rely on GNUTYPE_SPARSE type.
495 Use st->stat.st_size to print real file size.
496 (skip_member): Assign stat_info.file_name to save_name. This fixes
497 bug reported by Mads Martin Joergensen <mmj@suse.de>
498 Use sparse_skip_file() to skip sparse members.
499 * src/rtapelib.c: include "common.h"
500 * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
501 (struct tar_sparse_optab.fixup_header): New member
502 (tar_sparse_member_p): New function.
503 (tar_sparse_init): Return true if decode_header is not provided
504 (tar_sparse_fixup_header)
505 (sparse_member_p,sparse_fixup_header)
507 (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
508 (star_fixup_header, pax_sparse_member_p): New function
509 (pax_decode_header): Remove
510 * src/system.h: Include <sys/time.h> and <utime.h> when available
511 * src/tar.c (usage): Prototype moved to common.h
512 * src/tar.h (struct tar_stat_info.is_sparse): New member
513 * src/utf8.c (utf8_convert): Changed prototype
514 (get_input_charset): Removed unused variable
515 * src/xheader.c: include <fnmatch.h>
516 (size_decoder): Assign to both st->archive_file_size and
518 (st->stat.st_size): Assign to st->stat.st_size
519 (sparse_numbytes_decoder): Removed unused variable
520 * src/.cvsignore: Added .gdbinit
521 * THANKS: Added Mads Martin Joergensen
523 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
525 * src/create.c (write_long_name): Do not allow more than
526 NAME_FIELD_SIZE-1 characters in a file name for V7 format
528 * tests/longv7.sh: New file.
529 * tests/Makefile.am: Add longv7.sh
531 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
533 * src/buffer.c (open_archive): Clear read_full_records_option
534 if reading from a pipe.
535 (short_read): Display warning about the deduced record size
537 * tests/star/pax-big-10g.sh: Updated to match the above changes.
538 * tests/star/ustar-big-2g.sh: Likewise.
539 * tests/star/ustar-big-8g.sh: Likewise.
541 * configure.ac: Added gl_FUNC_STRTOULL
542 * src/create.c (start_header): Check for GNU_FORMAT
543 if incremental_option is set.
544 * src/xheader.c (to_decimal): New function.
545 (xheader_format_name): Use to_decimal() instead of snprintf.
546 * tests/listed01.sh: Use genfile instead of dd
547 * tests/multiv01.sh: Likewise.
549 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
551 * src/list.c (read_and): Stop processing the archive after
552 encountering a single zero record. Many old archives contain
553 arbitrary garbage after it.
554 The warning is issued anyway.
556 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
558 * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
559 conversion buffer was not null terminated. Fix provided
560 by Leland Lucius <llucius@tiny.net>
561 * THANKS: Added Leland Lucius
562 * src/utf8.c (utf8_convert): Indentation fix.
564 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
566 * src/buffer.c (flush_read): Bugfix: the
567 condition at line 714 included
569 || (status > 0 && !read_full_records_option)
571 which is grossly wrong, since even if new_volume() below succeeds,
572 the subsequent call to rmtread will overwrite the chunk of data
573 already read in the buffer and thus spoil everything.
574 * src/system.c (sys_child_open_for_uncompress): Minor stylistic
576 * tests/star/multi-fail.sh: New test.
577 * tests/Makefile.am: Added multi-fail.sh
578 * tests/star/README: Updated
580 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
583 * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
584 * src/common.h (utc_option): new global
585 (enum old_files.KEEP_NEWER_FILES): New element
586 * src/extract.c: Handle --keep-newer-files option
587 * src/list.c (tartime): Print UTC if --utc was given.
588 * src/tar.c: New options: --utc and keep-newer-files
590 * tests/Makefile.am: Added new tests
591 * tests/after: Rewritten
592 * tests/before: Rewritten
593 * tests/preset.in: Rewritten
594 * tests/delete03.sh: Accomodate for the new testsuite logic
595 * tests/gzip.sh: Likewise
596 * tests/incremen.sh: Likewise
597 * tests/listed01.sh: Likewise
598 * tests/multiv01.sh: Likewise
599 * tests/old.sh: Likewise
600 * tests/options.sh: Likewise
601 * tests/version.sh: Likewise
602 * tests/volume.sh: Likewise
604 * tests/star: New directory
605 * tests/star/README: New file
606 * tests/star/gtarfail.sh: New file
607 * tests/star/gtarfail2.sh: New file
608 * tests/star/pax-big-10g.sh: New file
609 * tests/star/qucktest.sh: New file
610 * tests/star/ustar-big-2g.sh: New file
611 * tests/star/ustar-big-8g.sh: New file
613 2004-02-26 Paul Eggert <eggert@twinsun.com>
615 * doc/tar.texi (dircategory Individual utilities): Append period,
616 as suggested by Karl Berry.
618 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
620 * src/list.c (decode_header): Call xheader_decode before
621 the assignment to current_stat_info.archive_file_size.
623 2004-02-23 Paul Eggert <eggert@twinsun.com>
625 * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
627 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
632 * tests/before: Move testing of the prerequisite archive formats
633 to the separate function 'prereq'. Do not expect any arguments
634 * tests/delete03.sh: Use prereq() instead of passing arguments
636 * tests/incremen.sh: Likewise.
637 * tests/listed01.sh: Likewise.
638 * tests/multiv01.sh: Likewise.
640 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
642 Added UTF-8 support. Finished global extended header
646 * configure.ac: Detect libiconv
647 * src/utf8.c: New file. Conversions to and from utf-8.
648 * src/Makefile.am: Added utf8.c
649 * src/create.c (write_header_name) In pax format, use
650 "path" keyword if the file name is not ASCII
651 (start_header): Likewise for uname and gname.
652 * src/list.c: Decode encountered global headers.
653 * src/xheader.c: Use keywords from the global
655 Correctly handle UTF-8 conversions.
656 (xheader_list_destroy): New function.
657 (xheader_set_single_keyword,xheader_set_keyword_equal): Added
658 missing gettext markers
659 (decode_record): Rewritten using caller-provided handler and
661 * tests/listed01.sh: Give credit to Andreas Schuldei.
663 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
665 * src/create.c (dump_file0): The conditional at line
666 1296 prevented incremental backups on individual files
667 from working, as reported by Andreas Schuldei
668 <andreas@schuldei.org>.
670 This is due to the condition
672 (0 < top_level || !incremental_option)
674 Removing it makes incremental backups work for individual
675 files as well as for directories. On the other hand, it does
676 not affect other functionality, as shown by the reasoning below:
678 To begin with, the two parts of this condition are mutually
681 1) when top_level < 0, incremental_option == 1
682 so the condition yields false
683 2) when top_level >= 0, incremental_option == 0
684 so the condition yields true.
686 In other words, it is completely equivalent to
688 (!incremental_option)
690 Now, let's consider the effect of its removal. There are two cases:
692 1) when incremental_option==1
693 This means incremental backup in progress. In this case dump_file
694 is invoked only for directories or for files marked with 'Y' by
695 get_directory_contents. The latter are those that did not meet the
696 condition in incremen.c:242, which is exactly the same condition
697 as this at create.c:1296. So, for these files the check
698 (!incremental_option) is useless, since the rest of the
699 conditional will yield false anyway. On the other hand, if
700 dump_file is invoked on a directory, the conditional will yield
701 false due to !S_ISDIR assertion, so these will be processed as usual.
703 Thus, for this case the extra condition (!incremental_option) is
704 irrelevant, and its removal won't alter the behavior of tar,
705 *except* that it will enable incremental backups on individual
706 files, which is the wanted effect.
708 2) when incremental_option==0
709 In this case the condition yields true and its removal does not
710 affect the functionality.
713 * configure.ac: Raised patchlevel to 93
714 * src/incremen.c: Minor stylistic fixes.
715 * tests/listed01.sh: New test. Check listed incremental
716 backups on individual files.
717 * tests/Makefile.am: Added listed01.sh
719 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
721 * src/common.h (simple_finish_header,start_private_header): New
723 (xheader_ghdr_name): Changed declaration
724 * src/create.c (start_private_header): Removed static qualifier.
725 (write_extended): Removed superfluous last argument. Use
727 (simple_finish_header): New function.
728 (finish_header): Use simple_finish_header() to break recursive
729 dependency between this function and write_extended().
730 * src/tar.c (assert_format): Do not bail out if several
731 --format arguments are given. This is a common case when
732 TAR_OPTIONS are used.
733 (decode_options): New option --show-defaults displays the
734 compiled-in defaults.
735 Use POSIX format if no --format option was given and
736 --pax-option was specified.
737 Do not allow to use --pax-option unless the archive format is
738 set to POSIX (or reading subcommand is requested).
740 * src/update.c (update_archive): Write global extended header if
742 * src/xheader.c (xheader_format_name): Bugfix.
743 (xheader_xhdr_name): Changed the default extended header name
744 to '%d/PaxHeaders.%p/%f', as POSIX requires.
745 (xheader_ghdr_name): Removed unused argument.
746 (xheader_write,xheader_write_global): New function.
747 (xheader_decode): Modified to honor overrides whatever
748 the current archive format is.
750 * src/delete.c (delete_archive_members): Call xheader_decode
752 * src/list.c (decode_header): Likewise.
753 * src/incremen.c (sort_obstack): Fixed typo in the comment
755 * doc/tar.texi: Document new default for extended
758 * tests/before: Accept an optional list of allowed archive
759 formats. Exit with the status 77 if the current archive
760 format does not match any of them.
761 * tests/delete03.sh: Require gnu, oldgnu or posix format
762 * tests/incremen.sh: Require gnu or oldgnu format
763 * tests/multiv01.sh: Likewise
765 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
767 * doc/tar.texi (Option Summary): Documented --pax-option
768 * src/tar.c: Likewise.
770 * src/create.c (to_chars): Added a comment.
771 * src/tar.h: Comment to GNU_FORMAT
773 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
776 * configure.ac: Added stpcpy
777 * bootstrap: Likewise
778 * lib/Makefile.am: Likewise
779 * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
781 * src/create.c (write_extended): Call xheader_xhdr_name
782 instead of using hardcoded "././@PaxHeader" name.
783 * src/tar.c: New option --pax-option (equivalent to -o option
785 * src/xheader.c: Implement pax -o option. Fixed misleading
786 heading comment (introduced 2003-09-02).
787 * src/incremen.c: Minor fixes
788 * m4/.cvsignore: Updated
790 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
792 * src/incremen.c: Removed accumulator stuff in favor of obstack.
793 (get_directory_contents): Split into two functions
794 * src/update.c: Minor changes
795 * doc/tar.texi: Fixed typo
797 2004-02-15 Paul Eggert <eggert@twinsun.com>
799 Fix Debian bug 230872, originally reported by Jeff King in
800 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
802 * doc/tar.texi (posix compliance): Remove. The whole section
803 was a misunderstanding of what POSIXLY_CORRECT is supposed to
804 mean. The GNU Coding Standards says that POSIXLY_CORRECT
805 is for disabling extensions that are incompatible with POSIX:
806 it is not for disabling compatible extensions. All references
807 to this section removed.
808 (posix): This format is created only if the posix format is
809 specified; it is no longer created if gnu format is specified
810 and POSIXLY_CORRECT is set.
811 * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
812 POSIX does not specify the behavior of tar, so we should
813 not worry about POSIXLY_CORRECT here.
815 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
817 * Makefile.am: Removed m4
818 * configure.ac: Require automake-1.8/autoconf-2.59. Removed
820 * README-alpha: Updated
821 * bootstrap: Updated TP URL, improved help output. Default
822 to :ext:anoncvs and set CVS_RSH, unless already set.
823 * m4/Makefile.am: Removed
825 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
827 * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
828 Use $option instead of $1 so all options will be parsed.
830 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
832 Started rewriting buffer.c ...
834 * bootstrap: New option --no-po
835 * src/buffer.c (new_volume,check_label_pattern): Changed return type.
836 (time_to_start_writing): Changed data type
837 (file_to_switch_to): Removed. Variable never assigned to.
838 (open_archive) Moved option compatibility checks to tar.c
840 * src/common.h (maybe_backup_file): Changed return type
841 * src/misc.c: Likewise.
842 * src/create.c: Updated invocations of safer_name_suffix
843 * src/extract.c: Likewise
844 * src/delete.c: Updated assignment to write_archive_to_stdout
845 * src/tar.c (decode_options): More option compatibility checks
846 (moved from buffer.c)
847 * src/update.c (time_to_start_writing): Changed data type.
848 * tests/recurse.sh: New test case.
849 * tests/mksparse.c: New file.
850 * tests/Makefile.am: Added recurse.sh and mksparse.c
852 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
854 * src/sparse.c (sparse_diff_file): Bugfix. Thanks
855 Martin Simmons for the patch.
856 * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
857 <pius@pld-linux.org> for the patch.
859 2003-12-26 Paul Eggert <eggert@twinsun.com>
861 Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
862 and translation website.
864 * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
865 intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
866 isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
867 a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
868 files are replaced by autoreconf. Also, there seems to be a bug
869 in gettext/autoconf/automake if we try to omit these files after
870 autoreconf has replaced them, even though the gettext manual says
871 they're optional. So give up and just include them for now, even
872 though they make 'configure' longer and slower.
874 Change translation URL from
875 <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
876 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
877 accommodate translator website revamp.
879 Fail if autoreconf fails.
881 * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
882 signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
883 ignore files now supplied by gettext 0.13.1.
885 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
887 Synchronized with the backup repository on Mirddin
889 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
891 * configure.ac: Check for varios members of struct stat
892 that may represent file modification times with a subsecond
894 Check for utimes (for future use)
895 * src/buffer.c (short_read): Issue a warning on short reads.
896 * src/common.h (sys_stat_nanoseconds): New function
897 * src/create.c (dump_file0): Use sys_stat_nanoseconds().
898 * src/list.c (read_and): Treat only two successive zero
899 filled blocks as an EOF indicator. Issue a warning if
900 a single one is encountered.
901 * src/system.c (sys_stat_nanoseconds): New function
902 * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
904 * src/xheader.c (code_time,decode_time): Support for subsecond
906 (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
907 (mtime_coder,mtime_decoder): Update invocations of code_time and
909 (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
910 (sparse_numblocks_decoder,sparse_offset_decoder)
911 (sparse_numbytes_decoder): Updated
913 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
915 * src/names.c (safer_name_suffix): Reverted change made
916 2003-11-14. Reason: Discussion with Paul Eggert and
917 Jean-Louis Martineau. See also ChangeLog entry from
919 * tests/delete03.sh: Likewise.
920 * tests/extrac04.sh: Likewise.
921 * tests/multiv01.sh: Likewise.
923 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
925 * src/incremen.c (write_directory_file): Use sys_truncate
926 * src/list.c (print_header): Use archive_file_size member
927 when printing real file size.
928 * src/sparse.c (sparse_scan_file): Correctly handle files with
930 (sparse_dump_region,sparse_extract_region): Allow for zero size
933 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
935 * configure.ac: Raised version number to 1.13.92
936 * src/list.c (decode_header): Discern between pax and ustar
938 Initialize current_stat_info.archive_file_size.
940 NOTE: Modifications from this date on are temporarily
941 stored on local CVS on mirddin. This repository will
942 be synchronized with Savannah as soon as the latter
943 becomes operational again.
945 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
948 * src/sparse.c: Initial implementation of GNU/pax sparse
950 * src/common.h (xheader_store): Changed prototype.
951 * src/create.c: Update calls to xheader_store
952 * src/extract.c (extract_archive): Check reported size vs.
953 archive file size to determine if we have to do with a
955 * src/tar.c (usage): Cleaned up the sample argument to --newer
957 (decode_options): Allow --sparse for POSIX_FORMAT archives.
958 * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
960 Implemented GNU.sparse.* keywords.
962 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
964 * configure.ac: Check for setlocale. Thanks Bruno Haible for
967 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
969 * src/create.c (write_gnu_long_link): Use oldgnu
970 magic with @LongLink blocks.
972 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
974 * src/tar.h: Support for star sparse format.
975 * src/sparse.c: Likewise.
977 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
979 * src/sparse.c (sparse_diff_file): New function
980 * src/common.h (sys_compare_uid,sys_compare_gid): New functions
981 (sys_compare_uid_gid): Removed.
982 (sys_compare_links,report_difference): Changed prototype
983 (sparse_diff_file): New function
984 * src/system.c (sys_compare_uid,sys_compare_gid): New functions
985 (sys_compare_uid_gid): Removed.
986 (sys_compare_links): Changed declaration
987 * src/compare.c (diff_archive): Use sparse_diff_file.
989 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
991 Rewritten sparse file handling.
993 * src/sparse.c: New file. Provides a universal framework
994 for various methods for sparse files handling.
995 * src/Makefile.am: Added sparse.c
996 * src/common.h (struct sp_array,sparsearray,sp_array_size)
997 (init_sparsearray,fill_in_sparse_array): Removed
998 (enum dump_status): New data type
999 (pad_archive,close_diag,open_diag,read_diag_details)
1000 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
1002 (sparse_file_p,sparse_dump_file,sparse_extract_file): New
1004 (print_header): Changed prototype declaration.
1005 * src/tar.h (struct sp_array): Declaration from common.h
1006 (struct tar_stat_info): New members archive_file_size,
1007 sparse_map_avail,sparse_map.
1008 * src/create.c: Major rewrite.
1009 * src/extract.c: Use new sparse file interface.
1010 * src/compare.c (diff_sparse_files): Temporary placeholder.
1012 * src/buffer.c: Minor changes
1013 * src/tar.c: Likewise.
1014 * src/list.c: Likewise.
1015 * src/misc.c (close_diag,open_diag,read_diag_details)
1016 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
1017 diagnostics functions.
1018 * src/incremen.c: Use new diagnostics functions.
1019 * src/names.c: Likewise.
1021 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1023 * configure.ac: Fixed check for setsockopt
1025 * src/create.c: Do not zero-terminate name field if
1026 the name is exactly 100 characters long.
1027 (write_ustar_long_name): Fixed cheking for unsplittable
1030 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1032 * src/create.c (start_header): Removed debugging hook
1033 (dump_file): Fixed handling of linkname field.
1034 * src/names.c (safer_name_suffix): If the input
1035 file name ends with a slash, output one should do so
1037 * doc/tar.texi: Documented --format=ustar
1039 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1041 * src/tar.h (archive_format): USTAR_FORMAT: New type.
1042 * src/create.c: Added POSIX.1-1988 support.
1043 * src/names.c (safer_name_suffix): Skip leading ./
1044 * src/tar.c: New option --format=ustar forces
1045 POSIX.1-1988 archive format.
1046 * tests/delete03.sh: Updated.
1047 * tests/extrac04.sh: Updated.
1048 * tests/multiv01.sh: Updated.
1050 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1052 * src/list.c (read_and): Initialize current_stat_info
1053 and extended_header at the start of the loop.
1054 * src/names.c (all_names_found): Check if the argument
1055 contains valid filename. Fixes coredump on `not_a_tar_file'
1056 * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
1057 (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
1058 Fixes `pax-big-10g' bug.
1060 2003-11-12 Paul Eggert <eggert@twinsun.com>
1062 Fix some C compatibility bugs reported by Joerg Schilling.
1064 * src/common.h (stripped_prefix_len): Fix misspelling
1065 "stripped_path_len" in declaration.
1066 * src/rmt.c (main): Use "return FOO;" rather than
1067 "exit (FOO);"; we no longer have to worry about
1068 pre-ANSI hosts that mishandled returned values from "main".
1069 * src/tar.c (main): Likewise. This avoids warnings on some
1071 * src/system.c: Include signal.h, for 'kill'.
1072 * src/system.h (DEV_BSIZE): Remove.
1073 (DEFAULT_ST_BLKSIZE): New macro.
1074 (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
1075 * src/tar.c (enum): Remove comma just before }.
1077 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1079 * src/list.c (decode_header): Initialize st_atime and
1082 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1084 * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
1085 Bunk <bunk@fs.tum.de> for reporting.
1086 * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
1087 <martin@xemacs.org> for spotting.
1089 2003-11-04 Paul Eggert <eggert@twinsun.com>
1091 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
1094 2003-10-26 Paul Eggert <eggert@twinsun.com>
1096 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
1097 Bug reported by Christian Weisgerber.
1099 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1103 * src/tar.c (decode_options): Removed superfluous archive format
1105 * doc/tar.texi: Documented new features.
1107 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1110 * THANKS: Added Wojciech Polak
1111 * configure.ac: Added checks for missing functions. Raised
1112 version number to indicate alpha release.
1113 * lib/Makefile.am: Added missing headers
1114 * lib/waitpid.c: Added missing includes.
1115 * src/extract.c: Likewise.
1116 * src/names.c: Removed spurious includes.
1117 * src/xheader.c: Likewise.
1118 * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
1119 macro overriding broken mkdir prototypes.
1121 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1123 * configure.ac: Check for dev_t and ino_t.
1124 * m4/Makefile.am: Added missing files.
1125 * src/system.c: New file.
1126 * src/Makefile.am: Added system.c
1127 * src/common.h: Prototypes for functions from system.c
1128 * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
1129 * src/buffer.c: Moved system dependencies to system.c
1130 * src/compare.c: Likewise.
1131 * src/create.c: Likewise.
1132 * src/delete.c: Likewise.
1133 * src/extract.c: Likewise.
1134 * src/rtapelib.c: Likewise.
1136 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1138 Implemented --occurrence option.
1141 * src/tar.c: New option --occurrence.
1142 * src/common.h (occurrence_option): New global
1143 (struct name): Changed `found' member to `uintmax_t
1145 (names_done): Removed
1146 (all_names_found): Changed prototype.
1147 (ISFOUND,WASFOUND): New macros
1148 * src/delete.c (delete_archive_members): Honor --occurrence
1150 * src/list.c (read_and): Likewise.
1151 * src/names.c: Count number of occurrences of each name in the
1153 (name_match): Honor --occurrence option.
1154 (names_done): Removed
1155 (all_names_found,names_notfound): Rewritten.
1157 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1159 * src/tar.c: Removed extra precaution regarding
1160 subcommand_option == CAT_SUBCOMMAND
1161 * lib/Makefile.am: Updated
1163 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1165 * src/common.h (names_done): New function.
1166 * src/names.c: Likewise.
1167 * src/list.c (read_and): Use all_names_found() as `while'
1169 * src/tar.c: New option --first-copy
1172 2003-09-24 Paul Eggert <eggert@twinsun.com>
1174 * src/rmt.c (main): Don't translate Copyright string; international
1175 law says the word "Copyright" should be in English.
1176 * src/tar.c (decode_options): Likewise.
1178 2003-09-22 Paul Eggert <eggert@twinsun.com>
1180 * doc/tar.texi (extracting untrusted archives): New section.
1182 * src/common.h (stripped_path_len): Renamed from cut_path_elements.
1183 Return size_t, not pointer, so that we don't have to worry about
1184 violating the C standard by converting char const * to char *.
1185 All callers changed.
1186 * src/names.c (stripped_path_len): Likewise. Strip file system
1187 prefix, too. Count adjacent slashes as if they were one slash;
1188 that is the POSIX standard.
1190 2003-09-17 Paul Eggert <eggert@twinsun.com>
1192 * README-alpha: Document maintainer tool assumptions a bit. GNU
1193 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
1194 Debian bug 211447. Fix minor misspellings/whitespace nits.
1196 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
1197 gl_USE_SYSTEM_EXTENSIONS.
1199 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
1200 * m4/.cvsignore: Add restrict.m4, time_r.m4.
1202 2003-09-17 Paul Eggert <eggert@twinsun.com>
1204 * bootstrap: Don't use "for option; do";
1205 Solaris 8 /bin/sh doesn't like that.
1207 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1209 * README-alpha: Updated
1210 * bootstrap: Updated
1212 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1214 * README-alpha: Updated
1215 * bootstrap: Updated
1216 * po/POTFILES.in: Added src/xheader.c
1217 * src/common.h (cut_path_elements): Added proto.
1219 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1221 * src/buffer.c: Use ngettext where appropriate.
1222 * src/compare.c: Likewise.
1223 * src/create.c: Likewise.
1224 * src/misc.c: Likewise.
1225 * src/tar.c: Likewise.
1226 * src/update.c: Likewise.
1228 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1230 * .cvsignore: Added *.shar.gz
1233 * src/common.h (strip_path_elements): New variable.
1234 * src/extract.c (extract_archive): Implemented --strip-path
1235 * src/names.c (cut_path_elements): New functon.
1236 * src/tar.c: New option --strip-path=NUM.
1237 (decode_options) Assign boolean values to bool variables.
1239 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1241 * src/delete.c: Fixed deletion from the POSIX archives.
1242 * src/list.c (read_header): Minor change.
1243 * src/tar.c (main): Do not check for volume_label_option
1244 if subcommand_option is not CREATE_SUBCOMMAND.
1245 * src/xheader.c (xheader_decode): Store the header as
1246 well (for eventual delete).
1248 * tests/incremen.sh: Explicitly request GNU format. This will
1249 disappear when GNU extended header keywords are working.
1250 * tests/multiv01.sh: Likewise
1251 * tests/volume.sh: Likewise
1253 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1255 * src/create.c: Support for "linkpath" extended keyword.
1256 * src/xheader.c (decode_record): Reversed the return
1259 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1261 * configure.ac: Allow to redefine the default output format.
1262 * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
1263 (archive_format_string): New function.
1264 (usage): Updated help output.
1269 2003-09-02 Paul Eggert <eggert@twinsun.com>
1271 * src/common.h (destroy_stat, xheader_decode, xheader_store,
1272 xheader_read, xheader_finish, xheader_destroy): Add decls;
1275 * src/create.c (write_extended): Remove unused local 'bufsize'.
1277 * src/delete.c (delete_archive_members): Handle case of
1278 HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
1279 * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
1280 occurs, as it's not possible.
1281 * src/update.c (update_archive): Likewise.
1283 Use "const" when possible in new code.
1284 * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
1285 (fmttab): Now const. All uses changed.
1286 * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
1287 (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
1288 decode_record, xheader_store, xheader_print, code_string, code_time,
1289 code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
1290 gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
1291 linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
1292 mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
1293 uid_coder, uid_decoder, uname_coder, uname_decoder):
1294 Use pointers to const when possible.
1295 (xhdr_tab): Now const.
1297 * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
1298 (set_archive_format): Report an error if no format name matches,
1299 instead of returning an undefined value.
1301 * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
1302 atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
1303 ctime_decoder, mtime_decoder, path_decoder, size_decoder,
1304 uid_decoder, uname_decoder): Remove unused keyword arg.
1307 * src/tar.c (set_archive_format): Now static.
1308 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
1310 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
1311 atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
1312 linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
1313 ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
1314 size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
1315 Remove forward decls; no longer needed.
1316 (xhdr_tab): Move to end, so that the forward decls aren't needed.
1317 Add a forward declaration.
1319 Use 'bool' in new code, when appropriate.
1320 * src/xheader.c (decode_record): Return bool, not int.
1321 * src/common.h (read_header): Since it accepts bool, change
1322 all callers to use false and true rather than 0 and 1.
1324 * src/xheader.c (decode_record): Fix misspelling in diagnostic
1325 "extended headed" -> "extended header".
1327 GNU coding style fixes.
1328 * src/xheader.c (decode_record, xheader_decode):
1329 Do not use decls like "char *p, *q;".
1332 (xheader_store): Avoid parentheses around object operand of sizeof.
1334 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1336 * src/create.c (start_header): Store long file names
1337 in "path" keyword of an extended header if in POSIX
1339 (finish_header): print header before calling write_extended().
1340 * src/list.c (list_archive): Always decode the header. This
1341 is necessary so the extended header is processed and the correct
1342 filename is printed no matter what the state of verbose_option.
1343 * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
1344 for the time being).
1346 2003-09-01 Paul Eggert <eggert@twinsun.com>
1348 Update from gnulib, and correct fnmatch to fnmatch-gnu.
1349 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
1351 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
1353 * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
1354 * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
1355 copying rules from gnulib module descriptions.
1356 (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
1357 Update from gnulib modules alloca, fnmatch, getline, stdbool.
1358 * m4/.cvsignore: Add utimes-null.m4. Sort.
1360 2003-09-01 Sergey Poznyakoff
1362 Added initial support for creating POSIX headers.
1364 * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
1365 (string_to_chars): New functions
1366 (struct xheader): Changed structure
1367 (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
1369 * src/create.c (string_to_chars): New function.
1370 (write_extended): New function
1371 (start_header): Create extended POSIX headers if necessary.
1372 (finish_header): Likewise.
1373 * src/list.c (print_header): Take user/group from
1375 * src/names.c (gid_to_gname,gname_to_gid)
1376 (uid_to_uname,uname_to_uid): Changed prototypes.
1377 * src/tar.c: New option --format.
1378 * src/tar.h (OLDGNU_COMPATIBILITY): Removed
1379 (struct extra_header): Removed unused structure.
1380 (union block.extra_header): Removed unused member.
1381 * src/xheader.c: Implemented coder functions.
1382 * bootstrap: Added obstack.
1383 * lib/.cvsignore: Likewise.
1384 * configure.ac: Added 'gl_OBSTACK'
1385 * m4/Makefile.am: Added new files.
1386 * m4/.cvsignore: Likewise.
1387 * TODO: Minor formatting change
1389 2003-08-31 Sergey Poznyakoff
1391 Added initial support for POSIX extended and STAR headers
1392 (only for listing/extracting).
1394 * src/xheader.c: New file.
1395 * src/Makefile.am: Added xheader.c
1396 * src/tar.h (struct star_header): New datatype
1397 (XHDTYPE,XGLTYPE): New defines
1398 (enum archive_format:STAR_FORMAT): New member
1399 (struct tar_stat_info): New datatype.
1400 (union block.star_header): New member.
1401 * src/common.h (orig_file_name,current_file_name)
1402 (current_trailing_slash,current_link_name): Removed variables.
1403 (current_stat_info): New variable
1404 (current_stat): Removed
1405 (extended_header): New variable
1406 (decode_header): Changed prototype.
1407 * src/list.c (decode_header): Added initial support for POSIX extended
1409 (skip_member): Check oldgnu_header only if current_format is set
1411 * src/buffer.c: Use current_stat_info
1412 * src/compare.c: Likewise.
1413 * src/create.c: Likewise.
1414 * src/delete.c: Likewise.
1415 * src/incremen.c: Likewise.
1416 * src/mangle.c: Likewise.
1417 * src/update.c: Likewise.
1418 * src/extract.c: Likewise.
1419 (make_directories): Improved check for the existence of the directory
1420 * src/tar.c (destroy_stat): New function.
1422 2003-08-29 Paul Eggert <eggert@twinsun.com>
1424 * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
1425 was worth (e.g., different users in en_GB disagree about -ize
1427 * po/en_GB.po: Remove.
1429 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1433 * src/tar.c: Removed support for the obsolete command line
1435 * doc/tar.texi: Removed references to the obsolete command
1438 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1442 * doc/tar.texi: Updated
1443 * src/common.h (check_links_option): New variable
1444 (orig_file_name): New variable
1445 (check_links): New proto.
1446 * src/create.c (struct link.nlink): New member
1447 (link_table): Static for the module.
1448 (dump_file): Update `link' member when adding new links
1450 (check_links): New function.
1451 * src/list.c (print_header): Use orig_file_name.
1452 * src/tar.c: New option --check-links. Changed semantics of
1453 -o to comply to UNIX98 when extracting and to its previous
1454 semantics otherwise.
1455 (main): Call check_links if --check-links. was given.
1457 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1459 * src/list.c (print_header): Revised
1460 * NEWS: Started the entry for 1.13.26
1461 * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
1463 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1465 * .cvsignore: Added to the repository.
1466 * doc/.cvsignore: Likewise.
1467 * lib/.cvsignore: Likewise.
1468 * m4/.cvsignore: Likewise.
1469 * po/.cvsignore: Likewise.
1470 * scripts/.cvsignore: Likewise.
1471 * src/.cvsignore: Likewise.
1472 * tests/.cvsignore: Likewise.
1474 * lib/Makefile.am: Added exitfail.[hc]
1475 * src/misc.c (chdir_do): Fixed call to restore_cwd
1476 * src/buffer.c (flush_read): Fixed behavior on short
1477 reads right after opening the new archive (multiv01.sh test).
1478 (new_volume): Special handling for "-".
1479 * src/list.c (print_header): Print trailing slash if
1480 current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
1481 * tests/multiv01.sh: Minor changes.
1482 * m4/Makefile.am: Added missing files.
1484 2003-07-05 Paul Eggert <eggert@twinsun.com>
1486 Finish the checkin begin yesterday.
1488 * NEWS: Document the user-visible changes installed in the last
1491 * TODO: New file (actually, resurrected; but with new contents).
1493 * src/list.c (read_and): Give full type for procedure arg.
1494 (read_header): Strip trailing slashes, setting current_trailing_slash.
1495 (tartime): Avoid int overflow when printing year (!).
1496 (print_header): New arg specifying block ordinal. All uses changed.
1497 Print link as 'h' type. Give labels for long links and names.
1499 * src/misc.c (contains_dot_dot): Moved to names.c
1500 (must_be_dot_or_slash): New function.
1501 (safer_rmdir): Use it.
1502 (remove_any_file): Now takes enum as option, not boolean.
1503 Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
1504 to unlink a directory.
1505 (deref_stat): Accept bool, not int.
1507 * src/names.c (namelist_match): Allow partial matches only if
1509 (hash_string_hasher): Renamed from hash_avoided_name.
1510 (hash_string_compare): Renamed from compare_avoided_anames.
1511 (hash_string_insert, hash_string_lookup): New functions.
1512 (add_avoided_name, is_avoided_name): Use them.
1513 (safer_name_suffix): New function.
1514 (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
1516 * src/rmt.c: Don't include print-copyr.h.
1517 (prepare_input_buffer): New arg FD.
1518 Do not read more than INT_MAX bytes at once,
1519 since it breaks on some brain damaged Tru64 hosts.
1521 when retrying instead of subtracting 1024; for speed.
1522 (main): Use gettext to translate (C), not print_copyright.
1524 * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
1525 now that gnulib handles this.
1526 Include <stddef.h> and <limits.h> unconditionally, now that we assume
1528 Assume that offsetof is defined in stddef.h.
1529 Do not include <sys/param.h>.
1530 (realloc, lseek): Do not declare.
1531 (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
1532 (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
1533 declarations, since we now assume C89 or better.
1534 (PARAMS): Remove, as we now assume C89. All uses changed.
1535 (bindtextdomain, textdomain): Include <gettext.h> to define.
1536 Include <unlocked-io.h>.
1537 (valloc): Define if not defined, and if valloc is not declared.
1538 (xstrdup): Remove decl.
1540 * src/tar.c: Do not include <print-copyr.h>.
1541 Include <getdate.h>.
1542 (get_date): Remove decl.
1543 (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
1544 IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
1545 NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
1546 SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
1547 (long_options, decode_options): Use them.
1548 (OVERWRITE_DIR_OPTION): Remove.
1549 (long_options): New options --index-file, --no-overwrite-dir.
1550 Remove --overwrite-dir option.
1551 (usage): Use PACKAGE_BUGREPORT.
1552 (decode_options): Terminate new argv properly.
1553 Use PACKAGE_NAME, PACKAGE_VERSION.
1554 If verbose, report how we grokked any textual date option.
1555 (main): Add support for index-file.
1557 * tests/Makefile.am: Convert to UTF-8.
1558 (AUTOMAKE_OPTIONS): Remove.
1559 (TESTS): Add delete04.sh, multiv01.sh, options.sh.
1560 (INCLUDES): Remove ../intl.
1561 (LDADD): Don't link libtar.a twice.
1563 * tests/genfile.c: Convert to UTF-8.
1564 Don't include <print-copyr.h>.
1565 (DEFAULT_PATTERN): Renamed from DEFAULT.
1566 (ZEROS_PATTERN): Renamed from ZEROS.
1567 (main): Use gettext to translate (C), not print_copyright.
1569 2003-07-04 Paul Eggert <eggert@twinsun.com>
1571 Revamp to meet current standards of autoconf, automake,
1572 gettext, and gnulib, and incorporate new translations.
1574 * config/config.guess, config/config.sub, config/depcomp,
1575 config/install-sh, config/mdate-sh, config/missing,
1576 config/mkinstalldirs, config/texinfo.texi:
1577 Moved here from parent directory, or from doc.
1578 * config.hin: Renamed from config.h.in.
1579 * config/config.rpath: New file.
1581 * intl: Remove this subdirectory.
1583 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
1585 * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
1586 lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
1587 lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
1588 lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
1589 lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
1590 m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
1593 * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
1594 lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
1595 lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
1596 m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
1597 m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
1598 m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
1599 m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
1600 m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
1601 m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
1602 m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
1603 m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
1604 m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
1605 m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
1606 m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
1607 m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
1608 m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
1609 po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
1610 po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
1611 po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
1613 * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
1614 lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
1615 lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
1616 lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
1617 lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
1618 lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
1619 lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
1620 lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
1621 lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
1622 lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
1623 lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
1624 lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
1625 lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
1626 m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
1627 m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
1628 m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
1629 m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
1630 m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
1632 Upgrade to latest version from external source. The file "bootstrap"
1633 now grabs these automatically, so we needn't keep track of them
1634 in this change long any longer.
1636 * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
1637 (SUBDIRS): Remove intl.
1638 * PORTS: Update for star, Macintosh.
1639 * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
1640 Bison 1.875, gettext 0.12.1.
1641 * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
1642 * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
1643 (AC_CONFIG_AUX_DIR): New.
1644 (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
1646 (AC_PREREQ): Bump from 2.52 to 2.57.
1647 (AC_GNU_SOURCE): New.
1648 (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
1649 we no longer support K&R C.
1651 (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
1652 sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
1653 (AC_MBSTATE_T): Remove.
1654 (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
1655 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
1656 HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
1657 (AM_STDBOOL_H): Add.
1658 (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
1659 jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
1660 (AC_CHECK_TYPE): Remove ssize_t.
1661 (gt_TYPE_SSIZE_T): Add.
1662 (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
1663 jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
1664 AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
1665 AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
1666 jm_FUNC_MKTIME, jm_FUNC_REALLOC):
1667 Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
1668 (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
1669 (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
1670 (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
1671 napms, poll, select, strstr, usleep.
1672 (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
1673 rmdir, strcasecmp, strncasecmp, strtol, strtoul.
1674 (AM_GNU_GETTEXT): Use external and need-ngettext options.
1675 (AM_GNU_GETTEXT_VERSION): New.
1676 (AC_OUTPUT): Remove intl/Makefile.
1678 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1679 ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
1680 * doc/fdl.texi: Update to current GNU version.
1681 * doc/gettext.texi: Update to current coreutils version,
1682 plus a copyright notice.
1683 * doc/tar.texi: Switch to new method for doing copyright notices.
1684 Use @acronym instead of @sc where appropriate.
1685 Remove empty examples. Give a few more examples.
1687 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1688 (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
1689 are built up in pieces with +=.
1690 (noinst_HEADERS, INCLUDES): Remove.
1691 (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
1692 (libtar_a_LIBADD): Use $ rather than @.
1693 (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
1695 * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
1696 bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
1697 ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
1698 intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
1699 isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
1700 memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
1701 pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
1702 safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
1703 stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
1704 strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
1705 unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
1706 Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
1707 prereq.m4, xstrtoimax.m4.
1709 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
1710 be translated, since it's not a user-visible tool.
1712 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1714 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1715 (INCLUDES): Remove ../intl. Put top-srcdir before ., for
1716 consistency with coreutils.
1717 (LDADD): Link LIBINTL after libtar.a, since
1718 it's now external and should stand by itself.
1720 * src/buffer.c (print_total_written): Adjust to new human.h
1722 (child_open_for_compress): Do not increase size to BLOCKSIZE.
1723 (open_archive): Open index file name.
1724 Strip trailing slahes from file names.
1725 (flush_write): Set size to 0 if not saving names.
1726 (flush_write, flush_read): Use safer_name_suffix rather than
1729 * src/common.h: Include <quote.h>.
1730 (absolute_names_option, atime_preserve_option, backup_option,
1731 block_number_option, checkpoint_option, dereference_option,
1732 force_local_option, ignore_failed_read_option, ignore_zeros_option,
1733 incremental_option, interactive_option, multi_volume_option,
1734 numeric_owner_option, one_file_system_option, recursive_unlink_option,
1735 read_full_records_option, remove_files_option, same_order_option,
1736 show_omitted_dirs_option, sparse_option, starting_file_option,
1737 to_stdout_option, totals_option, touch_option, verify_option,
1738 dev_null_output, now_verifying, we_are_root): Now bool, not int.
1739 (current_trailing_slash, index_file_name, recent_long_name_blocks,
1740 recent_long_link_blocks): New vars.
1741 (NO_OVERWRITE_DIR_OLD_FILES): New constant.
1742 (OVERWRITE_OLD_DIRS): Remove.
1743 (enum remove_option): New enum.
1744 (remove_any_file): Use it as option arg, not int.
1745 (is_avoided_name, contains_dot_dot): Return bool, not int.
1746 (safer_name_suffix): New decl.
1748 * src/compare.c (now_verifying): Now bool, not int.
1749 (fill_in_sparse_array): Move to extract.c. Now returns bool;
1750 all callers changed to test for failure.
1751 (diff_sparse_files): Take size from current_stat, not from param.
1752 (diff_archive): Do not count trailing slashes in archives.
1753 (verify_volume): Test for header failure after loop, not before.
1755 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
1756 All callers changed.
1757 (start_header): Clear devmajor and devminor fields, too.
1758 (finish_header): New arg block_ordinal.
1759 (init_sparsearray): Now extern. Set sp_array_size to
1760 SPARSES_IN_OLDGNU_HEADER if it is zero.
1761 (dump_file): Keep link table as a hash.
1762 Do not count "file changed as we read it" as a failure.
1764 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
1765 Move extern decl to common.h.
1767 * src/extract.c (we_are_root): Now bool, not int.
1768 (check_time): Warn about implausibly old time stamps.
1769 (set_stat): Use utimbuf, not stat_info.
1770 (prepare_to_extract): New arg DIRECTORY.
1771 (fill_in_sparse_array): Moved here from compare.c.
1772 (extract_sparse_file): Now returns off_t, giving size left.
1773 Truncate file at end.
1774 (extract_archive): Use safer_name_suffix rather than rolling our own.
1775 Use fill_in_sparse_array rather than rolling our own.
1776 Strip trailing slashes more effectively.
1777 Check for unsafe names.
1779 * src/incremen.c (struct directory): nfs and found are now of type
1781 (gnu_restore): Now takes directory name as argument, not offset
1782 of directory name in a global. All uses changed.
1783 (CURRENT_FILE_NAME): Remove.
1786 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
1789 2002-09-30 Paul Eggert <eggert@twinsun.com>
1791 * src/rmt.c (prepare_input_buffer): Renamed form
1792 prepare_record_buffer. All uses changed. Do not assume that
1793 size_t is the same width as int.
1795 2002-03-29 Paul Eggert <eggert@twinsun.com>
1797 * src/incremen.c (get_directory_contents):
1798 If ignore_failed_read_option, only warn about
1799 get_directory_contents failures. Fix suggested by
1802 2002-01-31 Mark W. Eichin <eichin@thok.org>
1804 * src/buffer.c (child_open_for_compress): Don't try to read
1805 past the end of the buffer.
1807 2001-10-11 Jim Meyering <meyering@lucent.com>
1809 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
1810 and quote_n (1, ... to avoid clobbering a buffer.
1812 2001-09-26 Paul Eggert <eggert@twinsun.com>
1814 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
1816 * src/buffer.c (flush_read): Don't diagnose partial blocks before
1817 end of file; just ignore them silently.
1819 * src/list.c (read_header): Don't keep around extended name
1820 and link info indefinitely; keep it only for the next file.
1821 This fixes a bug introduced in 1.13.24, and removes the need
1822 for some static variables. Set recent_long_name and
1823 recent_long_link to zero if there were no long links; this
1824 avoids a violation of ANSI C rules for pointers in delete.c.
1825 * THANKS: Add Christian Laubscher.
1827 2001-09-26 Jim Meyering <meyering@lucent.com>
1829 * doc/tar.texi (Remote Tape Server): is know -> is known
1831 2001-09-25 Paul Eggert <eggert@twinsun.com>
1833 * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
1834 <iconv.h> may define EILSEQ (e.g. libiconv). Define a
1835 replacement EILSEQ to be ENOENT, not EINVAL, since callers may
1836 want to distinguish EINVAL and EILSEQ.
1838 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
1840 * src/extract.c (maybe_recoverable):
1841 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
1843 2001-09-22 Paul Eggert <eggert@twinsun.com>
1845 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
1847 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
1850 * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
1851 * PORTS: Add copyright notice, 'star' reference.
1852 * README-alpha: Add copyright notice, autoconf 2.52 patch.
1853 * THANKS: Add Christophe Kalt.
1854 * config.sub: Upgrade to 2001-09-14 version.
1856 * configure.ac (ALL_LINGUAS): Add ko.
1857 * po/ko.po: Resurrected file.
1859 * doc/convtexi.pl: Add coding advice for Emacs.
1861 * doc/getdate.texi: Add copyright notice.
1863 * doc/mdate-sh: Upgrade to automake 1.5 version.
1865 * doc/tar.texi (extracting files): Mention --to-stdout.
1866 (Option Summary, Dealing with Old Files): New option --overwrite-dir.
1867 (Overwrite Old Files): Likewise.
1869 * lib/Makefile.am (noinst_HEADERS):
1870 Remove copysym.h. Add print-copyr.h, unicodeio.h.
1871 (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
1873 * lib/copysym.c, lib/copysym.h: Remove.
1874 * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
1875 lib/unicodeio.h: New files.
1877 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
1878 lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
1880 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
1881 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
1883 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
1884 * m4/isc-posix.m4: Remove.
1886 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
1888 * po/POTFILES.in: Add copyright notice.
1890 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
1892 * tests/Makefile.am (LDADD): Likewise.
1894 * src/buffer.c (write_archive_buffer, close_archive):
1895 If an archive is a socket, treat it like a FIFO.
1896 (records_read, records_written): New vars.
1897 (write_archive_to_stdout): Now bool, not int.
1898 (open_archive, flush_write, flush_read): Keep records_read and
1899 records_written up to date.
1901 * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
1902 (write_archive_to_stdout): Now bool, not int.
1903 (enum read_header): New value HEADER_SUCCESS_EXTENDED.
1904 (read_header): Now takes bool arg. Existing callers modified
1905 to pass 0, unless otherwise specified.
1907 * src/delete.c (records_read): Remove; now a global.
1908 (acting_as_filter): Now bool, not int.
1909 (recent_long_name, recent_long_link, recent_long_name_blocks,
1910 recent_long_link_blocks, records_read, records_written): New decls.
1911 (records_skipped): New var.
1912 (move_archive): Don't divide by zero if arg is 0.
1913 Use the above vars to compute how far to move.
1914 (write_recent_blocks): New function.
1915 (delete_archive_member): Pass 1 to read_header, so that it doesn't
1916 read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
1917 Keep track of how many records have been skipped.
1918 Let the buffer code count records.
1919 When copying a header, copy any extended headers that came before it.
1921 * src/extract.c (extract_archive): When marking a directory to be
1922 updated after symlinks, stat all directories after it in the
1923 delayed-set-stat list too, since they will be checked after
1924 symlinks. Add support for --overwrite-dir.
1926 * src/list.c (recent_long_name, recent_long_link,
1927 recent_long_name_blocks, recent_long_link_blocks): New vars.
1928 (read_and): Pass 0 to read_header.
1929 (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
1930 headers into new vars. Null-terminate incoming symbolic links.
1932 * src/rmt.c: Include print-copyr.h, not copysym.h.
1933 (main): Use print_copyright, not copyright_symbol.
1934 * src/tar.c (decode_options): Likewise.
1935 (OVERWRITE_DIR_OPTION): New constant.
1936 (long_options, usage, decode_options): Add --overwrite-dir.
1938 * src/tar.h: Put copyright notice into documentation.
1940 * tests/Makefile.am (TESTS): Add delete03.sh.
1941 * tests/delete03.sh: New file.
1943 * tests/genfile.c: Include print-copyr.h, not copysym.h.
1944 (main): Use print_copyright, not copyright_symbol.
1945 Include <argmatch.h>.
1946 (pattern_strings): Remove.
1947 (pattern_args, pattern_types): New constants.
1948 (main): Use XARGMATCH, not argmatch.
1950 2001-09-20 Jim Meyering <meyering@lucent.com>
1952 * lib/xstrtol.c (strtoimax): Guard declaration with
1953 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
1954 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
1955 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
1956 (strtoumax): Likewise, for completeness (it wasn't necessary).
1957 * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
1958 Check for declaration of strtoimax.
1959 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
1960 Check for declaration of strtoumax.
1962 2001-09-16 Paul Eggert <eggert@twinsun.com>
1964 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
1966 2001-09-14 Paul Eggert <eggert@twinsun.com>
1968 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
1970 * README-alpha: Describe automake patch.
1972 * configure.ac (LIBOBJS):
1973 Remove automake 1.4 workaround, as we're using 1.5 now.
1974 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
1976 * lib/copysym.c: Include stddef.h, for size_t.
1977 Include langinfo.h if needed.
1978 Use locale_charset only if USE_INCLUDED_LIBINTL;
1979 if not, use nl_langinfo (CODESET) if available.
1981 2001-09-13 Paul Eggert <eggert@twinsun.com>
1983 * config.guess, config.sub: Sync with canonical versions.
1985 * configure.ac (jm_PREREQ_XGETCWD): Add.
1987 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
1988 (libtar_a_SOURCES): Add copysym.c.
1989 * copysym.c, copysym.h: New files.
1991 * lib/error.c: Sync with fileutils version.
1993 * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
1994 * m4/getcwd.m4: New file.
1995 * m4/uintmax_t.m4: Remove.
1997 * m4/gettext.m4 (AM_WITH_NLS):
1998 Fix bug with calculating version of Bison 1.29.
1999 Reported by Karl Berry.
2001 * src/Makefile.am (datadir): Remove.
2003 * src/rmt.c: Include copysym.h.
2004 (main): Use copyright_symbol to translate copyright notice,
2006 * src/tar.c: Likewise.
2007 * tests/genfile.c: Likewise.
2009 * src/system.h (MB_LEN_MAX): New symbol.
2011 2001-09-11 Paul Eggert <eggert@twinsun.com>
2013 * src/extract.c (struct delayed_set_stat): New member
2015 (delay_set_stat): Initialize it to 0.
2016 (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
2017 taking an extra stat ourselves. All callers changed.
2018 (set_stat): Likewise.
2019 (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
2020 If false, stop when encountering a struct whose 'after_symlinks'
2021 member is true. Otherwise, go through all structures but check
2022 them more carefully. All callers changed.
2023 (extract_archive): When extracting a deferred symlink, if its parent
2024 directory's status needs fixing, then mark the directory as needing
2025 to be fixed after symlinks.
2026 (extract_finish): Fix status of ordinary directories, then apply
2027 delayed symlinks, then fix the status of directories that are
2028 ancestors of delayed symlinks.
2030 * src/rtapelib.c (rexec):
2031 Remove declaration; it ran afoul of prototypes on Crays.
2032 Reported by Wendy Palm of Cray.
2034 2001-09-06 Paul Eggert <eggert@twinsun.com>
2036 * lib/strtoimax.c (HAVE_LONG_LONG):
2037 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
2038 (strtoimax): Use sizeof (long), not
2039 sizeof strtol (ptr, endptr, base),
2040 to work around bug in IBM C compiler.
2042 2001-09-04 Paul Eggert <eggert@twinsun.com>
2044 * lib/xgetcwd.c: Include "xalloc.h".
2045 (xgetcwd): Do not return NULL when memory is exhausted; instead,
2046 report an error and exit.
2048 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
2049 (jm_PREREQ): Use it.
2051 2001-09-03 Paul Eggert <eggert@twinsun.com>
2053 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
2054 (jm_PREREQ_XGETCWD): New macro.
2056 * lib/exclude.c (fnmatch_no_wildcards):
2057 Fix typo that caused us to do case-folding
2058 search even when that was not desired. This occurred only in the
2061 * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
2062 Do not include xalloc.h.
2063 (INITIAL_BUFFER_SIZE): New symbol.
2064 Do not use xmalloc / xrealloc, since the caller is responsible for
2065 handling errors. Preserve errno around `free' during failure.
2066 Do not overrun buffer when using getwd.
2068 * lib/xgetcwd.c (xgetcwd):
2069 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
2070 to decide whether to use getcwd (NULL, 0).
2072 2001-09-02 Paul Eggert <eggert@twinsun.com>
2074 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
2076 2001-09-01 Jim Meyering <meyering@lucent.com>
2078 * exclude.c: Use `""', not `<>' to #include non-system header files.
2079 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
2080 and strncasecmp as r-values. Unixware didn't have declarations.
2082 2001-08-31 Jim Meyering <meyering@lucent.com>
2084 * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
2085 Use an initial, malloc'd, buffer of length 128 rather than
2086 a statically allocated one of length 1024.
2088 2001-08-30 Paul Eggert <eggert@twinsun.com>
2090 * lib/utime.c: Include full-write.h.
2091 * lib/xstrtol.c (strtoimax): New decl.
2093 2001-08-29 Paul Eggert <eggert@twinsun.com>
2095 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
2097 * src/create.c (dump_file): Relativize link names before dumping.
2098 This fixes a bug reported by Jose Pedro Oliveira.
2100 * src/create.c (dump_file): Use offsetof when computing sizes for
2101 struct hack; this avoids wasted space in some cases.
2102 * src/incremen.c (note_directory, find_directory): Likewise.
2103 * src/names.c (name_gather, addname): Likewise.
2105 * src/extract.c (extract_archive): Use strcpy, not memcpy,
2106 for consistency with other code that does similar things.
2107 * src/names.c (name_gather): Likewise.
2109 * src/names.c (read_name_from_file, name_next, name_gather,
2110 add_hierarchy_to_namelist): Avoid quadratic behavior when
2111 reallocating buffers. Check for buffer size overflow.
2112 (addname): Avoid unnecessary clearing of memory.
2114 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
2116 * src/extract.c (delay_set_stat): Fix off-by-one error in file
2117 name size allocation that caused core dumps.
2119 2001-08-28 Paul Eggert <eggert@twinsun.com>
2121 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
2123 * configure.ac (GNU_SOURCE): Define to 1, not /**/.
2124 (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
2125 (daddr_t): Remove; no longer used.
2126 (jm_PREREQ_HUMAN): Add.
2128 * acconfig.h: Remove; no longer needed.
2130 * config.guess, config.sub:
2131 New files, from automake 1.5. Gettext 0.10.39 needs them.
2132 * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
2134 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
2135 (SUBDIRS): Put intl before lib, as gettext requires.
2137 * ABOUT-NLS: Upgrade to gettext 0.10.39.
2138 * intl: Upgrade entire directory to gettext 0.10.39.
2139 * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
2140 New files, from gettext 0.10.39.
2141 * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
2142 Upgrade to gettext 0.10.39,
2143 * po/Makefile.in.in: Likewise, except fix a typo in its copying
2145 * po/cat-id-tbl.c, po/stamp-cat-id:
2146 Remove; no longer used by gettext 0.10.39.
2147 * po/ChangeLog: New file.
2149 * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
2150 $(srcdir)/tar.texi: Likewise.
2151 * doc/freemanuals.texi: New file.
2152 * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
2153 `fileds' -> `fields'
2154 * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
2156 * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
2157 (noinst_HEADERS): Add quote.h.
2158 (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
2160 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
2162 * lib/full-write.c, lib/savedir.c: Comment fix.
2164 * lib/pathmax.h: Remove.
2166 * lib/quote.c, lib/quote.h: New files.
2168 * lib/xgetcwd.c: Don't include pathmax.h.
2169 Include stdlib.h and unistd.h if available.
2171 (xmalloc, xstrdup, free): Remove decls.
2172 (xgetcwd): Don't assume sizes fit in unsigned.
2173 Check for overflow when computing sizes.
2174 Simplify reallocation code.
2176 * lib/xmalloc.c: Quote failure tests.
2178 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
2180 * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
2181 similar to strtol.c.
2182 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
2183 (verify): New macro.
2184 (strtoumax, uintmax_t, strtoull, strtol): Remove.
2185 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
2186 (strtoimax): Renamed from strtoumax. All uses of unsigned values
2187 changed to signed values. Check sizes at compile-time, not
2188 run-time. Prefer strtol to strtoll if both work.
2191 * lib/xstrtol.h (xstrtoimax): New decl.
2193 * m4/Makefile.am (EXTRA_DIST):
2194 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
2195 longlong.m4, xstrtoimax.m4.
2197 * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
2198 Remove; now done by autoconf.
2199 (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
2200 Use AC_CHECK_TYPE instead of merely looking for the header.
2202 * m4/uintmax_t.m4: Use shorter comment.
2204 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
2205 Quote first arg of AC_DEFUN.
2206 Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
2207 is needed to parse the include file.
2208 Simplify logic behind the args to AC_REPLACE.
2210 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
2212 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
2215 Use "Copyright %d" to simplify the translator's job in the future.
2216 Advise translator about circle-C.
2217 * src/tar.c: (decode_options): Likewise.
2218 * tests/genfile.c (main): Likewise.
2220 2001-08-28 Jim Meyering <meyering@lucent.com>
2222 * lib/argmatch.c: Include "quote.h".
2223 (argmatch_invalid): Quote the context.
2225 * lib/dirname.c (dir_name): Fix typo on PC platforms.
2227 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
2228 Use single-quote for local .h files.
2230 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
2232 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
2235 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
2236 invoking mktime the last time.
2238 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
2240 * lib/rename.c: Major rewrite by Volker Borchert to use system
2241 rename function, but to work around problems with trailing
2244 * lib/strtoll.c: New file, from glibc.
2245 * lib/strtoul.c: Update from glibc.
2247 * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
2248 Add support for signed numbers, too.
2249 (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
2251 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
2253 (strtoumax, uintmax_t, strtoull, strtoul): New macros.
2254 (main): Use generic names in debugging output.
2255 * lib/strtoimax.c: Plus add the following changes of my own:
2256 (main): Use accurate names in debugging output.
2258 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
2261 * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
2262 m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
2263 m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
2264 m4/utime.m4, m4/utimes.m4:
2265 Quote the first argument in each use of AC_DEFUN.
2267 * m4/getline.m4: Don't use string.h.
2269 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
2271 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
2273 2001-08-27 Paul Eggert <eggert@twinsun.com>
2275 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
2277 The biggest change is the new --exclude semantics and options.
2278 The basic idea was suggested by Gerhard Poul; thanks!
2280 * NEWS: Describe new --exclude semantics and options, and bug fixes.
2281 * README: ignfail.sh fails on some NFS hosts.
2282 * NEWS, README, lib/xstrtol.h: Add copyright notice.
2284 * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
2285 (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
2286 Remove; the automake bug has been fixed.
2287 * acinclude.m4: Remove.
2289 * configure.ac: Renamed from configure.in.
2290 (AC_PREREQ): Bump from 2.13 to 2.52.
2291 (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
2292 1997-05-30) has an encoding error.
2293 (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
2294 (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
2296 * doc/fdl.texi: Update to current GNU version.
2298 * doc/tar.texi: Put leading '*' in direntry.
2299 Accommodate new gfdl sectioning.
2300 New option --recursion (the default) that is the inverse of
2303 New options --anchored, --ignore-case, --wildcards,
2304 --wildcards-match-slash, and their negations (e.g., --no-anchored).
2305 Along with --recursion and --no-recursion, these control how exclude
2306 patterns are interpreted. The default interpretation of exclude
2307 patterns is now --no-anchored --no-ignore-case --recursion
2308 --wildcards --wildcards-match-slash.
2310 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
2312 * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
2313 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
2314 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
2315 Include if available.
2316 (<xalloc.h>): Include
2317 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
2318 (verify): New macro. Use it to verify that EXCLUDE macros do not
2319 collide with FNM macros.
2320 (struct patopts): New struct.
2321 (struct exclude): Use it, as exclude patterns now come with options.
2322 (new_exclude): Support above changes.
2323 (new_exclude, add_exclude_file):
2324 Initial size must now be a power of two to simplify overflow checking.
2325 (free_exclude, fnmatch_no_wildcards): New function.
2326 (excluded_filename): No longer requires options arg, as the options
2327 are determined by add_exclude. Now returns bool, not int.
2328 (excluded_filename, add_exclude):
2329 Add support for the fancy new exclusion options.
2330 (add_exclude, add_exclude_file): Now takes int options arg.
2331 Check for arithmetic overflow when computing sizes.
2332 (add_exclude_file): xrealloc might modify errno, so don't
2333 realloc until after errno might be used.
2335 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
2337 (free_exclude): New decl.
2338 (add_exclude, add_exclude_file): Now takes int options arg.
2339 (excluded_filename): No longer requires options arg, as the options
2340 are determined by add_exclude. Now returns bool, not int.
2342 * lib/prepargs.c: Include <string.h>; required for C99 since
2346 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
2348 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
2349 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
2351 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
2352 Remove inttypes_h.m4, largefile.m4, mktime.m4.
2354 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
2355 subsumed by Autoconf 2.50.
2357 * m4/error.m4: Upgrade to serial 2.
2359 * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
2360 remove test for GNU C library. It's not correct, as some
2361 older glibcs are buggy.
2363 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
2365 * m4/prereq.m4: Upgrade to serial 20, but then:
2366 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
2367 (jm_PREREQ_EXCLUDE): New macro.
2368 (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
2371 * m4/realloc.m4: Upgrade to serial 4.
2373 * m4/strerror_r.m4: Revert to serial 1002.
2375 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
2377 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
2379 * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
2380 (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
2381 it is now subsumed by autoconf. Add inttypes.h.
2383 * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
2384 po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
2386 * src/buffer.c (new_volume): Stop if the script exits with an error.
2388 * src/common.h (excluded_with_slash, excluded_without_slash):
2389 Remove, replacing by:
2390 (excluded): New decl.
2391 (link_error): New decl.
2392 (excluded_name): Now returns bool.
2395 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
2396 Support hard links to symbolic links.
2398 (struct delayed_symlink): Remove 'names' member, replacing it with
2399 'sources' and 'target' member. All uses changed.
2401 (struct string_list): New type.
2403 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
2404 for struct hack; this avoids wasted space in some cases.
2406 (extract_archive): Fix test for absolute pathnames and/or "..".
2407 Use link_error to report errors for links.
2408 Remove redundant trailing '/' at "really_dir", for all uses, not
2409 just before invoking mkdir.
2410 If overwriting old files, do not worry so much about existing
2412 Fix mode computation in the case where the directory exists.
2414 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
2415 link, make a copy of the symbolic link.
2417 * src/incremen.c (get_directory_contents):
2418 If ignore_failed_read_option, only warn about
2421 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
2422 However, check for error even for '-' or '+' case.
2424 (print_header): Try parsing uids and gids as unsigned integers first,
2425 and as a uid_t or gid_t only if that fails. This adds support for
2426 listing positive uids and gids that are greater than UID_MAX and
2429 * src/misc.c (link_error): New function.
2431 * src/names.c (collect_and_sort_names):
2432 If ignore_failed_read_option, only warn about
2435 (excluded_name): Now returns bool. Simplify, as the fancy
2436 features are now all in excluded_filename.
2438 * src/rtapelib.c (base_name): Remove decl, as system.h now
2441 * src/system.h: Include stddef.h if available.
2442 (offsetof): Declare if stddef.h doesn't.
2444 Include <dirname.h>.
2445 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
2447 * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
2448 NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
2449 NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
2450 WILDCARDS_MATCH_SLASH_OPTION):
2453 (long_options, usage, decode_options): Add support for --anchored,
2454 --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
2455 --no-wildcards-match-slash, --recursion, --wildcards,
2456 --wildcards-match-slash.
2458 (decode_options): Implement the new way of interpreting exclude
2461 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
2463 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
2464 just print error messages suggesting alternatives.
2466 (add_filtered_exclude): Remove.
2468 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
2470 * tests/extrac04.sh (out): Remove
2471 directory/subdirectory/file1, as the new semantics for
2472 --exclude exclude it.
2474 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
2476 2001-08-12 Paul Eggert <eggert@twinsun.com>
2478 * lib/addext.c (<errno.h>): Include.
2479 (errno): Declare if not defined.
2480 (addext): Work correctly on the Hurd, where pathconf returns -1 and
2481 leaves errno alone, because there is no limit. Also, work even if
2482 size_t is narrower than long.
2484 2001-07-08 Paul Eggert <eggert@twinsun.com>
2486 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
2488 2001-05-10 Paul Eggert <eggert@twinsun.com>
2490 * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
2491 Include <backupfile.h> and <dirname.h> after size_t is defined.
2492 (addext): Use base_len to trim redundant trailing slashes instead of
2495 * lib/backupfile.c (ISSLASH, base_name):
2496 Remove decls; now in dirname.h.
2497 Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
2499 (find_backup_file_name): Rename locals to avoid new functions.
2500 Use base_len instead of rolling it ourselves.
2501 Work even if dirlen is 0.
2502 Use a dir of '.' if given the empty string.
2505 Do not include <stdio.h>, <assert.h>; no longer needed.
2506 (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
2507 Include <string.h>, <dirname.h>.
2508 (base_name): Allow file names ending in slashes, other than names
2509 that are all slashes. In this case, return the basename followed
2512 * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
2513 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
2514 (dir_len): Renamed from dirlen.
2515 All callers changed.
2517 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
2519 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
2521 2001-02-16 Paul Eggert <eggert@twinsun.com>
2523 * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
2524 Do not declare or define if HAVE_MBRTOWC,
2525 since the test for HAVE_MBRTOWC now requires proper declarations.
2527 * lib/alloca.c (malloc): Undef before defining.
2529 2001-02-13 Paul Eggert <eggert@twinsun.com>
2531 * src/compare.c (read_and_process): Use off_t for size.
2532 From Maciej W. Rozycki.
2534 2001-01-26 Paul Eggert <eggert@twinsun.com>
2536 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
2538 2001-01-12 Paul Eggert <eggert@twinsun.com>
2540 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
2542 * lib/savedir.h (savedir): Remove size arg.
2544 * doc/tar.texi: Add @setchapternewpage odd.
2545 Remove -I as an alias for -T, for now.
2547 Update copyright. Remove "Published by".
2548 Dates beginning with / or . are taken to be file names.
2550 * src/tar.c (<time.h>): Do not include;
2551 (time): Do not declare.
2552 (usage): Remove -I as an alias for -T.
2553 (OPTION_STRING): Remove -I.
2554 (decode_options): Dates that look like an absolute path name,
2555 or that start with '.', are presumed to be file names whose
2557 Remove 'I' as an aliase for 'T'.
2560 * src/extract.c (<time.h>): Do not include; system.h now does this.
2561 (make_directories): Skip filesystem prefixes.
2562 Don't assume '/' is the only separator.
2563 (extract_sparse_file): Use new full_write semantics.
2564 On write error, return instead of invoking skip_file.
2565 Do not free sparsearray; caller does this now.
2566 (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
2568 (extract_archive): Don't assume file name lengths fit in int.
2569 Report what got stripped from member name; it might be more than '/'.
2570 Use new full_write semantics.
2571 Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
2573 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
2575 * src/buffer.c (<time.h>): Do not include; system.h now does this.
2576 (time): Remove decl; likewise.
2577 (child_open_for_uncompress): Use new full_write semantics.
2578 (flush_write): Use ISSLASH instead of testing for '/'.
2579 (flush_read): Likewise.
2581 * src/rmt.h (_remdev): Look for / anywhere in Path.
2583 * src/misc.c (contains_dot_dot): Skip filesystem prefix.
2584 Don't assume '/' is the only separator.
2585 (safer_rmdir): Don't assume '/' is the only separator.
2587 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
2589 * lib/dirname.h (dirlen): New decl.
2591 * src/incremen.c (get_directory_contents):
2592 Remove path_size arg; all callers changed.
2593 Don't assume '/' is the only directory separator.
2594 (gnu_restore): Work even if file name length doesn't fit in int.
2596 * lib/addext.c (ISSLASH): New macro.
2597 (addext): Trim any redundant trailing slashes.
2599 * src/names.c (name_next):
2600 Don't assume '/' is the only directory separator.
2601 (namelist_match): Likewise.
2602 (add_hierarchy_to_namelist): Remove dirsize arg.
2603 Do not assume '/' is the only directory separator.
2604 (new_name): Likewise.
2606 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
2607 (libtar_a_SOURCES): Add dirname.c.
2609 * src/create.c (relativize):
2610 New function, with much of old start_header's guts.
2611 Handle filesystem prefixes.
2612 (start_header): Use this new function.
2613 (init_sparsearray): Don't bother to zero out the new array;
2615 (deal_with_sparse): Fix array allocation bug.
2616 (create_archive): Don't assume '/' is the only separator.
2617 (dump_file): Likewise.
2618 Don't worry about leading / in symlink targets.
2620 * lib/savedir.c (savedir):
2621 Remove size arg; it wasn't portable. All callers changed.
2623 * lib/utime.c (utime_null): Adjust to new full_write convention.
2625 * configure.in (YACC): Avoid portability problem with Ultrix sh.
2627 * lib/backupfile.c: Include <dirname.h>.
2628 (ISSLASH): New macro.
2629 (find_backup_file_name): Use dirlen to calculate directory lengths.
2630 (max_backup_version): Strip redundant trailing slashes.
2632 * src/common.h: Include <full-write.h>.
2633 (get_directory_contents): No longer has size arg.
2634 (gnu_restore): Arg is size_t, not int.
2636 * src/system.h: Include <time.h>.
2637 (time): Declare if not defined.
2639 * lib/full-write.c: Include full-write.h, not safe-read.h.
2640 full_write returns size_t, with short writes meaning failure.
2641 All callers changed.
2643 * src/rtapelib.c: Include full-write.h.
2645 * src/rmt.c: Include full-write.h.
2646 (main): Update copyright.
2648 * doc/getdate.texi: Mention that only English is supported.
2649 Show how to use "date" so that the output is acceptable to getdate.
2650 Mention Z as an abbreviation for UTC.
2652 * lib/full-write.h: New file.
2654 * src/list.c: system.h now does time.h stuff.
2657 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
2659 Do not include string.h, strings.h, or assert.h; no longer needed.
2660 (strrchr, memrchr, malloc): Remove decls; no longer needed.
2662 (base_name): New decl.
2663 (BACKSLASH_IS_PATH_SEPARATOR): Remove.
2664 (dir_name_r): Remove.
2665 (dirlen): New function.
2666 (dir_name): Use dirlen instead of dir_name_r.
2667 (<string.h>, <strings.h>): Include only if test program.
2668 (main): Use "return 0", not "exit (0)".
2670 2000-12-08 Paul Eggert <eggert@twinsun.com>
2672 * lib/dirname.h: New file.
2674 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
2676 * lib/fnmatch.c: Do not comment out all the code if we are using
2677 the GNU C library, because in some cases we are replacing buggy
2678 code in the GNU C library itself.
2680 2000-10-30 Paul Eggert <eggert@twinsun.com>
2682 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
2684 2000-10-29 Paul Eggert <eggert@twinsun.com>
2686 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
2688 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
2690 2000-10-28 Paul Eggert <eggert@twinsun.com>
2692 * doc/tar.texi: --no-recursion now applies to extraction, too.
2693 * src/create.c (dump_file): no_recurse_option -> ! recursion_option
2694 * src/names.c (namelist_match, excluded_name):
2695 Do not match subfiles of a directory
2696 if --no-recursion is specified.
2697 * src/tar.c (NO_RECURSE_OPTION): Remove.
2698 (long_options): Have getopt set the --no-recursion flag.
2699 (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
2700 Remove case for NO_RECURSE_OPTION.
2701 * src/common.h (recursion_option):
2702 Renamed from no_recurse_option, with sense
2703 negated, and with FNM_LEADING_DIR being the nonzero value.
2705 * names.c (namelist_match): New function.
2706 (name_match, name_scan): Use it to eliminate duplicate code.
2707 (names_notfound): Remove special case for Amiga.
2709 2000-10-27 Paul Eggert <eggert@twinsun.com>
2711 * src/misc.c (read_error_details, read_warn_details,
2712 read_fatal_details): Don't assume size_t is unsigned long.
2714 * src/buffer.c (flush_read): If read_full_records_option, try to
2715 fill the input buffer, as --delete -f - needs this.
2717 2000-10-24 Paul Eggert <eggert@twinsun.com>
2719 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
2721 * src/buffer.c (check_label_pattern):
2722 Make sure header name is a string before
2723 passing it to fnmatch.
2724 (init_volume_number): Check for global_volno overflow.
2725 (new_volume): Check for global_volno overflow.
2727 * src/tar.c (decode_options):
2728 Check that volume label is not too long to overflow
2729 name in tar header block.
2731 * Makefile.am (EXTRA_DIST): Remove rebox.el.
2733 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
2734 (AC_FUNC_STRERROR_R): Use this instead.
2736 2000-10-23 Paul Eggert <eggert@twinsun.com>
2738 * src/extract.c: Include <time.h>, since we invoke "time".
2740 * lib/prepargs.c (prepend_default_options):
2741 Don't use NULL, for portability.
2743 * m4/fnmatch.m4: Add "working" to message.
2745 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
2747 (getpwuid, getgrgid): Declare only if system headers don't.
2748 (gid_to_gname): Don't invoke setgrent.
2749 (namelist): Now static, not global.
2750 (nametail): New var. All uses of namelast changed to use
2751 nametail, with one extra level of indirection.
2752 (name_gather): Use memcpy instead of strncpy + assignment of NUL.
2753 (name_match): Set nametail too, when setting namelist to null.
2754 (add_hierarchy_to_namelist): Change type of dir arg from char * to
2755 struct name *, so that we don't have to look up the name again
2756 here. Get change_dir from dir rather than as a separate arg. Add
2757 dirsize arg, and pass it along to get_directory_contents. Remove
2758 unnecessary check of directory type.
2759 (new_name): Do not append a slash if PATH already ends in one.
2760 (avoided_names, struct avoided_name): Remove.
2761 (avoided_name_table): New var, replacing avoided_names.
2762 (hash_avoided_name, compare_avoided_names): New function.
2763 (add_avoided_name, is_avoided_name): Use hash table rather than
2766 * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
2767 (child_open_for_compress, child_open_for_uncompress,
2768 close_archive): Propagate any failure of the compression process
2770 (open_archive, flush_write, flush_read, close_archive): Do not
2771 allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
2772 -1. Instead, allocate an array with the size that's needed.
2773 (open_archive): Don't bother checking S_ISCHR of /dev/null.
2774 (backspace_output): Don't try to backspace past start of archive.
2775 (close_archive): Remove special case for DELETE_SUBCOMMAND.
2777 * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
2778 DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
2779 HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
2780 HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
2781 PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
2782 WITH_DMALLOC, WITH_REGEX):
2783 Remove; now generated automatically.
2785 * configure.in (_GNU_SOURCE): Define to empty, not 1, for
2786 compatibility for glibc fragments.
2787 (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
2788 HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
2789 DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
2790 that we needn't put an entry into acconfig.h.
2791 (ALL_LINGUAS): Add da.
2792 (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
2793 (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
2795 (AC_MBSTATE_T): Add.
2796 (RMT): Append $(EXEEXT).
2797 (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
2798 (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
2799 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
2800 HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
2801 (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
2802 (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
2803 (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
2804 Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
2805 (EMUL_OPEN3): Remove; no longer needed.
2806 (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
2808 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
2810 * src/common.h: Do not include basename.h.
2811 * src/rtapelib.c (base_name): Do not include basename.h;
2812 declare base_name instead.
2814 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
2816 * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
2817 lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
2818 * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
2819 Adjust to the above changes.
2821 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
2823 * src/open3.c: Remove.
2825 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
2826 (tar_SOURCES): Remove open3.c.
2827 (INCLUDES): Remove -I.., as automake does that.
2828 (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
2830 The following changes are to put LOCALEDIR into localedir.h instead
2831 of passing it on the command line.
2833 (DISTCLEANFILES): New macro.
2834 (localedir.h): New rule.
2835 (rmt.o tar.o): Now depend on localedir.h.
2837 * tests/delete02.sh, tests/extrac04.sh: New files.
2839 * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
2840 (TESTS): Add extrac04.sh, and restore delete02.sh.
2841 (DEFS): Remove; LOCALEDIR is now done via localedir.h.
2842 (INCLUDES): Remove -I.. as automake does this now.
2844 * src/rtapelib.c (rexec): Don't declare unless using it.
2845 (do_command): Simplify signal-handling code slightly.
2847 * src/delete.c (blocks_needed): Remove. All uses changed to use
2848 blocking_factor - new_blocks.
2849 (acting_as_filter): New var.
2850 (write_record, delete_archive_members): Use acting_as_filter
2851 rather than archive == STDIN_FILENO to detect whether we're acting
2852 as a filter, as open can return STDIN_FILENO in some cases.
2853 (delete_archive_members): Ignore zero blocks if
2854 ignore_zeros_option is nonzero. Fix bug that messed up last
2855 output block: write_eot can't be used here, as it gets confused
2856 when the input is at end of file.
2858 * src/compare.c (diff_archive): Do not impose an arbitrary limit on
2859 symbolic link contents length. Pass directory size to
2860 get_directory_contents.
2862 * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
2863 m4/strerror_r.m4: New files.
2864 * m4/signedchar.m4: Remove this file.
2865 * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
2866 * m4/Makefile.am (EXTRA_DIST): Likewise.
2868 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
2870 * po/da.po: New translation file.
2872 * src/mangle.c (extract_mangle):
2873 Fix diagnostic with wrong number of %s'es.
2875 * lib/fnmatch.c (fnmatch):
2876 Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
2877 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
2879 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
2880 fall off a device's end. Detect this.
2882 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
2884 (open): Remove macro; we no longer support EMUL_OPEN3. Do not
2885 include <pathmax.h> and directory include files like <dirent.h>;
2886 no longer used. Include <savedir.h> instead.
2887 (closedir, signed_char): remove macro; no longer used.
2888 (bool, false, true): Include <stdbool.h> if you have the include
2889 file, otherwise define.
2892 (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
2893 opendir_warn, readdir_error): Remove; no longer needed.
2894 (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
2895 before deciding whether we're trying to remove ".".
2896 (remove_any_file): Try unlink first if we are not root. Use
2897 savedir when recursively removing directories, to avoid exhausting
2899 (savedir_error, savedir_warn, symlink_error): New functions.
2901 * src/list.c: (read_and): Do not invoke
2902 apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
2903 responsible for that. Do not invoke apply_delayed_set_stat; our
2904 caller is now responsible for that.
2905 (read_header): Use signed char instead of signed_char. Prevent
2906 later references to current_header from mistakenly treating it as
2908 (from_header): Quote invalid base-64 strings in diagnostics.
2909 (time_from_header): Do not warn about future timestamps in
2910 archive; check_time now does that.
2911 (print_header): Quote unknown file types.
2912 (skip_member): New function, replacing skip_extended_headers and
2913 now skipping the whole member instead of just the extended
2914 headers. All callers changed. This makes the code handle
2915 extended headers uniformly, and fixes some bugs.
2917 * src/update.c (update_archive): Use skip_member.
2919 * src/extract.c (we_are_root): Now global.
2920 (struct delayed_symlink): New type.
2921 (delayed_symlink_head): New var.
2922 (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
2923 not apply_delayed_set_stat.
2924 (set_mode, set_stat): Pointer args are now const pointers.
2925 (check_time): New function.
2926 (set_stat): Warn if setting a file's timestamp to be the future.
2927 (make_directories): Do not save and restore errno.
2928 (maybe_recoverable): Set errno to ENOENT if we cannot make missing
2929 intermediate directories.
2930 (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
2931 not in caller. Extract potentially dangerous symbolic links more
2932 carefully, deferring their creation until the end, and using a
2933 regular file placeholder in the meantime. Do not remove trailing
2934 / and /. from file names. Do not bother checking for ".." when
2935 checking whether a directory loops back on itself, as loopbacks
2936 can occur with symlinks too. Also, in that case, do not bother
2937 saving and restoring errno; just set it to EEXIST.
2938 (apply_nonancestor_delayed_set_stat): A prefix is a potential
2939 ancestor if it ends in slash too (as well as ending in a char just
2941 (apply_delayed_set_stat): Remove.
2942 (apply_delayed_symlinks, extract_finish): New functions.
2944 * doc/fdl.texi: New file.
2945 * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
2946 ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
2947 * doc/tar.texi: Add Free Documentation License. New section
2948 "Overwrite Old Files", and revamp that section to make it easier to
2949 follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
2950 documentation into getdate.texi. Fix several minor typos. Describe
2951 TAR_OPTIONS. Describe incompatibility between incremental backups and
2952 --atime-preserve. Describe incompatibility between --verify and other
2953 options. Mention that tar normally removes symbolic links rather than
2954 following them, when extracting a file of the same name.
2956 * THANKS: Add gpoul. Change skip's address.
2958 * po/POTFILES.in: Add lib/human.c.
2960 * src/common.h (namelist, namelast): Remove decls.
2961 (we_are_root, extract_finish, skip_member, savedir_error,
2962 savedir_warn, symlink_error, gnu_list_name): New decls.
2963 (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
2964 skip_extended_headers, is_dot_or_dotdot, closedir_error,
2965 closedir_warn, opendir_error, opendir_warn, readdir_error,
2966 readdir_warn): Remove decls.
2967 (get_directory_contents): New off_t arg.
2968 (addname): Now returns struct name *.
2970 * src/tar.h, tests/genfile.c: Fix comments.
2972 * src/create.c: Include hash.h.
2973 (gnu_list_name): Remove decl.
2974 (struct link): Remove "next" member.
2976 (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
2977 consistency with other diagnostics.
2978 (deal_with_sparse): Check for I/O error when closing the file.
2979 (create_archive): Do not allocate an array of size PATH_MAX, as
2980 PATH_MAX might be (size_t) -1. Instead, allocate an array with
2981 the size that's needed.
2982 (hash_link, compare_links): New functions.
2983 (dump_file): Do not exhaust open file descriptors when descending
2984 deeply into a directory, by using savedir rather than
2985 opendir/readdir. Do not zero-fill the name buffer unnecessarily.
2986 Hash the set of links already created, instead of using a linked
2987 list. Fix some bugs in outputting sparse files which caused the
2988 sparse tables to be incorrect. When a file unexpectedly shrinks,
2989 output zeros rather than garbage. Do not allocate an array of
2990 size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
2991 allocate an array with the size that's needed.
2993 * src/incremen.c: Include hash.h.
2994 (struct directory): Remove "next", "dir_text". Change "name" to
2995 be char[1] with struct hack, not const char *. Add "found".
2996 (directory_list): Remove. Replaced by directory_table.
2997 (directory_table): New var.
2998 (nfs_string): Renamed from nfs.
2999 (hash_directory, compare_directories): New functions.
3000 (note_directory): Now returns struct directory *. First arg is
3001 now const pointer. struct stat arg is now dev_t, ino_t, nfs.
3002 Remove text arg. New "found" arg, basically corresponding to the
3003 old text arg not being null. All callers changed.
3004 (note_directory, find_directory): Use hash table rather than
3006 (get_directory_contents): New arg "device". Use savedir to do the
3007 hard work. Save the nfs-ness of stat_data, since it might change
3008 under us. Use note_directory instead of find_directory to save
3009 some work. When adding an "A" record, do it with
3010 add_to_accumulator instead of cheating with strcat.
3011 (read_directory_file): Use "+" flag before device to indicate
3012 whether it was NFS. Fix typo in checking for strtoul error.
3013 (write_directory_file_entry): New function.
3014 (write_directory_file): Use it, and use the hash routines to
3015 traverse the directory table.
3016 (gnu_restore): Use savedir rather than opendir/readdir.
3018 * src/tar.c: Include localedir.h, prepargs.h.
3019 (long_options): Now static.
3020 (long_options, usage, decode_options): -j is now short for
3021 --bzip2, and -I is now an alias for -T.
3022 (decode_options, main): argv is not const pointer now.
3023 (decode_options): Invoke prepend_default_options to support
3024 TAR_OPTIONS. In diagnostic, mention the string that was the
3025 invalid blocking factor, tape length, group, owner, or record
3026 size. --delete is no longer incompatible with -f -, undoing
3028 (main): Invoke extract_finish at end of extraction.
3030 * src/rmt.c: Include localedir.h.
3031 (main): Update copyright date to 2000.
3033 * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
3034 following changes: Use @sc where appropriate. Document the ranges of
3035 supported times more precisely. Add Eggert to getdate authors.
3036 Document old Latin 12m/12pm tradition. Remove list of alphabetic time
3037 zone names, as it wasn't correct and people shouldn't be relying on it
3038 anyway. Relative items also account for non-DST adjustments. Fix
3041 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
3043 * tests/ignfail.sh: opendir -> savedir in diagnostics.
3045 * tests/preset.in: Set LANGUAGE to the empty string, for some
3048 2000-10-20 Paul Eggert <eggert@twinsun.com>
3050 * m4/fnmatch.m4: Mention the GNU C library.
3052 2000-10-19 Paul Eggert <eggert@twinsun.com>
3054 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
3057 2000-10-17 Paul Eggert <eggert@twinsun.com>
3059 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
3062 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
3063 (CHAR_BIT): Define if not defined.
3065 2000-09-09 Paul Eggert <eggert@twinsun.com>
3067 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
3069 2000-08-07 Paul Eggert <eggert@twinsun.com>
3071 * lib/xmalloc.c: Memory exhausted -> memory exhausted
3073 * lib/xalloc.h (xalloc_msg_memory_exhausted):
3074 change to array from char *.
3076 2000-08-06 Paul Eggert <eggert@twinsun.com>
3078 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
3079 compatibility with glibc 2.1.3 strftime.c.
3081 2000-07-31 Paul Eggert <eggert@twinsun.com>
3083 * lib/quotearg.c (quotearg_n_options):
3084 Don't make the initial slot vector a constant,
3085 since it might get modified.
3087 * lib/quotearg.c: Add support for more than one preallocated slot.
3089 2000-07-30 Paul Eggert <eggert@twinsun.com>
3091 * lib/quotearg.c (quotearg_n_options):
3092 Preallocate a slot 0 buffer, so that the caller
3093 can always quote one small component of a "memory exhausted" message
3096 2000-07-23 Paul Eggert <eggert@twinsun.com>
3099 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
3100 mbstate_t is always defined.
3102 Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
3103 some GCC installations, and this configuration error is likely to be
3106 2000-07-22 Paul Eggert <eggert@twinsun.com>
3109 When the system forces us to redefine mbstate_t, shadow its mbsinit
3110 function. From Bruno Haible.
3112 2000-07-14 Paul Eggert <eggert@twinsun.com>
3114 * lib/xmalloc.c: Simplify exhausted message.
3116 * lib/quotearg.h: Update copyright date; from Jim Meyering.
3118 2000-07-13 Paul Eggert <eggert@twinsun.com>
3120 * lib/quotearg.h (enum quoting style):
3121 New constant clocale_quoting_style.
3124 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
3125 Add support for clocale_quoting_style, undoing previous change to
3126 locale_quoting_style.
3128 2000-07-10 Paul Eggert <eggert@twinsun.com>
3131 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
3132 since otherwise we don't need it.
3133 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
3134 since we don't do multibytes in that case.
3135 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
3136 invoke multibyte primitives.
3138 * m4/mbstate_t.m4 (AC_MBSTATE_T):
3139 Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
3140 Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
3141 and mbstate_t, to a single-part test that simply defines mbstate_t.
3143 * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
3144 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
3145 to decide whether to define the BeOS workaround macro;
3146 this adjusts to the change to AC_MBSTATE_T.
3148 * m4/strerror_r.m4: New file.
3150 2000-07-05 Paul Eggert <eggert@twinsun.com>
3152 * lib/quotearg.c: Use double-quote to quote.
3154 * lib/quotearg.c (N_): New macro.
3155 (gettext_default): New function.
3156 (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
3157 "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
3160 * lib/quotearg.c (struct quoting_options):
3161 Simplify quote_these_too dimension.
3162 From Bruno Haible <haible@clisp.cons.org>.
3164 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
3165 Test for mbstate_t only if the test
3166 for an object-type mbstate_t fails.
3168 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
3170 2000-07-03 Paul Eggert <eggert@twinsun.com>
3172 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
3173 Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
3175 * lib/quotearg.c (mbrtowc):
3176 Assign to *pwc, and return 1 only if result is nonzero.
3177 (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
3179 2000-07-02 Paul Eggert <eggert@twinsun.com>
3181 * lib/quotearg.c (mbstate_t):
3182 Do not define; it should be defined with AC_CHECK_TYPE.
3184 2000-06-26 Paul Eggert <eggert@twinsun.com>
3186 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
3187 a bug in glibc 2.1.3.
3189 * lib/xmalloc.c: Fix inaccorate comment for xrealloc.
3191 2000-06-19 Paul Eggert <eggert@twinsun.com>
3193 * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
3194 inclusion of wctype.h to work around solaris2.6 namespace pollution.
3195 (ISPRINT): Likewise.
3196 Reported by Tom Tromey.
3198 2000-06-15 Paul Eggert <eggert@twinsun.com>
3200 * lib/human.c (adjust_value): New function.
3201 (human_readable_inexact): Apply rounding style even when printing
3204 * lib/human.c: Avoid shadowing warnings.
3207 2000-06-14 Paul Eggert <eggert@twinsun.com>
3209 * lib/human.c (human_readable_inexact): Allow an input block size
3210 that is not a multiple of the output block size, and vice versa.
3212 * lib/getdate.y (get_date): Apply relative times after time zone
3213 indicator, not before.
3215 2000-05-31 Paul Eggert <eggert@twinsun.com>
3217 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
3218 and thus don't need AC_CANONICAL_HOST.
3220 (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
3221 (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
3222 (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
3223 CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
3224 changed. Instead of inspecting the output of getconf, try to
3225 compile the test program without and with the macro definition.
3226 (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
3227 getconf. Instead, check for the needed flags by compiling test
3230 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
3232 * config.guess, config.sub: Remove these files, for similar reasons.
3234 2000-05-03 Paul Eggert <eggert@twinsun.com>
3236 * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
3237 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
3238 bug. This avoids a clash when files like regex.c that define
3241 2000-05-02 Paul Eggert <eggert@twinsun.com>
3243 * m4/largefile.m4 (AC_SYS_LARGEFILE):
3244 Define _GNU_SOURCE if this is needed to make
3245 ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
3246 inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
3248 * lib/quotearg.c (mbrtowc, mbstat_t):
3249 Add definitions if !HAVE_MBSTATE_T_OBJECT.
3250 (<wctype.h>): Include if HAVE_WCTYPE_H.
3251 (iswprint): Define to 1 if we lack it
3253 2000-04-18 Paul Eggert <eggert@twinsun.com>
3255 * m4/mbstate_t.m4: New file.
3257 2000-04-17 Bruno Haible <haible@clisp.cons.org>
3259 * tests/ignfail.sh: Test for uid 0 along with user "root".
3261 2000-04-05 Paul Eggert <eggert@twinsun.com>
3263 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
3264 Don't use -n32 on IRIX if the installer said
3267 2000-02-28 Paul Eggert <eggert@twinsun.com>
3269 * lib/quotearg.c (ALERT_CHAR): New macro.
3270 (quotearg_buffer_restyled): Use it.
3272 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3274 * src/list.c (tartime): Fix off-by-one error when copying year if
3277 2000-02-18 Paul Eggert <eggert@twinsun.com>
3279 * lib/getdate.y: Handle two-digit years with leading zeros correctly.
3280 (textint): New typedef.
3281 (parser_control): Changed from struct parser_control to typedef
3282 (for consistency). Member year changed from int to textint. All
3284 (YYSTYPE): Removed; replaced by %union with int and textint
3286 (tID): Removed; not used.
3287 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
3288 tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
3289 tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
3290 (tSNUMBER, tUNUMBER): Now of type <textintval>.
3291 (date, number, to_year): Use width of number in digits, not its
3292 value, to determine whether it's a 2-digit year, or a 2-digit
3294 (yylex): Store number of digits of numeric tokens. Return '?' for
3295 unknown identifiers, rather than (unused) tID.
3297 2000-01-16 Paul Eggert <eggert@twinsun.com>
3299 * lib/quotearg.c (quotearg_buffer_restyled):
3300 Do not quote alert, backslash, formfeed,
3301 and vertical tab unnecessarily in shell quoting style.
3303 2000-01-15 Paul Eggert <eggert@twinsun.com>
3306 Change quoting to be compatible with future autoconf versions.
3308 2000-01-11 Paul Eggert <eggert@twinsun.com>
3310 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
3312 2000-01-07 Paul Eggert <eggert@twinsun.com>
3314 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
3316 Fix bug with fnmatch.h dependency, as follows:
3317 * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
3318 * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
3320 * src/common.h (apply_nonancestor_delayed_set_stat):
3321 Renamed from apply_delayed_set_stat.
3322 (apply_delayed_set_stat, decode_mode, chmod_error_details,
3323 chown_error_details, close_warn, closedir_warn, mkdir_error,
3324 read_error_details, read_fatal_details, read_warn_details,
3325 seek_error_details, seek_warn_details, utime_error,
3326 write_error_details, write_fatal_details): New decls.
3328 Make diagnostic messages more regular.
3329 * src/create.c (dump_file): Quote file names with colons if possible.
3330 * src/compare.c (diff_archive): Likewise.
3331 * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
3332 * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
3333 * src/mangle.c (extract_mangle): Likewise.
3334 * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
3336 * src/buffer.c (archive_write_error, flush_archive, close_archive,
3337 new_volume, xclose):
3338 Use error message functions to report errors consistently.
3339 * src/compare.c (diff_sparse_files, diff_archive): Likewise.
3340 * src/create.c (finish_sparse_file, dump_file): Likewise.
3341 * src/extract.c (set_mode, set_stat, extract_sparse_file,
3342 extract_archive): Likewise.
3343 * src/list.c (list_archive): Likewise.
3344 * src/update.c (append_file): Likewise.
3345 * src/compare.c (diff_init, diff_sparse_files):
3346 Use xalloc_die to report memory exhaustion.
3347 * src/incremen.c (gnu_restore): Likewise.
3348 * src/list.c (read_header): Likewise.
3349 * src/mangle.c (extract_mangle): Likewise.
3350 * src/misc.c (maybe_backup_file): Likewise.
3351 * src/tar.c (decode_options): Likewise.
3352 * src/compare.c (read_and_process, fill_in_sparse_array,
3354 Use consistent terminology for unexpected-EOF message.
3355 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
3356 * src/list.c (list_archive, read_header, skip_file,
3357 skip_extended_headers): Likewise.
3358 * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
3359 (xdup2): Regularize messages with rest of tar.
3361 * src/buffer.c (flush_read): Don't read past EOF.
3363 * src/extract.c (extr_init):
3364 If we run out of memory, invoke apply_delayed_set_stat.
3365 (prepare_to_extract): Don't complain if we can't remove ".".
3366 (apply_delayed_set_stat): New function.
3367 (apply_nonancestor_delayed_set_stat):
3368 Renamed from apply_delayed_set_stat. All uses changed.
3369 Don't remove head if it doesn't apply.
3371 * src/create.c (find_new_file_size):
3372 Return size instead of storing through pointer.
3373 All callers changed.
3374 (deal_with_sparse): Don't keep reading after read errors.
3375 (finish_sparse_file): Just abort if there is an internal error.
3376 (dump_file): Fix typo: stat_warn and stat_error were interchanged.
3377 Don't restore access times on directories during incremental dumps
3378 until after dealing with the directory.
3379 If ignoring failed reads, count closedir, read, and unknown
3380 file errors as warnings, not errors.
3381 Fix buffer overrun problem when dumping sparse files.
3383 * src/list.c (read_and):
3384 Invoke apply_nonancestor_delayed_set_stat on file names
3385 after handling them.
3386 (decode_mode): Remove; moved to misc.c.
3388 * src/misc.c (safer_rmdir): New function.
3389 (remove_any_file): Use it to avoid problems with rmdir(".").
3390 (maybe_backup_file): Regularize diagnostics.
3391 (undo_backup_file): Likewise.
3392 (decode_mode): Moved here from list.c.
3393 (chmod_error_details, chown_error_details, close_fatal,
3394 close_warn, closedir_warn, mkdir_error, read_error_details,
3395 read_warn_details, read_fatal_details, seek_error_details,
3396 seek_warn_details, utime_error, write_error_details,
3397 write_fatal_details): New functions.
3399 * src/delete.c (save_record): Remove static variable (now local).
3400 (move_archive): Don't position before start of archive.
3401 (write_record): Abort if count is zero at inopportune time.
3404 * src/tar.c (decode_options): --delete and -f - are now
3405 incompatible, since we didn't have time to fix their bugs.
3407 * tests/Makefile.am (TESTS): Remove delete02.sh.
3408 * tests/ignfail.sh: Adjust to new quoting scheme again.
3410 2000-01-06 Paul Eggert <eggert@twinsun.com>
3412 * lib/getdate.y: Sync tm_diff with the GNU C Library.
3413 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
3414 (tm_diff): Renamed from difftm. All uses changed.
3415 Replace body with that taken from GNU C Library 2.1.3pre1.
3416 (get_date): Prefer tm_gmtoff to tm_diff if available.
3418 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
3420 * tests/incremen.sh: Invoke stat on newly created file so that its
3421 ctime is updated on Nextstep.
3423 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
3425 * lib/getdate.y (get_date):
3426 Fix typo when checking for time_t overflow in time zone calculations.
3428 1999-12-13 Paul Eggert <eggert@twinsun.com>
3430 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
3432 * README-alpha: New file.
3433 * README: New sections for gzip and bzip2, Solaris.
3434 Remove mention of BACKLOG.
3436 * configure.in (AC_C_BACKSLASH_A): Add.
3437 (AC_CHECK_HEADERS): Add wchar.h.
3438 (AC_CHECK_FUNCS): Add mbrtowc.
3439 (AC_FUNC_CLOSEDIR_VOID): Add.
3441 * tests/Makefile.am (TESTS): Add delete02.sh.
3442 (POSTPONED_TESTS): Remove.
3443 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
3446 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
3448 * tests/ignfail.sh (err): Adjust to new quoting scheme.
3450 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
3452 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
3454 * src/tar.c ("quotearg.h"): New include.
3455 (usage): Now has __attribute__ ((noreturn)).
3456 (confirm): Report errno if we can't open tty.
3457 (confirm, decode_options):
3458 Quote arbitrary strings in diagnostics.
3459 (OVERWRITE_OPTION): New constant.
3460 (long_options, usage, decode_options): New --overwrite option.
3461 (decode_options): --keep-old-files, --overwrite, and --unlink-first
3462 are now mutually exclusive.
3463 Don't assume that gettext preserves errno.
3464 (main): Set default quoting style to escape_quoting_style.
3466 * src/update.c (<quotearg.h>): New include.
3468 Don't assume that gettext preserves errno.
3469 Quote arbitrary strings in diagnostics.
3470 Check for close error.
3472 * src/names.c (<quotearg.h>): New include.
3473 (name_init, name_next, name_close, names_notfound,
3474 collect_and_sort_names): Don't assume that gettext preserves
3475 errno. Quote arbitrary strings in diagnostics.
3476 (excluded_name): Fix typo that caused empty patterns to be
3479 * src/misc.c (<quotearg.h>): New include.
3480 (quote_copy_string): Quote only newline and backslash; the output is no
3481 longer meant for humans, and is locale-independent.
3482 (contains_dot_dot): New function.
3483 (remove_any_file): Don't use lstat; just rmdir the file and then use
3484 unlink if the rmdir fails because the file isn't a directory.
3485 Check for readdir and closedir errors.
3486 (maybe_backup_file): Report "stat" for stat errors.
3487 (maybe_backup_file, chdir_do):
3488 Quote arbitrary strings in diagnostics.
3489 (maybe_backup_file, undo_last_backup):
3490 Don't assume that gettext preserves errno.
3491 (call_arg_error, call_arg_fatal, call_arg_warn,
3492 chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
3493 mknod_error, open_error, open_fatal, open_warn, opendir_error,
3494 opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
3495 readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
3496 stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
3497 write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
3499 * src/system.h (__attribute__): New macro.
3500 (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
3501 (S_ISDOOR): New macro.
3502 (closedir): New macro, if CLOSEDIR_VOID.
3504 * src/rmt.c, src/rtapelib.c (decode_oflag):
3505 O_APPEND might not be defined.
3507 * src/list.c: (read_and, list_archive):
3508 Quote arbitrary strings in diagnostics.
3509 (from_header): Use locale_quoting_style to quote diagnostics.
3510 (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
3512 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
3514 * src/Makefile.am: Use ## for copyright comments.
3516 * src/extract.c (<quotearg.h>): New include.
3517 (enum permstatus): New enum.
3518 (struct delayed_set_stat): file_name is now at end of buffer, to avoid
3519 two mallocs. New members file_name_len, invert_permissions, permstatus.
3520 (extr_init): Remove hack that silently adjusted newdir_umask.
3521 (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
3522 Use these args to decide whether and how to set modes.
3523 (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
3524 Don't assume that gettext preserves errno.
3525 (set_stat): Remove arg symlink_flag; subsumed by typeflag.
3526 (delay_set_stat, repair_delayed_set_stat): New functions.
3527 (make_directories): Avoid mkdir where last part of path is "..".
3528 Create a struct delayed_set_stat for each directory made.
3529 (prepare_to_extract): Renamed from unlink_destination, and
3530 return 0 immediately if to_stdout_option; all callers changed.
3531 (maybe_recoverable): New parameter interdir_made.
3532 Add support for --overwrite.
3533 (extract_sparse_file, extract_archive):
3534 Quote arbitrary strings in diagnostics.
3535 (extract_archive): By default, warn about ".." in member names, and skip them.
3536 Don't open files with O_NONBLOCK or O_APPEND.
3537 Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
3538 overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
3539 minus the current umask. Keep track of intermediate directories made,
3540 to avoid looping when making x/../x when x doesn't exist; the
3541 earlier code solved this in a different way that didn't fit well
3542 into the new scheme. Don't extract permissions onto existing
3543 directories unless --overwrite is given. Do not add -wx------
3544 permissions to new directories permanently; just do it temporarily.
3545 Remove no-longer-needed hack with MSDOS and directory time stamps.
3546 (apply_delayed_set_stat): New argument specifies which directories to
3547 fix statuses of. Do not wait until the end of extraction to fix
3548 statuses; instead, fix a directory's status once we exit that directory.
3549 This requires less memory and does the right thing in some cases
3550 where the old method didn't.
3551 (fatal_exit): New function.
3553 * src/incremen.c (<quotearg.h>): New include.
3554 (get_directory_contents, gnu_restore):
3555 Check for readdir and closedir errors.
3556 (get_directory_contents, read_directory_file, gnu_restore):
3557 Quote arbitrary strings in diagnostics.
3558 (get_directory_contents, read_directory_file, write_directory_file):
3559 Don't assume that gettext preserves errno.
3561 * src/create.c (<quotearg.h>): New include.
3562 (start_header): Use `member names' to refer to archive member names, not
3563 `archive names'. Warn about `..' in member names.
3564 (finish_sparse_file, dump_file):
3565 Quote arbitrary strings in diagnostics.
3566 (finish_sparse_file, dump_file):
3567 Don't assume that gettext preserves errno.
3568 (dump_file): Don't use `access' to determine whether a directory is readable;
3569 this isn't reliable if tar is setuid. Use `opendir' instead.
3570 Check for readdir and closedir failures.
3571 Don't dump sockets as if they were fifos; just warn and skip.
3573 * src/delete.c (move_archive):
3574 Don't report fatal error merely because sizes don't fit
3575 into struct mtop values; fall back on lseek instead.
3576 Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
3577 Say `reposition' instead of `re-position'.
3578 (delete_archive_members):
3579 Set archive to STDOUT_FILENO before outputting trailing buffer.
3581 * src/compare.c (<quotearg.h>): New include.
3582 (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
3583 and `Cannot' others.
3584 (report_difference, diff_archive):
3585 Quote arbitrary strings in diagnostics.
3586 (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
3587 Don't assume that gettext preserves errno.
3588 (diff_archive): Don't open regular files with O_NONBLOCK.
3589 Preserve access times of files if --atime.
3591 * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
3592 (FATAL_ERROR, USAGE): Don't return 0.
3593 (enum old files): New enum.
3594 (old_files_option): New variable, replacing keep_old_files_option and
3595 unlink_first_option.
3596 (apply_delayed_set_stat): Now takes char const * param.
3597 (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
3598 closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
3599 open_fatal, open_warn, opendir_error, opendir_warn, read_error,
3600 read_fatal, readdir_error, readdir_warn, readlink_error,
3601 readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
3602 truncate_error, truncate_warn, unlink_error, waitpid_error,
3603 write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
3606 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
3607 archive_write_error, archive_read_error, flush_archive, close_archive,
3608 init_volume_number, new_volume):
3609 Don't assume that gettext preserves errno.
3611 (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
3612 (open_archive): Reject multivolume verify attempts a bit earlier.
3613 Rename local variable `access', in case it's defined by system header.
3615 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
3616 `Could not' sometimes and `Cannot' others.
3618 (open_archive, flush_read, flush_archive, close_archive, new_volume):
3619 Quote arbitrary strings in diagnostics.
3621 (read_error): Set archive to STDOUT_FILENO temporarily when writing
3624 (init_volume_number): Check for input and output errors in volno_file.
3626 (new_volume): Use new fatal_exit function to exit, and new xfork
3629 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
3631 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
3633 * doc/tar.texi: Add --overwrite.
3634 --absolute-names rejects ".." in names.
3636 * lib/quotearg.c: Add support for multibyte characters.
3638 (ISPRINT): New macro.
3639 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
3640 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
3641 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
3642 (quotearg_buffer_restyled): New function, with most of the old
3643 quotearg_buffer's contents.
3644 Major rewrite to support multibyte characters.
3645 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
3647 * m4/c-bs-a.m4: New file.
3649 * lib/Makefile.am: Use ## for copyright notice.
3651 * scripts/Makefile.am: Use ## on copyright notice.
3654 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
3656 1999-12-05 Paul Eggert <eggert@twinsun.com>
3658 * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
3659 src/ChangeLog, tests/ChangeLog: Remove these files.
3660 * ChangeLog.1: New file, incorporating the above files, plus old
3662 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
3664 1999-12-05 Dale Worley <worley@ariadne.com>
3666 * src/compare.c (<utime.h>, struct utimbuf): Add.
3667 (diff_archive): Restore access times if --atime.
3668 * doc/tar.texi: Explain that --atime also preserves modification time.
3670 1999-12-04 Gerhard Poul <gpoul@gnu.org>
3672 * ABOUT-NLS: Update to latest version from ftp.gnu.org.
3673 * BACKLOG, TODO: Remove.
3674 * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
3675 * README: Bring up to date.
3677 1999-12-03 Paul Eggert <eggert@twinsun.com>
3679 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
3681 * src/compare.c (diff_archive):
3682 Do not set errno to EPIPE; we no longer use perror.
3684 * src/create.c (dump_file):
3685 If a parent directory said that a file should be there but it is
3686 absent, diagnose it as being removed in the meantime.
3687 Do not pass meaningless errno to ERROR when reporting that the
3688 file changed as we read it.
3689 Report that a file changed if its ctime changes; this is more
3690 sensitive than mtime+size, and more accurate.
3692 * src/incremen.c (enum children): New type.
3693 (struct directory): Change old char allnew member to new enum children
3696 (get_directory_contents): When doing an incremental dump that does
3697 not cross filesystem boundaries, dump the mount points, even though
3698 they are in a different filesystem. This is for convenience when
3699 restoring, and for consistency with non-incremental dumps.
3700 This requires a 3-way flag for keeping track of which children we want,
3701 so we use enum children rather than boolean.
3703 * src/open3.c (modes): Remove.
3704 (open3): Remove unportable assumptions about flag encodings.
3705 Use `stat' instead of `access' for testing file existence,
3706 to avoid problems with setuid programs.
3708 * src/names.c (name_next): If file names are given both in the
3709 command line (e.g. via -C) and in a file (via -T), do not
3710 ignore the command-line names.
3712 * m4/uintmax_t.m4: Backport to autoconf 2.13.
3714 * doc/tar.texi: Clarify getdate authorship.
3716 1999-11-23 Paul Eggert <eggert@twinsun.com>
3718 * lib/Makefile.am (DISTCLEANFILES): New macro.
3720 * configure.in (tar_fnmatch_hin):
3721 Remove; it runs afoul of a bug in autoconf 2.13.
3722 Instead, always link fnmatch.h to some file, even if it's a throwaway.
3724 1999-11-19 Paul Eggert <eggert@twinsun.com>
3726 * m4/largefile.m4: Update serial.
3728 1999-11-18 Paul Eggert <eggert@twinsun.com>
3730 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
3731 the QNX shell, which doesn't propagate exit status of failed
3732 commands inside shell assignments.
3734 1999-11-07 Paul Eggert <eggert@twinsun.com>
3736 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
3738 * configure.in (AC_PREREQ): Bump to 2.13.
3739 (ALL_LINGUAS): Add pt_BR, ja.
3740 (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
3741 (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
3742 for AIX crossbuilds.
3744 * doc/tar.texi: New node create options for --ignore-failed-read.
3745 Remove unused version control symbols.
3746 Modernize texinfo usage.
3748 * src/tar.c (usage): Add examples.
3750 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
3751 Include fnmatch.h when testing fnmatch.
3753 * src/common.h (collect_and_sort_names): New decl.
3755 * src/list.c (from_header):
3756 Handle 32-bit two's complement negative time stamps
3757 even if the leading octal digit is 2 or 3.
3759 * src/extract.c (set_stat): Remove duplicate code.
3761 * src/create.c (to_chars): Remove trailing newline from warning.
3762 (dump_file): Ignore doors.
3763 (finish_header): Report block numbers with origin 0, not origin 1.
3765 * src/rmt.c: Include getopt.h.
3766 (long_opts): New constant.
3767 (usage): New function.
3768 (main): Implement --help and --version.
3769 Output usage message if arguments are bad.
3771 1999-10-10 Paul Eggert <eggert@twinsun.com>
3773 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
3775 * README: Remove --with-dmalloc.
3776 Add --disable-largefile.
3777 Remove old NeXT dirent problems, or AIX valloc problems.
3778 Remove old union wait advice, and old %lld advice.
3779 Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
3781 * doc/tar.texi: Clarify documentation for portable file names.
3783 * configure.in (AM_WITH_DMALLOC): Remove.
3784 (ALL_LINGUAS): Add ja.
3786 * src/tar.c (decode_options):
3787 Invalid dates are now treated as (time_t) -1.
3788 Redo version message to conform to GNU standards.
3790 * src/create.c (dump_file):
3791 Fix typo: last two args to dump_file were interchanged.
3792 * src/update.c (update_archive): Likewise.
3794 * src/common.h (tartime): New decl.
3796 * src/list.c (tartime): Now extern.
3797 (read_and): Invalid headers cause errors, not warnings.
3799 1999-10-03 Paul Eggert <eggert@twinsun.com>
3801 * lib/getdate.y (__attribute__):
3802 Don't use if GCC claims to be before 2.8; this is
3803 needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
3805 1999-09-25 Paul Eggert <eggert@twinsun.com>
3807 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
3808 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
3810 * tests/incremen.sh: Add yet another sleep.
3812 1999-09-24 Paul Eggert <eggert@twinsun.com>
3814 * NEWS: A read error now causes a nonzero exit status.
3816 * src/create.c (to_chars): Fix base-256 output.
3818 * src/buffer.c (write_error):
3819 Read error is an error, not just a warning.
3821 1999-09-24 Paul Eggert <eggert@twinsun.com>
3823 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
3825 * src/tar.c (<time.h>): Include.
3826 (time): Declare if not defined.
3827 (confirm): Don't read past EOF.
3828 (long_options, usage): Add --no-same-owner, --no-same-permissions.
3829 (main): Use clock_gettime if available.
3831 * tests/Makefile.am (TESTS): Add incremen.sh
3832 (INCLUDES): Add -I../lib, for fnmatch.h.
3834 * src/update.c (update_archive):
3835 Remove call to name_expand; had no effect.
3836 Use chdir_do to change into directory.
3837 Use deref_stat instead of stat.
3838 Use add_avoided_name to mark names to be avoided; the old method of
3839 setting a bit with the name caused all descendants of that name to
3840 be avoided, in some circumstances.
3842 * tests/incremen.sh: Remove unnecessary sleeps.
3844 * src/names.c (name_next): Go back to using plain chdir.
3845 (name_gather): Use chdir_arg to keep track of arguments to chdir.
3846 (addname): Likewise.
3847 (name_match): Use chdir_do to act on chdir args.
3848 (merge_sort): Moved here from incremen.c.
3849 (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
3851 (name_expand): Remove.
3852 (name_from_list): Skip fake names.
3853 Use chdir_do to act on chdir args.
3854 (struct avoided_name): New struct.
3855 (avoided_names): New var.
3856 (add_avoided_name, is_avoided_name): New functions.
3858 * src/system.h (stat, lstat): Define in terms of statx on
3859 STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
3860 (UCHAR_MAX): New macro.
3861 (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
3863 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
3865 * src/incremen.c (<time.h>): Remove include; no longer used.
3866 (time): Remove decl.
3868 (get_directory_contents): Use deref_stat.
3869 Consider a subdirectory to be all new only if
3870 listed_incremental_option or if it its timestamp is newer than the
3872 (add_hierarchy_to_namelist, merge_sort): Move to names.c.
3873 (read_directory_file): Now extern. Do not set time_now.
3874 (write_directory_file): Renamed from write_dir_file.
3875 Use start_time instead of time_now.
3876 (compare_names, collect_and_sort_names): Move to names.c.
3878 * src/mangle.c (<time.h>): Remove; not used.
3879 (time): Do not declare.
3881 * src/misc.c (chdir_from_initial_wd): Remove.
3882 (deref_stat): New function.
3883 (struct wd): New struct.
3884 (wd, wds, wd_alloc): New variables.
3885 (chdir_arg, chdir_do): New function.
3887 * src/compare.c (get_stat_data): Use deref_stat.
3889 * src/common.h (name_expand): Remove.
3891 * src/list.c (time): Declare if not defined.
3892 (base_64_digits): Moved here from create.c.
3893 (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
3895 (read_and): Don't get time from header unless we need it now;
3896 as getting time can cause duplicate diagnostics if bogus.
3897 Remove "Hmm, " from diagnostic.
3898 Use "Skipping to next header" uniformly.
3899 (from_header): Renamed from from_chars. All uses changed.
3900 Allow different forms for unportable 2's complement numbers.
3901 Don't check for extended forms when parsing checksums.
3902 Parse base-256 output.
3903 (gid_from_header): Renamed from gid_from_chars. All uses changed.
3904 (major_from_header): Renamed from major_from_chars. All uses changed.
3905 (minor_from_header): Renamed from minor_from_chars. All uses changed.
3906 (mode_from_header): Renamed from mode_from_chars. All uses changed.
3907 (off_from_header): Renamed from off_from_chars. All uses changed.
3908 (size_from_header): Renamed from size_from_chars. All uses changed.
3909 (time_from_header): Renamed from time_from_chars. All uses changed.
3910 Warn about future timestamps.
3911 (uid_from_header): Renamed from uid_from_chars. All uses changed.
3912 (uintmax_from_header): Renamed from uintmax_from_chars.
3914 (tartime): New function, incorporating isotime.
3916 (print_header): Use tartime.
3918 * src/create.c (to_chars): Fix typo in decl.
3919 Don't assign through char const *.
3920 Rename name_expand back to collect_and_sort_names.
3922 * src/extract.c (<time.h>): No need to include.
3923 (time): No need to declare.
3924 (now): Remove variable.
3925 (extr_init): Don't initialize `now'.
3926 Increment same_permissions_option and same_owner_option if we_are_root
3927 is nonzero; this supports the new --no-same-owner option.
3928 (set_stat): Use start_time instead of `now'.
3930 * src/create.c (struct link): Remove unused linkcount member.
3931 (base_64_digits): Move to list.c.
3932 (base_8_digits): Remove.
3933 (to_octal): New function, with some of old contents of to_base.
3935 (to_base256): New function.
3936 (to_chars): Use base 256, not base 64, for huge values.
3937 (mode_to_chars): Don't use two's complement in GNU format or POSIX
3939 (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
3940 it means we have an incremental dump where we don't know whether this
3941 is a top-level call.
3942 Use deref_stat instead of statx / stat / lstat.
3943 Cast result of alloca.
3944 Check for dates if 0 < top_level, not if listed_incremental_option.
3945 Move multiple-link check after directory check.
3946 Do not dump avoided names.
3947 Dump hard links to symbolic names as links, not as separate
3949 start_header cannot return a null pointer, so don't test for it.
3950 Likewise for find_next_block.
3952 * src/buffer.c, src/common.h (<human.h>): Include.
3953 (read_error): Read error is an error, not just a warning.
3954 (print_total_written): Also print human-readable byte count, and
3956 (open_archive, flush_write): Use start_time, not current time.
3957 (flush_read): Report about garbage bytes ignored at end of archive,
3958 but act on non-garbage bytes (instead of ignoring them).
3959 (new_volume): Use WARN for warnings.
3962 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
3964 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
3966 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
3968 * lib/Makefile.am (noinst_HEADERS):
3969 Rename fnmatch.h to fnmatch.hin; add human.h.
3970 (libtar_a_SOURCES): Add human.c, xstrtoul.c.
3971 (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
3973 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
3975 * lib/fnmatch.c (strchrnul):
3976 Define to __strchrnul if _LIBC, to our own replacement otherwise.
3977 Do not define if !_LIBC and if it already exists.
3978 (internal_fnmatch): Use it.
3980 * configure.in (tar_LDADD): New variable, used only when linking tar.
3981 (rmt_LDADD): Similarly, for rmt.
3982 (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
3983 fnmatch.c; otherwise, use the system fnmatch.h.
3985 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
3986 Modernize sample backup script.
3988 * THANKS: Martin Goik's email address has changed.
3990 * m4/fnmatch.m4: New file.
3992 1999-09-03 Paul Eggert <eggert@twinsun.com>
3994 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
3997 1999-08-29 Paul Eggert <eggert@twinsun.com>
3999 * lib/getdate.y (get_date):
4000 Rename outermost local `probe' to `quarter'.
4001 Rename latter local `tm' to probe_tm.
4002 From: Jim Meyering <meyering@ascend.com>
4003 Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
4005 1999-08-28 Paul Eggert <eggert@twinsun.com>
4007 * lib/getdate.y (PC): New macro; use it when possible.
4008 (number): Handle `Nov 11 1996' example correctly.
4009 See Risks Digest 20.55 (1999-08-27)
4010 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
4012 1999-08-23 Paul Eggert <eggert@twinsun.com>
4014 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
4016 Remove minor cases of lint from many source files: this includes
4017 unnecessary casts, uses of NULL, etc.
4019 * configure.in (AC_PROG_YACC): Remove.
4020 (YACC): Always use bison.
4021 (AC_STRUCT_TIMEZONE): Add.
4022 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
4024 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
4027 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
4028 ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
4030 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
4032 * src/common.h (merge_sort): Remove decl; no longer exported.
4034 * src/system.h (voidstar): Remove.
4035 (memcpy, memcmp): Cast args.
4036 ("xalloc.h"): Add include.
4037 (xmalloc, xrealloc): Remove decl.
4039 * src/mangle.c (time): Do not declare if defined.
4040 (first_mangle, mangled_num): Remove.
4042 * src/list.c (from_chars): Report out-of-range values more precisely.
4043 (off_from_chars): Do not allow negative offsets.
4044 (uid_from_chars): Allow negative uids.
4046 * src/create.c (linklist): Now static.
4047 (to_chars): Fix wording of message to match from_chars.
4049 * src/misc.c (merge_sort): Move to incremen.c.
4050 * src/incremen.c (merge_sort): Move here from misc.c; now static.
4051 It's too painful to make it both generic and portable.
4052 (read_directory_file): "timestamp" -> "time stamp" in messages.
4054 * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
4055 (usage): Fix misspelling.
4056 (OPTION_STRING): -y is now -I.
4057 (decode_options): Use -1, not EOF, for getopt_long result.
4058 Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
4059 Handle operands after any "--" argument.
4060 (main): Report any output errors.
4062 * src/rmt.c (main): status is ssize_t, not long.
4064 * src/names.c (name_gather): Handle trailing -C option correctly.
4065 (addname): use memcpy, not strncpy, to copy a string of known length.
4066 (name_match): Handle trailing -C option correctly.
4067 Propagate -C option to following files.
4068 (name_match, name_scan): Remove redundant matching code.
4070 * src/buffer.c (open_archive): Use American spelling in diagnostic.
4072 * lib/getdate.y: Major rewrite. Add copyright notice.
4073 (<stdio.h>): Include only if testing.
4075 (ISLOWER): New macro.
4076 (<string.h>): Include if HAVE_STRING_H, not USG.
4078 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
4080 (EPOCH_YEAR): Renamed from EPOCH.
4081 (table): Renamed from TABLE.
4082 (meridian): Now an anonymous enum.
4083 (struct parser_control): New type.
4084 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
4085 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
4086 (%pure_parser): Added, so that the parser is pure.
4087 (%union): Removed; the type is now just plain int.
4088 All %type directives removed.
4089 (tLOCAL_ZONE): New %token.
4090 (month_day_table): Renamed from MonthDayTable.
4091 (gmtime, localtime, mktime, time): Declare only if not defined.
4092 (meridian_table): New table.
4093 (dst_table): New table.
4094 (units_table): renamed from UnitsTable.
4095 (relative_time_table): Renamed from OtherTable.
4096 (time_zone_table): Renamed from TimezoneTable. Modernized.
4097 (military_table): Renamed from MilitaryTable.
4098 (to_hour): Renamed from ToHour.
4099 (to_year): Renamed from ToYear.
4100 (lookup_zone): New function.
4101 (LookupWord): Renamed from lookup_word. Use lookup_zone for time
4103 (yylex): Now reentrant. All callers changed.
4104 (get_date): Add support for local time zone abbreviations.
4107 1999-08-20 Paul Eggert <eggert@twinsun.com>
4109 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
4111 * src/create.c (to_chars): Generate GNU base-64 representation
4112 if we are generating an old or new GNU format tar file for a
4113 number that can't be represented with the POSIX format.
4115 * configure.in (AC_CHECK_FUNCS): Add fchdir.
4116 (AM_FUNC_GETLINE): Add.
4117 (LIBOBJS): Add getline.o to workaround comment.
4118 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
4119 * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
4120 * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
4121 (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
4122 * lib/getline.c, lib/getline.h, lib/save-cwd.c,
4123 lib/save-cwd.h, m4/getline.m4: New files.
4125 * src/misc.c (<save-cwd.h>): Include.
4126 (chdir_from_initial_wd): New function.
4128 * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
4129 (name_gather): Handle `-C x -C y' correctly.
4130 Do not rely on addname to handle -C.
4131 (addname): New CHANGE_DIR parameter. All callers changed.
4132 Remove ugly calls to getcwd; no longer needed.
4133 (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
4135 * src/incremen.c (listed_incremental_stream): New var.
4136 (read_directory_file): Remove arbitrary limits on file name length.
4137 Do not attempt to get the working directory; we can bypass this
4138 on fchdir hosts. Open the listed_incremental_option file for both
4139 read and write instead of opening it twice. Check for I/O errors
4140 when doing I/O to this file. Check for invalid data in the file,
4141 and report line numbers of invalid data.
4142 (write_dir_file): Likewise.
4143 (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
4144 Do not invoke write_dir_file; that's our caller's responsibility.
4146 * src/list.c (max): New macro.
4147 (isotime): Now takes time_t, not time_t *. Report the decimal values
4148 of times that can't be broken down.
4149 (print_header): Don't assume that major and minor device numbers can
4152 * src/common.h (struct name): change_dir is now char const *.
4153 (write_directory_file): Remove unused decl.
4154 (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
4155 chars; the old `sizeof (b)' broke when b was a pointer not an array.
4156 (chdir_from_initial_wd): New decl.
4157 (addname): New 2nd arg.
4159 * THANKS: Torsten Lull -> Catrin Urbanneck
4161 1999-08-18 Paul Eggert <eggert@twinsun.com>
4163 * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
4164 Don't depend on ac_cv_func variables.
4165 From Albert Chin-A-Young <china@thewrittenword.com>.
4167 1999-08-18 Paul Eggert <eggert@twinsun.com>
4169 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
4171 * m4/signedchar.m4: New file.
4172 * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
4173 * src/system.h (signed_char): New macro.
4174 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
4175 * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
4177 * src/create.c (write_eot): Write at least two zero blocks.
4179 * src/extract.c (extract_archive): Fix sparse array bug:
4180 we did not find end of array correctly.
4182 * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
4183 Don't assume find_next_block yields nonnull.
4184 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
4185 * src/list.c (skip_extended_headers): Likewise.
4187 * src/list.c (read_and, list_archive): Simplify code.
4188 (read_header): Fix computation of signed checksums on machines where
4190 Do not consider a block to be zero unless all its bytes are zero,
4191 even the checksum bytes. Do not attempt to parse the checksum of
4192 a zero block. Fix memory leak with long names and links.
4193 (from_chars): Accommodate a buggy tar that outputs leading NUL
4194 if the previous field overflows.
4196 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
4197 \?, for portability to non-ASCII hosts.
4199 1999-08-16 Paul Eggert <eggert@twinsun.com>
4201 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
4203 * src/extract.c (make_directories): Do not chown intermediate
4204 directories, even if we are root.
4206 * src/list.c (read_header): Fix bugs when interpreting
4207 POSIX-compliant headers that do not contain null bytes in the
4208 header or link names.
4210 1999-08-14 Paul Eggert <eggert@twinsun.com>
4212 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
4214 * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
4215 (AC_HEADER_SYS_WAIT): Add.
4216 (AC_REPLACE_FUNCS): Add waitpid.
4217 (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
4218 * lib/waitpid.c: New file.
4219 * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
4220 * src/system.h (WCOREDUMP): Remove; no longer used.
4221 (WIFSTOPPED): Likewise.
4222 (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
4223 * src/buffer.c (child_open_for_compress): Undo previous change.
4224 (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
4225 (new_volume): Likewise.
4227 * src/buffer.c, src/extract.c, src/incremen.c (time):
4228 Don't declare if defined.
4229 * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
4230 * src/incremen.c (read_directory_file):
4231 Invoke `time' the same way everyone else does.
4232 Check validity of --listed-incremental file contents a bit better.
4233 Do not worry about --after-date-option; tar.c now checks this.
4234 * src/list.c (isotime): Report ??? if localtime returns null.
4235 Don't assume years fit into four digits.
4236 Don't append trailing newline.
4237 (print_header): Report ??? if localtime returns null;
4238 Don't assume years fit into four digits.
4240 * src/compare.c (diff_archive): Do not fall back on absolute name
4241 when --absolute-names is not specified.
4243 * src/create.c (start_header):
4244 Include text of ignored filesystem prefix in warning.
4245 (create_archive): Check for excluded names when doing incremental
4246 pass through directory.
4247 (dump_file): Do not dump old files explicitly given on command line
4248 when using --listed-incremental. Do not strip ./ prefix from names.
4250 * src/tar.c: -g now implies after_date_option = 1.
4251 -g and -N are now incompatible options.
4253 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
4255 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
4257 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
4258 incremental headers as POSIX prefixes.
4260 1999-08-11 Paul Eggert <eggert@twinsun.com>
4262 * NEWS, configure.in: Version 1.13.6.
4264 * configure.in (ALL_LINGUAS): Add pt_BR.
4265 * po/pt_BR.po: New file.
4267 * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
4268 Renamed from tar.info and header.texi; adjust actions so that
4269 they work in other directories.
4271 * doc/tar.texi: Add -y and --bzip2.
4272 Patterns containing / now exclude only file names whose prefix match.
4274 * lib/exclude.h (excluded_filename): New option parameter.
4275 (add_exclude_file): New ADD_FUNC parameter.
4276 (excluded_pathname): Remove decl.
4277 * lib/exclude.c (_GNU_SOURCE):
4278 Remove; no longer needed since we don't use FNM_ macros.
4279 (excluded_filename): Renamed from excluded_filename_opts.
4280 (excluded_filename, excluded_pathname): Remove.
4281 (add_exclude_file): New ADD_FUNC parameter.
4283 * po/POTFILES.in: Add lib/quotearg.c.
4285 * src/buffer.c (_GNU_SOURCE): Define.
4286 (<fnmatch.h>): Include unconditionally.
4287 (child_open_for_compress): Dup after closing, to avoid possible file
4288 descriptor exhaustion.
4289 (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
4290 (flush_read): Likewise.
4292 * src/common.h (LG_8, LG_64): New macros.
4293 (excluded_with_slash, excluded_without_slash): New vars.
4295 (base_64_digits): New decl.
4296 (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
4297 off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
4299 GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
4300 OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
4302 Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
4303 off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
4304 GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
4305 SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
4306 respectively. All definitions and uses changed.
4307 (excluded_name): New decl.
4309 * src/compare.c (diff_archive):
4310 Open files with O_NONBLOCK instead of O_NDELAY.
4312 * src/create.c (base_64_digits): New constant.
4313 (base_8_digits): New macro.
4314 (MAX_VAL_WITH_DIGITS): New macro.
4315 (to_base): First half of old to_oct. Support base 64 too.
4316 (to_chars): Other half of old to_oct, for 64-bit support.
4317 (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
4318 (gid_substitute, uid_substitute): Look up names dynamically if
4319 GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
4320 (mode_to_chars): Renamed from mode_to_oct.
4321 Support negative values in all the _to_chars functions.
4322 (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
4323 Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
4324 (dump_file): Inspect entire pathname, not just new file name
4325 component, when deciding whether to exclude it.
4327 * src/extract.c (extract_archive):
4328 Open files with O_NONBLOCK instead of O_NDELAY.
4330 * src/incremen.c (get_directory_contents):
4331 Inspect entire pathname, not just new file name
4332 component, when deciding whether to exclude it.
4334 * src/list.c (<fnmatch.h>): Do not include.
4335 (from_chars): Renamed from from_oct. New parameter specifying
4336 the negative of the minimum allowed value. Support negative
4338 (base64_map): New var.
4339 (base64_init): New function.
4340 (print_header): Output numeric uids and gids if numeric_owner_option.
4342 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
4344 * src/names.c (_GNU_SOURCE): Define.
4345 (<fnmatch.h>): Include unconditionally.
4346 (excluded_name): New function, taking over duties of excluded_pathname.
4349 * src/rmt.c (decode_oflag): New function.
4350 (main): Use it to support symbolic open flags.
4352 * src/rtapelib.c (encode_oflag): New function.
4353 (rmt_open__): Do not allow newlines in the path.
4354 Propagate errno correctly.
4355 Decode symbolic open flags, if present.
4357 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
4360 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
4361 New -y or --bzip2 option.
4362 (add_filtered_exclude): New function.
4363 (decode_options): Put excluded patterns with / into
4364 excluded_with_slash, and without / into excluded_without_slash.
4365 Compare newer_mtime_option to its new initial value
4366 TYPE_MINIMUM (time_t) when deciding whether more than one
4367 threshold date was specified.
4369 1999-07-20 Paul Eggert <eggert@twinsun.com>
4371 * NEWS, configure.in: Version 1.13.5.
4373 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
4375 * src/buffer.c (new_volume): Likewise.
4376 * src/incremen.c (read_directory_file): Likewise.
4377 * src/tar.c (decode_options):
4378 ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
4381 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
4382 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
4384 * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
4385 (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
4386 (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
4387 Define to 0 if the corresponding S_IF* macro is not defined.
4388 (mkfifo): Do not define if already defined, or if S_IFIFO
4391 * src/compare.c (diff_archive): Use HAVE_READLINK, not
4392 S_ISLNK, to determine whether to invoke readlink.
4393 * src/create.c (dump_file): Likewise.
4395 * src/extract.c (set_mode):
4396 Do not chmod unless we are root or the -p option was given;
4397 this matches historical practice.
4398 (unlink_destination): New function, which checks for unlink failures.
4399 (maybe_recoverable): Stay quiet if -U.
4400 (extract_archive): Use O_EXCL if unlink_first_option.
4401 Report unlink failures.
4402 Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
4403 Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
4406 * src/incremen.c (get_directory_contents): Depend on
4407 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
4409 * src/list.c: Remove S_IS* ifdefs.
4410 * src/misc.c (maybe_backup_file): Likewise.
4412 * src/misc.c (maybe_backup_file):
4413 "Virtual memory exhausted" -> "Memory exhausted",
4414 to conform to the other places this message is issued.
4416 * src/mangle.c (extract_mangle):
4417 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
4419 * src/rtapelib.c (rmt_open__):
4420 Remove typo that caused us to omit the first char
4423 1999-07-16 Paul Eggert <eggert@twinsun.com>
4425 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
4427 * doc/tar.texi: A path name is excluded if any of its file name
4428 components matches an excluded pattern, even if the path name was
4429 specified on the command line.
4430 * src/create.c (create_archive): Likewise.
4431 * src/list.c (read_and): Likewise.
4432 * src/update.c (update_archive): Likewise.
4433 * lib/exclude.h (excluded_pathname): New decl.
4434 * lib/exclude.c (_GNU_SOURCE): Define.
4435 (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
4436 (excluded_filename_opts): New function.
4437 (excluded_pathname): New function.
4439 * lib/Makefile.am (EXTRA_DIST):
4440 xstrtol.c moved here from libtar_a_SOURCES.
4441 (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
4442 Remove xstrtoul.c; no longer needed.
4443 * lib/xstrtol.c: Remove.
4445 * src/tar.c (decode_options):
4446 Set newer_time_option to TYPE_MINIMUM, so that
4447 negative timestamps are handled correctly.
4448 Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
4449 uniformity (and so that we don't need to have the other fns).
4450 (main): Remove call to init_total_written; no longer needed.
4452 * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
4453 checks for unsigned long and long long.
4454 * src/arith.c: Remove.
4455 * src/Makefile.am (tar_SOURCES): Remove arith.c.
4456 * po/POTFILES.in: Remove src/arith.c.
4457 * src/arith.h: Use double, to simplify configuration gotchas.
4458 (tarlong): Now double.
4459 (TARLONG_FORMAT): New macro.
4460 (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
4461 LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
4462 zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
4463 add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
4464 zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
4465 mult_tarlong, print_tarlong): Remove. All callers replaced with
4468 * src/common.h (init_total_written): Remove decl.
4470 * src/buffer.c (total_written):
4471 Remove; replaced with prev_written + bytes_written.
4472 (prev_written): New var.
4473 (init_total_written): Remove.
4474 (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
4476 * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
4477 Make sure that we can shift, multiply
4478 and divide unsigned long long values; Ultrix cc can't do it.
4480 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
4481 Check for any unknown bits, not just unknown bits left of the leftmost
4484 * lib/quotearg.c (quotearg_buffer):
4485 Don't quote spaces if C quoting style.
4486 * src/list.c (from_oct):
4487 Use C quoting style for error; omit trailing NULs.
4489 1999-07-14 Paul Eggert <eggert@twinsun.com>
4491 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
4493 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
4494 <inttypes.h> defines strtoumax as a macro (and not as a function).
4495 HP-UX 10.20 does this.
4497 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
4498 * PORTS, README, TODO, doc/tar.texi: Likewise.
4500 1999-07-12 Paul Eggert <eggert@twinsun.com>
4502 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
4503 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
4505 * src/list.c (decode_header):
4506 Do not assume that S_IFBLK and S_IFCHR are defined.
4508 * src/create.c (start_header): Do not assume S_IFMT is defined.
4509 (dump_file): Remove unnecessary check for screwy apollo lossage.
4510 Do not assume S_IFBLK and S_IFCHR are defined.
4512 * src/extract.c (extract_archive):
4513 Test whether S_IFCHR and S_IFBLK are nonzero,
4514 not whether they are defined, for consistency with other tests.
4516 * src/buffer.c (is_regular_file):
4517 Don't succeed on files that we can't access due to
4518 permissions problems.
4519 (open_archive): Fix wording on fatal error message.
4520 Don't bother to stat /dev/null if the archive is not a character
4523 * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
4524 Report an error, not a warning, for I/O errors.
4525 (process_rawdata, process_dumpdir, diff_sparse_files):
4526 Change ungrammatical "Data differs" to "Contents differ".
4527 (get_stat_data): Find hidden files on AIX.
4528 Accept file name as argument; all uses changed.
4529 (get_stat_data, diff_archive): Use system error message for
4530 nonexistent files rather than rolling our own.
4531 (diff_archive): Unknown file types are errors, not warnings.
4532 Normalize spelling of message to "File type differs".
4533 Use get_stat_data to get link status, for consistency.
4534 Do not inspect st_rdev for fifos.
4535 Do not assume st_mode values contain only file types and mode bits.
4536 Check for mode changes and device number changes separately.
4538 * src/update.c (append_file):
4539 Open the file before statting it, to avoid a race.
4540 Complain about file shrinkage only when we reach EOF.
4542 1999-07-08 Paul Eggert <eggert@twinsun.com>
4544 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
4546 * configure.in (AC_EXEEXT): Add.
4548 * lib/Makefile.am (noinst_HEADERS):
4549 Add basename.h, exclude.h. Remove full-write.h.
4550 (libtar_a_SOURCES): Add exclude.c.
4552 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
4554 * lib/full-write.c: Include safe-read.h instead of full-write.h.
4555 * lib/safe-read.h (safe_read): New decl.
4556 * src/rmt.c: Include safe-read.h.
4557 * src/rtapelib.c: Include basename.h, save-read.h.
4558 (rmt_open__): Use base_name to compute base name.
4561 Include basename.h, exclude.h; don't include full-write.h.
4562 (exclude_option): Remove decl.
4563 (excluded): New decl.
4564 (add_exclude, add_exclude_file, check_exclude): Remove decls.
4566 * src/list.c (read_and):
4567 Use excluded_filename instead of check_exclude.
4568 Check base name of incoming file name, not entire file name, when
4569 deciding whether to exclude it.
4571 * src/create.c (finish_sparse_file):
4572 Use excluded_filename instead of check_exclude.
4573 Don't bother to stat excluded file names.
4574 * src/incremen.c (get_directory_contents): Likewise.
4576 * src/names.c (exclude_pool, exclude_pool_size,
4577 allocated_exclude_pool_size, simple_exclude_array,
4578 simple_excludes, allocated_simple_excludes,
4579 pattern_exclude_array, pattern_excludes,
4580 allocated_pattern_excludes, add_exclude, add_exclude_file,
4582 Remove; now done in ../lib/exclude.c.
4584 * src/tar.c (decode_options): Initialize `excluded'.
4585 Use new add_exclude_file and add_exclude functions.
4587 1999-07-05 Paul Eggert <eggert@twinsun.com>
4589 * m4/gettext.m4: Use changequote rather than [[ ]].
4591 * lib/safe-read.c: Renamed from lib/full-read.c.
4592 (safe_read): Renamed from full_read. All uses changed.
4593 * lib/safe-read.h, lib/full-write.h: New files.
4594 * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
4595 (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
4596 * lib/full-write.c: Include full-write.h.
4597 * src/common.h: Include full-write.h, safe-read.h.
4598 * src/system.h: (full_read, full_write): Remove decls.
4600 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
4602 * src/system.h (bindtextdomain, textdomain): undef before
4603 defining, to avoid preprocessor warnings with --disable-nls
4604 on hosts whose locale.h includes libintl.h.
4606 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
4607 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
4608 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
4611 1999-07-02 Paul Eggert <eggert@twinsun.com>
4613 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
4614 * m4/mktime.m4: New file.
4615 * m4/Makefile.am.in, m4/README: Remove these files.
4616 * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
4617 remove README, Makefile.am.in.
4618 (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
4619 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
4622 * src/tar.c: Include signal.h.
4623 (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
4624 (main): Ensure SIGCHLD is not ignored.
4626 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
4627 MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
4628 OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
4629 RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
4630 VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
4631 OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
4632 OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
4633 OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
4634 they don't overlap with char codes. Use an enum instead of a lot
4637 * src/system.h (ISASCII): Remove.
4638 (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
4639 S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
4640 S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
4641 MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
4642 LONG_MAX): New macros.
4644 * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
4645 (read_directory_file): Cast ISSPACE arg to unsigned char.
4646 * src/misc.c (ISPRINT): Remove; now in system.h.
4647 (remove_any_file): Add brackets to pacify gcc -Wall.
4648 * src/list.c: Don't include <ctype.h>; system.h already does this.
4649 (ISODIGIT, ISSPACE): Remove; now in system.h.
4650 (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
4652 (from_oct): Cast ISSPACE arg to unsigned char.
4654 * src/create.c (mode_to_oct): Translate modes from internal to
4656 * src/list.c (mode_from_oct): Translate modes from external to
4657 internal form. Do not complain about unrecognized mode bits.
4658 * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
4659 TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
4661 * src/extract.c: (extr_init, make_directories, extract_archive):
4662 Do not assume mode bits have traditional Unix values.
4663 * src/list.c (decode_mode): Likewise.
4664 * src/create.c (start_header, dump_file): Likewise.
4665 * src/buffer.c (child_open_for_compress,
4666 child_open_for_uncompress, open_archive, (close_archive): Likewise.
4667 * src/compare.c (diff_archive): Likewise.
4669 * src/extract.c (set_mode): Use %04 not %0.4 format.
4670 (extract_sparse_file): Do not use data_block uninitialized.
4671 Check for lseek failures.
4673 * src/rtapelib.c (rmt_lseek__):
4674 Convert lseek whence values to portable integers on the wire.
4675 * src/rmt.c (main): Likewise. Check for whence values out of range.
4677 * src/create.c (finish_sparse_file): Use lseek whence macros
4678 instead of integers.
4679 * src/buffer.c (backspace_output): Likewise.
4680 * src/compare.c (diff_archive, verify_volume): Likewise.
4681 * src/delete.c (move_archive): Likewise.
4682 * src/extract.c (extract_sparse_file): Likewise.
4684 * src/create.c (dump_file): Do not invoke finish_sparse_file
4685 on a negative file descriptor.
4687 * src/buffer.c: Add braces to pacify gcc -Wall.
4689 * src/compare.c (diff_sparse_files): Report lseek errors.
4691 * configure.in (ALL_LINGUAS): Add cs, es, ru.
4693 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
4695 * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
4696 message to be internationalized; \a doesn't work with msgfmt.
4698 * src/tar.c (long_options, main, usage, OPTION_STRING):
4699 Remove -E or --ending-file.
4700 * src/list.c (read_and): Likewise.
4701 * src/common.h (ending_file_option): Likewise.
4702 * src/buffer.c (close_archive): Likewise.
4704 * tests/after: Don't run two commands together in a pipeline,
4705 as some old shells mishandle pipeline exit status.
4707 1999-06-28 Paul Eggert <eggert@twinsun.com>
4709 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
4710 * NEWS: Describe changes since 1.12.
4711 * README: Update bug reporting address; move paxutils ref to NEWS.
4713 Handle EINTR correctly.
4714 * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
4715 * lib/full-read.c, lib/full-write.c: New files.
4716 * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
4717 Prefer full_read to read and full_write to write.
4718 * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
4719 * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
4721 * src/extract.c (extract_sparse_file): Likewise.
4722 * src/rmt.c (get_string, main, report_error_message,
4723 report_numbered_error): Likewise.
4724 * src/rmt.h (rmtread, rmtwrite): Likewise.
4725 * src/rtapelib.c (do_command, get_status_string, rmt_read__,
4726 rmt_write__, rmt_ioctl__): Likewise.
4727 * src/update.c (append_file): Likewise.
4728 * src/system.h (full_read, full_write): New decls.
4730 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
4731 lib/xmalloc.c, src/arith.c, src/misc.c.
4733 * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
4734 New macros. All uses of STDIN and STDOUT changed.
4735 * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
4736 instead of 0 and STDOUT_FILENO instead of 1.
4737 * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
4738 instead of fileno (stdin) and fileno (stdout) or 0 and 1.
4740 * src/rmt.c (private_strerror): Avoid const. Translate results.
4742 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
4743 in the presence of NFS clock skew.
4745 1999-06-25 Paul Eggert <eggert@twinsun.com>
4747 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
4749 * src/buffer.c (write_archive_buffer): New function.
4750 (child_open_for_compress, flush_write, flush_read): Use it to write
4752 (open_archive): Report error if fstat of archive fails.
4753 Improve efficiency of check for /dev/null.
4754 Also, fix some corner cases with remote archives and /dev/null checking.
4755 (close_archive): Test for input fifo only if not remote.
4756 Truncate output archive only if it's not remote.
4758 * src/misc.c (remove_any_file):
4759 Don't terminate if you see . or ..; just skip them.
4761 1999-06-18 Paul Eggert <eggert@twinsun.com>
4763 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
4765 Output sizes using a format that's more compatible with
4766 traditional tar (and with GNU Emacs).
4767 * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
4768 MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
4769 Don't subtract 1 from size.
4770 * src/create.c (to_oct): Prepend leading zeros, not spaces.
4771 Output a trailing NUL unless the value won't fit without it.
4772 (finish_header): No need to append NUL to chksum, now that
4775 1999-06-16 Paul Eggert <eggert@twinsun.com>
4777 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
4779 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
4780 @INTLLIBS@ might invoke rpl_realloc.
4782 * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
4783 (intconv): Remove; use xstrto* fns instead.
4784 ("xstrtol.h"): Include.
4785 (check_decimal): Remove.
4786 (long_options, usage, OPTION_STRING, decode_options):
4787 Remove -y, --bzip2, --unbzip2.
4788 (decode_options): Use xget_version instead of get_version.
4789 Check for overflow with -b and -L and RECORD_SIZE_OPTION.
4790 Replace invocations of check_decimal with xstrtoumax.
4792 * tests/preset.in (echo_n, echo_c): Remove.
4794 * tests/after: Don't rely on $echo_c and $echo_n.
4796 * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
4797 lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
4798 lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
4799 lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
4800 m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
4801 m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
4802 m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
4803 m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
4804 m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
4805 m4/xstrtoumax.m4: New files.
4807 * configure.in(fp_PROG_ECHO): Remove; no longer needed.
4808 (AC_SYS_LARGEFILE): Renamed from AC_LFS.
4809 (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
4810 (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
4811 (AC_CHECK_FUNCS): Remove lchown.
4812 (AC_REPLACE_FUNCS): Remove basename, dirname.
4813 Add lchown, strtol, strtoul.
4814 (jm_FUNC_MKTIME): Add.
4815 (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
4816 are also built via the ANSI2KNR-filtering rules.
4817 Use a no-op line to work around bug in automake 1.4 with malloc and
4819 (AC_OUTPUT): Add m4/Makefile.
4821 * lib/Makefile.am (EXTRA_DIST):
4822 Add lchown.c, malloc.c, mktime.c, realloc.c,
4823 strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
4824 (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
4825 (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
4826 xstrtoul.c, xstrtoumax.c. Remove getversion.c.
4827 ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
4829 * src/system.h (uintmax_t): Don't declare; configure now does this.
4831 * src/common.h (backup_type): New decl.
4832 * src/common.h, src/misc.c, src/tar.c:
4833 Move include of backupfile.h to common.h.
4835 * src/misc.c (maybe_backup_file):
4836 Pass backup_type to find_backup_file_name.
4838 * src/list.c (print_header): Change sizes of uform and gform from 11 to
4839 UINTMAX_STRSIZE_BOUND.
4841 * doc/tar.texi: Remove --bzip2.
4842 Fix @xref typos reported by latest makeinfo.
4844 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
4846 (M4DIR, ACINCLUDE_INPUTS): New macros.
4847 ($(srcdir)/acinclude.m4): New rule.
4849 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
4850 HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
4851 now generated automatically by autoconf.
4853 1999-05-15 Paul Eggert <eggert@twinsun.com>
4855 * doc/tar.texi: Remove -y.
4857 1999-04-09 Paul Eggert <eggert@twinsun.com>
4859 * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
4860 (we were allocating too much storage).
4861 (uintmax_t): Don't declare; configure now does this.
4863 * ABOUT-NLS: Update to gettext 0.10.35 edition.
4865 1999-03-22 Paul Eggert <eggert@twinsun.com>
4867 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
4869 * acinclude.m4 (AC_LFS_FLAGS):
4870 Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
4871 (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
4872 (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
4874 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
4875 New macros; needed for latest GNU xmalloc.c.
4877 * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
4878 (libtar_a_SOURCES): Add quotearg.c.
4879 * list.c: Include <quotearg.h>.
4880 (from_oct): Add forward decl.
4881 (read_header): Return HEADER_FAILURE if we can't parse the checksum.
4882 (from_oct): Report an error only if TYPE is nonzero.
4883 Quote any funny characters in bad header.
4885 1999-03-20 Paul Eggert <eggert@twinsun.com>
4887 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
4889 * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
4890 (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
4892 (AC_LFS): Simplify AIX revision number test.
4894 1999-03-17 Paul Eggert <eggert@twinsun.com>
4896 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
4898 * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
4899 Remove; it doesn't work that well
4900 with AC_CANONICAL_HOST.
4901 (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
4903 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
4905 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
4907 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
4909 * tar.texi: Fix bug-report addr.
4911 * README: Remove --with-included-malloc.
4912 Upgrade version numbers of build software.
4914 1999-03-07 Paul Eggert <eggert@twinsun.com>
4916 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
4918 * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
4919 where bindtextdomain and gettext require -lintl.
4920 (AC_LFS_FLAGS): Simplify so that it only gets the flags;
4921 `no' means it failed.
4922 (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
4923 (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
4924 _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
4925 to add anything to the command line (it's all in config.h).
4926 Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
4928 1999-03-01 Paul Eggert <eggert@twinsun.com>
4930 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
4932 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
4934 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
4935 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
4936 uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
4937 like OFF_MAX, which are not reliable
4938 (e.g. OFF_MAX in AIX 4.2 is incorrect).
4939 * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
4940 SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
4942 * src/incremen.c (get_directory_contents):
4943 Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
4944 Have statx depend on STX_HIDDEN, not AIX.
4946 * src/create.c (to_oct):
4947 New parameter substitute, giving a substitute value to use
4948 when the original value is out of range. Do not append a space to the
4949 output; modern tars don't. When a value is out of range, specify the
4950 maximum value, not the number of bits.
4951 (GID_NOBODY, UID_NOBODY): New macros.
4952 (gid_to_oct, uid_to_oct): Use them as substitutes.
4953 (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
4954 (dump_file): Check whether the file changed as we read it.
4956 * src/rmt.c (main): Remove suspicious AIX/386 code.
4958 1999-02-19 Paul Eggert <eggert@twinsun.com>
4960 * intl/localealias.c (read_alias_file): Don't assume that memcpy
4961 returns a type compatible with char *; it doesn't on SunOS
4962 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
4964 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
4966 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
4967 * doc/tar.texi: Add --bzip2, --unbzip2 options.
4969 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
4971 (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
4972 (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
4973 * acinclude.m4 (AM_WITH_NLS):
4974 Update to latest gettext version (serial 5).
4975 (AC_LFS_FLAGS): New macro
4976 (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
4977 working only with unset variables. Append to CFLAGS, not CPPFLAGS.
4978 Work properly in cross-compilation scenario, by checking for getconf
4979 with AC_CHECK_TOOL and by ditching uname in favor of
4980 AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
4982 * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
4983 replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
4984 * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
4985 since getdate.y now uses ANSI code.
4987 * config.guess, config.sub: New files; taken from automake 1.4.
4989 * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
4990 intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
4991 intl/explodename.c, intl/finddomain.c, intl/gettext.c,
4992 intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
4993 intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
4994 intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
4995 Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
4997 1999-02-01 Paul Eggert <eggert@twinsun.com>
4999 * src/tar.c: Update copyright.
5003 1999-02-01 Paul Eggert <eggert@twinsun.com>
5005 * NEWS, configure.in: Version 1.12.64004
5007 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
5009 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
5011 * src/extract.c (extract_archive): Fix bug when extracting sparse
5012 files: they were trashing the tar file header.
5014 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
5015 Add -y or --bzip2 or --bunzip2 option.
5017 1999-01-30 Paul Eggert <eggert@twinsun.com>
5019 * src/names.c (cached_no_such_uname, cached_no_such_gname,
5020 cached_no_such_uid, cached_no_such_gid): New vars.
5021 (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
5022 Cache failures, too.
5024 * src/tar.c (decode_options):
5025 Don't pass names longer than UNAME_FIELD_SIZE to
5026 uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
5028 1999-01-27 Paul Eggert <eggert@twinsun.com>
5030 * NEWS, configure.in: Version 1.12.64003
5032 * src/buffer.c (backspace_output, close_archive): Cast
5033 rmtlseek position arg to off_t, for benefit of K&R compilers
5035 * src/compare.c (verify_volume): Likewise.
5037 * NEWS, configure.in: Version 1.12.64002
5039 * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
5040 off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
5041 Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
5042 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
5043 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
5044 uid_from_oct): Likewise.
5046 1999-01-25 Paul Eggert <eggert@twinsun.com>
5048 * incremen.sh: Fix timing bug in regression test.
5050 1999-01-22 Paul Eggert <eggert@twinsun.com>
5052 * NEWS, configure.in: Update version
5054 * Makefile.am (localedir): Change to $(datadir)/locale.
5055 (DEFS): New macro, defining LOCALEDIR.
5056 (tar.o, tar._o, rmt.o, rmt._o): Remove.
5057 (INCLUDES): Add -I..
5059 * Makefile.am (localedir): Change to $(datadir)/locale.
5061 1999-01-21 Paul Eggert <eggert@twinsun.com>
5063 * NEWS, README, configure.in: Unofficial version 1.12.64001.
5065 * tests/Makefile.am (localedir): Change to $(datadir)/locale.
5066 * src/Makefile.am (localedir): Likewise.
5067 (DEFS): New macro, defining LOCALEDIR.
5068 (tar.o, tar._o, rmt.o, rmt._o): Remove.
5069 (INCLUDES): Add `-I..'.
5071 * tests/incremen.sh: Fix timing bug.
5073 1999-01-20 Paul Eggert <eggert@twinsun.com>
5075 * NEWS, README, configure.in: Unofficial version 1.12.64000.
5076 `lfs.7' changed to `64000' in version number
5077 to conform to gnits standards.
5079 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
5080 mkinstalldirs, ansi2knr.c: Update to latest public versions.
5082 Rebuild with automake 1.4 and autoconf 2.13, to work around some
5085 1998-12-07 Paul Eggert <eggert@twinsun.com>
5087 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
5089 * src/list.c (read_header):
5090 Accept file names as specified by POSIX.1-1996 section 10.1.1.
5092 1998-11-30 Paul Eggert <eggert@twinsun.com>
5094 * configure.in: Quote the output of uname.
5096 * src/extract.c (set_stat): chmod after chown even when not root;
5097 if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
5099 1998-11-15 Paul Eggert <eggert@twinsun.com>
5101 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
5103 * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
5104 ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
5106 1998-10-28 Paul Eggert <eggert@twinsun.com>
5108 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
5110 * src/system.h (voidstar): Use void * if __STDC__ is defined,
5113 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
5114 On many installations, rexec is disabled.
5116 1998-08-07 Paul Eggert <eggert@twinsun.com>
5118 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
5120 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
5121 for nameless users and groups.
5123 1998-02-17 Paul Eggert <eggert@twinsun.com>
5125 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
5126 * NEWS, README: Add explanation of why this isn't an official version.
5128 1998-02-02 Paul Eggert <eggert@twinsun.com>
5130 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
5131 This is an unofficial version.
5133 1997-12-17 Paul Eggert <eggert@twinsun.com>
5135 * src/incremen.c (ST_DEV_MSB): New macro.
5136 (NFS_FILE_STAT): Use most significant bit of st_dev,
5137 even if it's unsigned.
5139 1997-12-08 Paul Eggert <eggert@twinsun.com>
5141 * src/system.h (ST_NBLOCKS): Fix typo in definition.
5143 1997-11-19 Paul Eggert <eggert@twinsun.com>
5145 * configure.in (HAVE_INTTYPES_H):
5146 Don't ignore cache variable if it's already set.
5148 1997-11-10 Paul Eggert <eggert@twinsun.com>
5150 * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
5151 * src/delete.c (records_read): Now off_t.
5152 (move_archive): Don't assume mt_count is of type daddr_t.
5154 1997-10-30 Paul Eggert <eggert@twinsun.com>
5156 * configure.in (CPPFLAGS, LDFLAGS, LIBS):
5157 Set to appropriate values if large file support
5158 needs explicit enabling.
5159 (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
5161 New macros to configure.
5162 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
5164 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
5165 major_t, minor_t, ssize_t): New macros.
5167 * src/arith.h (TARLONG_FORMAT):
5168 Fix typo: %uld -> %lu. Use unsigned when long long
5170 (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
5171 (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
5173 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
5174 2nd arg is now unsigned long.
5176 * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
5177 (prepare_record_buffer): Arg is now size_t.
5178 Remove now-useless casts.
5180 (main): Use `long' for status, so that it can store ssize_t.
5181 Use daddr_t, mode_t, size_t, off_t when appropriate.
5182 Convert daddr_t and off_t values ourselves, since they might be longer
5183 than long. Convert other types using `long' primitives.
5184 When processing MTIOCTOP, do not try to pass resulting
5185 count back, since it won't work (it could be too large) and it's
5186 not expected anyway.
5189 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
5190 now-useless casts. Use unsigned long to print *_t types, except use
5191 STRINGIFY_BIGINT for off_t.
5192 (update_archive): Cast -1 to dev_t when necessary.
5194 * src/tar.c (check_decimal):
5195 Now returns 1 if successful, 0 otherwise, and returns
5196 uintmax_t value into new arg. Check for arithmetic overflow.
5197 (decode_options): Avoid overflow if record_size fits in size_t but not int.
5198 Check for overflow on user or group ids.
5200 * src/compare.c (diff_init, process_rawdata, read_and_process,
5201 diff_sparse_files, diff_archive):
5202 Use off_t, pid_t, size_t, ssize_t when appropriate.
5203 Remove now-useless casts. Use unsigned long to print *_t types,
5204 except use STRINGIFY_BIGINT for off_t.
5206 (process_noop, process_rawdata, process_dumpdir, read_and_process):
5207 Size arg is now size_t.
5209 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
5210 when allocating buffer.
5213 (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
5214 Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
5215 Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
5218 (get_status_string, get_status_off): New function.
5219 (get_status): Now returns long, so that it can store ssize_t.
5220 Invoke get_status_string to do the real work.
5221 (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
5222 (rmt_lseek__): Now returns off_t, using new get_status_off function.
5223 (rmt_ioctl__): Convert mt_count by hand,
5224 since it might be longer than long.
5226 * src/mangle.c (extract_mangle):
5227 Check for overflow when converting off_t to size_t.
5228 Use off_t, size_t when appropriate. Remove now-useless casts.
5230 * src/system.h (mode_t): Remove; now done by autoconf.
5231 (ST_NBLOCKS): Do not overflow if st_size is near maximum.
5232 Return number of ST_NBLOCKSIZE-byte blocks,
5233 not number of 512-byte blocks;
5234 this also helps to avoid overflow.
5235 (st_blocks): Declare if needed.
5236 (ST_NBLOCKSIZE): New macro.
5237 (<limits.h>, <inttypes.h>): Include if available.
5238 (CHAR_BIT): New macro.
5239 (uintmax_t): New typedef.
5240 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
5241 UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
5242 OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
5244 * src/names.c (name_init):
5245 Fix typo in error message: FILE* was passed, but char*
5248 (read_name_from_file, name_gather, addname, name_match, name_scan,
5249 add_exclude): Use size_t when appropriate. Remove now-useless casts.
5251 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
5253 * src/extract.c (newdir_umask, current_umask): Now mode_t.
5254 (extract_sparse_file): Args now use off_t.
5256 (set_mode, set_stat, make_directories, extract_sparse_file,
5257 extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
5258 now-useless casts. Use unsigned long to print *_t types, except use
5259 STRINGIFY_BIGINT for off_t.
5261 * src/misc.c (quote_copy_string):
5262 Use size_t when appropriate. Remove now-useless casts.
5264 * src/list.c (read_and, list_archive, read_header, decode_mode,
5265 print_header, print_for_mkdir):
5266 Use mode_t, off_t, size_t when appropriate. Remove
5267 now-useless casts. Use unsigned long to print *_t types, except use
5268 STRINGIFY_BIGINT for off_t.
5270 (read_header): Check for overflow when converting header size.
5272 (from_oct): Now static. Now returns uintmax_t. `where' arg is now
5273 const char *. Size arg is now size_t. Now takes new type and maxval
5274 args. Compute result using uintmax_t, not long. Report error if
5275 field does not contain octal number in range.
5276 (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
5277 off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
5278 uintmax_from_oct): New functions.
5280 (stringify_uintmax_t_backwards): New function.
5282 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
5283 (skip_file): Offset arg is now off_t.
5285 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
5286 real_s_totsize, real_s_sizeleft, current_block_ordinal):
5288 (write_error): Arg is now ssize_t.
5289 (child_pid): Now pid_t.
5290 (available_space_after): Now size_t.
5292 (child_open_for_compress, child_open_for_uncompress, flush_write,
5293 open_archive, flush_write, write_error, flush_read, close_archive):
5294 Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
5295 casts. Use unsigned long to print *_t types, except use
5296 STRINGIFY_BIGINT for off_t.
5298 * src/delete.c (records_read): Now daddr_t.
5299 (move_archive): Arg is now daddr_t. Check for overflow when
5301 (move_archive, delete_archive_members): Use daddr_t, off_t when
5302 appropriate. Remove now-useless casts.
5304 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
5305 (rmt_lseek): Now returns off_t.
5307 * src/create.c (to_oct):
5308 Now static. Value arg is now uintmax_t. Accept new args
5309 giving name of type of octal field, for error messages. Report an
5310 error if the value is too large to fit in the field.
5311 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
5312 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
5314 (write_eot, write_long, finish_header, deal_with_sparse,
5315 finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
5316 appropriate. Remove now-useless casts. Use unsigned long to print
5317 *_t types, except use STRINGIFY_BIGINT for off_t.
5319 (find_new_file_size): 1st arg is now off_t*.
5320 (finish_sparse_file): Args now use off_t, not long.
5321 Check for lseek error.
5322 (create_archive, dump_file): Cast -1 to dev_t when necessary.
5323 (dump_file): Device arg is now dev_t.
5324 Avoid overflow when testing whether file has holes
5325 by using the new ST_NBLOCKSIZE macro.
5327 * src/incremen.c (struct accumulator, add_to_accumulator,
5328 get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
5329 Use size_t for sizes.
5330 (struct directory, get_directory_contents, add_hierarchy_to_namelist):
5331 Use dev_t, ino_t for devices and inodes.
5332 (gnu_restore): Use off_t for file offsets.
5333 (struct directory): Use char for flags. Add new flag `nfs'.
5335 (NFS_FILE_STAT): New macro.
5336 (note_directory): Accept struct stat * instead of
5337 device and inode number. All callers changed.
5338 (note_directory, get_directory_contents):
5339 Use NFS_FILE_STAT to determine whether directory is an NFS directory.
5340 (write_dir_file): Cast time_t to unsigned long before printing as %lu.
5342 * src/common.h (record_size, struct name, struct sp_array,
5343 available_space_after):
5344 Use size_t for sizes.
5345 (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
5346 Use off_t for file offsets.
5347 (struct name): dir_contents is now const char *, not char *.
5348 (dump_file, get_directory_contents): Use dev_t for devices.
5349 (to_oct): Remove decl.
5350 (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
5351 UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
5352 GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
5353 OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
5354 UINTMAX_FROM_OCT): New macros.
5355 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
5356 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
5357 stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
5358 minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
5359 time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
5360 (print_for_mkdir): 2nd arg is now mode_t.
5362 See ChangeLog.1 for earlier changes.
5366 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software
5369 This file is part of GNU tar.
5371 GNU tar is free software; you can redistribute it and/or modify
5372 it under the terms of the GNU General Public License as published by
5373 the Free Software Foundation; either version 2, or (at your option)
5376 GNU tar is distributed in the hope that it will be useful,
5377 but WITHOUT ANY WARRANTY; without even the implied warranty of
5378 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5379 GNU General Public License for more details.
5381 You should have received a copy of the GNU General Public License
5382 along with GNU tar; see the file COPYING. If not, write to
5383 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
5384 Boston, MA 02111-1307, USA.
5388 version-control: never