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