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