1 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3 * configure.ac: Fixed check for setsockopt
5 * src/create.c: Do not zero-terminate name field if
6 the name is exactly 100 characters long.
7 (write_ustar_long_name): Fixed cheking for unsplittable
10 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
12 * src/create.c (start_header): Removed debugging hook
13 (dump_file): Fixed handling of linkname field.
14 * src/names.c (safer_name_suffix): If the input
15 file name ends with a slash, output one should do so
17 * doc/tar.texi: Documented --format=ustar
19 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
21 * src/tar.h (archive_format): USTAR_FORMAT: New type.
22 * src/create.c: Added POSIX.1-1988 support.
23 * src/names.c (safer_name_suffix): Skip leading ./
24 * src/tar.c: New option --format=ustar forces
25 POSIX.1-1988 archive format.
26 * tests/delete03.sh: Updated.
27 * tests/extrac04.sh: Updated.
28 * tests/multiv01.sh: Updated.
30 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
32 * src/list.c (read_and): Initialize current_stat_info
33 and extended_header at the start of the loop.
34 * src/names.c (all_names_found): Check if the argument
35 contains valid filename. Fixes coredump on `not_a_tar_file'
36 * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
37 (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
38 Fixes `pax-big-10g' bug.
40 2003-11-12 Paul Eggert <eggert@twinsun.com>
42 Fix some C compatibility bugs reported by Joerg Schilling.
44 * src/common.h (stripped_prefix_len): Fix misspelling
45 "stripped_path_len" in declaration.
46 * src/rmt.c (main): Use "return FOO;" rather than
47 "exit (FOO);"; we no longer have to worry about
48 pre-ANSI hosts that mishandled returned values from "main".
49 * src/tar.c (main): Likewise. This avoids warnings on some
51 * src/system.c: Include signal.h, for 'kill'.
52 * src/system.h (DEV_BSIZE): Remove.
53 (DEFAULT_ST_BLKSIZE): New macro.
54 (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
55 * src/tar.c (enum): Remove comma just before }.
57 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
59 * src/list.c (decode_header): Initialize st_atime and
62 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
64 * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
65 Bunk <bunk@fs.tum.de> for reporting.
66 * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
67 <martin@xemacs.org> for spotting.
69 2003-11-04 Paul Eggert <eggert@twinsun.com>
71 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
74 2003-10-26 Paul Eggert <eggert@twinsun.com>
76 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
77 Bug reported by Christian Weisgerber.
79 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
83 * src/tar.c (decode_options): Removed superfluous archive format
85 * doc/tar.texi: Documented new features.
87 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
90 * THANKS: Added Wojciech Polak
91 * configure.ac: Added checks for missing functions. Raised
92 version number to indicate alpha release.
93 * lib/Makefile.am: Added missing headers
94 * lib/waitpid.c: Added missing includes.
95 * src/extract.c: Likewise.
96 * src/names.c: Removed spurious includes.
97 * src/xheader.c: Likewise.
98 * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
99 macro overriding broken mkdir prototypes.
101 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
103 * configure.ac: Check for dev_t and ino_t.
104 * m4/Makefile.am: Added missing files.
105 * src/system.c: New file.
106 * src/Makefile.am: Added system.c
107 * src/common.h: Prototypes for functions from system.c
108 * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
109 * src/buffer.c: Moved system dependencies to system.c
110 * src/compare.c: Likewise.
111 * src/create.c: Likewise.
112 * src/delete.c: Likewise.
113 * src/extract.c: Likewise.
114 * src/rtapelib.c: Likewise.
116 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
118 Implemented --occurrence option.
121 * src/tar.c: New option --occurrence.
122 * src/common.h (occurrence_option): New global
123 (struct name): Changed `found' member to `uintmax_t
125 (names_done): Removed
126 (all_names_found): Changed prototype.
127 (ISFOUND,WASFOUND): New macros
128 * src/delete.c (delete_archive_members): Honor --occurrence
130 * src/list.c (read_and): Likewise.
131 * src/names.c: Count number of occurrences of each name in the
133 (name_match): Honor --occurrence option.
134 (names_done): Removed
135 (all_names_found,names_notfound): Rewritten.
137 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
139 * src/tar.c: Removed extra precaution regarding
140 subcommand_option == CAT_SUBCOMMAND
141 * lib/Makefile.am: Updated
143 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
145 * src/common.h (names_done): New function.
146 * src/names.c: Likewise.
147 * src/list.c (read_and): Use all_names_found() as `while'
149 * src/tar.c: New option --first-copy
152 2003-09-24 Paul Eggert <eggert@twinsun.com>
154 * src/rmt.c (main): Don't translate Copyright string; international
155 law says the word "Copyright" should be in English.
156 * src/tar.c (decode_options): Likewise.
158 2003-09-22 Paul Eggert <eggert@twinsun.com>
160 * doc/tar.texi (extracting untrusted archives): New section.
162 * src/common.h (stripped_path_len): Renamed from cut_path_elements.
163 Return size_t, not pointer, so that we don't have to worry about
164 violating the C standard by converting char const * to char *.
166 * src/names.c (stripped_path_len): Likewise. Strip file system
167 prefix, too. Count adjacent slashes as if they were one slash;
168 that is the POSIX standard.
170 2003-09-17 Paul Eggert <eggert@twinsun.com>
172 * README-alpha: Document maintainer tool assumptions a bit. GNU
173 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
174 Debian bug 211447. Fix minor misspellings/whitespace nits.
176 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
177 gl_USE_SYSTEM_EXTENSIONS.
179 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
180 * m4/.cvsignore: Add restrict.m4, time_r.m4.
182 2003-09-17 Paul Eggert <eggert@twinsun.com>
184 * bootstrap: Don't use "for option; do";
185 Solaris 8 /bin/sh doesn't like that.
187 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
189 * README-alpha: Updated
192 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
194 * README-alpha: Updated
196 * po/POTFILES.in: Added src/xheader.c
197 * src/common.h (cut_path_elements): Added proto.
199 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
201 * src/buffer.c: Use ngettext where appropriate.
202 * src/compare.c: Likewise.
203 * src/create.c: Likewise.
204 * src/misc.c: Likewise.
205 * src/tar.c: Likewise.
206 * src/update.c: Likewise.
208 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
210 * .cvsignore: Added *.shar.gz
213 * src/common.h (strip_path_elements): New variable.
214 * src/extract.c (extract_archive): Implemented --strip-path
215 * src/names.c (cut_path_elements): New functon.
216 * src/tar.c: New option --strip-path=NUM.
217 (decode_options) Assign boolean values to bool variables.
219 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
221 * src/delete.c: Fixed deletion from the POSIX archives.
222 * src/list.c (read_header): Minor change.
223 * src/tar.c (main): Do not check for volume_label_option
224 if subcommand_option is not CREATE_SUBCOMMAND.
225 * src/xheader.c (xheader_decode): Store the header as
226 well (for eventual delete).
228 * tests/incremen.sh: Explicitly request GNU format. This will
229 disappear when GNU extended header keywords are working.
230 * tests/multiv01.sh: Likewise
231 * tests/volume.sh: Likewise
233 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
235 * src/create.c: Support for "linkpath" extended keyword.
236 * src/xheader.c (decode_record): Reversed the return
239 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
241 * configure.ac: Allow to redefine the default output format.
242 * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
243 (archive_format_string): New function.
244 (usage): Updated help output.
249 2003-09-02 Paul Eggert <eggert@twinsun.com>
251 * src/common.h (destroy_stat, xheader_decode, xheader_store,
252 xheader_read, xheader_finish, xheader_destroy): Add decls;
255 * src/create.c (write_extended): Remove unused local 'bufsize'.
257 * src/delete.c (delete_archive_members): Handle case of
258 HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
259 * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
260 occurs, as it's not possible.
261 * src/update.c (update_archive): Likewise.
263 Use "const" when possible in new code.
264 * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
265 (fmttab): Now const. All uses changed.
266 * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
267 (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
268 decode_record, xheader_store, xheader_print, code_string, code_time,
269 code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
270 gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
271 linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
272 mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
273 uid_coder, uid_decoder, uname_coder, uname_decoder):
274 Use pointers to const when possible.
275 (xhdr_tab): Now const.
277 * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
278 (set_archive_format): Report an error if no format name matches,
279 instead of returning an undefined value.
281 * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
282 atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
283 ctime_decoder, mtime_decoder, path_decoder, size_decoder,
284 uid_decoder, uname_decoder): Remove unused keyword arg.
287 * src/tar.c (set_archive_format): Now static.
288 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
290 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
291 atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
292 linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
293 ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
294 size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
295 Remove forward decls; no longer needed.
296 (xhdr_tab): Move to end, so that the forward decls aren't needed.
297 Add a forward declaration.
299 Use 'bool' in new code, when appropriate.
300 * src/xheader.c (decode_record): Return bool, not int.
301 * src/common.h (read_header): Since it accepts bool, change
302 all callers to use false and true rather than 0 and 1.
304 * src/xheader.c (decode_record): Fix misspelling in diagnostic
305 "extended headed" -> "extended header".
307 GNU coding style fixes.
308 * src/xheader.c (decode_record, xheader_decode):
309 Do not use decls like "char *p, *q;".
312 (xheader_store): Avoid parentheses around object operand of sizeof.
314 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
316 * src/create.c (start_header): Store long file names
317 in "path" keyword of an extended header if in POSIX
319 (finish_header): print header before calling write_extended().
320 * src/list.c (list_archive): Always decode the header. This
321 is necessary so the extended header is processed and the correct
322 filename is printed no matter what the state of verbose_option.
323 * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
326 2003-09-01 Paul Eggert <eggert@twinsun.com>
328 Update from gnulib, and correct fnmatch to fnmatch-gnu.
329 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
331 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
333 * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
334 * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
335 copying rules from gnulib module descriptions.
336 (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
337 Update from gnulib modules alloca, fnmatch, getline, stdbool.
338 * m4/.cvsignore: Add utimes-null.m4. Sort.
340 2003-09-01 Sergey Poznyakoff
342 Added initial support for creating POSIX headers.
344 * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
345 (string_to_chars): New functions
346 (struct xheader): Changed structure
347 (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
349 * src/create.c (string_to_chars): New function.
350 (write_extended): New function
351 (start_header): Create extended POSIX headers if necessary.
352 (finish_header): Likewise.
353 * src/list.c (print_header): Take user/group from
355 * src/names.c (gid_to_gname,gname_to_gid)
356 (uid_to_uname,uname_to_uid): Changed prototypes.
357 * src/tar.c: New option --format.
358 * src/tar.h (OLDGNU_COMPATIBILITY): Removed
359 (struct extra_header): Removed unused structure.
360 (union block.extra_header): Removed unused member.
361 * src/xheader.c: Implemented coder functions.
362 * bootstrap: Added obstack.
363 * lib/.cvsignore: Likewise.
364 * configure.ac: Added 'gl_OBSTACK'
365 * m4/Makefile.am: Added new files.
366 * m4/.cvsignore: Likewise.
367 * TODO: Minor formatting change
369 2003-08-31 Sergey Poznyakoff
371 Added initial support for POSIX extended and STAR headers
372 (only for listing/extracting).
374 * src/xheader.c: New file.
375 * src/Makefile.am: Added xheader.c
376 * src/tar.h (struct star_header): New datatype
377 (XHDTYPE,XGLTYPE): New defines
378 (enum archive_format:STAR_FORMAT): New member
379 (struct tar_stat_info): New datatype.
380 (union block.star_header): New member.
381 * src/common.h (orig_file_name,current_file_name)
382 (current_trailing_slash,current_link_name): Removed variables.
383 (current_stat_info): New variable
384 (current_stat): Removed
385 (extended_header): New variable
386 (decode_header): Changed prototype.
387 * src/list.c (decode_header): Added initial support for POSIX extended
389 (skip_member): Check oldgnu_header only if current_format is set
391 * src/buffer.c: Use current_stat_info
392 * src/compare.c: Likewise.
393 * src/create.c: Likewise.
394 * src/delete.c: Likewise.
395 * src/incremen.c: Likewise.
396 * src/mangle.c: Likewise.
397 * src/update.c: Likewise.
398 * src/extract.c: Likewise.
399 (make_directories): Improved check for the existence of the directory
400 * src/tar.c (destroy_stat): New function.
402 2003-08-29 Paul Eggert <eggert@twinsun.com>
404 * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
405 was worth (e.g., different users in en_GB disagree about -ize
407 * po/en_GB.po: Remove.
409 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
413 * src/tar.c: Removed support for the obsolete command line
415 * doc/tar.texi: Removed references to the obsolete command
418 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
422 * doc/tar.texi: Updated
423 * src/common.h (check_links_option): New variable
424 (orig_file_name): New variable
425 (check_links): New proto.
426 * src/create.c (struct link.nlink): New member
427 (link_table): Static for the module.
428 (dump_file): Update `link' member when adding new links
430 (check_links): New function.
431 * src/list.c (print_header): Use orig_file_name.
432 * src/tar.c: New option --check-links. Changed semantics of
433 -o to comply to UNIX98 when extracting and to its previous
435 (main): Call check_links if --check-links. was given.
437 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
439 * src/list.c (print_header): Revised
440 * NEWS: Started the entry for 1.13.26
441 * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
443 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
445 * .cvsignore: Added to the repository.
446 * doc/.cvsignore: Likewise.
447 * lib/.cvsignore: Likewise.
448 * m4/.cvsignore: Likewise.
449 * po/.cvsignore: Likewise.
450 * scripts/.cvsignore: Likewise.
451 * src/.cvsignore: Likewise.
452 * tests/.cvsignore: Likewise.
454 * lib/Makefile.am: Added exitfail.[hc]
455 * src/misc.c (chdir_do): Fixed call to restore_cwd
456 * src/buffer.c (flush_read): Fixed behavior on short
457 reads right after opening the new archive (multiv01.sh test).
458 (new_volume): Special handling for "-".
459 * src/list.c (print_header): Print trailing slash if
460 current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
461 * tests/multiv01.sh: Minor changes.
462 * m4/Makefile.am: Added missing files.
464 2003-07-05 Paul Eggert <eggert@twinsun.com>
466 Finish the checkin begin yesterday.
468 * NEWS: Document the user-visible changes installed in the last
471 * TODO: New file (actually, resurrected; but with new contents).
473 * src/list.c (read_and): Give full type for procedure arg.
474 (read_header): Strip trailing slashes, setting current_trailing_slash.
475 (tartime): Avoid int overflow when printing year (!).
476 (print_header): New arg specifying block ordinal. All uses changed.
477 Print link as 'h' type. Give labels for long links and names.
479 * src/misc.c (contains_dot_dot): Moved to names.c
480 (must_be_dot_or_slash): New function.
481 (safer_rmdir): Use it.
482 (remove_any_file): Now takes enum as option, not boolean.
483 Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
484 to unlink a directory.
485 (deref_stat): Accept bool, not int.
487 * src/names.c (namelist_match): Allow partial matches only if
489 (hash_string_hasher): Renamed from hash_avoided_name.
490 (hash_string_compare): Renamed from compare_avoided_anames.
491 (hash_string_insert, hash_string_lookup): New functions.
492 (add_avoided_name, is_avoided_name): Use them.
493 (safer_name_suffix): New function.
494 (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
496 * src/rmt.c: Don't include print-copyr.h.
497 (prepare_input_buffer): New arg FD.
498 Do not read more than INT_MAX bytes at once,
499 since it breaks on some brain damaged Tru64 hosts.
501 when retrying instead of subtracting 1024; for speed.
502 (main): Use gettext to translate (C), not print_copyright.
504 * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
505 now that gnulib handles this.
506 Include <stddef.h> and <limits.h> unconditionally, now that we assume
508 Assume that offsetof is defined in stddef.h.
509 Do not include <sys/param.h>.
510 (realloc, lseek): Do not declare.
511 (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
512 (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
513 declarations, since we now assume C89 or better.
514 (PARAMS): Remove, as we now assume C89. All uses changed.
515 (bindtextdomain, textdomain): Include <gettext.h> to define.
516 Include <unlocked-io.h>.
517 (valloc): Define if not defined, and if valloc is not declared.
518 (xstrdup): Remove decl.
520 * src/tar.c: Do not include <print-copyr.h>.
522 (get_date): Remove decl.
523 (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
524 IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
525 NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
526 SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
527 (long_options, decode_options): Use them.
528 (OVERWRITE_DIR_OPTION): Remove.
529 (long_options): New options --index-file, --no-overwrite-dir.
530 Remove --overwrite-dir option.
531 (usage): Use PACKAGE_BUGREPORT.
532 (decode_options): Terminate new argv properly.
533 Use PACKAGE_NAME, PACKAGE_VERSION.
534 If verbose, report how we grokked any textual date option.
535 (main): Add support for index-file.
537 * tests/Makefile.am: Convert to UTF-8.
538 (AUTOMAKE_OPTIONS): Remove.
539 (TESTS): Add delete04.sh, multiv01.sh, options.sh.
540 (INCLUDES): Remove ../intl.
541 (LDADD): Don't link libtar.a twice.
543 * tests/genfile.c: Convert to UTF-8.
544 Don't include <print-copyr.h>.
545 (DEFAULT_PATTERN): Renamed from DEFAULT.
546 (ZEROS_PATTERN): Renamed from ZEROS.
547 (main): Use gettext to translate (C), not print_copyright.
549 2003-07-04 Paul Eggert <eggert@twinsun.com>
551 Revamp to meet current standards of autoconf, automake,
552 gettext, and gnulib, and incorporate new translations.
554 * config/config.guess, config/config.sub, config/depcomp,
555 config/install-sh, config/mdate-sh, config/missing,
556 config/mkinstalldirs, config/texinfo.texi:
557 Moved here from parent directory, or from doc.
558 * config.hin: Renamed from config.h.in.
559 * config/config.rpath: New file.
561 * intl: Remove this subdirectory.
563 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
565 * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
566 lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
567 lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
568 lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
569 lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
570 m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
573 * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
574 lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
575 lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
576 m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
577 m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
578 m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
579 m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
580 m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
581 m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
582 m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
583 m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
584 m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
585 m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
586 m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
587 m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
588 m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
589 po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
590 po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
591 po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
593 * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
594 lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
595 lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
596 lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
597 lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
598 lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
599 lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
600 lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
601 lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
602 lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
603 lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
604 lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
605 lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
606 m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
607 m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
608 m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
609 m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
610 m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
612 Upgrade to latest version from external source. The file "bootstrap"
613 now grabs these automatically, so we needn't keep track of them
614 in this change long any longer.
616 * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
617 (SUBDIRS): Remove intl.
618 * PORTS: Update for star, Macintosh.
619 * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
620 Bison 1.875, gettext 0.12.1.
621 * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
622 * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
623 (AC_CONFIG_AUX_DIR): New.
624 (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
626 (AC_PREREQ): Bump from 2.52 to 2.57.
627 (AC_GNU_SOURCE): New.
628 (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
629 we no longer support K&R C.
631 (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
632 sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
633 (AC_MBSTATE_T): Remove.
634 (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
635 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
636 HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
638 (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
639 jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
640 (AC_CHECK_TYPE): Remove ssize_t.
641 (gt_TYPE_SSIZE_T): Add.
642 (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
643 jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
644 AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
645 AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
646 jm_FUNC_MKTIME, jm_FUNC_REALLOC):
647 Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
648 (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
649 (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
650 (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
651 napms, poll, select, strstr, usleep.
652 (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
653 rmdir, strcasecmp, strncasecmp, strtol, strtoul.
654 (AM_GNU_GETTEXT): Use external and need-ngettext options.
655 (AM_GNU_GETTEXT_VERSION): New.
656 (AC_OUTPUT): Remove intl/Makefile.
658 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
659 ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
660 * doc/fdl.texi: Update to current GNU version.
661 * doc/gettext.texi: Update to current coreutils version,
662 plus a copyright notice.
663 * doc/tar.texi: Switch to new method for doing copyright notices.
664 Use @acronym instead of @sc where appropriate.
665 Remove empty examples. Give a few more examples.
667 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
668 (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
669 are built up in pieces with +=.
670 (noinst_HEADERS, INCLUDES): Remove.
671 (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
672 (libtar_a_LIBADD): Use $ rather than @.
673 (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
675 * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
676 bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
677 ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
678 intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
679 isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
680 memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
681 pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
682 safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
683 stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
684 strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
685 unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
686 Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
687 prereq.m4, xstrtoimax.m4.
689 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
690 be translated, since it's not a user-visible tool.
692 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
694 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
695 (INCLUDES): Remove ../intl. Put top-srcdir before ., for
696 consistency with coreutils.
697 (LDADD): Link LIBINTL after libtar.a, since
698 it's now external and should stand by itself.
700 * src/buffer.c (print_total_written): Adjust to new human.h
702 (child_open_for_compress): Do not increase size to BLOCKSIZE.
703 (open_archive): Open index file name.
704 Strip trailing slahes from file names.
705 (flush_write): Set size to 0 if not saving names.
706 (flush_write, flush_read): Use safer_name_suffix rather than
709 * src/common.h: Include <quote.h>.
710 (absolute_names_option, atime_preserve_option, backup_option,
711 block_number_option, checkpoint_option, dereference_option,
712 force_local_option, ignore_failed_read_option, ignore_zeros_option,
713 incremental_option, interactive_option, multi_volume_option,
714 numeric_owner_option, one_file_system_option, recursive_unlink_option,
715 read_full_records_option, remove_files_option, same_order_option,
716 show_omitted_dirs_option, sparse_option, starting_file_option,
717 to_stdout_option, totals_option, touch_option, verify_option,
718 dev_null_output, now_verifying, we_are_root): Now bool, not int.
719 (current_trailing_slash, index_file_name, recent_long_name_blocks,
720 recent_long_link_blocks): New vars.
721 (NO_OVERWRITE_DIR_OLD_FILES): New constant.
722 (OVERWRITE_OLD_DIRS): Remove.
723 (enum remove_option): New enum.
724 (remove_any_file): Use it as option arg, not int.
725 (is_avoided_name, contains_dot_dot): Return bool, not int.
726 (safer_name_suffix): New decl.
728 * src/compare.c (now_verifying): Now bool, not int.
729 (fill_in_sparse_array): Move to extract.c. Now returns bool;
730 all callers changed to test for failure.
731 (diff_sparse_files): Take size from current_stat, not from param.
732 (diff_archive): Do not count trailing slashes in archives.
733 (verify_volume): Test for header failure after loop, not before.
735 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
737 (start_header): Clear devmajor and devminor fields, too.
738 (finish_header): New arg block_ordinal.
739 (init_sparsearray): Now extern. Set sp_array_size to
740 SPARSES_IN_OLDGNU_HEADER if it is zero.
741 (dump_file): Keep link table as a hash.
742 Do not count "file changed as we read it" as a failure.
744 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
745 Move extern decl to common.h.
747 * src/extract.c (we_are_root): Now bool, not int.
748 (check_time): Warn about implausibly old time stamps.
749 (set_stat): Use utimbuf, not stat_info.
750 (prepare_to_extract): New arg DIRECTORY.
751 (fill_in_sparse_array): Moved here from compare.c.
752 (extract_sparse_file): Now returns off_t, giving size left.
753 Truncate file at end.
754 (extract_archive): Use safer_name_suffix rather than rolling our own.
755 Use fill_in_sparse_array rather than rolling our own.
756 Strip trailing slashes more effectively.
757 Check for unsafe names.
759 * src/incremen.c (struct directory): nfs and found are now of type
761 (gnu_restore): Now takes directory name as argument, not offset
762 of directory name in a global. All uses changed.
763 (CURRENT_FILE_NAME): Remove.
766 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
769 2002-09-30 Paul Eggert <eggert@twinsun.com>
771 * src/rmt.c (prepare_input_buffer): Renamed form
772 prepare_record_buffer. All uses changed. Do not assume that
773 size_t is the same width as int.
775 2002-03-29 Paul Eggert <eggert@twinsun.com>
777 * src/incremen.c (get_directory_contents):
778 If ignore_failed_read_option, only warn about
779 get_directory_contents failures. Fix suggested by
782 2002-01-31 Mark W. Eichin <eichin@thok.org>
784 * src/buffer.c (child_open_for_compress): Don't try to read
785 past the end of the buffer.
787 2001-10-11 Jim Meyering <meyering@lucent.com>
789 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
790 and quote_n (1, ... to avoid clobbering a buffer.
792 2001-09-26 Paul Eggert <eggert@twinsun.com>
794 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
796 * src/buffer.c (flush_read): Don't diagnose partial blocks before
797 end of file; just ignore them silently.
799 * src/list.c (read_header): Don't keep around extended name
800 and link info indefinitely; keep it only for the next file.
801 This fixes a bug introduced in 1.13.24, and removes the need
802 for some static variables. Set recent_long_name and
803 recent_long_link to zero if there were no long links; this
804 avoids a violation of ANSI C rules for pointers in delete.c.
805 * THANKS: Add Christian Laubscher.
807 2001-09-26 Jim Meyering <meyering@lucent.com>
809 * doc/tar.texi (Remote Tape Server): is know -> is known
811 2001-09-25 Paul Eggert <eggert@twinsun.com>
813 * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
814 <iconv.h> may define EILSEQ (e.g. libiconv). Define a
815 replacement EILSEQ to be ENOENT, not EINVAL, since callers may
816 want to distinguish EINVAL and EILSEQ.
818 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
820 * src/extract.c (maybe_recoverable):
821 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
823 2001-09-22 Paul Eggert <eggert@twinsun.com>
825 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
827 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
830 * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
831 * PORTS: Add copyright notice, 'star' reference.
832 * README-alpha: Add copyright notice, autoconf 2.52 patch.
833 * THANKS: Add Christophe Kalt.
834 * config.sub: Upgrade to 2001-09-14 version.
836 * configure.ac (ALL_LINGUAS): Add ko.
837 * po/ko.po: Resurrected file.
839 * doc/convtexi.pl: Add coding advice for Emacs.
841 * doc/getdate.texi: Add copyright notice.
843 * doc/mdate-sh: Upgrade to automake 1.5 version.
845 * doc/tar.texi (extracting files): Mention --to-stdout.
846 (Option Summary, Dealing with Old Files): New option --overwrite-dir.
847 (Overwrite Old Files): Likewise.
849 * lib/Makefile.am (noinst_HEADERS):
850 Remove copysym.h. Add print-copyr.h, unicodeio.h.
851 (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
853 * lib/copysym.c, lib/copysym.h: Remove.
854 * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
855 lib/unicodeio.h: New files.
857 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
858 lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
860 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
861 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
863 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
864 * m4/isc-posix.m4: Remove.
866 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
868 * po/POTFILES.in: Add copyright notice.
870 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
872 * tests/Makefile.am (LDADD): Likewise.
874 * src/buffer.c (write_archive_buffer, close_archive):
875 If an archive is a socket, treat it like a FIFO.
876 (records_read, records_written): New vars.
877 (write_archive_to_stdout): Now bool, not int.
878 (open_archive, flush_write, flush_read): Keep records_read and
879 records_written up to date.
881 * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
882 (write_archive_to_stdout): Now bool, not int.
883 (enum read_header): New value HEADER_SUCCESS_EXTENDED.
884 (read_header): Now takes bool arg. Existing callers modified
885 to pass 0, unless otherwise specified.
887 * src/delete.c (records_read): Remove; now a global.
888 (acting_as_filter): Now bool, not int.
889 (recent_long_name, recent_long_link, recent_long_name_blocks,
890 recent_long_link_blocks, records_read, records_written): New decls.
891 (records_skipped): New var.
892 (move_archive): Don't divide by zero if arg is 0.
893 Use the above vars to compute how far to move.
894 (write_recent_blocks): New function.
895 (delete_archive_member): Pass 1 to read_header, so that it doesn't
896 read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
897 Keep track of how many records have been skipped.
898 Let the buffer code count records.
899 When copying a header, copy any extended headers that came before it.
901 * src/extract.c (extract_archive): When marking a directory to be
902 updated after symlinks, stat all directories after it in the
903 delayed-set-stat list too, since they will be checked after
904 symlinks. Add support for --overwrite-dir.
906 * src/list.c (recent_long_name, recent_long_link,
907 recent_long_name_blocks, recent_long_link_blocks): New vars.
908 (read_and): Pass 0 to read_header.
909 (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
910 headers into new vars. Null-terminate incoming symbolic links.
912 * src/rmt.c: Include print-copyr.h, not copysym.h.
913 (main): Use print_copyright, not copyright_symbol.
914 * src/tar.c (decode_options): Likewise.
915 (OVERWRITE_DIR_OPTION): New constant.
916 (long_options, usage, decode_options): Add --overwrite-dir.
918 * src/tar.h: Put copyright notice into documentation.
920 * tests/Makefile.am (TESTS): Add delete03.sh.
921 * tests/delete03.sh: New file.
923 * tests/genfile.c: Include print-copyr.h, not copysym.h.
924 (main): Use print_copyright, not copyright_symbol.
925 Include <argmatch.h>.
926 (pattern_strings): Remove.
927 (pattern_args, pattern_types): New constants.
928 (main): Use XARGMATCH, not argmatch.
930 2001-09-20 Jim Meyering <meyering@lucent.com>
932 * lib/xstrtol.c (strtoimax): Guard declaration with
933 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
934 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
935 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
936 (strtoumax): Likewise, for completeness (it wasn't necessary).
937 * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
938 Check for declaration of strtoimax.
939 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
940 Check for declaration of strtoumax.
942 2001-09-16 Paul Eggert <eggert@twinsun.com>
944 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
946 2001-09-14 Paul Eggert <eggert@twinsun.com>
948 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
950 * README-alpha: Describe automake patch.
952 * configure.ac (LIBOBJS):
953 Remove automake 1.4 workaround, as we're using 1.5 now.
954 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
956 * lib/copysym.c: Include stddef.h, for size_t.
957 Include langinfo.h if needed.
958 Use locale_charset only if USE_INCLUDED_LIBINTL;
959 if not, use nl_langinfo (CODESET) if available.
961 2001-09-13 Paul Eggert <eggert@twinsun.com>
963 * config.guess, config.sub: Sync with canonical versions.
965 * configure.ac (jm_PREREQ_XGETCWD): Add.
967 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
968 (libtar_a_SOURCES): Add copysym.c.
969 * copysym.c, copysym.h: New files.
971 * lib/error.c: Sync with fileutils version.
973 * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
974 * m4/getcwd.m4: New file.
975 * m4/uintmax_t.m4: Remove.
977 * m4/gettext.m4 (AM_WITH_NLS):
978 Fix bug with calculating version of Bison 1.29.
979 Reported by Karl Berry.
981 * src/Makefile.am (datadir): Remove.
983 * src/rmt.c: Include copysym.h.
984 (main): Use copyright_symbol to translate copyright notice,
986 * src/tar.c: Likewise.
987 * tests/genfile.c: Likewise.
989 * src/system.h (MB_LEN_MAX): New symbol.
991 2001-09-11 Paul Eggert <eggert@twinsun.com>
993 * src/extract.c (struct delayed_set_stat): New member
995 (delay_set_stat): Initialize it to 0.
996 (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
997 taking an extra stat ourselves. All callers changed.
998 (set_stat): Likewise.
999 (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
1000 If false, stop when encountering a struct whose 'after_symlinks'
1001 member is true. Otherwise, go through all structures but check
1002 them more carefully. All callers changed.
1003 (extract_archive): When extracting a deferred symlink, if its parent
1004 directory's status needs fixing, then mark the directory as needing
1005 to be fixed after symlinks.
1006 (extract_finish): Fix status of ordinary directories, then apply
1007 delayed symlinks, then fix the status of directories that are
1008 ancestors of delayed symlinks.
1010 * src/rtapelib.c (rexec):
1011 Remove declaration; it ran afoul of prototypes on Crays.
1012 Reported by Wendy Palm of Cray.
1014 2001-09-06 Paul Eggert <eggert@twinsun.com>
1016 * lib/strtoimax.c (HAVE_LONG_LONG):
1017 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
1018 (strtoimax): Use sizeof (long), not
1019 sizeof strtol (ptr, endptr, base),
1020 to work around bug in IBM C compiler.
1022 2001-09-04 Paul Eggert <eggert@twinsun.com>
1024 * lib/xgetcwd.c: Include "xalloc.h".
1025 (xgetcwd): Do not return NULL when memory is exhausted; instead,
1026 report an error and exit.
1028 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
1029 (jm_PREREQ): Use it.
1031 2001-09-03 Paul Eggert <eggert@twinsun.com>
1033 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
1034 (jm_PREREQ_XGETCWD): New macro.
1036 * lib/exclude.c (fnmatch_no_wildcards):
1037 Fix typo that caused us to do case-folding
1038 search even when that was not desired. This occurred only in the
1041 * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
1042 Do not include xalloc.h.
1043 (INITIAL_BUFFER_SIZE): New symbol.
1044 Do not use xmalloc / xrealloc, since the caller is responsible for
1045 handling errors. Preserve errno around `free' during failure.
1046 Do not overrun buffer when using getwd.
1048 * lib/xgetcwd.c (xgetcwd):
1049 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
1050 to decide whether to use getcwd (NULL, 0).
1052 2001-09-02 Paul Eggert <eggert@twinsun.com>
1054 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
1056 2001-09-01 Jim Meyering <meyering@lucent.com>
1058 * exclude.c: Use `""', not `<>' to #include non-system header files.
1059 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
1060 and strncasecmp as r-values. Unixware didn't have declarations.
1062 2001-08-31 Jim Meyering <meyering@lucent.com>
1064 * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
1065 Use an initial, malloc'd, buffer of length 128 rather than
1066 a statically allocated one of length 1024.
1068 2001-08-30 Paul Eggert <eggert@twinsun.com>
1070 * lib/utime.c: Include full-write.h.
1071 * lib/xstrtol.c (strtoimax): New decl.
1073 2001-08-29 Paul Eggert <eggert@twinsun.com>
1075 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
1077 * src/create.c (dump_file): Relativize link names before dumping.
1078 This fixes a bug reported by Jose Pedro Oliveira.
1080 * src/create.c (dump_file): Use offsetof when computing sizes for
1081 struct hack; this avoids wasted space in some cases.
1082 * src/incremen.c (note_directory, find_directory): Likewise.
1083 * src/names.c (name_gather, addname): Likewise.
1085 * src/extract.c (extract_archive): Use strcpy, not memcpy,
1086 for consistency with other code that does similar things.
1087 * src/names.c (name_gather): Likewise.
1089 * src/names.c (read_name_from_file, name_next, name_gather,
1090 add_hierarchy_to_namelist): Avoid quadratic behavior when
1091 reallocating buffers. Check for buffer size overflow.
1092 (addname): Avoid unnecessary clearing of memory.
1094 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
1096 * src/extract.c (delay_set_stat): Fix off-by-one error in file
1097 name size allocation that caused core dumps.
1099 2001-08-28 Paul Eggert <eggert@twinsun.com>
1101 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
1103 * configure.ac (GNU_SOURCE): Define to 1, not /**/.
1104 (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
1105 (daddr_t): Remove; no longer used.
1106 (jm_PREREQ_HUMAN): Add.
1108 * acconfig.h: Remove; no longer needed.
1110 * config.guess, config.sub:
1111 New files, from automake 1.5. Gettext 0.10.39 needs them.
1112 * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
1114 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
1115 (SUBDIRS): Put intl before lib, as gettext requires.
1117 * ABOUT-NLS: Upgrade to gettext 0.10.39.
1118 * intl: Upgrade entire directory to gettext 0.10.39.
1119 * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
1120 New files, from gettext 0.10.39.
1121 * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
1122 Upgrade to gettext 0.10.39,
1123 * po/Makefile.in.in: Likewise, except fix a typo in its copying
1125 * po/cat-id-tbl.c, po/stamp-cat-id:
1126 Remove; no longer used by gettext 0.10.39.
1127 * po/ChangeLog: New file.
1129 * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
1130 $(srcdir)/tar.texi: Likewise.
1131 * doc/freemanuals.texi: New file.
1132 * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
1133 `fileds' -> `fields'
1134 * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
1136 * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
1137 (noinst_HEADERS): Add quote.h.
1138 (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
1140 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
1142 * lib/full-write.c, lib/savedir.c: Comment fix.
1144 * lib/pathmax.h: Remove.
1146 * lib/quote.c, lib/quote.h: New files.
1148 * lib/xgetcwd.c: Don't include pathmax.h.
1149 Include stdlib.h and unistd.h if available.
1151 (xmalloc, xstrdup, free): Remove decls.
1152 (xgetcwd): Don't assume sizes fit in unsigned.
1153 Check for overflow when computing sizes.
1154 Simplify reallocation code.
1156 * lib/xmalloc.c: Quote failure tests.
1158 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
1160 * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
1161 similar to strtol.c.
1162 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
1163 (verify): New macro.
1164 (strtoumax, uintmax_t, strtoull, strtol): Remove.
1165 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
1166 (strtoimax): Renamed from strtoumax. All uses of unsigned values
1167 changed to signed values. Check sizes at compile-time, not
1168 run-time. Prefer strtol to strtoll if both work.
1171 * lib/xstrtol.h (xstrtoimax): New decl.
1173 * m4/Makefile.am (EXTRA_DIST):
1174 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
1175 longlong.m4, xstrtoimax.m4.
1177 * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
1178 Remove; now done by autoconf.
1179 (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
1180 Use AC_CHECK_TYPE instead of merely looking for the header.
1182 * m4/uintmax_t.m4: Use shorter comment.
1184 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
1185 Quote first arg of AC_DEFUN.
1186 Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
1187 is needed to parse the include file.
1188 Simplify logic behind the args to AC_REPLACE.
1190 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
1192 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
1195 Use "Copyright %d" to simplify the translator's job in the future.
1196 Advise translator about circle-C.
1197 * src/tar.c: (decode_options): Likewise.
1198 * tests/genfile.c (main): Likewise.
1200 2001-08-28 Jim Meyering <meyering@lucent.com>
1202 * lib/argmatch.c: Include "quote.h".
1203 (argmatch_invalid): Quote the context.
1205 * lib/dirname.c (dir_name): Fix typo on PC platforms.
1207 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
1208 Use single-quote for local .h files.
1210 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
1212 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
1215 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
1216 invoking mktime the last time.
1218 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
1220 * lib/rename.c: Major rewrite by Volker Borchert to use system
1221 rename function, but to work around problems with trailing
1224 * lib/strtoll.c: New file, from glibc.
1225 * lib/strtoul.c: Update from glibc.
1227 * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
1228 Add support for signed numbers, too.
1229 (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
1231 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
1233 (strtoumax, uintmax_t, strtoull, strtoul): New macros.
1234 (main): Use generic names in debugging output.
1235 * lib/strtoimax.c: Plus add the following changes of my own:
1236 (main): Use accurate names in debugging output.
1238 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
1241 * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
1242 m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
1243 m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
1244 m4/utime.m4, m4/utimes.m4:
1245 Quote the first argument in each use of AC_DEFUN.
1247 * m4/getline.m4: Don't use string.h.
1249 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
1251 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
1253 2001-08-27 Paul Eggert <eggert@twinsun.com>
1255 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
1257 The biggest change is the new --exclude semantics and options.
1258 The basic idea was suggested by Gerhard Poul; thanks!
1260 * NEWS: Describe new --exclude semantics and options, and bug fixes.
1261 * README: ignfail.sh fails on some NFS hosts.
1262 * NEWS, README, lib/xstrtol.h: Add copyright notice.
1264 * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
1265 (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
1266 Remove; the automake bug has been fixed.
1267 * acinclude.m4: Remove.
1269 * configure.ac: Renamed from configure.in.
1270 (AC_PREREQ): Bump from 2.13 to 2.52.
1271 (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
1272 1997-05-30) has an encoding error.
1273 (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
1274 (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
1276 * doc/fdl.texi: Update to current GNU version.
1278 * doc/tar.texi: Put leading '*' in direntry.
1279 Accommodate new gfdl sectioning.
1280 New option --recursion (the default) that is the inverse of
1283 New options --anchored, --ignore-case, --wildcards,
1284 --wildcards-match-slash, and their negations (e.g., --no-anchored).
1285 Along with --recursion and --no-recursion, these control how exclude
1286 patterns are interpreted. The default interpretation of exclude
1287 patterns is now --no-anchored --no-ignore-case --recursion
1288 --wildcards --wildcards-match-slash.
1290 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
1292 * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
1293 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
1294 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
1295 Include if available.
1296 (<xalloc.h>): Include
1297 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
1298 (verify): New macro. Use it to verify that EXCLUDE macros do not
1299 collide with FNM macros.
1300 (struct patopts): New struct.
1301 (struct exclude): Use it, as exclude patterns now come with options.
1302 (new_exclude): Support above changes.
1303 (new_exclude, add_exclude_file):
1304 Initial size must now be a power of two to simplify overflow checking.
1305 (free_exclude, fnmatch_no_wildcards): New function.
1306 (excluded_filename): No longer requires options arg, as the options
1307 are determined by add_exclude. Now returns bool, not int.
1308 (excluded_filename, add_exclude):
1309 Add support for the fancy new exclusion options.
1310 (add_exclude, add_exclude_file): Now takes int options arg.
1311 Check for arithmetic overflow when computing sizes.
1312 (add_exclude_file): xrealloc might modify errno, so don't
1313 realloc until after errno might be used.
1315 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
1317 (free_exclude): New decl.
1318 (add_exclude, add_exclude_file): Now takes int options arg.
1319 (excluded_filename): No longer requires options arg, as the options
1320 are determined by add_exclude. Now returns bool, not int.
1322 * lib/prepargs.c: Include <string.h>; required for C99 since
1326 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
1328 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
1329 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
1331 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
1332 Remove inttypes_h.m4, largefile.m4, mktime.m4.
1334 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
1335 subsumed by Autoconf 2.50.
1337 * m4/error.m4: Upgrade to serial 2.
1339 * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
1340 remove test for GNU C library. It's not correct, as some
1341 older glibcs are buggy.
1343 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
1345 * m4/prereq.m4: Upgrade to serial 20, but then:
1346 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
1347 (jm_PREREQ_EXCLUDE): New macro.
1348 (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
1351 * m4/realloc.m4: Upgrade to serial 4.
1353 * m4/strerror_r.m4: Revert to serial 1002.
1355 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
1357 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
1359 * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
1360 (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
1361 it is now subsumed by autoconf. Add inttypes.h.
1363 * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
1364 po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
1366 * src/buffer.c (new_volume): Stop if the script exits with an error.
1368 * src/common.h (excluded_with_slash, excluded_without_slash):
1369 Remove, replacing by:
1370 (excluded): New decl.
1371 (link_error): New decl.
1372 (excluded_name): Now returns bool.
1375 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
1376 Support hard links to symbolic links.
1378 (struct delayed_symlink): Remove 'names' member, replacing it with
1379 'sources' and 'target' member. All uses changed.
1381 (struct string_list): New type.
1383 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
1384 for struct hack; this avoids wasted space in some cases.
1386 (extract_archive): Fix test for absolute pathnames and/or "..".
1387 Use link_error to report errors for links.
1388 Remove redundant trailing '/' at "really_dir", for all uses, not
1389 just before invoking mkdir.
1390 If overwriting old files, do not worry so much about existing
1392 Fix mode computation in the case where the directory exists.
1394 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
1395 link, make a copy of the symbolic link.
1397 * src/incremen.c (get_directory_contents):
1398 If ignore_failed_read_option, only warn about
1401 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
1402 However, check for error even for '-' or '+' case.
1404 (print_header): Try parsing uids and gids as unsigned integers first,
1405 and as a uid_t or gid_t only if that fails. This adds support for
1406 listing positive uids and gids that are greater than UID_MAX and
1409 * src/misc.c (link_error): New function.
1411 * src/names.c (collect_and_sort_names):
1412 If ignore_failed_read_option, only warn about
1415 (excluded_name): Now returns bool. Simplify, as the fancy
1416 features are now all in excluded_filename.
1418 * src/rtapelib.c (base_name): Remove decl, as system.h now
1421 * src/system.h: Include stddef.h if available.
1422 (offsetof): Declare if stddef.h doesn't.
1424 Include <dirname.h>.
1425 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
1427 * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
1428 NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
1429 NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
1430 WILDCARDS_MATCH_SLASH_OPTION):
1433 (long_options, usage, decode_options): Add support for --anchored,
1434 --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
1435 --no-wildcards-match-slash, --recursion, --wildcards,
1436 --wildcards-match-slash.
1438 (decode_options): Implement the new way of interpreting exclude
1441 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
1443 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
1444 just print error messages suggesting alternatives.
1446 (add_filtered_exclude): Remove.
1448 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
1450 * tests/extrac04.sh (out): Remove
1451 directory/subdirectory/file1, as the new semantics for
1452 --exclude exclude it.
1454 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
1456 2001-08-12 Paul Eggert <eggert@twinsun.com>
1458 * lib/addext.c (<errno.h>): Include.
1459 (errno): Declare if not defined.
1460 (addext): Work correctly on the Hurd, where pathconf returns -1 and
1461 leaves errno alone, because there is no limit. Also, work even if
1462 size_t is narrower than long.
1464 2001-07-08 Paul Eggert <eggert@twinsun.com>
1466 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
1468 2001-05-10 Paul Eggert <eggert@twinsun.com>
1470 * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
1471 Include <backupfile.h> and <dirname.h> after size_t is defined.
1472 (addext): Use base_len to trim redundant trailing slashes instead of
1475 * lib/backupfile.c (ISSLASH, base_name):
1476 Remove decls; now in dirname.h.
1477 Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
1479 (find_backup_file_name): Rename locals to avoid new functions.
1480 Use base_len instead of rolling it ourselves.
1481 Work even if dirlen is 0.
1482 Use a dir of '.' if given the empty string.
1485 Do not include <stdio.h>, <assert.h>; no longer needed.
1486 (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
1487 Include <string.h>, <dirname.h>.
1488 (base_name): Allow file names ending in slashes, other than names
1489 that are all slashes. In this case, return the basename followed
1492 * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
1493 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
1494 (dir_len): Renamed from dirlen.
1495 All callers changed.
1497 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
1499 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
1501 2001-02-16 Paul Eggert <eggert@twinsun.com>
1503 * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
1504 Do not declare or define if HAVE_MBRTOWC,
1505 since the test for HAVE_MBRTOWC now requires proper declarations.
1507 * lib/alloca.c (malloc): Undef before defining.
1509 2001-02-13 Paul Eggert <eggert@twinsun.com>
1511 * src/compare.c (read_and_process): Use off_t for size.
1512 From Maciej W. Rozycki.
1514 2001-01-26 Paul Eggert <eggert@twinsun.com>
1516 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
1518 2001-01-12 Paul Eggert <eggert@twinsun.com>
1520 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
1522 * lib/savedir.h (savedir): Remove size arg.
1524 * doc/tar.texi: Add @setchapternewpage odd.
1525 Remove -I as an alias for -T, for now.
1527 Update copyright. Remove "Published by".
1528 Dates beginning with / or . are taken to be file names.
1530 * src/tar.c (<time.h>): Do not include;
1531 (time): Do not declare.
1532 (usage): Remove -I as an alias for -T.
1533 (OPTION_STRING): Remove -I.
1534 (decode_options): Dates that look like an absolute path name,
1535 or that start with '.', are presumed to be file names whose
1537 Remove 'I' as an aliase for 'T'.
1540 * src/extract.c (<time.h>): Do not include; system.h now does this.
1541 (make_directories): Skip filesystem prefixes.
1542 Don't assume '/' is the only separator.
1543 (extract_sparse_file): Use new full_write semantics.
1544 On write error, return instead of invoking skip_file.
1545 Do not free sparsearray; caller does this now.
1546 (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
1548 (extract_archive): Don't assume file name lengths fit in int.
1549 Report what got stripped from member name; it might be more than '/'.
1550 Use new full_write semantics.
1551 Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
1553 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
1555 * src/buffer.c (<time.h>): Do not include; system.h now does this.
1556 (time): Remove decl; likewise.
1557 (child_open_for_uncompress): Use new full_write semantics.
1558 (flush_write): Use ISSLASH instead of testing for '/'.
1559 (flush_read): Likewise.
1561 * src/rmt.h (_remdev): Look for / anywhere in Path.
1563 * src/misc.c (contains_dot_dot): Skip filesystem prefix.
1564 Don't assume '/' is the only separator.
1565 (safer_rmdir): Don't assume '/' is the only separator.
1567 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
1569 * lib/dirname.h (dirlen): New decl.
1571 * src/incremen.c (get_directory_contents):
1572 Remove path_size arg; all callers changed.
1573 Don't assume '/' is the only directory separator.
1574 (gnu_restore): Work even if file name length doesn't fit in int.
1576 * lib/addext.c (ISSLASH): New macro.
1577 (addext): Trim any redundant trailing slashes.
1579 * src/names.c (name_next):
1580 Don't assume '/' is the only directory separator.
1581 (namelist_match): Likewise.
1582 (add_hierarchy_to_namelist): Remove dirsize arg.
1583 Do not assume '/' is the only directory separator.
1584 (new_name): Likewise.
1586 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
1587 (libtar_a_SOURCES): Add dirname.c.
1589 * src/create.c (relativize):
1590 New function, with much of old start_header's guts.
1591 Handle filesystem prefixes.
1592 (start_header): Use this new function.
1593 (init_sparsearray): Don't bother to zero out the new array;
1595 (deal_with_sparse): Fix array allocation bug.
1596 (create_archive): Don't assume '/' is the only separator.
1597 (dump_file): Likewise.
1598 Don't worry about leading / in symlink targets.
1600 * lib/savedir.c (savedir):
1601 Remove size arg; it wasn't portable. All callers changed.
1603 * lib/utime.c (utime_null): Adjust to new full_write convention.
1605 * configure.in (YACC): Avoid portability problem with Ultrix sh.
1607 * lib/backupfile.c: Include <dirname.h>.
1608 (ISSLASH): New macro.
1609 (find_backup_file_name): Use dirlen to calculate directory lengths.
1610 (max_backup_version): Strip redundant trailing slashes.
1612 * src/common.h: Include <full-write.h>.
1613 (get_directory_contents): No longer has size arg.
1614 (gnu_restore): Arg is size_t, not int.
1616 * src/system.h: Include <time.h>.
1617 (time): Declare if not defined.
1619 * lib/full-write.c: Include full-write.h, not safe-read.h.
1620 full_write returns size_t, with short writes meaning failure.
1621 All callers changed.
1623 * src/rtapelib.c: Include full-write.h.
1625 * src/rmt.c: Include full-write.h.
1626 (main): Update copyright.
1628 * doc/getdate.texi: Mention that only English is supported.
1629 Show how to use "date" so that the output is acceptable to getdate.
1630 Mention Z as an abbreviation for UTC.
1632 * lib/full-write.h: New file.
1634 * src/list.c: system.h now does time.h stuff.
1637 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
1639 Do not include string.h, strings.h, or assert.h; no longer needed.
1640 (strrchr, memrchr, malloc): Remove decls; no longer needed.
1642 (base_name): New decl.
1643 (BACKSLASH_IS_PATH_SEPARATOR): Remove.
1644 (dir_name_r): Remove.
1645 (dirlen): New function.
1646 (dir_name): Use dirlen instead of dir_name_r.
1647 (<string.h>, <strings.h>): Include only if test program.
1648 (main): Use "return 0", not "exit (0)".
1650 2000-12-08 Paul Eggert <eggert@twinsun.com>
1652 * lib/dirname.h: New file.
1654 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
1656 * lib/fnmatch.c: Do not comment out all the code if we are using
1657 the GNU C library, because in some cases we are replacing buggy
1658 code in the GNU C library itself.
1660 2000-10-30 Paul Eggert <eggert@twinsun.com>
1662 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
1664 2000-10-29 Paul Eggert <eggert@twinsun.com>
1666 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
1668 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
1670 2000-10-28 Paul Eggert <eggert@twinsun.com>
1672 * doc/tar.texi: --no-recursion now applies to extraction, too.
1673 * src/create.c (dump_file): no_recurse_option -> ! recursion_option
1674 * src/names.c (namelist_match, excluded_name):
1675 Do not match subfiles of a directory
1676 if --no-recursion is specified.
1677 * src/tar.c (NO_RECURSE_OPTION): Remove.
1678 (long_options): Have getopt set the --no-recursion flag.
1679 (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
1680 Remove case for NO_RECURSE_OPTION.
1681 * src/common.h (recursion_option):
1682 Renamed from no_recurse_option, with sense
1683 negated, and with FNM_LEADING_DIR being the nonzero value.
1685 * names.c (namelist_match): New function.
1686 (name_match, name_scan): Use it to eliminate duplicate code.
1687 (names_notfound): Remove special case for Amiga.
1689 2000-10-27 Paul Eggert <eggert@twinsun.com>
1691 * src/misc.c (read_error_details, read_warn_details,
1692 read_fatal_details): Don't assume size_t is unsigned long.
1694 * src/buffer.c (flush_read): If read_full_records_option, try to
1695 fill the input buffer, as --delete -f - needs this.
1697 2000-10-24 Paul Eggert <eggert@twinsun.com>
1699 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
1701 * src/buffer.c (check_label_pattern):
1702 Make sure header name is a string before
1703 passing it to fnmatch.
1704 (init_volume_number): Check for global_volno overflow.
1705 (new_volume): Check for global_volno overflow.
1707 * src/tar.c (decode_options):
1708 Check that volume label is not too long to overflow
1709 name in tar header block.
1711 * Makefile.am (EXTRA_DIST): Remove rebox.el.
1713 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
1714 (AC_FUNC_STRERROR_R): Use this instead.
1716 2000-10-23 Paul Eggert <eggert@twinsun.com>
1718 * src/extract.c: Include <time.h>, since we invoke "time".
1720 * lib/prepargs.c (prepend_default_options):
1721 Don't use NULL, for portability.
1723 * m4/fnmatch.m4: Add "working" to message.
1725 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
1727 (getpwuid, getgrgid): Declare only if system headers don't.
1728 (gid_to_gname): Don't invoke setgrent.
1729 (namelist): Now static, not global.
1730 (nametail): New var. All uses of namelast changed to use
1731 nametail, with one extra level of indirection.
1732 (name_gather): Use memcpy instead of strncpy + assignment of NUL.
1733 (name_match): Set nametail too, when setting namelist to null.
1734 (add_hierarchy_to_namelist): Change type of dir arg from char * to
1735 struct name *, so that we don't have to look up the name again
1736 here. Get change_dir from dir rather than as a separate arg. Add
1737 dirsize arg, and pass it along to get_directory_contents. Remove
1738 unnecessary check of directory type.
1739 (new_name): Do not append a slash if PATH already ends in one.
1740 (avoided_names, struct avoided_name): Remove.
1741 (avoided_name_table): New var, replacing avoided_names.
1742 (hash_avoided_name, compare_avoided_names): New function.
1743 (add_avoided_name, is_avoided_name): Use hash table rather than
1746 * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
1747 (child_open_for_compress, child_open_for_uncompress,
1748 close_archive): Propagate any failure of the compression process
1750 (open_archive, flush_write, flush_read, close_archive): Do not
1751 allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
1752 -1. Instead, allocate an array with the size that's needed.
1753 (open_archive): Don't bother checking S_ISCHR of /dev/null.
1754 (backspace_output): Don't try to backspace past start of archive.
1755 (close_archive): Remove special case for DELETE_SUBCOMMAND.
1757 * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
1758 DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
1759 HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
1760 HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
1761 PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
1762 WITH_DMALLOC, WITH_REGEX):
1763 Remove; now generated automatically.
1765 * configure.in (_GNU_SOURCE): Define to empty, not 1, for
1766 compatibility for glibc fragments.
1767 (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
1768 HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
1769 DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
1770 that we needn't put an entry into acconfig.h.
1771 (ALL_LINGUAS): Add da.
1772 (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
1773 (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
1775 (AC_MBSTATE_T): Add.
1776 (RMT): Append $(EXEEXT).
1777 (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
1778 (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
1779 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
1780 HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
1781 (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
1782 (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
1783 (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
1784 Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
1785 (EMUL_OPEN3): Remove; no longer needed.
1786 (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
1788 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
1790 * src/common.h: Do not include basename.h.
1791 * src/rtapelib.c (base_name): Do not include basename.h;
1792 declare base_name instead.
1794 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
1796 * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
1797 lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
1798 * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
1799 Adjust to the above changes.
1801 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
1803 * src/open3.c: Remove.
1805 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
1806 (tar_SOURCES): Remove open3.c.
1807 (INCLUDES): Remove -I.., as automake does that.
1808 (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
1810 The following changes are to put LOCALEDIR into localedir.h instead
1811 of passing it on the command line.
1813 (DISTCLEANFILES): New macro.
1814 (localedir.h): New rule.
1815 (rmt.o tar.o): Now depend on localedir.h.
1817 * tests/delete02.sh, tests/extrac04.sh: New files.
1819 * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
1820 (TESTS): Add extrac04.sh, and restore delete02.sh.
1821 (DEFS): Remove; LOCALEDIR is now done via localedir.h.
1822 (INCLUDES): Remove -I.. as automake does this now.
1824 * src/rtapelib.c (rexec): Don't declare unless using it.
1825 (do_command): Simplify signal-handling code slightly.
1827 * src/delete.c (blocks_needed): Remove. All uses changed to use
1828 blocking_factor - new_blocks.
1829 (acting_as_filter): New var.
1830 (write_record, delete_archive_members): Use acting_as_filter
1831 rather than archive == STDIN_FILENO to detect whether we're acting
1832 as a filter, as open can return STDIN_FILENO in some cases.
1833 (delete_archive_members): Ignore zero blocks if
1834 ignore_zeros_option is nonzero. Fix bug that messed up last
1835 output block: write_eot can't be used here, as it gets confused
1836 when the input is at end of file.
1838 * src/compare.c (diff_archive): Do not impose an arbitrary limit on
1839 symbolic link contents length. Pass directory size to
1840 get_directory_contents.
1842 * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
1843 m4/strerror_r.m4: New files.
1844 * m4/signedchar.m4: Remove this file.
1845 * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
1846 * m4/Makefile.am (EXTRA_DIST): Likewise.
1848 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
1850 * po/da.po: New translation file.
1852 * src/mangle.c (extract_mangle):
1853 Fix diagnostic with wrong number of %s'es.
1855 * lib/fnmatch.c (fnmatch):
1856 Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
1857 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
1859 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
1860 fall off a device's end. Detect this.
1862 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
1864 (open): Remove macro; we no longer support EMUL_OPEN3. Do not
1865 include <pathmax.h> and directory include files like <dirent.h>;
1866 no longer used. Include <savedir.h> instead.
1867 (closedir, signed_char): remove macro; no longer used.
1868 (bool, false, true): Include <stdbool.h> if you have the include
1869 file, otherwise define.
1872 (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
1873 opendir_warn, readdir_error): Remove; no longer needed.
1874 (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
1875 before deciding whether we're trying to remove ".".
1876 (remove_any_file): Try unlink first if we are not root. Use
1877 savedir when recursively removing directories, to avoid exhausting
1879 (savedir_error, savedir_warn, symlink_error): New functions.
1881 * src/list.c: (read_and): Do not invoke
1882 apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
1883 responsible for that. Do not invoke apply_delayed_set_stat; our
1884 caller is now responsible for that.
1885 (read_header): Use signed char instead of signed_char. Prevent
1886 later references to current_header from mistakenly treating it as
1888 (from_header): Quote invalid base-64 strings in diagnostics.
1889 (time_from_header): Do not warn about future timestamps in
1890 archive; check_time now does that.
1891 (print_header): Quote unknown file types.
1892 (skip_member): New function, replacing skip_extended_headers and
1893 now skipping the whole member instead of just the extended
1894 headers. All callers changed. This makes the code handle
1895 extended headers uniformly, and fixes some bugs.
1897 * src/update.c (update_archive): Use skip_member.
1899 * src/extract.c (we_are_root): Now global.
1900 (struct delayed_symlink): New type.
1901 (delayed_symlink_head): New var.
1902 (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
1903 not apply_delayed_set_stat.
1904 (set_mode, set_stat): Pointer args are now const pointers.
1905 (check_time): New function.
1906 (set_stat): Warn if setting a file's timestamp to be the future.
1907 (make_directories): Do not save and restore errno.
1908 (maybe_recoverable): Set errno to ENOENT if we cannot make missing
1909 intermediate directories.
1910 (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
1911 not in caller. Extract potentially dangerous symbolic links more
1912 carefully, deferring their creation until the end, and using a
1913 regular file placeholder in the meantime. Do not remove trailing
1914 / and /. from file names. Do not bother checking for ".." when
1915 checking whether a directory loops back on itself, as loopbacks
1916 can occur with symlinks too. Also, in that case, do not bother
1917 saving and restoring errno; just set it to EEXIST.
1918 (apply_nonancestor_delayed_set_stat): A prefix is a potential
1919 ancestor if it ends in slash too (as well as ending in a char just
1921 (apply_delayed_set_stat): Remove.
1922 (apply_delayed_symlinks, extract_finish): New functions.
1924 * doc/fdl.texi: New file.
1925 * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
1926 ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
1927 * doc/tar.texi: Add Free Documentation License. New section
1928 "Overwrite Old Files", and revamp that section to make it easier to
1929 follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
1930 documentation into getdate.texi. Fix several minor typos. Describe
1931 TAR_OPTIONS. Describe incompatibility between incremental backups and
1932 --atime-preserve. Describe incompatibility between --verify and other
1933 options. Mention that tar normally removes symbolic links rather than
1934 following them, when extracting a file of the same name.
1936 * THANKS: Add gpoul. Change skip's address.
1938 * po/POTFILES.in: Add lib/human.c.
1940 * src/common.h (namelist, namelast): Remove decls.
1941 (we_are_root, extract_finish, skip_member, savedir_error,
1942 savedir_warn, symlink_error, gnu_list_name): New decls.
1943 (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
1944 skip_extended_headers, is_dot_or_dotdot, closedir_error,
1945 closedir_warn, opendir_error, opendir_warn, readdir_error,
1946 readdir_warn): Remove decls.
1947 (get_directory_contents): New off_t arg.
1948 (addname): Now returns struct name *.
1950 * src/tar.h, tests/genfile.c: Fix comments.
1952 * src/create.c: Include hash.h.
1953 (gnu_list_name): Remove decl.
1954 (struct link): Remove "next" member.
1956 (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
1957 consistency with other diagnostics.
1958 (deal_with_sparse): Check for I/O error when closing the file.
1959 (create_archive): Do not allocate an array of size PATH_MAX, as
1960 PATH_MAX might be (size_t) -1. Instead, allocate an array with
1961 the size that's needed.
1962 (hash_link, compare_links): New functions.
1963 (dump_file): Do not exhaust open file descriptors when descending
1964 deeply into a directory, by using savedir rather than
1965 opendir/readdir. Do not zero-fill the name buffer unnecessarily.
1966 Hash the set of links already created, instead of using a linked
1967 list. Fix some bugs in outputting sparse files which caused the
1968 sparse tables to be incorrect. When a file unexpectedly shrinks,
1969 output zeros rather than garbage. Do not allocate an array of
1970 size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
1971 allocate an array with the size that's needed.
1973 * src/incremen.c: Include hash.h.
1974 (struct directory): Remove "next", "dir_text". Change "name" to
1975 be char[1] with struct hack, not const char *. Add "found".
1976 (directory_list): Remove. Replaced by directory_table.
1977 (directory_table): New var.
1978 (nfs_string): Renamed from nfs.
1979 (hash_directory, compare_directories): New functions.
1980 (note_directory): Now returns struct directory *. First arg is
1981 now const pointer. struct stat arg is now dev_t, ino_t, nfs.
1982 Remove text arg. New "found" arg, basically corresponding to the
1983 old text arg not being null. All callers changed.
1984 (note_directory, find_directory): Use hash table rather than
1986 (get_directory_contents): New arg "device". Use savedir to do the
1987 hard work. Save the nfs-ness of stat_data, since it might change
1988 under us. Use note_directory instead of find_directory to save
1989 some work. When adding an "A" record, do it with
1990 add_to_accumulator instead of cheating with strcat.
1991 (read_directory_file): Use "+" flag before device to indicate
1992 whether it was NFS. Fix typo in checking for strtoul error.
1993 (write_directory_file_entry): New function.
1994 (write_directory_file): Use it, and use the hash routines to
1995 traverse the directory table.
1996 (gnu_restore): Use savedir rather than opendir/readdir.
1998 * src/tar.c: Include localedir.h, prepargs.h.
1999 (long_options): Now static.
2000 (long_options, usage, decode_options): -j is now short for
2001 --bzip2, and -I is now an alias for -T.
2002 (decode_options, main): argv is not const pointer now.
2003 (decode_options): Invoke prepend_default_options to support
2004 TAR_OPTIONS. In diagnostic, mention the string that was the
2005 invalid blocking factor, tape length, group, owner, or record
2006 size. --delete is no longer incompatible with -f -, undoing
2008 (main): Invoke extract_finish at end of extraction.
2010 * src/rmt.c: Include localedir.h.
2011 (main): Update copyright date to 2000.
2013 * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
2014 following changes: Use @sc where appropriate. Document the ranges of
2015 supported times more precisely. Add Eggert to getdate authors.
2016 Document old Latin 12m/12pm tradition. Remove list of alphabetic time
2017 zone names, as it wasn't correct and people shouldn't be relying on it
2018 anyway. Relative items also account for non-DST adjustments. Fix
2021 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
2023 * tests/ignfail.sh: opendir -> savedir in diagnostics.
2025 * tests/preset.in: Set LANGUAGE to the empty string, for some
2028 2000-10-20 Paul Eggert <eggert@twinsun.com>
2030 * m4/fnmatch.m4: Mention the GNU C library.
2032 2000-10-19 Paul Eggert <eggert@twinsun.com>
2034 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
2037 2000-10-17 Paul Eggert <eggert@twinsun.com>
2039 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
2042 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
2043 (CHAR_BIT): Define if not defined.
2045 2000-09-09 Paul Eggert <eggert@twinsun.com>
2047 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
2049 2000-08-07 Paul Eggert <eggert@twinsun.com>
2051 * lib/xmalloc.c: Memory exhausted -> memory exhausted
2053 * lib/xalloc.h (xalloc_msg_memory_exhausted):
2054 change to array from char *.
2056 2000-08-06 Paul Eggert <eggert@twinsun.com>
2058 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
2059 compatibility with glibc 2.1.3 strftime.c.
2061 2000-07-31 Paul Eggert <eggert@twinsun.com>
2063 * lib/quotearg.c (quotearg_n_options):
2064 Don't make the initial slot vector a constant,
2065 since it might get modified.
2067 * lib/quotearg.c: Add support for more than one preallocated slot.
2069 2000-07-30 Paul Eggert <eggert@twinsun.com>
2071 * lib/quotearg.c (quotearg_n_options):
2072 Preallocate a slot 0 buffer, so that the caller
2073 can always quote one small component of a "memory exhausted" message
2076 2000-07-23 Paul Eggert <eggert@twinsun.com>
2079 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
2080 mbstate_t is always defined.
2082 Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
2083 some GCC installations, and this configuration error is likely to be
2086 2000-07-22 Paul Eggert <eggert@twinsun.com>
2089 When the system forces us to redefine mbstate_t, shadow its mbsinit
2090 function. From Bruno Haible.
2092 2000-07-14 Paul Eggert <eggert@twinsun.com>
2094 * lib/xmalloc.c: Simplify exhausted message.
2096 * lib/quotearg.h: Update copyright date; from Jim Meyering.
2098 2000-07-13 Paul Eggert <eggert@twinsun.com>
2100 * lib/quotearg.h (enum quoting style):
2101 New constant clocale_quoting_style.
2104 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
2105 Add support for clocale_quoting_style, undoing previous change to
2106 locale_quoting_style.
2108 2000-07-10 Paul Eggert <eggert@twinsun.com>
2111 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
2112 since otherwise we don't need it.
2113 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
2114 since we don't do multibytes in that case.
2115 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
2116 invoke multibyte primitives.
2118 * m4/mbstate_t.m4 (AC_MBSTATE_T):
2119 Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
2120 Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
2121 and mbstate_t, to a single-part test that simply defines mbstate_t.
2123 * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
2124 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
2125 to decide whether to define the BeOS workaround macro;
2126 this adjusts to the change to AC_MBSTATE_T.
2128 * m4/strerror_r.m4: New file.
2130 2000-07-05 Paul Eggert <eggert@twinsun.com>
2132 * lib/quotearg.c: Use double-quote to quote.
2134 * lib/quotearg.c (N_): New macro.
2135 (gettext_default): New function.
2136 (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
2137 "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
2140 * lib/quotearg.c (struct quoting_options):
2141 Simplify quote_these_too dimension.
2142 From Bruno Haible <haible@clisp.cons.org>.
2144 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
2145 Test for mbstate_t only if the test
2146 for an object-type mbstate_t fails.
2148 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
2150 2000-07-03 Paul Eggert <eggert@twinsun.com>
2152 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
2153 Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
2155 * lib/quotearg.c (mbrtowc):
2156 Assign to *pwc, and return 1 only if result is nonzero.
2157 (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
2159 2000-07-02 Paul Eggert <eggert@twinsun.com>
2161 * lib/quotearg.c (mbstate_t):
2162 Do not define; it should be defined with AC_CHECK_TYPE.
2164 2000-06-26 Paul Eggert <eggert@twinsun.com>
2166 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
2167 a bug in glibc 2.1.3.
2169 * lib/xmalloc.c: Fix inaccorate comment for xrealloc.
2171 2000-06-19 Paul Eggert <eggert@twinsun.com>
2173 * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
2174 inclusion of wctype.h to work around solaris2.6 namespace pollution.
2175 (ISPRINT): Likewise.
2176 Reported by Tom Tromey.
2178 2000-06-15 Paul Eggert <eggert@twinsun.com>
2180 * lib/human.c (adjust_value): New function.
2181 (human_readable_inexact): Apply rounding style even when printing
2184 * lib/human.c: Avoid shadowing warnings.
2187 2000-06-14 Paul Eggert <eggert@twinsun.com>
2189 * lib/human.c (human_readable_inexact): Allow an input block size
2190 that is not a multiple of the output block size, and vice versa.
2192 * lib/getdate.y (get_date): Apply relative times after time zone
2193 indicator, not before.
2195 2000-05-31 Paul Eggert <eggert@twinsun.com>
2197 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
2198 and thus don't need AC_CANONICAL_HOST.
2200 (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
2201 (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
2202 (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
2203 CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
2204 changed. Instead of inspecting the output of getconf, try to
2205 compile the test program without and with the macro definition.
2206 (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
2207 getconf. Instead, check for the needed flags by compiling test
2210 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
2212 * config.guess, config.sub: Remove these files, for similar reasons.
2214 2000-05-03 Paul Eggert <eggert@twinsun.com>
2216 * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
2217 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
2218 bug. This avoids a clash when files like regex.c that define
2221 2000-05-02 Paul Eggert <eggert@twinsun.com>
2223 * m4/largefile.m4 (AC_SYS_LARGEFILE):
2224 Define _GNU_SOURCE if this is needed to make
2225 ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
2226 inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
2228 * lib/quotearg.c (mbrtowc, mbstat_t):
2229 Add definitions if !HAVE_MBSTATE_T_OBJECT.
2230 (<wctype.h>): Include if HAVE_WCTYPE_H.
2231 (iswprint): Define to 1 if we lack it
2233 2000-04-18 Paul Eggert <eggert@twinsun.com>
2235 * m4/mbstate_t.m4: New file.
2237 2000-04-17 Bruno Haible <haible@clisp.cons.org>
2239 * tests/ignfail.sh: Test for uid 0 along with user "root".
2241 2000-04-05 Paul Eggert <eggert@twinsun.com>
2243 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
2244 Don't use -n32 on IRIX if the installer said
2247 2000-02-28 Paul Eggert <eggert@twinsun.com>
2249 * lib/quotearg.c (ALERT_CHAR): New macro.
2250 (quotearg_buffer_restyled): Use it.
2252 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2254 * src/list.c (tartime): Fix off-by-one error when copying year if
2257 2000-02-18 Paul Eggert <eggert@twinsun.com>
2259 * lib/getdate.y: Handle two-digit years with leading zeros correctly.
2260 (textint): New typedef.
2261 (parser_control): Changed from struct parser_control to typedef
2262 (for consistency). Member year changed from int to textint. All
2264 (YYSTYPE): Removed; replaced by %union with int and textint
2266 (tID): Removed; not used.
2267 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
2268 tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
2269 tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
2270 (tSNUMBER, tUNUMBER): Now of type <textintval>.
2271 (date, number, to_year): Use width of number in digits, not its
2272 value, to determine whether it's a 2-digit year, or a 2-digit
2274 (yylex): Store number of digits of numeric tokens. Return '?' for
2275 unknown identifiers, rather than (unused) tID.
2277 2000-01-16 Paul Eggert <eggert@twinsun.com>
2279 * lib/quotearg.c (quotearg_buffer_restyled):
2280 Do not quote alert, backslash, formfeed,
2281 and vertical tab unnecessarily in shell quoting style.
2283 2000-01-15 Paul Eggert <eggert@twinsun.com>
2286 Change quoting to be compatible with future autoconf versions.
2288 2000-01-11 Paul Eggert <eggert@twinsun.com>
2290 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
2292 2000-01-07 Paul Eggert <eggert@twinsun.com>
2294 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
2296 Fix bug with fnmatch.h dependency, as follows:
2297 * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
2298 * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
2300 * src/common.h (apply_nonancestor_delayed_set_stat):
2301 Renamed from apply_delayed_set_stat.
2302 (apply_delayed_set_stat, decode_mode, chmod_error_details,
2303 chown_error_details, close_warn, closedir_warn, mkdir_error,
2304 read_error_details, read_fatal_details, read_warn_details,
2305 seek_error_details, seek_warn_details, utime_error,
2306 write_error_details, write_fatal_details): New decls.
2308 Make diagnostic messages more regular.
2309 * src/create.c (dump_file): Quote file names with colons if possible.
2310 * src/compare.c (diff_archive): Likewise.
2311 * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
2312 * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
2313 * src/mangle.c (extract_mangle): Likewise.
2314 * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
2316 * src/buffer.c (archive_write_error, flush_archive, close_archive,
2317 new_volume, xclose):
2318 Use error message functions to report errors consistently.
2319 * src/compare.c (diff_sparse_files, diff_archive): Likewise.
2320 * src/create.c (finish_sparse_file, dump_file): Likewise.
2321 * src/extract.c (set_mode, set_stat, extract_sparse_file,
2322 extract_archive): Likewise.
2323 * src/list.c (list_archive): Likewise.
2324 * src/update.c (append_file): Likewise.
2325 * src/compare.c (diff_init, diff_sparse_files):
2326 Use xalloc_die to report memory exhaustion.
2327 * src/incremen.c (gnu_restore): Likewise.
2328 * src/list.c (read_header): Likewise.
2329 * src/mangle.c (extract_mangle): Likewise.
2330 * src/misc.c (maybe_backup_file): Likewise.
2331 * src/tar.c (decode_options): Likewise.
2332 * src/compare.c (read_and_process, fill_in_sparse_array,
2334 Use consistent terminology for unexpected-EOF message.
2335 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
2336 * src/list.c (list_archive, read_header, skip_file,
2337 skip_extended_headers): Likewise.
2338 * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
2339 (xdup2): Regularize messages with rest of tar.
2341 * src/buffer.c (flush_read): Don't read past EOF.
2343 * src/extract.c (extr_init):
2344 If we run out of memory, invoke apply_delayed_set_stat.
2345 (prepare_to_extract): Don't complain if we can't remove ".".
2346 (apply_delayed_set_stat): New function.
2347 (apply_nonancestor_delayed_set_stat):
2348 Renamed from apply_delayed_set_stat. All uses changed.
2349 Don't remove head if it doesn't apply.
2351 * src/create.c (find_new_file_size):
2352 Return size instead of storing through pointer.
2353 All callers changed.
2354 (deal_with_sparse): Don't keep reading after read errors.
2355 (finish_sparse_file): Just abort if there is an internal error.
2356 (dump_file): Fix typo: stat_warn and stat_error were interchanged.
2357 Don't restore access times on directories during incremental dumps
2358 until after dealing with the directory.
2359 If ignoring failed reads, count closedir, read, and unknown
2360 file errors as warnings, not errors.
2361 Fix buffer overrun problem when dumping sparse files.
2363 * src/list.c (read_and):
2364 Invoke apply_nonancestor_delayed_set_stat on file names
2365 after handling them.
2366 (decode_mode): Remove; moved to misc.c.
2368 * src/misc.c (safer_rmdir): New function.
2369 (remove_any_file): Use it to avoid problems with rmdir(".").
2370 (maybe_backup_file): Regularize diagnostics.
2371 (undo_backup_file): Likewise.
2372 (decode_mode): Moved here from list.c.
2373 (chmod_error_details, chown_error_details, close_fatal,
2374 close_warn, closedir_warn, mkdir_error, read_error_details,
2375 read_warn_details, read_fatal_details, seek_error_details,
2376 seek_warn_details, utime_error, write_error_details,
2377 write_fatal_details): New functions.
2379 * src/delete.c (save_record): Remove static variable (now local).
2380 (move_archive): Don't position before start of archive.
2381 (write_record): Abort if count is zero at inopportune time.
2384 * src/tar.c (decode_options): --delete and -f - are now
2385 incompatible, since we didn't have time to fix their bugs.
2387 * tests/Makefile.am (TESTS): Remove delete02.sh.
2388 * tests/ignfail.sh: Adjust to new quoting scheme again.
2390 2000-01-06 Paul Eggert <eggert@twinsun.com>
2392 * lib/getdate.y: Sync tm_diff with the GNU C Library.
2393 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
2394 (tm_diff): Renamed from difftm. All uses changed.
2395 Replace body with that taken from GNU C Library 2.1.3pre1.
2396 (get_date): Prefer tm_gmtoff to tm_diff if available.
2398 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
2400 * tests/incremen.sh: Invoke stat on newly created file so that its
2401 ctime is updated on Nextstep.
2403 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
2405 * lib/getdate.y (get_date):
2406 Fix typo when checking for time_t overflow in time zone calculations.
2408 1999-12-13 Paul Eggert <eggert@twinsun.com>
2410 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
2412 * README-alpha: New file.
2413 * README: New sections for gzip and bzip2, Solaris.
2414 Remove mention of BACKLOG.
2416 * configure.in (AC_C_BACKSLASH_A): Add.
2417 (AC_CHECK_HEADERS): Add wchar.h.
2418 (AC_CHECK_FUNCS): Add mbrtowc.
2419 (AC_FUNC_CLOSEDIR_VOID): Add.
2421 * tests/Makefile.am (TESTS): Add delete02.sh.
2422 (POSTPONED_TESTS): Remove.
2423 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
2426 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
2428 * tests/ignfail.sh (err): Adjust to new quoting scheme.
2430 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
2432 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
2434 * src/tar.c ("quotearg.h"): New include.
2435 (usage): Now has __attribute__ ((noreturn)).
2436 (confirm): Report errno if we can't open tty.
2437 (confirm, decode_options):
2438 Quote arbitrary strings in diagnostics.
2439 (OVERWRITE_OPTION): New constant.
2440 (long_options, usage, decode_options): New --overwrite option.
2441 (decode_options): --keep-old-files, --overwrite, and --unlink-first
2442 are now mutually exclusive.
2443 Don't assume that gettext preserves errno.
2444 (main): Set default quoting style to escape_quoting_style.
2446 * src/update.c (<quotearg.h>): New include.
2448 Don't assume that gettext preserves errno.
2449 Quote arbitrary strings in diagnostics.
2450 Check for close error.
2452 * src/names.c (<quotearg.h>): New include.
2453 (name_init, name_next, name_close, names_notfound,
2454 collect_and_sort_names): Don't assume that gettext preserves
2455 errno. Quote arbitrary strings in diagnostics.
2456 (excluded_name): Fix typo that caused empty patterns to be
2459 * src/misc.c (<quotearg.h>): New include.
2460 (quote_copy_string): Quote only newline and backslash; the output is no
2461 longer meant for humans, and is locale-independent.
2462 (contains_dot_dot): New function.
2463 (remove_any_file): Don't use lstat; just rmdir the file and then use
2464 unlink if the rmdir fails because the file isn't a directory.
2465 Check for readdir and closedir errors.
2466 (maybe_backup_file): Report "stat" for stat errors.
2467 (maybe_backup_file, chdir_do):
2468 Quote arbitrary strings in diagnostics.
2469 (maybe_backup_file, undo_last_backup):
2470 Don't assume that gettext preserves errno.
2471 (call_arg_error, call_arg_fatal, call_arg_warn,
2472 chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
2473 mknod_error, open_error, open_fatal, open_warn, opendir_error,
2474 opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
2475 readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
2476 stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
2477 write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
2479 * src/system.h (__attribute__): New macro.
2480 (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
2481 (S_ISDOOR): New macro.
2482 (closedir): New macro, if CLOSEDIR_VOID.
2484 * src/rmt.c, src/rtapelib.c (decode_oflag):
2485 O_APPEND might not be defined.
2487 * src/list.c: (read_and, list_archive):
2488 Quote arbitrary strings in diagnostics.
2489 (from_header): Use locale_quoting_style to quote diagnostics.
2490 (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
2492 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
2494 * src/Makefile.am: Use ## for copyright comments.
2496 * src/extract.c (<quotearg.h>): New include.
2497 (enum permstatus): New enum.
2498 (struct delayed_set_stat): file_name is now at end of buffer, to avoid
2499 two mallocs. New members file_name_len, invert_permissions, permstatus.
2500 (extr_init): Remove hack that silently adjusted newdir_umask.
2501 (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
2502 Use these args to decide whether and how to set modes.
2503 (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
2504 Don't assume that gettext preserves errno.
2505 (set_stat): Remove arg symlink_flag; subsumed by typeflag.
2506 (delay_set_stat, repair_delayed_set_stat): New functions.
2507 (make_directories): Avoid mkdir where last part of path is "..".
2508 Create a struct delayed_set_stat for each directory made.
2509 (prepare_to_extract): Renamed from unlink_destination, and
2510 return 0 immediately if to_stdout_option; all callers changed.
2511 (maybe_recoverable): New parameter interdir_made.
2512 Add support for --overwrite.
2513 (extract_sparse_file, extract_archive):
2514 Quote arbitrary strings in diagnostics.
2515 (extract_archive): By default, warn about ".." in member names, and skip them.
2516 Don't open files with O_NONBLOCK or O_APPEND.
2517 Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
2518 overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
2519 minus the current umask. Keep track of intermediate directories made,
2520 to avoid looping when making x/../x when x doesn't exist; the
2521 earlier code solved this in a different way that didn't fit well
2522 into the new scheme. Don't extract permissions onto existing
2523 directories unless --overwrite is given. Do not add -wx------
2524 permissions to new directories permanently; just do it temporarily.
2525 Remove no-longer-needed hack with MSDOS and directory time stamps.
2526 (apply_delayed_set_stat): New argument specifies which directories to
2527 fix statuses of. Do not wait until the end of extraction to fix
2528 statuses; instead, fix a directory's status once we exit that directory.
2529 This requires less memory and does the right thing in some cases
2530 where the old method didn't.
2531 (fatal_exit): New function.
2533 * src/incremen.c (<quotearg.h>): New include.
2534 (get_directory_contents, gnu_restore):
2535 Check for readdir and closedir errors.
2536 (get_directory_contents, read_directory_file, gnu_restore):
2537 Quote arbitrary strings in diagnostics.
2538 (get_directory_contents, read_directory_file, write_directory_file):
2539 Don't assume that gettext preserves errno.
2541 * src/create.c (<quotearg.h>): New include.
2542 (start_header): Use `member names' to refer to archive member names, not
2543 `archive names'. Warn about `..' in member names.
2544 (finish_sparse_file, dump_file):
2545 Quote arbitrary strings in diagnostics.
2546 (finish_sparse_file, dump_file):
2547 Don't assume that gettext preserves errno.
2548 (dump_file): Don't use `access' to determine whether a directory is readable;
2549 this isn't reliable if tar is setuid. Use `opendir' instead.
2550 Check for readdir and closedir failures.
2551 Don't dump sockets as if they were fifos; just warn and skip.
2553 * src/delete.c (move_archive):
2554 Don't report fatal error merely because sizes don't fit
2555 into struct mtop values; fall back on lseek instead.
2556 Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
2557 Say `reposition' instead of `re-position'.
2558 (delete_archive_members):
2559 Set archive to STDOUT_FILENO before outputting trailing buffer.
2561 * src/compare.c (<quotearg.h>): New include.
2562 (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
2563 and `Cannot' others.
2564 (report_difference, diff_archive):
2565 Quote arbitrary strings in diagnostics.
2566 (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
2567 Don't assume that gettext preserves errno.
2568 (diff_archive): Don't open regular files with O_NONBLOCK.
2569 Preserve access times of files if --atime.
2571 * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
2572 (FATAL_ERROR, USAGE): Don't return 0.
2573 (enum old files): New enum.
2574 (old_files_option): New variable, replacing keep_old_files_option and
2575 unlink_first_option.
2576 (apply_delayed_set_stat): Now takes char const * param.
2577 (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
2578 closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
2579 open_fatal, open_warn, opendir_error, opendir_warn, read_error,
2580 read_fatal, readdir_error, readdir_warn, readlink_error,
2581 readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
2582 truncate_error, truncate_warn, unlink_error, waitpid_error,
2583 write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
2586 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
2587 archive_write_error, archive_read_error, flush_archive, close_archive,
2588 init_volume_number, new_volume):
2589 Don't assume that gettext preserves errno.
2591 (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
2592 (open_archive): Reject multivolume verify attempts a bit earlier.
2593 Rename local variable `access', in case it's defined by system header.
2595 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
2596 `Could not' sometimes and `Cannot' others.
2598 (open_archive, flush_read, flush_archive, close_archive, new_volume):
2599 Quote arbitrary strings in diagnostics.
2601 (read_error): Set archive to STDOUT_FILENO temporarily when writing
2604 (init_volume_number): Check for input and output errors in volno_file.
2606 (new_volume): Use new fatal_exit function to exit, and new xfork
2609 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
2611 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
2613 * doc/tar.texi: Add --overwrite.
2614 --absolute-names rejects ".." in names.
2616 * lib/quotearg.c: Add support for multibyte characters.
2618 (ISPRINT): New macro.
2619 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
2620 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
2621 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
2622 (quotearg_buffer_restyled): New function, with most of the old
2623 quotearg_buffer's contents.
2624 Major rewrite to support multibyte characters.
2625 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
2627 * m4/c-bs-a.m4: New file.
2629 * lib/Makefile.am: Use ## for copyright notice.
2631 * scripts/Makefile.am: Use ## on copyright notice.
2634 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
2636 1999-12-05 Paul Eggert <eggert@twinsun.com>
2638 * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
2639 src/ChangeLog, tests/ChangeLog: Remove these files.
2640 * ChangeLog.1: New file, incorporating the above files, plus old
2642 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
2644 1999-12-05 Dale Worley <worley@ariadne.com>
2646 * src/compare.c (<utime.h>, struct utimbuf): Add.
2647 (diff_archive): Restore access times if --atime.
2648 * doc/tar.texi: Explain that --atime also preserves modification time.
2650 1999-12-04 Gerhard Poul <gpoul@gnu.org>
2652 * ABOUT-NLS: Update to latest version from ftp.gnu.org.
2653 * BACKLOG, TODO: Remove.
2654 * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
2655 * README: Bring up to date.
2657 1999-12-03 Paul Eggert <eggert@twinsun.com>
2659 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
2661 * src/compare.c (diff_archive):
2662 Do not set errno to EPIPE; we no longer use perror.
2664 * src/create.c (dump_file):
2665 If a parent directory said that a file should be there but it is
2666 absent, diagnose it as being removed in the meantime.
2667 Do not pass meaningless errno to ERROR when reporting that the
2668 file changed as we read it.
2669 Report that a file changed if its ctime changes; this is more
2670 sensitive than mtime+size, and more accurate.
2672 * src/incremen.c (enum children): New type.
2673 (struct directory): Change old char allnew member to new enum children
2676 (get_directory_contents): When doing an incremental dump that does
2677 not cross filesystem boundaries, dump the mount points, even though
2678 they are in a different filesystem. This is for convenience when
2679 restoring, and for consistency with non-incremental dumps.
2680 This requires a 3-way flag for keeping track of which children we want,
2681 so we use enum children rather than boolean.
2683 * src/open3.c (modes): Remove.
2684 (open3): Remove unportable assumptions about flag encodings.
2685 Use `stat' instead of `access' for testing file existence,
2686 to avoid problems with setuid programs.
2688 * src/names.c (name_next): If file names are given both in the
2689 command line (e.g. via -C) and in a file (via -T), do not
2690 ignore the command-line names.
2692 * m4/uintmax_t.m4: Backport to autoconf 2.13.
2694 * doc/tar.texi: Clarify getdate authorship.
2696 1999-11-23 Paul Eggert <eggert@twinsun.com>
2698 * lib/Makefile.am (DISTCLEANFILES): New macro.
2700 * configure.in (tar_fnmatch_hin):
2701 Remove; it runs afoul of a bug in autoconf 2.13.
2702 Instead, always link fnmatch.h to some file, even if it's a throwaway.
2704 1999-11-19 Paul Eggert <eggert@twinsun.com>
2706 * m4/largefile.m4: Update serial.
2708 1999-11-18 Paul Eggert <eggert@twinsun.com>
2710 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
2711 the QNX shell, which doesn't propagate exit status of failed
2712 commands inside shell assignments.
2714 1999-11-07 Paul Eggert <eggert@twinsun.com>
2716 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
2718 * configure.in (AC_PREREQ): Bump to 2.13.
2719 (ALL_LINGUAS): Add pt_BR, ja.
2720 (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
2721 (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
2722 for AIX crossbuilds.
2724 * doc/tar.texi: New node create options for --ignore-failed-read.
2725 Remove unused version control symbols.
2726 Modernize texinfo usage.
2728 * src/tar.c (usage): Add examples.
2730 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
2731 Include fnmatch.h when testing fnmatch.
2733 * src/common.h (collect_and_sort_names): New decl.
2735 * src/list.c (from_header):
2736 Handle 32-bit two's complement negative time stamps
2737 even if the leading octal digit is 2 or 3.
2739 * src/extract.c (set_stat): Remove duplicate code.
2741 * src/create.c (to_chars): Remove trailing newline from warning.
2742 (dump_file): Ignore doors.
2743 (finish_header): Report block numbers with origin 0, not origin 1.
2745 * src/rmt.c: Include getopt.h.
2746 (long_opts): New constant.
2747 (usage): New function.
2748 (main): Implement --help and --version.
2749 Output usage message if arguments are bad.
2751 1999-10-10 Paul Eggert <eggert@twinsun.com>
2753 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
2755 * README: Remove --with-dmalloc.
2756 Add --disable-largefile.
2757 Remove old NeXT dirent problems, or AIX valloc problems.
2758 Remove old union wait advice, and old %lld advice.
2759 Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
2761 * doc/tar.texi: Clarify documentation for portable file names.
2763 * configure.in (AM_WITH_DMALLOC): Remove.
2764 (ALL_LINGUAS): Add ja.
2766 * src/tar.c (decode_options):
2767 Invalid dates are now treated as (time_t) -1.
2768 Redo version message to conform to GNU standards.
2770 * src/create.c (dump_file):
2771 Fix typo: last two args to dump_file were interchanged.
2772 * src/update.c (update_archive): Likewise.
2774 * src/common.h (tartime): New decl.
2776 * src/list.c (tartime): Now extern.
2777 (read_and): Invalid headers cause errors, not warnings.
2779 1999-10-03 Paul Eggert <eggert@twinsun.com>
2781 * lib/getdate.y (__attribute__):
2782 Don't use if GCC claims to be before 2.8; this is
2783 needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
2785 1999-09-25 Paul Eggert <eggert@twinsun.com>
2787 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
2788 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
2790 * tests/incremen.sh: Add yet another sleep.
2792 1999-09-24 Paul Eggert <eggert@twinsun.com>
2794 * NEWS: A read error now causes a nonzero exit status.
2796 * src/create.c (to_chars): Fix base-256 output.
2798 * src/buffer.c (write_error):
2799 Read error is an error, not just a warning.
2801 1999-09-24 Paul Eggert <eggert@twinsun.com>
2803 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
2805 * src/tar.c (<time.h>): Include.
2806 (time): Declare if not defined.
2807 (confirm): Don't read past EOF.
2808 (long_options, usage): Add --no-same-owner, --no-same-permissions.
2809 (main): Use clock_gettime if available.
2811 * tests/Makefile.am (TESTS): Add incremen.sh
2812 (INCLUDES): Add -I../lib, for fnmatch.h.
2814 * src/update.c (update_archive):
2815 Remove call to name_expand; had no effect.
2816 Use chdir_do to change into directory.
2817 Use deref_stat instead of stat.
2818 Use add_avoided_name to mark names to be avoided; the old method of
2819 setting a bit with the name caused all descendants of that name to
2820 be avoided, in some circumstances.
2822 * tests/incremen.sh: Remove unnecessary sleeps.
2824 * src/names.c (name_next): Go back to using plain chdir.
2825 (name_gather): Use chdir_arg to keep track of arguments to chdir.
2826 (addname): Likewise.
2827 (name_match): Use chdir_do to act on chdir args.
2828 (merge_sort): Moved here from incremen.c.
2829 (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
2831 (name_expand): Remove.
2832 (name_from_list): Skip fake names.
2833 Use chdir_do to act on chdir args.
2834 (struct avoided_name): New struct.
2835 (avoided_names): New var.
2836 (add_avoided_name, is_avoided_name): New functions.
2838 * src/system.h (stat, lstat): Define in terms of statx on
2839 STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
2840 (UCHAR_MAX): New macro.
2841 (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
2843 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
2845 * src/incremen.c (<time.h>): Remove include; no longer used.
2846 (time): Remove decl.
2848 (get_directory_contents): Use deref_stat.
2849 Consider a subdirectory to be all new only if
2850 listed_incremental_option or if it its timestamp is newer than the
2852 (add_hierarchy_to_namelist, merge_sort): Move to names.c.
2853 (read_directory_file): Now extern. Do not set time_now.
2854 (write_directory_file): Renamed from write_dir_file.
2855 Use start_time instead of time_now.
2856 (compare_names, collect_and_sort_names): Move to names.c.
2858 * src/mangle.c (<time.h>): Remove; not used.
2859 (time): Do not declare.
2861 * src/misc.c (chdir_from_initial_wd): Remove.
2862 (deref_stat): New function.
2863 (struct wd): New struct.
2864 (wd, wds, wd_alloc): New variables.
2865 (chdir_arg, chdir_do): New function.
2867 * src/compare.c (get_stat_data): Use deref_stat.
2869 * src/common.h (name_expand): Remove.
2871 * src/list.c (time): Declare if not defined.
2872 (base_64_digits): Moved here from create.c.
2873 (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
2875 (read_and): Don't get time from header unless we need it now;
2876 as getting time can cause duplicate diagnostics if bogus.
2877 Remove "Hmm, " from diagnostic.
2878 Use "Skipping to next header" uniformly.
2879 (from_header): Renamed from from_chars. All uses changed.
2880 Allow different forms for unportable 2's complement numbers.
2881 Don't check for extended forms when parsing checksums.
2882 Parse base-256 output.
2883 (gid_from_header): Renamed from gid_from_chars. All uses changed.
2884 (major_from_header): Renamed from major_from_chars. All uses changed.
2885 (minor_from_header): Renamed from minor_from_chars. All uses changed.
2886 (mode_from_header): Renamed from mode_from_chars. All uses changed.
2887 (off_from_header): Renamed from off_from_chars. All uses changed.
2888 (size_from_header): Renamed from size_from_chars. All uses changed.
2889 (time_from_header): Renamed from time_from_chars. All uses changed.
2890 Warn about future timestamps.
2891 (uid_from_header): Renamed from uid_from_chars. All uses changed.
2892 (uintmax_from_header): Renamed from uintmax_from_chars.
2894 (tartime): New function, incorporating isotime.
2896 (print_header): Use tartime.
2898 * src/create.c (to_chars): Fix typo in decl.
2899 Don't assign through char const *.
2900 Rename name_expand back to collect_and_sort_names.
2902 * src/extract.c (<time.h>): No need to include.
2903 (time): No need to declare.
2904 (now): Remove variable.
2905 (extr_init): Don't initialize `now'.
2906 Increment same_permissions_option and same_owner_option if we_are_root
2907 is nonzero; this supports the new --no-same-owner option.
2908 (set_stat): Use start_time instead of `now'.
2910 * src/create.c (struct link): Remove unused linkcount member.
2911 (base_64_digits): Move to list.c.
2912 (base_8_digits): Remove.
2913 (to_octal): New function, with some of old contents of to_base.
2915 (to_base256): New function.
2916 (to_chars): Use base 256, not base 64, for huge values.
2917 (mode_to_chars): Don't use two's complement in GNU format or POSIX
2919 (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
2920 it means we have an incremental dump where we don't know whether this
2921 is a top-level call.
2922 Use deref_stat instead of statx / stat / lstat.
2923 Cast result of alloca.
2924 Check for dates if 0 < top_level, not if listed_incremental_option.
2925 Move multiple-link check after directory check.
2926 Do not dump avoided names.
2927 Dump hard links to symbolic names as links, not as separate
2929 start_header cannot return a null pointer, so don't test for it.
2930 Likewise for find_next_block.
2932 * src/buffer.c, src/common.h (<human.h>): Include.
2933 (read_error): Read error is an error, not just a warning.
2934 (print_total_written): Also print human-readable byte count, and
2936 (open_archive, flush_write): Use start_time, not current time.
2937 (flush_read): Report about garbage bytes ignored at end of archive,
2938 but act on non-garbage bytes (instead of ignoring them).
2939 (new_volume): Use WARN for warnings.
2942 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
2944 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
2946 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
2948 * lib/Makefile.am (noinst_HEADERS):
2949 Rename fnmatch.h to fnmatch.hin; add human.h.
2950 (libtar_a_SOURCES): Add human.c, xstrtoul.c.
2951 (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
2953 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
2955 * lib/fnmatch.c (strchrnul):
2956 Define to __strchrnul if _LIBC, to our own replacement otherwise.
2957 Do not define if !_LIBC and if it already exists.
2958 (internal_fnmatch): Use it.
2960 * configure.in (tar_LDADD): New variable, used only when linking tar.
2961 (rmt_LDADD): Similarly, for rmt.
2962 (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
2963 fnmatch.c; otherwise, use the system fnmatch.h.
2965 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
2966 Modernize sample backup script.
2968 * THANKS: Martin Goik's email address has changed.
2970 * m4/fnmatch.m4: New file.
2972 1999-09-03 Paul Eggert <eggert@twinsun.com>
2974 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
2977 1999-08-29 Paul Eggert <eggert@twinsun.com>
2979 * lib/getdate.y (get_date):
2980 Rename outermost local `probe' to `quarter'.
2981 Rename latter local `tm' to probe_tm.
2982 From: Jim Meyering <meyering@ascend.com>
2983 Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
2985 1999-08-28 Paul Eggert <eggert@twinsun.com>
2987 * lib/getdate.y (PC): New macro; use it when possible.
2988 (number): Handle `Nov 11 1996' example correctly.
2989 See Risks Digest 20.55 (1999-08-27)
2990 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
2992 1999-08-23 Paul Eggert <eggert@twinsun.com>
2994 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
2996 Remove minor cases of lint from many source files: this includes
2997 unnecessary casts, uses of NULL, etc.
2999 * configure.in (AC_PROG_YACC): Remove.
3000 (YACC): Always use bison.
3001 (AC_STRUCT_TIMEZONE): Add.
3002 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
3004 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
3007 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
3008 ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
3010 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
3012 * src/common.h (merge_sort): Remove decl; no longer exported.
3014 * src/system.h (voidstar): Remove.
3015 (memcpy, memcmp): Cast args.
3016 ("xalloc.h"): Add include.
3017 (xmalloc, xrealloc): Remove decl.
3019 * src/mangle.c (time): Do not declare if defined.
3020 (first_mangle, mangled_num): Remove.
3022 * src/list.c (from_chars): Report out-of-range values more precisely.
3023 (off_from_chars): Do not allow negative offsets.
3024 (uid_from_chars): Allow negative uids.
3026 * src/create.c (linklist): Now static.
3027 (to_chars): Fix wording of message to match from_chars.
3029 * src/misc.c (merge_sort): Move to incremen.c.
3030 * src/incremen.c (merge_sort): Move here from misc.c; now static.
3031 It's too painful to make it both generic and portable.
3032 (read_directory_file): "timestamp" -> "time stamp" in messages.
3034 * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
3035 (usage): Fix misspelling.
3036 (OPTION_STRING): -y is now -I.
3037 (decode_options): Use -1, not EOF, for getopt_long result.
3038 Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
3039 Handle operands after any "--" argument.
3040 (main): Report any output errors.
3042 * src/rmt.c (main): status is ssize_t, not long.
3044 * src/names.c (name_gather): Handle trailing -C option correctly.
3045 (addname): use memcpy, not strncpy, to copy a string of known length.
3046 (name_match): Handle trailing -C option correctly.
3047 Propagate -C option to following files.
3048 (name_match, name_scan): Remove redundant matching code.
3050 * src/buffer.c (open_archive): Use American spelling in diagnostic.
3052 * lib/getdate.y: Major rewrite. Add copyright notice.
3053 (<stdio.h>): Include only if testing.
3055 (ISLOWER): New macro.
3056 (<string.h>): Include if HAVE_STRING_H, not USG.
3058 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
3060 (EPOCH_YEAR): Renamed from EPOCH.
3061 (table): Renamed from TABLE.
3062 (meridian): Now an anonymous enum.
3063 (struct parser_control): New type.
3064 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
3065 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
3066 (%pure_parser): Added, so that the parser is pure.
3067 (%union): Removed; the type is now just plain int.
3068 All %type directives removed.
3069 (tLOCAL_ZONE): New %token.
3070 (month_day_table): Renamed from MonthDayTable.
3071 (gmtime, localtime, mktime, time): Declare only if not defined.
3072 (meridian_table): New table.
3073 (dst_table): New table.
3074 (units_table): renamed from UnitsTable.
3075 (relative_time_table): Renamed from OtherTable.
3076 (time_zone_table): Renamed from TimezoneTable. Modernized.
3077 (military_table): Renamed from MilitaryTable.
3078 (to_hour): Renamed from ToHour.
3079 (to_year): Renamed from ToYear.
3080 (lookup_zone): New function.
3081 (LookupWord): Renamed from lookup_word. Use lookup_zone for time
3083 (yylex): Now reentrant. All callers changed.
3084 (get_date): Add support for local time zone abbreviations.
3087 1999-08-20 Paul Eggert <eggert@twinsun.com>
3089 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
3091 * src/create.c (to_chars): Generate GNU base-64 representation
3092 if we are generating an old or new GNU format tar file for a
3093 number that can't be represented with the POSIX format.
3095 * configure.in (AC_CHECK_FUNCS): Add fchdir.
3096 (AM_FUNC_GETLINE): Add.
3097 (LIBOBJS): Add getline.o to workaround comment.
3098 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
3099 * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
3100 * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
3101 (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
3102 * lib/getline.c, lib/getline.h, lib/save-cwd.c,
3103 lib/save-cwd.h, m4/getline.m4: New files.
3105 * src/misc.c (<save-cwd.h>): Include.
3106 (chdir_from_initial_wd): New function.
3108 * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
3109 (name_gather): Handle `-C x -C y' correctly.
3110 Do not rely on addname to handle -C.
3111 (addname): New CHANGE_DIR parameter. All callers changed.
3112 Remove ugly calls to getcwd; no longer needed.
3113 (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
3115 * src/incremen.c (listed_incremental_stream): New var.
3116 (read_directory_file): Remove arbitrary limits on file name length.
3117 Do not attempt to get the working directory; we can bypass this
3118 on fchdir hosts. Open the listed_incremental_option file for both
3119 read and write instead of opening it twice. Check for I/O errors
3120 when doing I/O to this file. Check for invalid data in the file,
3121 and report line numbers of invalid data.
3122 (write_dir_file): Likewise.
3123 (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
3124 Do not invoke write_dir_file; that's our caller's responsibility.
3126 * src/list.c (max): New macro.
3127 (isotime): Now takes time_t, not time_t *. Report the decimal values
3128 of times that can't be broken down.
3129 (print_header): Don't assume that major and minor device numbers can
3132 * src/common.h (struct name): change_dir is now char const *.
3133 (write_directory_file): Remove unused decl.
3134 (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
3135 chars; the old `sizeof (b)' broke when b was a pointer not an array.
3136 (chdir_from_initial_wd): New decl.
3137 (addname): New 2nd arg.
3139 * THANKS: Torsten Lull -> Catrin Urbanneck
3141 1999-08-18 Paul Eggert <eggert@twinsun.com>
3143 * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
3144 Don't depend on ac_cv_func variables.
3145 From Albert Chin-A-Young <china@thewrittenword.com>.
3147 1999-08-18 Paul Eggert <eggert@twinsun.com>
3149 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
3151 * m4/signedchar.m4: New file.
3152 * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
3153 * src/system.h (signed_char): New macro.
3154 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
3155 * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
3157 * src/create.c (write_eot): Write at least two zero blocks.
3159 * src/extract.c (extract_archive): Fix sparse array bug:
3160 we did not find end of array correctly.
3162 * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
3163 Don't assume find_next_block yields nonnull.
3164 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
3165 * src/list.c (skip_extended_headers): Likewise.
3167 * src/list.c (read_and, list_archive): Simplify code.
3168 (read_header): Fix computation of signed checksums on machines where
3170 Do not consider a block to be zero unless all its bytes are zero,
3171 even the checksum bytes. Do not attempt to parse the checksum of
3172 a zero block. Fix memory leak with long names and links.
3173 (from_chars): Accommodate a buggy tar that outputs leading NUL
3174 if the previous field overflows.
3176 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
3177 \?, for portability to non-ASCII hosts.
3179 1999-08-16 Paul Eggert <eggert@twinsun.com>
3181 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
3183 * src/extract.c (make_directories): Do not chown intermediate
3184 directories, even if we are root.
3186 * src/list.c (read_header): Fix bugs when interpreting
3187 POSIX-compliant headers that do not contain null bytes in the
3188 header or link names.
3190 1999-08-14 Paul Eggert <eggert@twinsun.com>
3192 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
3194 * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
3195 (AC_HEADER_SYS_WAIT): Add.
3196 (AC_REPLACE_FUNCS): Add waitpid.
3197 (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
3198 * lib/waitpid.c: New file.
3199 * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
3200 * src/system.h (WCOREDUMP): Remove; no longer used.
3201 (WIFSTOPPED): Likewise.
3202 (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
3203 * src/buffer.c (child_open_for_compress): Undo previous change.
3204 (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
3205 (new_volume): Likewise.
3207 * src/buffer.c, src/extract.c, src/incremen.c (time):
3208 Don't declare if defined.
3209 * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
3210 * src/incremen.c (read_directory_file):
3211 Invoke `time' the same way everyone else does.
3212 Check validity of --listed-incremental file contents a bit better.
3213 Do not worry about --after-date-option; tar.c now checks this.
3214 * src/list.c (isotime): Report ??? if localtime returns null.
3215 Don't assume years fit into four digits.
3216 Don't append trailing newline.
3217 (print_header): Report ??? if localtime returns null;
3218 Don't assume years fit into four digits.
3220 * src/compare.c (diff_archive): Do not fall back on absolute name
3221 when --absolute-names is not specified.
3223 * src/create.c (start_header):
3224 Include text of ignored filesystem prefix in warning.
3225 (create_archive): Check for excluded names when doing incremental
3226 pass through directory.
3227 (dump_file): Do not dump old files explicitly given on command line
3228 when using --listed-incremental. Do not strip ./ prefix from names.
3230 * src/tar.c: -g now implies after_date_option = 1.
3231 -g and -N are now incompatible options.
3233 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
3235 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
3237 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
3238 incremental headers as POSIX prefixes.
3240 1999-08-11 Paul Eggert <eggert@twinsun.com>
3242 * NEWS, configure.in: Version 1.13.6.
3244 * configure.in (ALL_LINGUAS): Add pt_BR.
3245 * po/pt_BR.po: New file.
3247 * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
3248 Renamed from tar.info and header.texi; adjust actions so that
3249 they work in other directories.
3251 * doc/tar.texi: Add -y and --bzip2.
3252 Patterns containing / now exclude only file names whose prefix match.
3254 * lib/exclude.h (excluded_filename): New option parameter.
3255 (add_exclude_file): New ADD_FUNC parameter.
3256 (excluded_pathname): Remove decl.
3257 * lib/exclude.c (_GNU_SOURCE):
3258 Remove; no longer needed since we don't use FNM_ macros.
3259 (excluded_filename): Renamed from excluded_filename_opts.
3260 (excluded_filename, excluded_pathname): Remove.
3261 (add_exclude_file): New ADD_FUNC parameter.
3263 * po/POTFILES.in: Add lib/quotearg.c.
3265 * src/buffer.c (_GNU_SOURCE): Define.
3266 (<fnmatch.h>): Include unconditionally.
3267 (child_open_for_compress): Dup after closing, to avoid possible file
3268 descriptor exhaustion.
3269 (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
3270 (flush_read): Likewise.
3272 * src/common.h (LG_8, LG_64): New macros.
3273 (excluded_with_slash, excluded_without_slash): New vars.
3275 (base_64_digits): New decl.
3276 (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
3277 off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
3279 GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
3280 OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
3282 Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
3283 off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
3284 GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
3285 SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
3286 respectively. All definitions and uses changed.
3287 (excluded_name): New decl.
3289 * src/compare.c (diff_archive):
3290 Open files with O_NONBLOCK instead of O_NDELAY.
3292 * src/create.c (base_64_digits): New constant.
3293 (base_8_digits): New macro.
3294 (MAX_VAL_WITH_DIGITS): New macro.
3295 (to_base): First half of old to_oct. Support base 64 too.
3296 (to_chars): Other half of old to_oct, for 64-bit support.
3297 (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
3298 (gid_substitute, uid_substitute): Look up names dynamically if
3299 GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
3300 (mode_to_chars): Renamed from mode_to_oct.
3301 Support negative values in all the _to_chars functions.
3302 (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
3303 Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
3304 (dump_file): Inspect entire pathname, not just new file name
3305 component, when deciding whether to exclude it.
3307 * src/extract.c (extract_archive):
3308 Open files with O_NONBLOCK instead of O_NDELAY.
3310 * src/incremen.c (get_directory_contents):
3311 Inspect entire pathname, not just new file name
3312 component, when deciding whether to exclude it.
3314 * src/list.c (<fnmatch.h>): Do not include.
3315 (from_chars): Renamed from from_oct. New parameter specifying
3316 the negative of the minimum allowed value. Support negative
3318 (base64_map): New var.
3319 (base64_init): New function.
3320 (print_header): Output numeric uids and gids if numeric_owner_option.
3322 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
3324 * src/names.c (_GNU_SOURCE): Define.
3325 (<fnmatch.h>): Include unconditionally.
3326 (excluded_name): New function, taking over duties of excluded_pathname.
3329 * src/rmt.c (decode_oflag): New function.
3330 (main): Use it to support symbolic open flags.
3332 * src/rtapelib.c (encode_oflag): New function.
3333 (rmt_open__): Do not allow newlines in the path.
3334 Propagate errno correctly.
3335 Decode symbolic open flags, if present.
3337 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
3340 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
3341 New -y or --bzip2 option.
3342 (add_filtered_exclude): New function.
3343 (decode_options): Put excluded patterns with / into
3344 excluded_with_slash, and without / into excluded_without_slash.
3345 Compare newer_mtime_option to its new initial value
3346 TYPE_MINIMUM (time_t) when deciding whether more than one
3347 threshold date was specified.
3349 1999-07-20 Paul Eggert <eggert@twinsun.com>
3351 * NEWS, configure.in: Version 1.13.5.
3353 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
3355 * src/buffer.c (new_volume): Likewise.
3356 * src/incremen.c (read_directory_file): Likewise.
3357 * src/tar.c (decode_options):
3358 ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
3361 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
3362 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
3364 * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
3365 (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
3366 (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
3367 Define to 0 if the corresponding S_IF* macro is not defined.
3368 (mkfifo): Do not define if already defined, or if S_IFIFO
3371 * src/compare.c (diff_archive): Use HAVE_READLINK, not
3372 S_ISLNK, to determine whether to invoke readlink.
3373 * src/create.c (dump_file): Likewise.
3375 * src/extract.c (set_mode):
3376 Do not chmod unless we are root or the -p option was given;
3377 this matches historical practice.
3378 (unlink_destination): New function, which checks for unlink failures.
3379 (maybe_recoverable): Stay quiet if -U.
3380 (extract_archive): Use O_EXCL if unlink_first_option.
3381 Report unlink failures.
3382 Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
3383 Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
3386 * src/incremen.c (get_directory_contents): Depend on
3387 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
3389 * src/list.c: Remove S_IS* ifdefs.
3390 * src/misc.c (maybe_backup_file): Likewise.
3392 * src/misc.c (maybe_backup_file):
3393 "Virtual memory exhausted" -> "Memory exhausted",
3394 to conform to the other places this message is issued.
3396 * src/mangle.c (extract_mangle):
3397 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
3399 * src/rtapelib.c (rmt_open__):
3400 Remove typo that caused us to omit the first char
3403 1999-07-16 Paul Eggert <eggert@twinsun.com>
3405 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
3407 * doc/tar.texi: A path name is excluded if any of its file name
3408 components matches an excluded pattern, even if the path name was
3409 specified on the command line.
3410 * src/create.c (create_archive): Likewise.
3411 * src/list.c (read_and): Likewise.
3412 * src/update.c (update_archive): Likewise.
3413 * lib/exclude.h (excluded_pathname): New decl.
3414 * lib/exclude.c (_GNU_SOURCE): Define.
3415 (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
3416 (excluded_filename_opts): New function.
3417 (excluded_pathname): New function.
3419 * lib/Makefile.am (EXTRA_DIST):
3420 xstrtol.c moved here from libtar_a_SOURCES.
3421 (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
3422 Remove xstrtoul.c; no longer needed.
3423 * lib/xstrtol.c: Remove.
3425 * src/tar.c (decode_options):
3426 Set newer_time_option to TYPE_MINIMUM, so that
3427 negative timestamps are handled correctly.
3428 Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
3429 uniformity (and so that we don't need to have the other fns).
3430 (main): Remove call to init_total_written; no longer needed.
3432 * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
3433 checks for unsigned long and long long.
3434 * src/arith.c: Remove.
3435 * src/Makefile.am (tar_SOURCES): Remove arith.c.
3436 * po/POTFILES.in: Remove src/arith.c.
3437 * src/arith.h: Use double, to simplify configuration gotchas.
3438 (tarlong): Now double.
3439 (TARLONG_FORMAT): New macro.
3440 (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
3441 LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
3442 zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
3443 add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
3444 zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
3445 mult_tarlong, print_tarlong): Remove. All callers replaced with
3448 * src/common.h (init_total_written): Remove decl.
3450 * src/buffer.c (total_written):
3451 Remove; replaced with prev_written + bytes_written.
3452 (prev_written): New var.
3453 (init_total_written): Remove.
3454 (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
3456 * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
3457 Make sure that we can shift, multiply
3458 and divide unsigned long long values; Ultrix cc can't do it.
3460 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
3461 Check for any unknown bits, not just unknown bits left of the leftmost
3464 * lib/quotearg.c (quotearg_buffer):
3465 Don't quote spaces if C quoting style.
3466 * src/list.c (from_oct):
3467 Use C quoting style for error; omit trailing NULs.
3469 1999-07-14 Paul Eggert <eggert@twinsun.com>
3471 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
3473 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
3474 <inttypes.h> defines strtoumax as a macro (and not as a function).
3475 HP-UX 10.20 does this.
3477 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
3478 * PORTS, README, TODO, doc/tar.texi: Likewise.
3480 1999-07-12 Paul Eggert <eggert@twinsun.com>
3482 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
3483 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
3485 * src/list.c (decode_header):
3486 Do not assume that S_IFBLK and S_IFCHR are defined.
3488 * src/create.c (start_header): Do not assume S_IFMT is defined.
3489 (dump_file): Remove unnecessary check for screwy apollo lossage.
3490 Do not assume S_IFBLK and S_IFCHR are defined.
3492 * src/extract.c (extract_archive):
3493 Test whether S_IFCHR and S_IFBLK are nonzero,
3494 not whether they are defined, for consistency with other tests.
3496 * src/buffer.c (is_regular_file):
3497 Don't succeed on files that we can't access due to
3498 permissions problems.
3499 (open_archive): Fix wording on fatal error message.
3500 Don't bother to stat /dev/null if the archive is not a character
3503 * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
3504 Report an error, not a warning, for I/O errors.
3505 (process_rawdata, process_dumpdir, diff_sparse_files):
3506 Change ungrammatical "Data differs" to "Contents differ".
3507 (get_stat_data): Find hidden files on AIX.
3508 Accept file name as argument; all uses changed.
3509 (get_stat_data, diff_archive): Use system error message for
3510 nonexistent files rather than rolling our own.
3511 (diff_archive): Unknown file types are errors, not warnings.
3512 Normalize spelling of message to "File type differs".
3513 Use get_stat_data to get link status, for consistency.
3514 Do not inspect st_rdev for fifos.
3515 Do not assume st_mode values contain only file types and mode bits.
3516 Check for mode changes and device number changes separately.
3518 * src/update.c (append_file):
3519 Open the file before statting it, to avoid a race.
3520 Complain about file shrinkage only when we reach EOF.
3522 1999-07-08 Paul Eggert <eggert@twinsun.com>
3524 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
3526 * configure.in (AC_EXEEXT): Add.
3528 * lib/Makefile.am (noinst_HEADERS):
3529 Add basename.h, exclude.h. Remove full-write.h.
3530 (libtar_a_SOURCES): Add exclude.c.
3532 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
3534 * lib/full-write.c: Include safe-read.h instead of full-write.h.
3535 * lib/safe-read.h (safe_read): New decl.
3536 * src/rmt.c: Include safe-read.h.
3537 * src/rtapelib.c: Include basename.h, save-read.h.
3538 (rmt_open__): Use base_name to compute base name.
3541 Include basename.h, exclude.h; don't include full-write.h.
3542 (exclude_option): Remove decl.
3543 (excluded): New decl.
3544 (add_exclude, add_exclude_file, check_exclude): Remove decls.
3546 * src/list.c (read_and):
3547 Use excluded_filename instead of check_exclude.
3548 Check base name of incoming file name, not entire file name, when
3549 deciding whether to exclude it.
3551 * src/create.c (finish_sparse_file):
3552 Use excluded_filename instead of check_exclude.
3553 Don't bother to stat excluded file names.
3554 * src/incremen.c (get_directory_contents): Likewise.
3556 * src/names.c (exclude_pool, exclude_pool_size,
3557 allocated_exclude_pool_size, simple_exclude_array,
3558 simple_excludes, allocated_simple_excludes,
3559 pattern_exclude_array, pattern_excludes,
3560 allocated_pattern_excludes, add_exclude, add_exclude_file,
3562 Remove; now done in ../lib/exclude.c.
3564 * src/tar.c (decode_options): Initialize `excluded'.
3565 Use new add_exclude_file and add_exclude functions.
3567 1999-07-05 Paul Eggert <eggert@twinsun.com>
3569 * m4/gettext.m4: Use changequote rather than [[ ]].
3571 * lib/safe-read.c: Renamed from lib/full-read.c.
3572 (safe_read): Renamed from full_read. All uses changed.
3573 * lib/safe-read.h, lib/full-write.h: New files.
3574 * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
3575 (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
3576 * lib/full-write.c: Include full-write.h.
3577 * src/common.h: Include full-write.h, safe-read.h.
3578 * src/system.h: (full_read, full_write): Remove decls.
3580 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
3582 * src/system.h (bindtextdomain, textdomain): undef before
3583 defining, to avoid preprocessor warnings with --disable-nls
3584 on hosts whose locale.h includes libintl.h.
3586 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
3587 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
3588 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
3591 1999-07-02 Paul Eggert <eggert@twinsun.com>
3593 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
3594 * m4/mktime.m4: New file.
3595 * m4/Makefile.am.in, m4/README: Remove these files.
3596 * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
3597 remove README, Makefile.am.in.
3598 (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
3599 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
3602 * src/tar.c: Include signal.h.
3603 (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
3604 (main): Ensure SIGCHLD is not ignored.
3606 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
3607 MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
3608 OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
3609 RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
3610 VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
3611 OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
3612 OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
3613 OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
3614 they don't overlap with char codes. Use an enum instead of a lot
3617 * src/system.h (ISASCII): Remove.
3618 (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
3619 S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
3620 S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
3621 MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
3622 LONG_MAX): New macros.
3624 * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
3625 (read_directory_file): Cast ISSPACE arg to unsigned char.
3626 * src/misc.c (ISPRINT): Remove; now in system.h.
3627 (remove_any_file): Add brackets to pacify gcc -Wall.
3628 * src/list.c: Don't include <ctype.h>; system.h already does this.
3629 (ISODIGIT, ISSPACE): Remove; now in system.h.
3630 (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
3632 (from_oct): Cast ISSPACE arg to unsigned char.
3634 * src/create.c (mode_to_oct): Translate modes from internal to
3636 * src/list.c (mode_from_oct): Translate modes from external to
3637 internal form. Do not complain about unrecognized mode bits.
3638 * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
3639 TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
3641 * src/extract.c: (extr_init, make_directories, extract_archive):
3642 Do not assume mode bits have traditional Unix values.
3643 * src/list.c (decode_mode): Likewise.
3644 * src/create.c (start_header, dump_file): Likewise.
3645 * src/buffer.c (child_open_for_compress,
3646 child_open_for_uncompress, open_archive, (close_archive): Likewise.
3647 * src/compare.c (diff_archive): Likewise.
3649 * src/extract.c (set_mode): Use %04 not %0.4 format.
3650 (extract_sparse_file): Do not use data_block uninitialized.
3651 Check for lseek failures.
3653 * src/rtapelib.c (rmt_lseek__):
3654 Convert lseek whence values to portable integers on the wire.
3655 * src/rmt.c (main): Likewise. Check for whence values out of range.
3657 * src/create.c (finish_sparse_file): Use lseek whence macros
3658 instead of integers.
3659 * src/buffer.c (backspace_output): Likewise.
3660 * src/compare.c (diff_archive, verify_volume): Likewise.
3661 * src/delete.c (move_archive): Likewise.
3662 * src/extract.c (extract_sparse_file): Likewise.
3664 * src/create.c (dump_file): Do not invoke finish_sparse_file
3665 on a negative file descriptor.
3667 * src/buffer.c: Add braces to pacify gcc -Wall.
3669 * src/compare.c (diff_sparse_files): Report lseek errors.
3671 * configure.in (ALL_LINGUAS): Add cs, es, ru.
3673 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
3675 * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
3676 message to be internationalized; \a doesn't work with msgfmt.
3678 * src/tar.c (long_options, main, usage, OPTION_STRING):
3679 Remove -E or --ending-file.
3680 * src/list.c (read_and): Likewise.
3681 * src/common.h (ending_file_option): Likewise.
3682 * src/buffer.c (close_archive): Likewise.
3684 * tests/after: Don't run two commands together in a pipeline,
3685 as some old shells mishandle pipeline exit status.
3687 1999-06-28 Paul Eggert <eggert@twinsun.com>
3689 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
3690 * NEWS: Describe changes since 1.12.
3691 * README: Update bug reporting address; move paxutils ref to NEWS.
3693 Handle EINTR correctly.
3694 * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
3695 * lib/full-read.c, lib/full-write.c: New files.
3696 * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
3697 Prefer full_read to read and full_write to write.
3698 * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
3699 * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
3701 * src/extract.c (extract_sparse_file): Likewise.
3702 * src/rmt.c (get_string, main, report_error_message,
3703 report_numbered_error): Likewise.
3704 * src/rmt.h (rmtread, rmtwrite): Likewise.
3705 * src/rtapelib.c (do_command, get_status_string, rmt_read__,
3706 rmt_write__, rmt_ioctl__): Likewise.
3707 * src/update.c (append_file): Likewise.
3708 * src/system.h (full_read, full_write): New decls.
3710 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
3711 lib/xmalloc.c, src/arith.c, src/misc.c.
3713 * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
3714 New macros. All uses of STDIN and STDOUT changed.
3715 * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
3716 instead of 0 and STDOUT_FILENO instead of 1.
3717 * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
3718 instead of fileno (stdin) and fileno (stdout) or 0 and 1.
3720 * src/rmt.c (private_strerror): Avoid const. Translate results.
3722 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
3723 in the presence of NFS clock skew.
3725 1999-06-25 Paul Eggert <eggert@twinsun.com>
3727 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
3729 * src/buffer.c (write_archive_buffer): New function.
3730 (child_open_for_compress, flush_write, flush_read): Use it to write
3732 (open_archive): Report error if fstat of archive fails.
3733 Improve efficiency of check for /dev/null.
3734 Also, fix some corner cases with remote archives and /dev/null checking.
3735 (close_archive): Test for input fifo only if not remote.
3736 Truncate output archive only if it's not remote.
3738 * src/misc.c (remove_any_file):
3739 Don't terminate if you see . or ..; just skip them.
3741 1999-06-18 Paul Eggert <eggert@twinsun.com>
3743 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
3745 Output sizes using a format that's more compatible with
3746 traditional tar (and with GNU Emacs).
3747 * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
3748 MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
3749 Don't subtract 1 from size.
3750 * src/create.c (to_oct): Prepend leading zeros, not spaces.
3751 Output a trailing NUL unless the value won't fit without it.
3752 (finish_header): No need to append NUL to chksum, now that
3755 1999-06-16 Paul Eggert <eggert@twinsun.com>
3757 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
3759 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
3760 @INTLLIBS@ might invoke rpl_realloc.
3762 * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
3763 (intconv): Remove; use xstrto* fns instead.
3764 ("xstrtol.h"): Include.
3765 (check_decimal): Remove.
3766 (long_options, usage, OPTION_STRING, decode_options):
3767 Remove -y, --bzip2, --unbzip2.
3768 (decode_options): Use xget_version instead of get_version.
3769 Check for overflow with -b and -L and RECORD_SIZE_OPTION.
3770 Replace invocations of check_decimal with xstrtoumax.
3772 * tests/preset.in (echo_n, echo_c): Remove.
3774 * tests/after: Don't rely on $echo_c and $echo_n.
3776 * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
3777 lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
3778 lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
3779 lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
3780 m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
3781 m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
3782 m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
3783 m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
3784 m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
3785 m4/xstrtoumax.m4: New files.
3787 * configure.in(fp_PROG_ECHO): Remove; no longer needed.
3788 (AC_SYS_LARGEFILE): Renamed from AC_LFS.
3789 (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
3790 (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
3791 (AC_CHECK_FUNCS): Remove lchown.
3792 (AC_REPLACE_FUNCS): Remove basename, dirname.
3793 Add lchown, strtol, strtoul.
3794 (jm_FUNC_MKTIME): Add.
3795 (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
3796 are also built via the ANSI2KNR-filtering rules.
3797 Use a no-op line to work around bug in automake 1.4 with malloc and
3799 (AC_OUTPUT): Add m4/Makefile.
3801 * lib/Makefile.am (EXTRA_DIST):
3802 Add lchown.c, malloc.c, mktime.c, realloc.c,
3803 strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
3804 (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
3805 (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
3806 xstrtoul.c, xstrtoumax.c. Remove getversion.c.
3807 ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
3809 * src/system.h (uintmax_t): Don't declare; configure now does this.
3811 * src/common.h (backup_type): New decl.
3812 * src/common.h, src/misc.c, src/tar.c:
3813 Move include of backupfile.h to common.h.
3815 * src/misc.c (maybe_backup_file):
3816 Pass backup_type to find_backup_file_name.
3818 * src/list.c (print_header): Change sizes of uform and gform from 11 to
3819 UINTMAX_STRSIZE_BOUND.
3821 * doc/tar.texi: Remove --bzip2.
3822 Fix @xref typos reported by latest makeinfo.
3824 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
3826 (M4DIR, ACINCLUDE_INPUTS): New macros.
3827 ($(srcdir)/acinclude.m4): New rule.
3829 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
3830 HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
3831 now generated automatically by autoconf.
3833 1999-05-15 Paul Eggert <eggert@twinsun.com>
3835 * doc/tar.texi: Remove -y.
3837 1999-04-09 Paul Eggert <eggert@twinsun.com>
3839 * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
3840 (we were allocating too much storage).
3841 (uintmax_t): Don't declare; configure now does this.
3843 * ABOUT-NLS: Update to gettext 0.10.35 edition.
3845 1999-03-22 Paul Eggert <eggert@twinsun.com>
3847 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
3849 * acinclude.m4 (AC_LFS_FLAGS):
3850 Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
3851 (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
3852 (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
3854 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
3855 New macros; needed for latest GNU xmalloc.c.
3857 * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
3858 (libtar_a_SOURCES): Add quotearg.c.
3859 * list.c: Include <quotearg.h>.
3860 (from_oct): Add forward decl.
3861 (read_header): Return HEADER_FAILURE if we can't parse the checksum.
3862 (from_oct): Report an error only if TYPE is nonzero.
3863 Quote any funny characters in bad header.
3865 1999-03-20 Paul Eggert <eggert@twinsun.com>
3867 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
3869 * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
3870 (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
3872 (AC_LFS): Simplify AIX revision number test.
3874 1999-03-17 Paul Eggert <eggert@twinsun.com>
3876 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
3878 * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
3879 Remove; it doesn't work that well
3880 with AC_CANONICAL_HOST.
3881 (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
3883 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
3885 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
3887 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
3889 * tar.texi: Fix bug-report addr.
3891 * README: Remove --with-included-malloc.
3892 Upgrade version numbers of build software.
3894 1999-03-07 Paul Eggert <eggert@twinsun.com>
3896 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
3898 * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
3899 where bindtextdomain and gettext require -lintl.
3900 (AC_LFS_FLAGS): Simplify so that it only gets the flags;
3901 `no' means it failed.
3902 (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
3903 (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
3904 _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
3905 to add anything to the command line (it's all in config.h).
3906 Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
3908 1999-03-01 Paul Eggert <eggert@twinsun.com>
3910 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
3912 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
3914 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
3915 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
3916 uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
3917 like OFF_MAX, which are not reliable
3918 (e.g. OFF_MAX in AIX 4.2 is incorrect).
3919 * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
3920 SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
3922 * src/incremen.c (get_directory_contents):
3923 Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
3924 Have statx depend on STX_HIDDEN, not AIX.
3926 * src/create.c (to_oct):
3927 New parameter substitute, giving a substitute value to use
3928 when the original value is out of range. Do not append a space to the
3929 output; modern tars don't. When a value is out of range, specify the
3930 maximum value, not the number of bits.
3931 (GID_NOBODY, UID_NOBODY): New macros.
3932 (gid_to_oct, uid_to_oct): Use them as substitutes.
3933 (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
3934 (dump_file): Check whether the file changed as we read it.
3936 * src/rmt.c (main): Remove suspicious AIX/386 code.
3938 1999-02-19 Paul Eggert <eggert@twinsun.com>
3940 * intl/localealias.c (read_alias_file): Don't assume that memcpy
3941 returns a type compatible with char *; it doesn't on SunOS
3942 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
3944 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
3946 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
3947 * doc/tar.texi: Add --bzip2, --unbzip2 options.
3949 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
3951 (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
3952 (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
3953 * acinclude.m4 (AM_WITH_NLS):
3954 Update to latest gettext version (serial 5).
3955 (AC_LFS_FLAGS): New macro
3956 (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
3957 working only with unset variables. Append to CFLAGS, not CPPFLAGS.
3958 Work properly in cross-compilation scenario, by checking for getconf
3959 with AC_CHECK_TOOL and by ditching uname in favor of
3960 AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
3962 * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
3963 replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
3964 * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
3965 since getdate.y now uses ANSI code.
3967 * config.guess, config.sub: New files; taken from automake 1.4.
3969 * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
3970 intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
3971 intl/explodename.c, intl/finddomain.c, intl/gettext.c,
3972 intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
3973 intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
3974 intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
3975 Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
3977 1999-02-01 Paul Eggert <eggert@twinsun.com>
3979 * src/tar.c: Update copyright.
3983 1999-02-01 Paul Eggert <eggert@twinsun.com>
3985 * NEWS, configure.in: Version 1.12.64004
3987 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
3989 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
3991 * src/extract.c (extract_archive): Fix bug when extracting sparse
3992 files: they were trashing the tar file header.
3994 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
3995 Add -y or --bzip2 or --bunzip2 option.
3997 1999-01-30 Paul Eggert <eggert@twinsun.com>
3999 * src/names.c (cached_no_such_uname, cached_no_such_gname,
4000 cached_no_such_uid, cached_no_such_gid): New vars.
4001 (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
4002 Cache failures, too.
4004 * src/tar.c (decode_options):
4005 Don't pass names longer than UNAME_FIELD_SIZE to
4006 uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
4008 1999-01-27 Paul Eggert <eggert@twinsun.com>
4010 * NEWS, configure.in: Version 1.12.64003
4012 * src/buffer.c (backspace_output, close_archive): Cast
4013 rmtlseek position arg to off_t, for benefit of K&R compilers
4015 * src/compare.c (verify_volume): Likewise.
4017 * NEWS, configure.in: Version 1.12.64002
4019 * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
4020 off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
4021 Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
4022 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
4023 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
4024 uid_from_oct): Likewise.
4026 1999-01-25 Paul Eggert <eggert@twinsun.com>
4028 * incremen.sh: Fix timing bug in regression test.
4030 1999-01-22 Paul Eggert <eggert@twinsun.com>
4032 * NEWS, configure.in: Update version
4034 * Makefile.am (localedir): Change to $(datadir)/locale.
4035 (DEFS): New macro, defining LOCALEDIR.
4036 (tar.o, tar._o, rmt.o, rmt._o): Remove.
4037 (INCLUDES): Add -I..
4039 * Makefile.am (localedir): Change to $(datadir)/locale.
4041 1999-01-21 Paul Eggert <eggert@twinsun.com>
4043 * NEWS, README, configure.in: Unofficial version 1.12.64001.
4045 * tests/Makefile.am (localedir): Change to $(datadir)/locale.
4046 * src/Makefile.am (localedir): Likewise.
4047 (DEFS): New macro, defining LOCALEDIR.
4048 (tar.o, tar._o, rmt.o, rmt._o): Remove.
4049 (INCLUDES): Add `-I..'.
4051 * tests/incremen.sh: Fix timing bug.
4053 1999-01-20 Paul Eggert <eggert@twinsun.com>
4055 * NEWS, README, configure.in: Unofficial version 1.12.64000.
4056 `lfs.7' changed to `64000' in version number
4057 to conform to gnits standards.
4059 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
4060 mkinstalldirs, ansi2knr.c: Update to latest public versions.
4062 Rebuild with automake 1.4 and autoconf 2.13, to work around some
4065 1998-12-07 Paul Eggert <eggert@twinsun.com>
4067 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
4069 * src/list.c (read_header):
4070 Accept file names as specified by POSIX.1-1996 section 10.1.1.
4072 1998-11-30 Paul Eggert <eggert@twinsun.com>
4074 * configure.in: Quote the output of uname.
4076 * src/extract.c (set_stat): chmod after chown even when not root;
4077 if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
4079 1998-11-15 Paul Eggert <eggert@twinsun.com>
4081 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
4083 * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
4084 ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
4086 1998-10-28 Paul Eggert <eggert@twinsun.com>
4088 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
4090 * src/system.h (voidstar): Use void * if __STDC__ is defined,
4093 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
4094 On many installations, rexec is disabled.
4096 1998-08-07 Paul Eggert <eggert@twinsun.com>
4098 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
4100 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
4101 for nameless users and groups.
4103 1998-02-17 Paul Eggert <eggert@twinsun.com>
4105 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
4106 * NEWS, README: Add explanation of why this isn't an official version.
4108 1998-02-02 Paul Eggert <eggert@twinsun.com>
4110 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
4111 This is an unofficial version.
4113 1997-12-17 Paul Eggert <eggert@twinsun.com>
4115 * src/incremen.c (ST_DEV_MSB): New macro.
4116 (NFS_FILE_STAT): Use most significant bit of st_dev,
4117 even if it's unsigned.
4119 1997-12-08 Paul Eggert <eggert@twinsun.com>
4121 * src/system.h (ST_NBLOCKS): Fix typo in definition.
4123 1997-11-19 Paul Eggert <eggert@twinsun.com>
4125 * configure.in (HAVE_INTTYPES_H):
4126 Don't ignore cache variable if it's already set.
4128 1997-11-10 Paul Eggert <eggert@twinsun.com>
4130 * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
4131 * src/delete.c (records_read): Now off_t.
4132 (move_archive): Don't assume mt_count is of type daddr_t.
4134 1997-10-30 Paul Eggert <eggert@twinsun.com>
4136 * configure.in (CPPFLAGS, LDFLAGS, LIBS):
4137 Set to appropriate values if large file support
4138 needs explicit enabling.
4139 (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
4141 New macros to configure.
4142 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
4144 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
4145 major_t, minor_t, ssize_t): New macros.
4147 * src/arith.h (TARLONG_FORMAT):
4148 Fix typo: %uld -> %lu. Use unsigned when long long
4150 (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
4151 (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
4153 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
4154 2nd arg is now unsigned long.
4156 * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
4157 (prepare_record_buffer): Arg is now size_t.
4158 Remove now-useless casts.
4160 (main): Use `long' for status, so that it can store ssize_t.
4161 Use daddr_t, mode_t, size_t, off_t when appropriate.
4162 Convert daddr_t and off_t values ourselves, since they might be longer
4163 than long. Convert other types using `long' primitives.
4164 When processing MTIOCTOP, do not try to pass resulting
4165 count back, since it won't work (it could be too large) and it's
4166 not expected anyway.
4169 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
4170 now-useless casts. Use unsigned long to print *_t types, except use
4171 STRINGIFY_BIGINT for off_t.
4172 (update_archive): Cast -1 to dev_t when necessary.
4174 * src/tar.c (check_decimal):
4175 Now returns 1 if successful, 0 otherwise, and returns
4176 uintmax_t value into new arg. Check for arithmetic overflow.
4177 (decode_options): Avoid overflow if record_size fits in size_t but not int.
4178 Check for overflow on user or group ids.
4180 * src/compare.c (diff_init, process_rawdata, read_and_process,
4181 diff_sparse_files, diff_archive):
4182 Use off_t, pid_t, size_t, ssize_t when appropriate.
4183 Remove now-useless casts. Use unsigned long to print *_t types,
4184 except use STRINGIFY_BIGINT for off_t.
4186 (process_noop, process_rawdata, process_dumpdir, read_and_process):
4187 Size arg is now size_t.
4189 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
4190 when allocating buffer.
4193 (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
4194 Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
4195 Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
4198 (get_status_string, get_status_off): New function.
4199 (get_status): Now returns long, so that it can store ssize_t.
4200 Invoke get_status_string to do the real work.
4201 (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
4202 (rmt_lseek__): Now returns off_t, using new get_status_off function.
4203 (rmt_ioctl__): Convert mt_count by hand,
4204 since it might be longer than long.
4206 * src/mangle.c (extract_mangle):
4207 Check for overflow when converting off_t to size_t.
4208 Use off_t, size_t when appropriate. Remove now-useless casts.
4210 * src/system.h (mode_t): Remove; now done by autoconf.
4211 (ST_NBLOCKS): Do not overflow if st_size is near maximum.
4212 Return number of ST_NBLOCKSIZE-byte blocks,
4213 not number of 512-byte blocks;
4214 this also helps to avoid overflow.
4215 (st_blocks): Declare if needed.
4216 (ST_NBLOCKSIZE): New macro.
4217 (<limits.h>, <inttypes.h>): Include if available.
4218 (CHAR_BIT): New macro.
4219 (uintmax_t): New typedef.
4220 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
4221 UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
4222 OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
4224 * src/names.c (name_init):
4225 Fix typo in error message: FILE* was passed, but char*
4228 (read_name_from_file, name_gather, addname, name_match, name_scan,
4229 add_exclude): Use size_t when appropriate. Remove now-useless casts.
4231 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
4233 * src/extract.c (newdir_umask, current_umask): Now mode_t.
4234 (extract_sparse_file): Args now use off_t.
4236 (set_mode, set_stat, make_directories, extract_sparse_file,
4237 extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
4238 now-useless casts. Use unsigned long to print *_t types, except use
4239 STRINGIFY_BIGINT for off_t.
4241 * src/misc.c (quote_copy_string):
4242 Use size_t when appropriate. Remove now-useless casts.
4244 * src/list.c (read_and, list_archive, read_header, decode_mode,
4245 print_header, print_for_mkdir):
4246 Use mode_t, off_t, size_t when appropriate. Remove
4247 now-useless casts. Use unsigned long to print *_t types, except use
4248 STRINGIFY_BIGINT for off_t.
4250 (read_header): Check for overflow when converting header size.
4252 (from_oct): Now static. Now returns uintmax_t. `where' arg is now
4253 const char *. Size arg is now size_t. Now takes new type and maxval
4254 args. Compute result using uintmax_t, not long. Report error if
4255 field does not contain octal number in range.
4256 (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
4257 off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
4258 uintmax_from_oct): New functions.
4260 (stringify_uintmax_t_backwards): New function.
4262 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
4263 (skip_file): Offset arg is now off_t.
4265 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
4266 real_s_totsize, real_s_sizeleft, current_block_ordinal):
4268 (write_error): Arg is now ssize_t.
4269 (child_pid): Now pid_t.
4270 (available_space_after): Now size_t.
4272 (child_open_for_compress, child_open_for_uncompress, flush_write,
4273 open_archive, flush_write, write_error, flush_read, close_archive):
4274 Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
4275 casts. Use unsigned long to print *_t types, except use
4276 STRINGIFY_BIGINT for off_t.
4278 * src/delete.c (records_read): Now daddr_t.
4279 (move_archive): Arg is now daddr_t. Check for overflow when
4281 (move_archive, delete_archive_members): Use daddr_t, off_t when
4282 appropriate. Remove now-useless casts.
4284 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
4285 (rmt_lseek): Now returns off_t.
4287 * src/create.c (to_oct):
4288 Now static. Value arg is now uintmax_t. Accept new args
4289 giving name of type of octal field, for error messages. Report an
4290 error if the value is too large to fit in the field.
4291 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
4292 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
4294 (write_eot, write_long, finish_header, deal_with_sparse,
4295 finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
4296 appropriate. Remove now-useless casts. Use unsigned long to print
4297 *_t types, except use STRINGIFY_BIGINT for off_t.
4299 (find_new_file_size): 1st arg is now off_t*.
4300 (finish_sparse_file): Args now use off_t, not long.
4301 Check for lseek error.
4302 (create_archive, dump_file): Cast -1 to dev_t when necessary.
4303 (dump_file): Device arg is now dev_t.
4304 Avoid overflow when testing whether file has holes
4305 by using the new ST_NBLOCKSIZE macro.
4307 * src/incremen.c (struct accumulator, add_to_accumulator,
4308 get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
4309 Use size_t for sizes.
4310 (struct directory, get_directory_contents, add_hierarchy_to_namelist):
4311 Use dev_t, ino_t for devices and inodes.
4312 (gnu_restore): Use off_t for file offsets.
4313 (struct directory): Use char for flags. Add new flag `nfs'.
4315 (NFS_FILE_STAT): New macro.
4316 (note_directory): Accept struct stat * instead of
4317 device and inode number. All callers changed.
4318 (note_directory, get_directory_contents):
4319 Use NFS_FILE_STAT to determine whether directory is an NFS directory.
4320 (write_dir_file): Cast time_t to unsigned long before printing as %lu.
4322 * src/common.h (record_size, struct name, struct sp_array,
4323 available_space_after):
4324 Use size_t for sizes.
4325 (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
4326 Use off_t for file offsets.
4327 (struct name): dir_contents is now const char *, not char *.
4328 (dump_file, get_directory_contents): Use dev_t for devices.
4329 (to_oct): Remove decl.
4330 (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
4331 UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
4332 GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
4333 OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
4334 UINTMAX_FROM_OCT): New macros.
4335 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
4336 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
4337 stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
4338 minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
4339 time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
4340 (print_for_mkdir): 2nd arg is now mode_t.
4342 See ChangeLog.1 for earlier changes.
4345 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation,
4348 This file is part of GNU tar.
4350 GNU tar is free software; you can redistribute it and/or modify
4351 it under the terms of the GNU General Public License as published by
4352 the Free Software Foundation; either version 2, or (at your option)
4355 GNU tar is distributed in the hope that it will be useful,
4356 but WITHOUT ANY WARRANTY; without even the implied warranty of
4357 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4358 GNU General Public License for more details.
4360 You should have received a copy of the GNU General Public License
4361 along with GNU tar; see the file COPYING. If not, write to
4362 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
4363 Boston, MA 02111-1307, USA.