]> Dogcows Code - chaz/tar/blob - ChangeLog
(close_diag,open_diag,read_diag_details)
[chaz/tar] / ChangeLog
1 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2
3 * configure.ac: Fixed check for setsockopt
4
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
8 names.
9
10 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
11
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
16 as well.
17 * doc/tar.texi: Documented --format=ustar
18
19 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
20
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.
29
30 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
31
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.
39
40 2003-11-12 Paul Eggert <eggert@twinsun.com>
41
42 Fix some C compatibility bugs reported by Joerg Schilling.
43
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
50 compilers.
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 }.
56
57 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
58
59 * src/list.c (decode_header): Initialize st_atime and
60 st_ctime.
61
62 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
63
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.
68
69 2003-11-04 Paul Eggert <eggert@twinsun.com>
70
71 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
72 C99 require this.
73
74 2003-10-26 Paul Eggert <eggert@twinsun.com>
75
76 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
77 Bug reported by Christian Weisgerber.
78
79 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
80
81 * AUTHORS: Updated
82 * NEWS: Updated
83 * src/tar.c (decode_options): Removed superfluous archive format
84 check
85 * doc/tar.texi: Documented new features.
86
87 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
88
89 * NEWS: Updated
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.
100
101 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
102
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.
115
116 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
117
118 Implemented --occurrence option.
119
120 * NEWS: Updated.
121 * src/tar.c: New option --occurrence.
122 * src/common.h (occurrence_option): New global
123 (struct name): Changed `found' member to `uintmax_t
124 found_count'.
125 (names_done): Removed
126 (all_names_found): Changed prototype.
127 (ISFOUND,WASFOUND): New macros
128 * src/delete.c (delete_archive_members): Honor --occurrence
129 option.
130 * src/list.c (read_and): Likewise.
131 * src/names.c: Count number of occurrences of each name in the
132 archive.
133 (name_match): Honor --occurrence option.
134 (names_done): Removed
135 (all_names_found,names_notfound): Rewritten.
136
137 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
138
139 * src/tar.c: Removed extra precaution regarding
140 subcommand_option == CAT_SUBCOMMAND
141 * lib/Makefile.am: Updated
142
143 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
144
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'
148 condition.
149 * src/tar.c: New option --first-copy
150 * NEWS: Updated
151
152 2003-09-24 Paul Eggert <eggert@twinsun.com>
153
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.
157
158 2003-09-22 Paul Eggert <eggert@twinsun.com>
159
160 * doc/tar.texi (extracting untrusted archives): New section.
161
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 *.
165 All callers changed.
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.
169
170 2003-09-17 Paul Eggert <eggert@twinsun.com>
171
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.
175
176 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
177 gl_USE_SYSTEM_EXTENSIONS.
178
179 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
180 * m4/.cvsignore: Add restrict.m4, time_r.m4.
181
182 2003-09-17 Paul Eggert <eggert@twinsun.com>
183
184 * bootstrap: Don't use "for option; do";
185 Solaris 8 /bin/sh doesn't like that.
186
187 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
188
189 * README-alpha: Updated
190 * bootstrap: Updated
191
192 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
193
194 * README-alpha: Updated
195 * bootstrap: Updated
196 * po/POTFILES.in: Added src/xheader.c
197 * src/common.h (cut_path_elements): Added proto.
198
199 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
200
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.
207
208 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
209
210 * .cvsignore: Added *.shar.gz
211 * NEWS: Updated
212 * TODO: Updated
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.
218
219 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
220
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).
227
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
232
233 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
234
235 * src/create.c: Support for "linkpath" extended keyword.
236 * src/xheader.c (decode_record): Reversed the return
237 condition.
238
239 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
240
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.
245 * README: Updated.
246 * NEWS: Updated.
247 * TODO: Updated.
248
249 2003-09-02 Paul Eggert <eggert@twinsun.com>
250
251 * src/common.h (destroy_stat, xheader_decode, xheader_store,
252 xheader_read, xheader_finish, xheader_destroy): Add decls;
253 C99 requires this.
254
255 * src/create.c (write_extended): Remove unused local 'bufsize'.
256
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.
262
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.
276
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.
280
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.
285 All uses changed.
286
287 * src/tar.c (set_archive_format): Now static.
288 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
289
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.
298
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.
303
304 * src/xheader.c (decode_record): Fix misspelling in diagnostic
305 "extended headed" -> "extended header".
306
307 GNU coding style fixes.
308 * src/xheader.c (decode_record, xheader_decode):
309 Do not use decls like "char *p, *q;".
310
311 Minor style fixes.
312 (xheader_store): Avoid parentheses around object operand of sizeof.
313
314 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
315
316 * src/create.c (start_header): Store long file names
317 in "path" keyword of an extended header if in POSIX
318 mode.
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
324 for the time being).
325
326 2003-09-01 Paul Eggert <eggert@twinsun.com>
327
328 Update from gnulib, and correct fnmatch to fnmatch-gnu.
329 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
330 Sort.
331 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
332 of AC_GNU_SOURCE.
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.
339
340 2003-09-01 Sergey Poznyakoff
341
342 Added initial support for creating POSIX headers.
343
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
348 prototypes.
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
354 current_stat_info.
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
368
369 2003-08-31 Sergey Poznyakoff
370
371 Added initial support for POSIX extended and STAR headers
372 (only for listing/extracting).
373
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
388 and STAR headers.
389 (skip_member): Check oldgnu_header only if current_format is set
390 to OLDGNU_FORMAT.
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.
401
402 2003-08-29 Paul Eggert <eggert@twinsun.com>
403
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
406 versus -ise).
407 * po/en_GB.po: Remove.
408
409 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
410
411 * TODO: Updated
412 * NEWS: Updated
413 * src/tar.c: Removed support for the obsolete command line
414 options.
415 * doc/tar.texi: Removed references to the obsolete command
416 line options.
417
418 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
419
420 * TODO: Updated
421 * NEWS: Updated
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
429 to the link_table.
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
434 semantics otherwise.
435 (main): Call check_links if --check-links. was given.
436
437 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
438
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.
442
443 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
444
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.
453
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.
463
464 2003-07-05 Paul Eggert <eggert@twinsun.com>
465
466 Finish the checkin begin yesterday.
467
468 * NEWS: Document the user-visible changes installed in the last
469 two days.
470
471 * TODO: New file (actually, resurrected; but with new contents).
472
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.
478
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.
486
487 * src/names.c (namelist_match): Allow partial matches only if
488 recursive.
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.
495
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.
500 Divide size by two
501 when retrying instead of subtracting 1024; for speed.
502 (main): Use gettext to translate (C), not print_copyright.
503
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
507 C89 or better.
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.
519
520 * src/tar.c: Do not include <print-copyr.h>.
521 Include <getdate.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.
536
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.
542
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.
548
549 2003-07-04 Paul Eggert <eggert@twinsun.com>
550
551 Revamp to meet current standards of autoconf, automake,
552 gettext, and gnulib, and incorporate new translations.
553
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.
560
561 * intl: Remove this subdirectory.
562
563 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
564
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,
571 stamp-h.in: Remove.
572
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.
592
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,
611 po/Makefile.in.in:
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.
615
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
625 like coreutils.
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.
630 (YACC): Remove.
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.
637 (AM_STDBOOL_H): Add.
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.
657
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.
666
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.
674
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.
688
689 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
690 be translated, since it's not a user-visible tool.
691
692 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
693
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.
699
700 * src/buffer.c (print_total_written): Adjust to new human.h
701 interface.
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
707 inline code.
708
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.
727
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.
734
735 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
736 All callers changed.
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.
743
744 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
745 Move extern decl to common.h.
746
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.
758
759 * src/incremen.c (struct directory): nfs and found are now of type
760 bool, not int.
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.
764
765 New tests.
766 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
767 files.
768
769 2002-09-30 Paul Eggert <eggert@twinsun.com>
770
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.
774
775 2002-03-29 Paul Eggert <eggert@twinsun.com>
776
777 * src/incremen.c (get_directory_contents):
778 If ignore_failed_read_option, only warn about
779 get_directory_contents failures. Fix suggested by
780 Mark Costlow.
781
782 2002-01-31 Mark W. Eichin <eichin@thok.org>
783
784 * src/buffer.c (child_open_for_compress): Don't try to read
785 past the end of the buffer.
786
787 2001-10-11 Jim Meyering <meyering@lucent.com>
788
789 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
790 and quote_n (1, ... to avoid clobbering a buffer.
791
792 2001-09-26 Paul Eggert <eggert@twinsun.com>
793
794 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
795
796 * src/buffer.c (flush_read): Don't diagnose partial blocks before
797 end of file; just ignore them silently.
798
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.
806
807 2001-09-26 Jim Meyering <meyering@lucent.com>
808
809 * doc/tar.texi (Remote Tape Server): is know -> is known
810
811 2001-09-25 Paul Eggert <eggert@twinsun.com>
812
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.
817
818 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
819
820 * src/extract.c (maybe_recoverable):
821 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
822
823 2001-09-22 Paul Eggert <eggert@twinsun.com>
824
825 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
826
827 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
828 with GPL.
829
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.
835
836 * configure.ac (ALL_LINGUAS): Add ko.
837 * po/ko.po: Resurrected file.
838
839 * doc/convtexi.pl: Add coding advice for Emacs.
840
841 * doc/getdate.texi: Add copyright notice.
842
843 * doc/mdate-sh: Upgrade to automake 1.5 version.
844
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.
848
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.
852
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.
856
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.
859
860 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
861 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
862
863 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
864 * m4/isc-posix.m4: Remove.
865
866 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
867
868 * po/POTFILES.in: Add copyright notice.
869
870 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
871 well as after.
872 * tests/Makefile.am (LDADD): Likewise.
873
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.
880
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.
886
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.
900
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.
905
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.
911
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.
917
918 * src/tar.h: Put copyright notice into documentation.
919
920 * tests/Makefile.am (TESTS): Add delete03.sh.
921 * tests/delete03.sh: New file.
922
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.
929
930 2001-09-20 Jim Meyering <meyering@lucent.com>
931
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.
941
942 2001-09-16 Paul Eggert <eggert@twinsun.com>
943
944 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
945
946 2001-09-14 Paul Eggert <eggert@twinsun.com>
947
948 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
949
950 * README-alpha: Describe automake patch.
951
952 * configure.ac (LIBOBJS):
953 Remove automake 1.4 workaround, as we're using 1.5 now.
954 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
955
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.
960
961 2001-09-13 Paul Eggert <eggert@twinsun.com>
962
963 * config.guess, config.sub: Sync with canonical versions.
964
965 * configure.ac (jm_PREREQ_XGETCWD): Add.
966
967 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
968 (libtar_a_SOURCES): Add copysym.c.
969 * copysym.c, copysym.h: New files.
970
971 * lib/error.c: Sync with fileutils version.
972
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.
976
977 * m4/gettext.m4 (AM_WITH_NLS):
978 Fix bug with calculating version of Bison 1.29.
979 Reported by Karl Berry.
980
981 * src/Makefile.am (datadir): Remove.
982
983 * src/rmt.c: Include copysym.h.
984 (main): Use copyright_symbol to translate copyright notice,
985 instead of gettext.
986 * src/tar.c: Likewise.
987 * tests/genfile.c: Likewise.
988
989 * src/system.h (MB_LEN_MAX): New symbol.
990
991 2001-09-11 Paul Eggert <eggert@twinsun.com>
992
993 * src/extract.c (struct delayed_set_stat): New member
994 'after_symlinks'.
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.
1009
1010 * src/rtapelib.c (rexec):
1011 Remove declaration; it ran afoul of prototypes on Crays.
1012 Reported by Wendy Palm of Cray.
1013
1014 2001-09-06 Paul Eggert <eggert@twinsun.com>
1015
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.
1021
1022 2001-09-04 Paul Eggert <eggert@twinsun.com>
1023
1024 * lib/xgetcwd.c: Include "xalloc.h".
1025 (xgetcwd): Do not return NULL when memory is exhausted; instead,
1026 report an error and exit.
1027
1028 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
1029 (jm_PREREQ): Use it.
1030
1031 2001-09-03 Paul Eggert <eggert@twinsun.com>
1032
1033 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
1034 (jm_PREREQ_XGETCWD): New macro.
1035
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
1039 no-wildcard case.
1040
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.
1047
1048 * lib/xgetcwd.c (xgetcwd):
1049 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
1050 to decide whether to use getcwd (NULL, 0).
1051
1052 2001-09-02 Paul Eggert <eggert@twinsun.com>
1053
1054 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
1055
1056 2001-09-01 Jim Meyering <meyering@lucent.com>
1057
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.
1061
1062 2001-08-31 Jim Meyering <meyering@lucent.com>
1063
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.
1067
1068 2001-08-30 Paul Eggert <eggert@twinsun.com>
1069
1070 * lib/utime.c: Include full-write.h.
1071 * lib/xstrtol.c (strtoimax): New decl.
1072
1073 2001-08-29 Paul Eggert <eggert@twinsun.com>
1074
1075 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
1076
1077 * src/create.c (dump_file): Relativize link names before dumping.
1078 This fixes a bug reported by Jose Pedro Oliveira.
1079
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.
1084
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.
1088
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.
1093
1094 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
1095
1096 * src/extract.c (delay_set_stat): Fix off-by-one error in file
1097 name size allocation that caused core dumps.
1098
1099 2001-08-28 Paul Eggert <eggert@twinsun.com>
1100
1101 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
1102
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.
1107
1108 * acconfig.h: Remove; no longer needed.
1109
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.
1113
1114 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
1115 (SUBDIRS): Put intl before lib, as gettext requires.
1116
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
1124 permissions.
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.
1128
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.
1135
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.
1139
1140 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
1141
1142 * lib/full-write.c, lib/savedir.c: Comment fix.
1143
1144 * lib/pathmax.h: Remove.
1145
1146 * lib/quote.c, lib/quote.h: New files.
1147
1148 * lib/xgetcwd.c: Don't include pathmax.h.
1149 Include stdlib.h and unistd.h if available.
1150 Include xalloc.h.
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.
1155
1156 * lib/xmalloc.c: Quote failure tests.
1157
1158 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
1159
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.
1169 (main): Remove.
1170
1171 * lib/xstrtol.h (xstrtoimax): New decl.
1172
1173 * m4/Makefile.am (EXTRA_DIST):
1174 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
1175 longlong.m4, xstrtoimax.m4.
1176
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.
1181
1182 * m4/uintmax_t.m4: Use shorter comment.
1183
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.
1189
1190 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
1191
1192 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
1193
1194 * src/rmt.c (main):
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.
1199
1200 2001-08-28 Jim Meyering <meyering@lucent.com>
1201
1202 * lib/argmatch.c: Include "quote.h".
1203 (argmatch_invalid): Quote the context.
1204
1205 * lib/dirname.c (dir_name): Fix typo on PC platforms.
1206
1207 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
1208 Use single-quote for local .h files.
1209
1210 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
1211
1212 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
1213 glibc versions.
1214
1215 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
1216 invoking mktime the last time.
1217
1218 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
1219
1220 * lib/rename.c: Major rewrite by Volker Borchert to use system
1221 rename function, but to work around problems with trailing
1222 slashes.
1223
1224 * lib/strtoll.c: New file, from glibc.
1225 * lib/strtoul.c: Update from glibc.
1226
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
1230 is not defined.
1231 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
1232 not defined.
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.
1237
1238 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
1239 Don't use PATH_MAX.
1240
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.
1246
1247 * m4/getline.m4: Don't use string.h.
1248
1249 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
1250
1251 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
1252
1253 2001-08-27 Paul Eggert <eggert@twinsun.com>
1254
1255 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
1256
1257 The biggest change is the new --exclude semantics and options.
1258 The basic idea was suggested by Gerhard Poul; thanks!
1259
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.
1263
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.
1268
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.
1275
1276 * doc/fdl.texi: Update to current GNU version.
1277
1278 * doc/tar.texi: Put leading '*' in direntry.
1279 Accommodate new gfdl sectioning.
1280 New option --recursion (the default) that is the inverse of
1281 --no-recursion.
1282
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.
1289
1290 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
1291
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.
1314
1315 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
1316 New macros.
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.
1321
1322 * lib/prepargs.c: Include <string.h>; required for C99 since
1323 we use strlen.
1324
1325 * lib/quotearg.c:
1326 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
1327
1328 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
1329 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
1330
1331 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
1332 Remove inttypes_h.m4, largefile.m4, mktime.m4.
1333
1334 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
1335 subsumed by Autoconf 2.50.
1336
1337 * m4/error.m4: Upgrade to serial 2.
1338
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.
1342
1343 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
1344
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
1349 by autoconf 2.5x.
1350
1351 * m4/realloc.m4: Upgrade to serial 4.
1352
1353 * m4/strerror_r.m4: Revert to serial 1002.
1354
1355 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
1356
1357 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
1358
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.
1362
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.
1365
1366 * src/buffer.c (new_volume): Stop if the script exits with an error.
1367
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.
1373
1374 * src/extract.c:
1375 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
1376 Support hard links to symbolic links.
1377
1378 (struct delayed_symlink): Remove 'names' member, replacing it with
1379 'sources' and 'target' member. All uses changed.
1380
1381 (struct string_list): New type.
1382
1383 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
1384 for struct hack; this avoids wasted space in some cases.
1385
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
1391 directories.
1392 Fix mode computation in the case where the directory exists.
1393
1394 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
1395 link, make a copy of the symbolic link.
1396
1397 * src/incremen.c (get_directory_contents):
1398 If ignore_failed_read_option, only warn about
1399 stat failures.
1400
1401 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
1402 However, check for error even for '-' or '+' case.
1403
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
1407 GID_MAX.
1408
1409 * src/misc.c (link_error): New function.
1410
1411 * src/names.c (collect_and_sort_names):
1412 If ignore_failed_read_option, only warn about
1413 stat errors.
1414
1415 (excluded_name): Now returns bool. Simplify, as the fancy
1416 features are now all in excluded_filename.
1417
1418 * src/rtapelib.c (base_name): Remove decl, as system.h now
1419 declares it.
1420
1421 * src/system.h: Include stddef.h if available.
1422 (offsetof): Declare if stddef.h doesn't.
1423
1424 Include <dirname.h>.
1425 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
1426
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):
1431 New enum values.
1432
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.
1437
1438 (decode_options): Implement the new way of interpreting exclude
1439 patterns.
1440
1441 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
1442
1443 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
1444 just print error messages suggesting alternatives.
1445
1446 (add_filtered_exclude): Remove.
1447
1448 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
1449
1450 * tests/extrac04.sh (out): Remove
1451 directory/subdirectory/file1, as the new semantics for
1452 --exclude exclude it.
1453
1454 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
1455
1456 2001-08-12 Paul Eggert <eggert@twinsun.com>
1457
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.
1463
1464 2001-07-08 Paul Eggert <eggert@twinsun.com>
1465
1466 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
1467
1468 2001-05-10 Paul Eggert <eggert@twinsun.com>
1469
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
1473 doing it ourselves.
1474
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
1478 is defined.
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.
1483
1484 * lib/basename.c:
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
1490 by the slashes.
1491
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.
1496
1497 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
1498 New macros.
1499 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
1500
1501 2001-02-16 Paul Eggert <eggert@twinsun.com>
1502
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.
1506
1507 * lib/alloca.c (malloc): Undef before defining.
1508
1509 2001-02-13 Paul Eggert <eggert@twinsun.com>
1510
1511 * src/compare.c (read_and_process): Use off_t for size.
1512 From Maciej W. Rozycki.
1513
1514 2001-01-26 Paul Eggert <eggert@twinsun.com>
1515
1516 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
1517
1518 2001-01-12 Paul Eggert <eggert@twinsun.com>
1519
1520 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
1521
1522 * lib/savedir.h (savedir): Remove size arg.
1523
1524 * doc/tar.texi: Add @setchapternewpage odd.
1525 Remove -I as an alias for -T, for now.
1526 Add @dircategory.
1527 Update copyright. Remove "Published by".
1528 Dates beginning with / or . are taken to be file names.
1529
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
1536 dates are taken.
1537 Remove 'I' as an aliase for 'T'.
1538 Update copyright.
1539
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
1547 separator.
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
1552 mkdir to ignore it.
1553 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
1554
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.
1560
1561 * src/rmt.h (_remdev): Look for / anywhere in Path.
1562
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.
1566
1567 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
1568
1569 * lib/dirname.h (dirlen): New decl.
1570
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.
1575
1576 * lib/addext.c (ISSLASH): New macro.
1577 (addext): Trim any redundant trailing slashes.
1578
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.
1585
1586 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
1587 (libtar_a_SOURCES): Add dirname.c.
1588
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;
1594 it's not needed.
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.
1599
1600 * lib/savedir.c (savedir):
1601 Remove size arg; it wasn't portable. All callers changed.
1602
1603 * lib/utime.c (utime_null): Adjust to new full_write convention.
1604
1605 * configure.in (YACC): Avoid portability problem with Ultrix sh.
1606
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.
1611
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.
1615
1616 * src/system.h: Include <time.h>.
1617 (time): Declare if not defined.
1618
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.
1622
1623 * src/rtapelib.c: Include full-write.h.
1624
1625 * src/rmt.c: Include full-write.h.
1626 (main): Update copyright.
1627
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.
1631
1632 * lib/full-write.h: New file.
1633
1634 * src/list.c: system.h now does time.h stuff.
1635
1636 * lib/dirname.c:
1637 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
1638 stdlib.h.
1639 Do not include string.h, strings.h, or assert.h; no longer needed.
1640 (strrchr, memrchr, malloc): Remove decls; no longer needed.
1641 Include <xalloc.h>.
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)".
1649
1650 2000-12-08 Paul Eggert <eggert@twinsun.com>
1651
1652 * lib/dirname.h: New file.
1653
1654 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
1655
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.
1659
1660 2000-10-30 Paul Eggert <eggert@twinsun.com>
1661
1662 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
1663
1664 2000-10-29 Paul Eggert <eggert@twinsun.com>
1665
1666 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
1667
1668 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
1669
1670 2000-10-28 Paul Eggert <eggert@twinsun.com>
1671
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.
1684
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.
1688
1689 2000-10-27 Paul Eggert <eggert@twinsun.com>
1690
1691 * src/misc.c (read_error_details, read_warn_details,
1692 read_fatal_details): Don't assume size_t is unsigned long.
1693
1694 * src/buffer.c (flush_read): If read_full_records_option, try to
1695 fill the input buffer, as --delete -f - needs this.
1696
1697 2000-10-24 Paul Eggert <eggert@twinsun.com>
1698
1699 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
1700
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.
1706
1707 * src/tar.c (decode_options):
1708 Check that volume label is not too long to overflow
1709 name in tar header block.
1710
1711 * Makefile.am (EXTRA_DIST): Remove rebox.el.
1712
1713 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
1714 (AC_FUNC_STRERROR_R): Use this instead.
1715
1716 2000-10-23 Paul Eggert <eggert@twinsun.com>
1717
1718 * src/extract.c: Include <time.h>, since we invoke "time".
1719
1720 * lib/prepargs.c (prepend_default_options):
1721 Don't use NULL, for portability.
1722
1723 * m4/fnmatch.m4: Add "working" to message.
1724
1725 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
1726 Include <hash.h>.
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
1744 linked list.
1745
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
1749 back to "tar".
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.
1756
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.
1764
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
1774 (for strtol.c).
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.
1787
1788 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
1789
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.
1793
1794 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
1795 Remove these files.
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.
1800
1801 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
1802
1803 * src/open3.c: Remove.
1804
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.
1809
1810 The following changes are to put LOCALEDIR into localedir.h instead
1811 of passing it on the command line.
1812 (DEFS): Remove.
1813 (DISTCLEANFILES): New macro.
1814 (localedir.h): New rule.
1815 (rmt.o tar.o): Now depend on localedir.h.
1816
1817 * tests/delete02.sh, tests/extrac04.sh: New files.
1818
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.
1823
1824 * src/rtapelib.c (rexec): Don't declare unless using it.
1825 (do_command): Simplify signal-handling code slightly.
1826
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.
1837
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.
1841
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.
1847
1848 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
1849
1850 * po/da.po: New translation file.
1851
1852 * src/mangle.c (extract_mangle):
1853 Fix diagnostic with wrong number of %s'es.
1854
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.
1858
1859 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
1860 fall off a device's end. Detect this.
1861
1862 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
1863 uses changed.
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.
1870
1871 * src/misc.c:
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
1878 file descriptors.
1879 (savedir_error, savedir_warn, symlink_error): New functions.
1880
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
1887 an old GNU header.
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.
1896
1897 * src/update.c (update_archive): Use skip_member.
1898
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
1920 before slash).
1921 (apply_delayed_set_stat): Remove.
1922 (apply_delayed_symlinks, extract_finish): New functions.
1923
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.
1935
1936 * THANKS: Add gpoul. Change skip's address.
1937
1938 * po/POTFILES.in: Add lib/human.c.
1939
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 *.
1949
1950 * src/tar.h, tests/genfile.c: Fix comments.
1951
1952 * src/create.c: Include hash.h.
1953 (gnu_list_name): Remove decl.
1954 (struct link): Remove "next" member.
1955 (linklist): Remove.
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.
1972
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
1985 linked list.
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.
1997
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
2007 2000-01-07 change.
2008 (main): Invoke extract_finish at end of extraction.
2009
2010 * src/rmt.c: Include localedir.h.
2011 (main): Update copyright date to 2000.
2012
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
2019 some misspellings.
2020
2021 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
2022
2023 * tests/ignfail.sh: opendir -> savedir in diagnostics.
2024
2025 * tests/preset.in: Set LANGUAGE to the empty string, for some
2026 brain damaged host.
2027
2028 2000-10-20 Paul Eggert <eggert@twinsun.com>
2029
2030 * m4/fnmatch.m4: Mention the GNU C library.
2031
2032 2000-10-19 Paul Eggert <eggert@twinsun.com>
2033
2034 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
2035 glibc 2.1.95.
2036
2037 2000-10-17 Paul Eggert <eggert@twinsun.com>
2038
2039 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
2040 (CHAR_BIT): Remove.
2041
2042 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
2043 (CHAR_BIT): Define if not defined.
2044
2045 2000-09-09 Paul Eggert <eggert@twinsun.com>
2046
2047 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
2048
2049 2000-08-07 Paul Eggert <eggert@twinsun.com>
2050
2051 * lib/xmalloc.c: Memory exhausted -> memory exhausted
2052
2053 * lib/xalloc.h (xalloc_msg_memory_exhausted):
2054 change to array from char *.
2055
2056 2000-08-06 Paul Eggert <eggert@twinsun.com>
2057
2058 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
2059 compatibility with glibc 2.1.3 strftime.c.
2060
2061 2000-07-31 Paul Eggert <eggert@twinsun.com>
2062
2063 * lib/quotearg.c (quotearg_n_options):
2064 Don't make the initial slot vector a constant,
2065 since it might get modified.
2066
2067 * lib/quotearg.c: Add support for more than one preallocated slot.
2068
2069 2000-07-30 Paul Eggert <eggert@twinsun.com>
2070
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
2074 in slot 0.
2075
2076 2000-07-23 Paul Eggert <eggert@twinsun.com>
2077
2078 * lib/quotearg.c:
2079 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
2080 mbstate_t is always defined.
2081
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
2084 common.
2085
2086 2000-07-22 Paul Eggert <eggert@twinsun.com>
2087
2088 * lib/quotearg.c:
2089 When the system forces us to redefine mbstate_t, shadow its mbsinit
2090 function. From Bruno Haible.
2091
2092 2000-07-14 Paul Eggert <eggert@twinsun.com>
2093
2094 * lib/xmalloc.c: Simplify exhausted message.
2095
2096 * lib/quotearg.h: Update copyright date; from Jim Meyering.
2097
2098 2000-07-13 Paul Eggert <eggert@twinsun.com>
2099
2100 * lib/quotearg.h (enum quoting style):
2101 New constant clocale_quoting_style.
2102
2103 * lib/quotearg.c:
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.
2107
2108 2000-07-10 Paul Eggert <eggert@twinsun.com>
2109
2110 * lib/quotearg.c:
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.
2117
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.
2122
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.
2127
2128 * m4/strerror_r.m4: New file.
2129
2130 2000-07-05 Paul Eggert <eggert@twinsun.com>
2131
2132 * lib/quotearg.c: Use double-quote to quote.
2133
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}", "\"")
2138 for right quote.
2139
2140 * lib/quotearg.c (struct quoting_options):
2141 Simplify quote_these_too dimension.
2142 From Bruno Haible <haible@clisp.cons.org>.
2143
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.
2147
2148 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
2149
2150 2000-07-03 Paul Eggert <eggert@twinsun.com>
2151
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.
2154
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.
2158
2159 2000-07-02 Paul Eggert <eggert@twinsun.com>
2160
2161 * lib/quotearg.c (mbstate_t):
2162 Do not define; it should be defined with AC_CHECK_TYPE.
2163
2164 2000-06-26 Paul Eggert <eggert@twinsun.com>
2165
2166 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
2167 a bug in glibc 2.1.3.
2168
2169 * lib/xmalloc.c: Fix inaccorate comment for xrealloc.
2170
2171 2000-06-19 Paul Eggert <eggert@twinsun.com>
2172
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.
2177
2178 2000-06-15 Paul Eggert <eggert@twinsun.com>
2179
2180 * lib/human.c (adjust_value): New function.
2181 (human_readable_inexact): Apply rounding style even when printing
2182 approximate values.
2183
2184 * lib/human.c: Avoid shadowing warnings.
2185 From Jim Meyering.
2186
2187 2000-06-14 Paul Eggert <eggert@twinsun.com>
2188
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.
2191
2192 * lib/getdate.y (get_date): Apply relative times after time zone
2193 indicator, not before.
2194
2195 2000-05-31 Paul Eggert <eggert@twinsun.com>
2196
2197 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
2198 and thus don't need AC_CANONICAL_HOST.
2199
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
2208 programs.
2209
2210 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
2211 longer needs it.
2212 * config.guess, config.sub: Remove these files, for similar reasons.
2213
2214 2000-05-03 Paul Eggert <eggert@twinsun.com>
2215
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
2219 _GNU_SOURCE.
2220
2221 2000-05-02 Paul Eggert <eggert@twinsun.com>
2222
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.
2227
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
2232
2233 2000-04-18 Paul Eggert <eggert@twinsun.com>
2234
2235 * m4/mbstate_t.m4: New file.
2236
2237 2000-04-17 Bruno Haible <haible@clisp.cons.org>
2238
2239 * tests/ignfail.sh: Test for uid 0 along with user "root".
2240
2241 2000-04-05 Paul Eggert <eggert@twinsun.com>
2242
2243 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
2244 Don't use -n32 on IRIX if the installer said
2245 otherwise.
2246
2247 2000-02-28 Paul Eggert <eggert@twinsun.com>
2248
2249 * lib/quotearg.c (ALERT_CHAR): New macro.
2250 (quotearg_buffer_restyled): Use it.
2251
2252 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2253
2254 * src/list.c (tartime): Fix off-by-one error when copying year if
2255 OLD_CTIME.
2256
2257 2000-02-18 Paul Eggert <eggert@twinsun.com>
2258
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
2263 uses changed.
2264 (YYSTYPE): Removed; replaced by %union with int and textint
2265 members.
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
2273 time.
2274 (yylex): Store number of digits of numeric tokens. Return '?' for
2275 unknown identifiers, rather than (unused) tID.
2276
2277 2000-01-16 Paul Eggert <eggert@twinsun.com>
2278
2279 * lib/quotearg.c (quotearg_buffer_restyled):
2280 Do not quote alert, backslash, formfeed,
2281 and vertical tab unnecessarily in shell quoting style.
2282
2283 2000-01-15 Paul Eggert <eggert@twinsun.com>
2284
2285 * m4/c-bs-a.m4:
2286 Change quoting to be compatible with future autoconf versions.
2287
2288 2000-01-11 Paul Eggert <eggert@twinsun.com>
2289
2290 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
2291
2292 2000-01-07 Paul Eggert <eggert@twinsun.com>
2293
2294 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
2295
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.
2299
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.
2307
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):
2315 Likewise.
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,
2333 diff_sparse_files):
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.
2340
2341 * src/buffer.c (flush_read): Don't read past EOF.
2342
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.
2350
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.
2362
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.
2367
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.
2378
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.
2382 Plug memory leak.
2383
2384 * src/tar.c (decode_options): --delete and -f - are now
2385 incompatible, since we didn't have time to fix their bugs.
2386
2387 * tests/Makefile.am (TESTS): Remove delete02.sh.
2388 * tests/ignfail.sh: Adjust to new quoting scheme again.
2389
2390 2000-01-06 Paul Eggert <eggert@twinsun.com>
2391
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.
2397
2398 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
2399
2400 * tests/incremen.sh: Invoke stat on newly created file so that its
2401 ctime is updated on Nextstep.
2402
2403 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
2404
2405 * lib/getdate.y (get_date):
2406 Fix typo when checking for time_t overflow in time zone calculations.
2407
2408 1999-12-13 Paul Eggert <eggert@twinsun.com>
2409
2410 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
2411
2412 * README-alpha: New file.
2413 * README: New sections for gzip and bzip2, Solaris.
2414 Remove mention of BACKLOG.
2415
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.
2420
2421 * tests/Makefile.am (TESTS): Add delete02.sh.
2422 (POSTPONED_TESTS): Remove.
2423 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
2424
2425 * tests/preset.in:
2426 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
2427
2428 * tests/ignfail.sh (err): Adjust to new quoting scheme.
2429
2430 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
2431
2432 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
2433
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.
2445
2446 * src/update.c (<quotearg.h>): New include.
2447 (append_file):
2448 Don't assume that gettext preserves errno.
2449 Quote arbitrary strings in diagnostics.
2450 Check for close error.
2451
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
2457 mishandled.
2458
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.
2478
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.
2483
2484 * src/rmt.c, src/rtapelib.c (decode_oflag):
2485 O_APPEND might not be defined.
2486
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.
2491
2492 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
2493
2494 * src/Makefile.am: Use ## for copyright comments.
2495
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.
2532
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.
2540
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.
2552
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.
2560
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.
2570
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.
2584
2585 * src/buffer.c:
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.
2590
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.
2594
2595 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
2596 `Could not' sometimes and `Cannot' others.
2597
2598 (open_archive, flush_read, flush_archive, close_archive, new_volume):
2599 Quote arbitrary strings in diagnostics.
2600
2601 (read_error): Set archive to STDOUT_FILENO temporarily when writing
2602 archive buffer.
2603
2604 (init_volume_number): Check for input and output errors in volno_file.
2605
2606 (new_volume): Use new fatal_exit function to exit, and new xfork
2607 function to fork.
2608
2609 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
2610
2611 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
2612
2613 * doc/tar.texi: Add --overwrite.
2614 --absolute-names rejects ".." in names.
2615
2616 * lib/quotearg.c: Add support for multibyte characters.
2617 (ISGRAPH): Remove.
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.
2626
2627 * m4/c-bs-a.m4: New file.
2628
2629 * lib/Makefile.am: Use ## for copyright notice.
2630
2631 * scripts/Makefile.am: Use ## on copyright notice.
2632
2633 * doc/Makefile.am:
2634 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
2635
2636 1999-12-05 Paul Eggert <eggert@twinsun.com>
2637
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
2641 ChangeLog entries.
2642 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
2643
2644 1999-12-05 Dale Worley <worley@ariadne.com>
2645
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.
2649
2650 1999-12-04 Gerhard Poul <gpoul@gnu.org>
2651
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.
2656
2657 1999-12-03 Paul Eggert <eggert@twinsun.com>
2658
2659 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
2660
2661 * src/compare.c (diff_archive):
2662 Do not set errno to EPIPE; we no longer use perror.
2663
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.
2671
2672 * src/incremen.c (enum children): New type.
2673 (struct directory): Change old char allnew member to new enum children
2674 children member.
2675 All uses changed.
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.
2682
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.
2687
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.
2691
2692 * m4/uintmax_t.m4: Backport to autoconf 2.13.
2693
2694 * doc/tar.texi: Clarify getdate authorship.
2695
2696 1999-11-23 Paul Eggert <eggert@twinsun.com>
2697
2698 * lib/Makefile.am (DISTCLEANFILES): New macro.
2699
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.
2703
2704 1999-11-19 Paul Eggert <eggert@twinsun.com>
2705
2706 * m4/largefile.m4: Update serial.
2707
2708 1999-11-18 Paul Eggert <eggert@twinsun.com>
2709
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.
2713
2714 1999-11-07 Paul Eggert <eggert@twinsun.com>
2715
2716 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
2717
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.
2723
2724 * doc/tar.texi: New node create options for --ignore-failed-read.
2725 Remove unused version control symbols.
2726 Modernize texinfo usage.
2727
2728 * src/tar.c (usage): Add examples.
2729
2730 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
2731 Include fnmatch.h when testing fnmatch.
2732
2733 * src/common.h (collect_and_sort_names): New decl.
2734
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.
2738
2739 * src/extract.c (set_stat): Remove duplicate code.
2740
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.
2744
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.
2750
2751 1999-10-10 Paul Eggert <eggert@twinsun.com>
2752
2753 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
2754
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'.
2760
2761 * doc/tar.texi: Clarify documentation for portable file names.
2762
2763 * configure.in (AM_WITH_DMALLOC): Remove.
2764 (ALL_LINGUAS): Add ja.
2765
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.
2769
2770 * src/create.c (dump_file):
2771 Fix typo: last two args to dump_file were interchanged.
2772 * src/update.c (update_archive): Likewise.
2773
2774 * src/common.h (tartime): New decl.
2775
2776 * src/list.c (tartime): Now extern.
2777 (read_and): Invalid headers cause errors, not warnings.
2778
2779 1999-10-03 Paul Eggert <eggert@twinsun.com>
2780
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.
2784
2785 1999-09-25 Paul Eggert <eggert@twinsun.com>
2786
2787 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
2788 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
2789
2790 * tests/incremen.sh: Add yet another sleep.
2791
2792 1999-09-24 Paul Eggert <eggert@twinsun.com>
2793
2794 * NEWS: A read error now causes a nonzero exit status.
2795
2796 * src/create.c (to_chars): Fix base-256 output.
2797
2798 * src/buffer.c (write_error):
2799 Read error is an error, not just a warning.
2800
2801 1999-09-24 Paul Eggert <eggert@twinsun.com>
2802
2803 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
2804
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.
2810
2811 * tests/Makefile.am (TESTS): Add incremen.sh
2812 (INCLUDES): Add -I../lib, for fnmatch.h.
2813
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.
2821
2822 * tests/incremen.sh: Remove unnecessary sleeps.
2823
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):
2830 Likewise.
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.
2837
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.
2842
2843 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
2844
2845 * src/incremen.c (<time.h>): Remove include; no longer used.
2846 (time): Remove decl.
2847 (time_now): Remove.
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
2851 cutoff.
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.
2857
2858 * src/mangle.c (<time.h>): Remove; not used.
2859 (time): Do not declare.
2860
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.
2866
2867 * src/compare.c (get_stat_data): Use deref_stat.
2868
2869 * src/common.h (name_expand): Remove.
2870
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)
2874 -1.
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.
2893 All uses changed.
2894 (tartime): New function, incorporating isotime.
2895 (isotime): Delete.
2896 (print_header): Use tartime.
2897
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.
2901
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'.
2909
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.
2914 (to_base): Remove.
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
2918 format.
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
2928 symbolic links.
2929 start_header cannot return a null pointer, so don't test for it.
2930 Likewise for find_next_block.
2931
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
2935 bytes/s.
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.
2940
2941 * doc/Makefile.am:
2942 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
2943
2944 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
2945
2946 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
2947
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.
2952
2953 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
2954
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.
2959
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.
2964
2965 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
2966 Modernize sample backup script.
2967
2968 * THANKS: Martin Goik's email address has changed.
2969
2970 * m4/fnmatch.m4: New file.
2971
2972 1999-09-03 Paul Eggert <eggert@twinsun.com>
2973
2974 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
2975 Use EINVAL instead.
2976
2977 1999-08-29 Paul Eggert <eggert@twinsun.com>
2978
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>
2984
2985 1999-08-28 Paul Eggert <eggert@twinsun.com>
2986
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
2991
2992 1999-08-23 Paul Eggert <eggert@twinsun.com>
2993
2994 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
2995
2996 Remove minor cases of lint from many source files: this includes
2997 unnecessary casts, uses of NULL, etc.
2998
2999 * configure.in (AC_PROG_YACC): Remove.
3000 (YACC): Always use bison.
3001 (AC_STRUCT_TIMEZONE): Add.
3002 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
3003
3004 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
3005 Fix spelling.
3006
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.
3009
3010 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
3011
3012 * src/common.h (merge_sort): Remove decl; no longer exported.
3013
3014 * src/system.h (voidstar): Remove.
3015 (memcpy, memcmp): Cast args.
3016 ("xalloc.h"): Add include.
3017 (xmalloc, xrealloc): Remove decl.
3018
3019 * src/mangle.c (time): Do not declare if defined.
3020 (first_mangle, mangled_num): Remove.
3021
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.
3025
3026 * src/create.c (linklist): Now static.
3027 (to_chars): Fix wording of message to match from_chars.
3028
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.
3033
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.
3041
3042 * src/rmt.c (main): status is ssize_t, not long.
3043
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.
3049
3050 * src/buffer.c (open_archive): Use American spelling in diagnostic.
3051
3052 * lib/getdate.y: Major rewrite. Add copyright notice.
3053 (<stdio.h>): Include only if testing.
3054 (ISUPPER): Remove.
3055 (ISLOWER): New macro.
3056 (<string.h>): Include if HAVE_STRING_H, not USG.
3057 (bcopy): Remove.
3058 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
3059 bison.
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
3082 zones.
3083 (yylex): Now reentrant. All callers changed.
3084 (get_date): Add support for local time zone abbreviations.
3085 Make it reentrant.
3086
3087 1999-08-20 Paul Eggert <eggert@twinsun.com>
3088
3089 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
3090
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.
3094
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.
3104
3105 * src/misc.c (<save-cwd.h>): Include.
3106 (chdir_from_initial_wd): New function.
3107
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.
3114
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.
3125
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
3130 fit into uintmax_t.
3131
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.
3138
3139 * THANKS: Torsten Lull -> Catrin Urbanneck
3140
3141 1999-08-18 Paul Eggert <eggert@twinsun.com>
3142
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>.
3146
3147 1999-08-18 Paul Eggert <eggert@twinsun.com>
3148
3149 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
3150
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.
3156
3157 * src/create.c (write_eot): Write at least two zero blocks.
3158
3159 * src/extract.c (extract_archive): Fix sparse array bug:
3160 we did not find end of array correctly.
3161
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.
3166
3167 * src/list.c (read_and, list_archive): Simplify code.
3168 (read_header): Fix computation of signed checksums on machines where
3169 char is unsigned.
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.
3175
3176 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
3177 \?, for portability to non-ASCII hosts.
3178
3179 1999-08-16 Paul Eggert <eggert@twinsun.com>
3180
3181 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
3182
3183 * src/extract.c (make_directories): Do not chown intermediate
3184 directories, even if we are root.
3185
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.
3189
3190 1999-08-14 Paul Eggert <eggert@twinsun.com>
3191
3192 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
3193
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.
3206
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.
3219
3220 * src/compare.c (diff_archive): Do not fall back on absolute name
3221 when --absolute-names is not specified.
3222
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.
3229
3230 * src/tar.c: -g now implies after_date_option = 1.
3231 -g and -N are now incompatible options.
3232
3233 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
3234
3235 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
3236
3237 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
3238 incremental headers as POSIX prefixes.
3239
3240 1999-08-11 Paul Eggert <eggert@twinsun.com>
3241
3242 * NEWS, configure.in: Version 1.13.6.
3243
3244 * configure.in (ALL_LINGUAS): Add pt_BR.
3245 * po/pt_BR.po: New file.
3246
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.
3250
3251 * doc/tar.texi: Add -y and --bzip2.
3252 Patterns containing / now exclude only file names whose prefix match.
3253
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.
3262
3263 * po/POTFILES.in: Add lib/quotearg.c.
3264
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.
3271
3272 * src/common.h (LG_8, LG_64): New macros.
3273 (excluded_with_slash, excluded_without_slash): New vars.
3274 (excluded): Remove.
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,
3278 uintmax_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,
3281 UINTMAX_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.
3288
3289 * src/compare.c (diff_archive):
3290 Open files with O_NONBLOCK instead of O_NDELAY.
3291
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.
3306
3307 * src/extract.c (extract_archive):
3308 Open files with O_NONBLOCK instead of O_NDELAY.
3309
3310 * src/incremen.c (get_directory_contents):
3311 Inspect entire pathname, not just new file name
3312 component, when deciding whether to exclude it.
3313
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
3317 and base-64 values.
3318 (base64_map): New var.
3319 (base64_init): New function.
3320 (print_header): Output numeric uids and gids if numeric_owner_option.
3321
3322 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
3323
3324 * src/names.c (_GNU_SOURCE): Define.
3325 (<fnmatch.h>): Include unconditionally.
3326 (excluded_name): New function, taking over duties of excluded_pathname.
3327 All uses changed.
3328
3329 * src/rmt.c (decode_oflag): New function.
3330 (main): Use it to support symbolic open flags.
3331
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.
3336
3337 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
3338 New macros.
3339
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.
3348
3349 1999-07-20 Paul Eggert <eggert@twinsun.com>
3350
3351 * NEWS, configure.in: Version 1.13.5.
3352
3353 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
3354 before exiting.
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,
3359 for consistency.
3360
3361 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
3362 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
3363
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
3369 is not defined.
3370
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.
3374
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
3384 mkfifo exists.
3385
3386 * src/incremen.c (get_directory_contents): Depend on
3387 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
3388
3389 * src/list.c: Remove S_IS* ifdefs.
3390 * src/misc.c (maybe_backup_file): Likewise.
3391
3392 * src/misc.c (maybe_backup_file):
3393 "Virtual memory exhausted" -> "Memory exhausted",
3394 to conform to the other places this message is issued.
3395
3396 * src/mangle.c (extract_mangle):
3397 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
3398
3399 * src/rtapelib.c (rmt_open__):
3400 Remove typo that caused us to omit the first char
3401 of the basename.
3402
3403 1999-07-16 Paul Eggert <eggert@twinsun.com>
3404
3405 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
3406
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.
3418
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.
3424
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.
3431
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
3446 arithmetic ops.
3447
3448 * src/common.h (init_total_written): Remove decl.
3449
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.
3455
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.
3459
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
3462 known bit.
3463
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.
3468
3469 1999-07-14 Paul Eggert <eggert@twinsun.com>
3470
3471 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
3472
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.
3476
3477 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
3478 * PORTS, README, TODO, doc/tar.texi: Likewise.
3479
3480 1999-07-12 Paul Eggert <eggert@twinsun.com>
3481
3482 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
3483 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
3484
3485 * src/list.c (decode_header):
3486 Do not assume that S_IFBLK and S_IFCHR are defined.
3487
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.
3491
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.
3495
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
3501 special device.
3502
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.
3517
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.
3521
3522 1999-07-08 Paul Eggert <eggert@twinsun.com>
3523
3524 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
3525
3526 * configure.in (AC_EXEEXT): Add.
3527
3528 * lib/Makefile.am (noinst_HEADERS):
3529 Add basename.h, exclude.h. Remove full-write.h.
3530 (libtar_a_SOURCES): Add exclude.c.
3531
3532 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
3533 New files.
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.
3539
3540 * src/common.h:
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.
3545
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.
3550
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.
3555
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,
3561 check_exclude):
3562 Remove; now done in ../lib/exclude.c.
3563
3564 * src/tar.c (decode_options): Initialize `excluded'.
3565 Use new add_exclude_file and add_exclude functions.
3566
3567 1999-07-05 Paul Eggert <eggert@twinsun.com>
3568
3569 * m4/gettext.m4: Use changequote rather than [[ ]].
3570
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.
3579
3580 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
3581
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.
3585
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
3589 the above decl.
3590
3591 1999-07-02 Paul Eggert <eggert@twinsun.com>
3592
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,
3600 not AM_FUNC_MKTIME.
3601
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.
3605
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
3615 of #defines.
3616
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.
3623
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
3631 does this now.
3632 (from_oct): Cast ISSPACE arg to unsigned char.
3633
3634 * src/create.c (mode_to_oct): Translate modes from internal to
3635 external form.
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.
3640
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.
3648
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.
3652
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.
3656
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.
3663
3664 * src/create.c (dump_file): Do not invoke finish_sparse_file
3665 on a negative file descriptor.
3666
3667 * src/buffer.c: Add braces to pacify gcc -Wall.
3668
3669 * src/compare.c (diff_sparse_files): Report lseek errors.
3670
3671 * configure.in (ALL_LINGUAS): Add cs, es, ru.
3672
3673 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
3674
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.
3677
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.
3683
3684 * tests/after: Don't run two commands together in a pipeline,
3685 as some old shells mishandle pipeline exit status.
3686
3687 1999-06-28 Paul Eggert <eggert@twinsun.com>
3688
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.
3692
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):
3700 Likewise.
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.
3709
3710 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
3711 lib/xmalloc.c, src/arith.c, src/misc.c.
3712
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.
3719
3720 * src/rmt.c (private_strerror): Avoid const. Translate results.
3721
3722 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
3723 in the presence of NFS clock skew.
3724
3725 1999-06-25 Paul Eggert <eggert@twinsun.com>
3726
3727 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
3728
3729 * src/buffer.c (write_archive_buffer): New function.
3730 (child_open_for_compress, flush_write, flush_read): Use it to write
3731 buffers.
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.
3737
3738 * src/misc.c (remove_any_file):
3739 Don't terminate if you see . or ..; just skip them.
3740
3741 1999-06-18 Paul Eggert <eggert@twinsun.com>
3742
3743 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
3744
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
3753 to_oct is doing it.
3754
3755 1999-06-16 Paul Eggert <eggert@twinsun.com>
3756
3757 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
3758
3759 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
3760 @INTLLIBS@ might invoke rpl_realloc.
3761
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.
3771
3772 * tests/preset.in (echo_n, echo_c): Remove.
3773
3774 * tests/after: Don't rely on $echo_c and $echo_n.
3775
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.
3786
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
3798 realloc.
3799 (AC_OUTPUT): Add m4/Makefile.
3800
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.
3808
3809 * src/system.h (uintmax_t): Don't declare; configure now does this.
3810
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.
3814
3815 * src/misc.c (maybe_backup_file):
3816 Pass backup_type to find_backup_file_name.
3817
3818 * src/list.c (print_header): Change sizes of uform and gform from 11 to
3819 UINTMAX_STRSIZE_BOUND.
3820
3821 * doc/tar.texi: Remove --bzip2.
3822 Fix @xref typos reported by latest makeinfo.
3823
3824 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
3825 (SUBDIRS): Add m4.
3826 (M4DIR, ACINCLUDE_INPUTS): New macros.
3827 ($(srcdir)/acinclude.m4): New rule.
3828
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.
3832
3833 1999-05-15 Paul Eggert <eggert@twinsun.com>
3834
3835 * doc/tar.texi: Remove -y.
3836
3837 1999-04-09 Paul Eggert <eggert@twinsun.com>
3838
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.
3842
3843 * ABOUT-NLS: Update to gettext 0.10.35 edition.
3844
3845 1999-03-22 Paul Eggert <eggert@twinsun.com>
3846
3847 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
3848
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.
3853
3854 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
3855 New macros; needed for latest GNU xmalloc.c.
3856
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.
3864
3865 1999-03-20 Paul Eggert <eggert@twinsun.com>
3866
3867 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
3868
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
3871 changed.
3872 (AC_LFS): Simplify AIX revision number test.
3873
3874 1999-03-17 Paul Eggert <eggert@twinsun.com>
3875
3876 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
3877
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.
3882
3883 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
3884
3885 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
3886
3887 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
3888
3889 * tar.texi: Fix bug-report addr.
3890
3891 * README: Remove --with-included-malloc.
3892 Upgrade version numbers of build software.
3893
3894 1999-03-07 Paul Eggert <eggert@twinsun.com>
3895
3896 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
3897
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.
3907
3908 1999-03-01 Paul Eggert <eggert@twinsun.com>
3909
3910 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
3911
3912 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
3913
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.
3921
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.
3925
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.
3935
3936 * src/rmt.c (main): Remove suspicious AIX/386 code.
3937
3938 1999-02-19 Paul Eggert <eggert@twinsun.com>
3939
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.
3943
3944 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
3945
3946 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
3947 * doc/tar.texi: Add --bzip2, --unbzip2 options.
3948
3949 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
3950 Add.
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.
3961
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.
3966
3967 * config.guess, config.sub: New files; taken from automake 1.4.
3968
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.
3976
3977 1999-02-01 Paul Eggert <eggert@twinsun.com>
3978
3979 * src/tar.c: Update copyright.
3980
3981 * NEWS: 1.12.64004
3982
3983 1999-02-01 Paul Eggert <eggert@twinsun.com>
3984
3985 * NEWS, configure.in: Version 1.12.64004
3986
3987 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
3988
3989 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
3990
3991 * src/extract.c (extract_archive): Fix bug when extracting sparse
3992 files: they were trashing the tar file header.
3993
3994 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
3995 Add -y or --bzip2 or --bunzip2 option.
3996
3997 1999-01-30 Paul Eggert <eggert@twinsun.com>
3998
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.
4003
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.
4007
4008 1999-01-27 Paul Eggert <eggert@twinsun.com>
4009
4010 * NEWS, configure.in: Version 1.12.64003
4011
4012 * src/buffer.c (backspace_output, close_archive): Cast
4013 rmtlseek position arg to off_t, for benefit of K&R compilers
4014 with long long.
4015 * src/compare.c (verify_volume): Likewise.
4016
4017 * NEWS, configure.in: Version 1.12.64002
4018
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.
4025
4026 1999-01-25 Paul Eggert <eggert@twinsun.com>
4027
4028 * incremen.sh: Fix timing bug in regression test.
4029
4030 1999-01-22 Paul Eggert <eggert@twinsun.com>
4031
4032 * NEWS, configure.in: Update version
4033
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..
4038
4039 * Makefile.am (localedir): Change to $(datadir)/locale.
4040
4041 1999-01-21 Paul Eggert <eggert@twinsun.com>
4042
4043 * NEWS, README, configure.in: Unofficial version 1.12.64001.
4044
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..'.
4050
4051 * tests/incremen.sh: Fix timing bug.
4052
4053 1999-01-20 Paul Eggert <eggert@twinsun.com>
4054
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.
4058
4059 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
4060 mkinstalldirs, ansi2knr.c: Update to latest public versions.
4061
4062 Rebuild with automake 1.4 and autoconf 2.13, to work around some
4063 porting problems.
4064
4065 1998-12-07 Paul Eggert <eggert@twinsun.com>
4066
4067 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
4068
4069 * src/list.c (read_header):
4070 Accept file names as specified by POSIX.1-1996 section 10.1.1.
4071
4072 1998-11-30 Paul Eggert <eggert@twinsun.com>
4073
4074 * configure.in: Quote the output of uname.
4075
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.
4078
4079 1998-11-15 Paul Eggert <eggert@twinsun.com>
4080
4081 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
4082
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.
4085
4086 1998-10-28 Paul Eggert <eggert@twinsun.com>
4087
4088 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
4089
4090 * src/system.h (voidstar): Use void * if __STDC__ is defined,
4091 not merely nonzero.
4092
4093 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
4094 On many installations, rexec is disabled.
4095
4096 1998-08-07 Paul Eggert <eggert@twinsun.com>
4097
4098 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
4099
4100 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
4101 for nameless users and groups.
4102
4103 1998-02-17 Paul Eggert <eggert@twinsun.com>
4104
4105 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
4106 * NEWS, README: Add explanation of why this isn't an official version.
4107
4108 1998-02-02 Paul Eggert <eggert@twinsun.com>
4109
4110 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
4111 This is an unofficial version.
4112
4113 1997-12-17 Paul Eggert <eggert@twinsun.com>
4114
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.
4118
4119 1997-12-08 Paul Eggert <eggert@twinsun.com>
4120
4121 * src/system.h (ST_NBLOCKS): Fix typo in definition.
4122
4123 1997-11-19 Paul Eggert <eggert@twinsun.com>
4124
4125 * configure.in (HAVE_INTTYPES_H):
4126 Don't ignore cache variable if it's already set.
4127
4128 1997-11-10 Paul Eggert <eggert@twinsun.com>
4129
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.
4133
4134 1997-10-30 Paul Eggert <eggert@twinsun.com>
4135
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,
4140 ssize_t):
4141 New macros to configure.
4142 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
4143
4144 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
4145 major_t, minor_t, ssize_t): New macros.
4146
4147 * src/arith.h (TARLONG_FORMAT):
4148 Fix typo: %uld -> %lu. Use unsigned when long long
4149 (%lld -> %llu).
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.
4152
4153 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
4154 2nd arg is now unsigned long.
4155
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.
4159
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.
4167
4168 * src/update.c:
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.
4173
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.
4179
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.
4185
4186 (process_noop, process_rawdata, process_dumpdir, read_and_process):
4187 Size arg is now size_t.
4188
4189 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
4190 when allocating buffer.
4191
4192 * src/rtapelib.c:
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
4196 off_t.
4197
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.
4205
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.
4209
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.
4223
4224 * src/names.c (name_init):
4225 Fix typo in error message: FILE* was passed, but char*
4226 was wanted.
4227
4228 (read_name_from_file, name_gather, addname, name_match, name_scan,
4229 add_exclude): Use size_t when appropriate. Remove now-useless casts.
4230
4231 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
4232
4233 * src/extract.c (newdir_umask, current_umask): Now mode_t.
4234 (extract_sparse_file): Args now use off_t.
4235
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.
4240
4241 * src/misc.c (quote_copy_string):
4242 Use size_t when appropriate. Remove now-useless casts.
4243
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.
4249
4250 (read_header): Check for overflow when converting header size.
4251
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.
4259
4260 (stringify_uintmax_t_backwards): New function.
4261
4262 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
4263 (skip_file): Offset arg is now off_t.
4264
4265 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
4266 real_s_totsize, real_s_sizeleft, current_block_ordinal):
4267 Now off_t.
4268 (write_error): Arg is now ssize_t.
4269 (child_pid): Now pid_t.
4270 (available_space_after): Now size_t.
4271
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.
4277
4278 * src/delete.c (records_read): Now daddr_t.
4279 (move_archive): Arg is now daddr_t. Check for overflow when
4280 computing offset.
4281 (move_archive, delete_archive_members): Use daddr_t, off_t when
4282 appropriate. Remove now-useless casts.
4283
4284 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
4285 (rmt_lseek): Now returns off_t.
4286
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.
4293
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.
4298
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.
4306
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'.
4314 (nfs): New constant
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.
4321
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.
4341
4342 See ChangeLog.1 for earlier changes.
4343
4344
4345 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation,
4346 Inc.
4347
4348 This file is part of GNU tar.
4349
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)
4353 any later version.
4354
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.
4359
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.
This page took 0.253392 seconds and 4 git commands to generate.