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