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