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