]> Dogcows Code - chaz/tar/blob - ChangeLog
Update
[chaz/tar] / ChangeLog
1 2006-09-08 Sergey Poznyakoff <gray@gnu.org.ua>
2
3 * src/incremen.c (try_purge_directory): Initialize struct st. Fix
4 condition for selecting candidates for removal.
5 * README-alpha: List texinfo among build prerequisites for the CVS
6 version.
7
8 * bootstrap (intl_files_to_remove): Do not remove m4/inttypes-h.m4
9 and m4/inttypes-pri.m4
10
11 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
12
13 * bootstrap: Set XGETTEXT_OPTIONS to flag our printf-format functions,
14 so that translators are warned about strings that are formats but
15 don't look like formats. This might help prevent core dumps.
16 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
17 Suggested by Eric Blake to avoid problems like
18 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
19 (AM_GNU_GETTEXT_VERSION): Upgrade from 0.12.1 to 0.15. The gettext
20 manual says we should use the version number normally expected of
21 maintainers, neither more nor less.
22
23 * bootstrap (get_translations):
24 Don't exclude ky.po; it is working again.
25
26 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
27
28 * bootstrap (get_translations):
29 Don't exclude ja.po; it is working again.
30 Don't remove all old .po files if we're merely updating one.
31 * po/.cvsignore: Add Makevars.
32
33 2006-08-07 Paul Eggert <eggert@cs.ucla.edu>
34
35 * src/tar.c: Work around limitation imposed by gettext 0.15
36 by concatenating strings with "\v" after translation.
37 (doc): Remove, splitting into:
38 (doc0, doc1): New constants.
39 (argp): Don't use doc; just initialize to NULL.
40 (initialize_argp_doc): New function.
41 (decode_options): Use it.
42
43 * bootstrap: Redo po file retrieval to match Bison's method,
44 since the translation project changed its index format.
45 Don't use --assume-autoconf; it's now replaced
46 by looking in configure.ac.
47 (m4/codeset.m4, m4/intdiv.m4, m4/inttypes-pri.m4, m4/isc-posix.m4):
48 (m4/lcmessage.m4, m4/onceonly_2_57.m4, m4/gettext.m4, m4/glibc21.m4):
49 (m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4):
50 (m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4):
51 Don't rename to ..._gl.m4, as this is no longer needed.
52 (m4/geteext.m4): Patch to remove the need for intl/*.
53 Use autopoint manually, then remove the intl files,
54 then undo changes to gnulib files that autoreconf made,
55 and then run aclocal/autoconf/autoheader/automake.
56 This makes our bootstrap procedure closer to Bison's.
57 (po/Makevars): Generate automatically.
58 * configure.ac (AC_PREREQ): Update from 2.59 to 2.60.
59 (gl_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Remove.
60 * gnulib.modules: Add inttypes, stdint.
61 * lib/.cvsignore: Add close-stream.c, close-stream.h,
62 stdint.h, stdint_.h.
63 * po/Makefile: Remove; now automatically generated.
64
65 * src/incremen.c (read_incr_db_01): Check input strings more
66 carefully. Do not pass arbitrary char values to isspace, as
67 this has undefined behavior. Likewise for assigning arbitrary
68 uintmax_t values to other types.
69 (read_negative_num, read_unsigned_num, read_timespec):
70 New functions, to check input values a bit more carefuly.
71 (read_num): Use read_unsigned_num. New arg MAX_VAL;
72 all callers changed.
73 (read_incr_db_2): Use these new functions.
74 Use a consistent diagnostic for unexpected EOF.
75 (read_directory_file): Do not assign arbitrary uintmax_t value
76 to int.
77 (read_timespec, write_directory_file_entry, write_directory_file):
78 Handle negative time_t values correctly. We don't bother to do
79 this with pre-2 formats, since presumably the time stamps were
80 output incorrectly.
81
82 * src/tar.c (doc): Don't use \v in an argument to gettext;
83 gettext 0.15 rejects this.
84
85 2006-07-24 Sergey Poznyakoff <gray@gnu.org.ua>
86
87 * src/tar.c (decode_options): Do not require -L with -M -Hpax.
88 It could be needed in future, but currently it is not.
89 * src/create.c (to_chars_subst): Update comment regarding OLDGNU
90 vs. GNU format differences.
91 (mode_to_chars): Treat OLDGNU_FORMAT same as GNU_FORMAT. Fixes bug
92 reported by TAMUKI Shoichi <tamuki@linet.gr.jp>, which caused
93 equivalent `tar cf ...' and `tar rf ...' commands to produce
94 different archives.
95
96 * tests/append02.at: New test case
97 * tests/Makefile.am, tests/testsuite.at: Add append02.at
98
99 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
100
101 * bootstrap: Adjust to today's change to gnulib-tool by invoking
102 it with --assume-autoconf='latest-stable'.
103
104 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
105
106 Adjust to recent gnulib changes.
107 * lib/.cvsignore: Remove atexit.c, exit.c, getndelim2.c, getndelim2.h,
108 pathmax.h, paxconvert.c, paxerror.h, xstrdup.c.
109 Add inttypes.h, mktime.c, wcwidth.h, xstrndup.c, xstrndup.h.
110 * src/create.c (start_header): Adjust to API change to mode_adjust.
111
112 2006-07-09 Sergey Poznyakoff <gray@gnu.org.ua>
113
114 * THANKS: Add Ralf Wildenhues
115 * NEWS: Update
116
117 2006-07-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
118
119 * doc/dumpdir.texi, doc/snapshot.texi, doc/sparse.texi,
120 doc/tar.texi: Fix some typos.
121
122 2006-07-06 Sergey Poznyakoff <gray@gnu.org.ua>
123
124 tar --index-file=FILE --file=- sent the archive to FILE, and
125 the listing to stderr. Bug reported by Marcin Gryszkalis
126 <mg@fork.pl>
127
128 * src/buffer.c (_open_archive): Remove stdlis initialization
129 * src/tar.c (decode_options): Initialize stdlis
130 * tests/indexfile.at: New test case
131 * tests/testsuite.at: Include indexfile.at
132 * tests/Makefile.am (TESTSUITE_AT): Add indexfile.at
133
134 2006-07-05 Sergey Poznyakoff <gray@gnu.org.ua>
135
136 * doc/Makefile.am (manual): Fix TEXINPUTS
137 * doc/rendition.texi (FIXME): Do not use deprecated @quote-args.
138 Do not use @allow-recursion. In its current form the macro is not
139 recursive.
140
141 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
142
143 * bootstrap (update_po): Fix single translation update
144
145 2006-07-03 Sergey Poznyakoff <gray@gnu.org.ua>
146
147 * configure.ac (AC_CHECK_FUNCS): Check for getdtablesize
148 * src/common.h (closeopen): New function
149 * src/misc.c (chdir_arg): Use x2nrealloc to reallocate wd.
150 (get_max_open_files,closeopen): New functions
151 (chdir_do): Do not use save_cwd if it was already used more than
152 max_open_files-4 times to avoid running off the file
153 descriptors.
154 * src/tar.c (main): Call closeopen
155 * doc/tar.texi: Update --directory description
156 * NEWS: Update
157
158 2006-06-26 Sergey Poznyakoff <gray@gnu.org.ua>
159
160 * doc/tar.texi: Update. Add cross-references.
161 * doc/sparse.texi: Add cross-references.
162
163 2006-06-25 Sergey Poznyakoff <gray@gnu.org.ua>
164
165 * scripts/xsparse.c: A sample utility to expand sparse files
166 extracted by third-party tars. It is not meant to be installed nor
167 to be included in the distribution. It is here, so that it can be
168 obtained either from CVS or from the tar web site.
169 * doc/Makefile.am (tar_TEXINFOS): Sorted
170 * doc/tar.texi (Other Tars): New node describing how to extract
171 GNU-specific member formats using third-party tars.
172 * src/common.h (sparse_file_p): Remove
173 * src/sparse.c: Likewise
174 * src/create.c: Use ST_IS_SPARSE instead of sparse_file_p (update
175 paxutils first)
176 * src/tar.c: --sparse-version turns on --sparse
177
178 2006-06-24 Sergey Poznyakoff <gray@gnu.org.ua>
179
180 * src/buffer.c (print_total_stats): Add default case.
181 * src/common.h (name_init): New prototype.
182 (xheader_string_end): Return bool.
183 * src/extract.c (extract_volhdr): Add missing return
184 * src/incremen.c: Remove not used variables
185 * src/sparse.c (pax_dump_header_0): Return false if
186 xheader_string_end fails (for 0.1 formats).
187 (pax_dump_header): Return meaningful value
188 * src/transform.c (segm_count): Change type to size_t
189 * src/xheader.c (xhdr_tab.decoder): pass keyword as a second
190 argument. All callers changed.
191 (decode_record): Check for numeric overflow
192 (xheader_string_end): Return boolean value. Check for possible
193 numeric overflow
194
195 2006-06-23 Sergey Poznyakoff <gray@gnu.org.ua>
196
197 * doc/sparse.texi: New file
198 * doc/Makefile.am (tar_TEXINFOS): Add sparse.texi
199 * doc/intern.texi (Sparse Formats): New node
200 * doc/tar.texi: Update master menu
201
202 * src/common.h (tar_sparse_major,tar_sparse_minor): New globals.
203 * src/sparse.c: Implement sparse format versioning. Implement new
204 version (1.0) of PAX sparse format.
205 (pax_sparse_member_p): Fix condition
206 (pax_dump_header): A dispatcher function
207 (pax_dump_header_0,pax_dump_header_1): New functions.
208 (pax_optab): Update
209 (oldgnu_dump_header): Minor fix: make sure
210 sparse_header.isextended is set before calling
211 set_next_block_after
212 * src/tar.c: New option --sparse-version
213 * src/tar.h (struct tar_stat_info.sparse_major,sparse_minor): New
214 members.
215 * src/xheader.c: Implement new keywords: GNU.sparse.name,
216 GNU.sparse.major, GNU.sparse.minor, GNU.sparse.realsize
217
218 * tests/spmpv00.at, tests/spmvp01.at, tests/spmvp10.at: New
219 testcases.
220
221 * tests/Makefile.am: Add spmvp00.at, spmpv01.at, spmpv10.at
222 * tests/shortrec.at: Explicitely give `-f -' to the tar invocation
223 * tests/sparsemvp.at: Rewritten as an include file.
224 (TAR_MVP_TEST): New macro
225 * tests/testsuite.at: Include sparsemvp.at, spmvp00.at,
226 spmvp01.at, spmvp10.at
227
228 2006-06-21 Sergey Poznyakoff <gray@gnu.org.ua>
229
230 * doc/tar.texi (Overriding File Metadata): New node
231 Document --mtime option.
232 * src/common.h (set_mtime_option,mtime_option): New globals
233 * src/create.c (start_header): Override mtime if requested
234 * src/tar.c: Implement new option, --mtime, allowing to set
235 modification times for all archive members during creation.
236 (struct tar_args): textual_date_option replaced with a linked list
237 textual_date. All references updated.
238 (get_date_or_file,report_textual_dates): New functions.
239 * configure.ac: Raise version number to 1.15.92
240 * NEWS: Update
241
242 2006-06-20 Sergey Poznyakoff <gray@gnu.org.ua>
243
244 * src/common.h (struct name.explicit): Remove
245 Use variable names in all declarations
246 (name_scan): Remove second argument
247 * src/delete.c: Remove second argument from calls to name_scan
248 * src/update.c: Likewise
249 * src/incremen.c (procdir): Use is_individual_file to check for
250 files explicitely specified in the command line. Fixes bug
251 reported by Dat Head on 19 Jun 2006 (descending into mountpoints
252 with --one-file-system in use)
253 * src/misc.c (maybe_backup_file): Second argument is bool
254 * src/names.c (name_next_elt): Call register_individual_file
255 (namelist_match): Remove third argument
256 (name_match): Change return type to bool
257 (name_scan): Remove second argument
258 * src/sparse.c (pax_dump_header): Store original sparse file name
259 in GNU.sparse.name variable. The name field in the ustar header
260 now contains generated name (%d/GNUSparseFile.%p/%f), so that
261 non-pax-aware tars won't extract the file under the original
262 filename.
263 * src/xheader.c (GNU.sparse.name): New variable for storing sparse
264 file name.
265
266 2006-06-13 Sergey Poznyakoff <gray@gnu.org.ua>
267
268 * doc/Makefile.am (check-options): Expand macros before grepping
269 in $(info_TEXINFOS)
270 * doc/rendition.texi (FIXME) [!PROOF_FOOTNOTED]: Enclose in a
271 cartouche
272 * doc/tar.texi: Define op as codeindex. Use special macros to
273 populate it
274 Consequently prefer @dfn{long options} over @dfn{mnemonic
275 options}.
276 Document --unquote, --no-unquote
277 (Short Option Summary): Build a table of cross-references to the
278 corresponding long options.
279 (Using Multiple Tapes,Multi-Volume Archives): Rewritten
280
281 * doc/value.texi (xopindex,opsummary): New macros
282
283 * doc/Makefile.am (check-options): New goal
284 * doc/tar.texi: Update
285 * src/tar.c: Implement --overwrite-dir option (long ago
286 documented).
287
288 2006-06-12 Sergey Poznyakoff <gray@gnu.org.ua>
289
290 * doc/tar.texi: Document better the --totals option
291 * NEWS: Update
292 * src/buffer.c (total_blocks_deleted): New variable
293 (set_start_time): Set volume_start_time and last_stat_time as well
294 (set_volume_start_time): New function
295 (compute_duration): Do not call set_start_time, update
296 last_stat_time instead. Use it in calculation instead of
297 start_time, which is now set only once, upon startup.
298 (print_total_written): Removed.
299 (print_total_stats): New function for printing byte/speed statistics.
300 (_open_archive): Detect attempts to update compressed archives.
301 (_gnu_flush_write): Always update prev_written.
302 (open_archive): Call set_volume_start_time.
303 * src/common.h (volume_start_time,last_stat_time): New globals
304 (print_total_written): Replaced with:
305 (print_total_stats): New function
306 * src/delete.c (records_skipped): Remove static qualifier, the
307 variable is used by print_total_stats in buffer.c
308 * src/extract.c (check_time): Use volume_start_time when checking
309 for timestamp plausability.
310 * src/tar.c: (options, parse_opt): Allow for optional argument to
311 the --totals option, which specifies a signal upon delivery of which
312 the statistics must be output.
313 (main): Call print_total_stats if total_option is set.
314
315 2006-06-11 Sergey Poznyakoff <gray@gnu.org.ua>
316
317 * src/xheader.c (xheader_set_single_keyword): Fix typo.
318 (decode_time): Avoid using gotos.
319
320 * doc/mastermenu.el: New file
321 * doc/Makefile.am (master-menu): New goal
322 * doc/tar.texi: Update master menu
323
324 2006-06-10 Sergey Poznyakoff <gray@gnu.org.ua>
325
326 * doc/tar.texi: Remove leftover include
327
328 2006-06-09 Sergey Poznyakoff <gray@gnu.org.ua>
329
330 * doc/Makefile.am (tar_TEXINFOS): Add intern.texi
331 (EXTRA_DIST): Remove convtexi.pl, add texify.sed
332 * doc/intern.texi: New file
333 * doc/convtexi.pl: Remove
334 * doc/texify.sed: Auxiliary script to convert ../src/tar.h to
335 header.texi
336 * doc/rendition.texi: Fix typo
337 * doc/tar.texi: Update
338 * src/tar.h: Fix indentation, introduce end-of-format marker for
339 texify.sed
340
341 * THANKS: Add Jason Armistead
342 * doc/tar.texi: Update
343 * NEWS: Update
344 * src/buffer.c: Implement more flexible checkpoint style
345 * src/common.h (checkpoint_option): Change type to unsigned
346 (checkpoint_style): New variable.
347 * src/tar.c: --checkpoint takes an optional argument specifying
348 number of records between two successive checkpoints (proposed
349 by Jason Armistead on 2004-06-22). Optional dot starting the
350 argument means "print dots instead of textual checkpoints".
351 (tar_help): New function
352 * src/transform.c: Minor fixes.
353
354 2006-06-08 Sergey Poznyakoff <gray@gnu.org.ua>
355
356 * gnulib.modules: Add mkdtemp
357 * doc/dumpdir.texi: New file
358 * doc/Makefile.am (tar_TEXINFOS): Add dumpdir.texi
359 * doc/tar.texi: Document dumpdir format
360 * src/incremen.c (dumpdir_locate,obstack_code_rename):
361 (purge_directory): Re-implement renaming. Introduce
362 'X' control code.
363 (make_tmp_dir_name): Remove
364
365 * src/transform.c (set_transform_expr,_transform_name_to_obstack):
366 Implement NUMBER flag.
367 (add_char_segment): Fix length assignement
368
369 * doc/tar.texi: Update
370
371 2006-06-07 Sergey Poznyakoff <gray@gnu.org.ua>
372
373 * src/transform.c (transform_name_fp): Run fun even if
374 _transform_name_to_obstack returns false.
375 (_transform_name_to_obstack,set_transform_expr): Implement GNU
376 extension case conversion operations.
377
378 * doc/tar.texi (transform): Document the option.
379
380 2006-06-02 Sergey Poznyakoff <gray@gnu.org.ua>
381
382 * NEWS: Update
383 * src/common.h (set_transform_expr): New function
384 * tests/Makefile.am: Add incr04.at
385 * tests/testsuite.at: Likewise
386 * tests/incr04.at: New test case
387 * tests/long01.at: Fix typo in the comment
388 * tests/multiv04.at: Use genfile --files-from
389
390 (Above changes need new genfile.c from paxutils)
391
392 * TODO: Update
393 * NEWS: Update
394 * doc/tar.texi: Update
395 * src/transform.c: New file
396 * src/Makefile.am (tar_SOURCES): New module transform.c
397 * src/common.h (transform_name, transform_name_fp): New functions
398 (show_stored_names_option): Renamed to
399 show_transformed_names_option. All uses changed
400 * src/create.c (dump_file0): Transform file name
401 * src/extract.c (extract_archive): safer_name_suffix and
402 stripped_prefix_len are now called by decode_header
403 * src/list.c (print_header): Update displayable name selection.
404 * src/tar.c: New option --transform
405 New option --show-transformed-names generalizes
406 --show-stored-names. The latter is retained as an alias.
407
408 2006-05-31 Sergey Poznyakoff <gray@gnu.org.ua>
409
410 * src/incremen.c (make_directory): Fix initialization of struct
411 directory.
412
413 2006-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
414
415 * doc/tar.texi: Document use of globbing patterns.
416 * src/tar.c (parse_opt): Add comment before --preserve case.
417
418 2006-05-24 Sergey Poznyakoff <gray@gnu.org.ua>
419
420 * NEWS: Update
421 * doc/tar.texi: Update
422 * configure.ac (AM_INIT_AUTOMAKE): Use tar-ustar option. Raise
423 version requirement to 1.9
424 * src/common.h (struct name): Refactured
425 (warn_regex_usage): New variable.
426 (dump_file): First argument is const char*.
427 (name_init,name_add): Removed
428 (name_add_name,name_add_dir): New functions
429 (name_next): Return const char*.
430 * src/create.c: (dump_file,dump_file0): First argument is const
431 char*. All callers updated.
432 * src/names.c: Rewritten handling of member names in the command
433 line. Tar no longer attempts to guess globbing patterns, instead
434 it relies on --wildcard option.
435 (init_names): Removed.
436 (struct name_elt): New structure.
437 (name_array): Change type to struct name_elt. All references updated
438 (name_add_name,name_add_dir): New functions
439 (name_next_elt): New function
440 (name_next): Rewritten using name_next_elt.
441 (namelist_match): Rewritten pattern matching using
442 exclude_fnmatch.
443 (names_notfound): Warn if globbing patterns were used without
444 --wildcards option
445 * src/tar.c (options): Move globbing-related options into a
446 separate group. Set -l as an alias to --check-links, as required
447 by UNIX98
448 (struct tar_args): New fields
449 wildcards,matching_flags,include_anchored
450 (MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS): New macros
451 (parse_opt): Use x2nrealloc to grow archive_name_array.
452 Use MAKE_EXCL_OPTIONS,MAKE_INCL_OPTIONS to create appropriate
453 fnmatch options, and name_add_name,name_add_dir to handle member
454 name and -C arguments.
455 (decode_options): Likewise
456 (main): Remove call to init_names.
457
458 * tests/append.at, tests/append01.at, tests/extrac01.at,
459 tests/options.at, tests/options02.at, tests/same-order01.at,
460 tests/same-order02.at: Make AT_SETUP more readable.
461
462 2006-05-23 Sergey Poznyakoff <gray@gnu.org.ua>
463
464 * src/buffer.c (change_tape_menu): Fix typo (uninitialized
465 variable) introduced yesterday.
466
467 2006-05-22 Sergey Poznyakoff <gray@gnu.org.ua>
468
469 * doc/tar.texi: Use @var{file_name} instead of @var{file name}
470 * src/buffer.c (change_tape_menu): Break the loop after obtaining
471 new archive name. Check for empty input line.
472
473 2006-05-15 Sergey Poznyakoff <gray@gnu.org.ua>
474
475 * tests/atlocal.in (XFAILFILE): New variable
476 * tests/version.at: Create $XFAILFILE on failure
477 * tests/testsuite.at (AT_TAR_CHECK): Declare expected failure if
478 $XFAILFILE exists.
479
480 2006-05-13 Sergey Poznyakoff <gray@gnu.org.ua>
481
482 * THANKS: Update
483 * src/buffer.c (read_header0): Use read_header_primitive to avoid
484 clubbering current_tar_info. All callers updated.
485 * src/common.h (read_header_primitive): New function
486 * src/extract.c (extract_volhdr): New function
487 (prepare_to_extract): Use extract_volhdr as extractor for volume
488 names.
489 * src/list.c (read_header_primitive): New function
490 (read_header): Front end for read_header_primitive
491 * tests/chtype.at: New file
492 * tests/volsize.at: New file
493 * tests/Makefile.am (TESTSUITE_AT): Add chtype.at, volsize.at
494 (check-full): New target.
495 * tests/atlocal.in (TEST_DATA_URL,STAR_DATA_URL)
496 (STAR_TESTSCRIPTS): Provide default values.
497 (tarball_prereq): New function
498 * tests/testsuite.at (AT_TARBALL_PREREQ): New defun
499 (AT_STAR_PREREQ): Rewrite using tarball_prereq
500 Include chtype.at and volsize.at
501 * tests/volume.at: Add keywords.
502
503 * tests/star/gtarfail.at, tests/star/gtarfail2.at,
504 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
505 tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at
506 (AT_STAR_PREREQ): Provide md5 sum.
507
508 * lib/.cvsignore: Update
509
510 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
511
512 * tests/testsuite.at (AT_SORT_PREREQ, AT_UNPRIVILEGED_PREREQ): New
513 defines
514
515 * tests/extrac04.at, tests/incr03.at, tests/listed02.at,
516 tests/pipe.at, tests/rename01.at, tests/rename02.at,
517 tests/rename03.at, tests/same-order01.at: Call
518 AT_SORT_PREREQ. Remove fd 2 redirection after calls to sort
519 * ignfail.at: Call AT_UNPRIVILEGED_PREREQ
520
521 2006-05-08 Sergey Poznyakoff <gray@gnu.org.ua>
522
523 Listed incremental backups: keep more information about
524 directories. Handle renamed directories more effectively
525 (initial implementation, more updates to follow).
526 Source tree before this point is tagged
527 alpha_1_15_90_incremental_1.
528
529 * NEWS: Update
530 * configure.ac: Raise version number to 1.15.91
531 * src/common.h (rename_directory,append_incremental_renames): New
532 functions.
533 * src/extract.c (rename_directory): New function
534 * src/incremen.c (struct directory.contents, flags): New members
535 (nfs,found,new): Remove. Replaced by appropriate bitmask values in
536 `flags' field. All uses updated.
537 (directory_meta_table): New table.
538 (hash_directory): Rename to hash_directory_name
539 (compare_directories): Rename to compare_directory_names
540 (hash_directory_meta,compare_directory_meta,find_directory_meta):
541 New functions
542 (compare_dirents): Removed
543 (note_directory): Get 7th argument: directory contents.
544 All callers updated
545 (dumpdir_locate,makedumpdir): New functions
546 (scan_directory): Rewritten. Use makedumpdir to create a sorted
547 dumpdir array. This makes the obstack argument unnecessary. Besides,
548 ALL_CHILDREN flag is set only for new directories.
549 (procdir): Change return type to struct directory. Return
550 immediately if the directory was already initialized. Discover
551 directory renames using directory_meta_table.
552 (append_incremental_renames): New function.
553 (read_directory_file, write_directory_file): Use new snapshot file
554 format.
555 * src/names.c (collect_and_sort_names): Update dir_contents of the
556 first non-fake name entry when in listed incremental mode.
557
558 * tests/incr03.at: New testcase
559 * tests/rename01.at: New testcase
560 * tests/rename02.at: New testcase
561 * tests/rename03.at: New testcase
562 * tests/Makefile.am: Add
563 incr03.at,rename01.at,rename02.at,rename03.at
564 * tests/testsuite.at: Likewise.
565 * tests/listed02.at: Update for the new behavior
566 * tests/multiv04.at (AT_KEYWORDS): Add missing incremental kw.
567
568 2006-05-02 Sergey Poznyakoff <gray@gnu.org.ua>
569
570 * src/buffer.c (try_new_volume): Attempt to continue if the name
571 is apparently truncated in a GNU format volume.
572
573 * tests/comprec.at, tests/delete01.at, tests/delete02.at,
574 tests/delete04.at, tests/delete05.at, tests/extrac05.at,
575 tests/listed01.at, tests/multiv01.at, tests/multiv02.at,
576 tests/pipe.at, tests/same-order01.at, tests/same-order02.at,
577 tests/sparse01.at, tests/sparse03.at: Always use genfile --file,
578 this enables extra error checking.
579
580 * tests/multiv03.at: Attempt to extract a member with truncated
581 file name from the archive.
582
583 * src/buffer.c (_open_archive): Remove unnecessary argument to
584 check_compressed_archive.
585
586 2006-04-25 Sergey Poznyakoff <gray@gnu.org.ua>
587
588 * tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
589 tests/sparsemv.at, tests/sparsemvp.at: Skip the test if the file
590 system does not support sparse files.
591 * doc/tar.texi (@copying): Remove the reference to not existing
592 invariant section.
593
594 2006-04-11 Sergey Poznyakoff <gray@gnu.org.ua>
595
596 * src/extract.c (extract_dir): Fix toggling existing directory
597 permissions (Debian bug #361077). Use parts of patch provided by
598 Ian Jackson <iwj@ubuntu.com>.
599 * src/compare.c: Minor changes
600 * src/incremen.c (directory.new): New member
601 (note_directory,find_directory: Use make_directory to create
602 struct directory entries
603 (procdir): Avoid duplicating directories in the incremental
604 backup map.
605 * tests/Makefile.am (TESTSUITE_AT): Add extrac06.at
606 * tests/testsuite.at: Include extrac06.at
607
608 2006-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (trivial change)
609
610 * tests/atlocal.in (PATH): Add build-aux from the source tree,
611 not the build tree.
612
613 2006-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
614
615 * THANKS: Add Benno Schulenberg
616
617 2006-03-13 Jim Meyering <jim@meyering.net>
618
619 * tests/listed02.at: Sort the two lines of stderr from the
620 first `tar -v --listed-incremental'. They would come out
621 reversed and provoke a test failure on a tmpfs
622 file system.
623
624 2006-03-13 Benno Schulenberg <benno@nietvergeten.nl>
625
626 * doc/tar.texi: Minor fixes.
627 * src/tar.c (options): Consistently begin help messages with a
628 lowercase letter.
629
630 2006-03-12 Sergey Poznyakoff <gray@gnu.org.ua>
631
632 * tests/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR
633
634 2006-03-07 Paul Eggert <eggert@cs.ucla.edu>
635
636 * src/buffer.c (record_buffer_aligned): New var.
637 (init_buffer): Use it to ensure that the buffer is aligned.
638 This doesn't result in any measurable performance improvement
639 on my host (Debian GNU/Linux 3.1 stable, with default block size),
640 but I assume it does help on some hosts.
641
642 * lib/.cvsignore: Sort.
643
644 2006-03-04 Sergey Poznyakoff <gray@gnu.org.ua>
645
646 * tests/shortrec.at: Use -f - to read from stdin.
647
648 2006-02-21 Sergey Poznyakoff <gray@gnu.org.ua>
649
650 * doc/tar.texi: Fix typo: --to-command instead of --to-program
651
652 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
653
654 * tests/multiv04.at (split directory members in a MV archive):
655 Don't use %X in an awk printf format; this doesn't work with
656 Solaris 10 /usr/bin/awk. Use %x instead.
657
658 2006-02-20 Sergey Poznyakoff <gray@gnu.org.ua>
659
660 * src/create.c (split_long_name): Fix maximum length estimation.
661 Patch by Jim Lowe.
662 * tests/Makefile.am (lustar01.at,lustar02.at,lustar03.at): New
663 tests.
664 * tests/atlocal.in: Add build-aux to the PATH
665 * tests/long01.at: Remove mkhier, use AT_TAR_MKHIER instead
666 * tests/longv7.at: Reword test title
667 * tests/lustar01.at: New test
668 * tests/lustar02.at: New test
669 * tests/lustar03.at: New test
670 * tests/testsuite.at (AT_TAR_MKHIER): New macro
671 (lustar01.at,lustar02.at,lustar03.at): New tests.
672
673 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
674
675 * bootstrap: Don't claim lib/Makefile.am is generated automatically
676 from itself.
677
678 Avoid installation glitches on Solaris 8 with Sun C 5.4.
679 * lib/.cvsignore: Add system-ioctl.h.
680 * lib/Makefile.tmpl (noinst_HEADERS): Add system-ioctl.h.
681 * src/buffer.c: Include system-ioctl.h.
682 * src/compare.c: Likewise.
683 * src/delete.c: Likewise.
684 * src/system.c: Include <getline.h>, <setenv.h>.
685 * src/tar.c: Include <getline.h>.
686
687 2006-02-19 Sergey Poznyakoff <gray@gnu.org.ua>
688
689 * src/buffer.c (add_chunk_header): Free st.orig_file_name after
690 calling finish_header().
691 (new_volume): Prompt the user for archive name if unable to open
692 next archive.
693
694 * src/create.c (dump_file0): Restore file_count_links,
695 accidentally removed on 2005-11-29.
696 * configure.ac: Raise version number to 1.15.90
697 * NEWS: Likewise.
698
699 2006-02-08 Sergey Poznyakoff <gray@gnu.org.ua>
700
701 * src/tar.c (tar_set_quoting_style): Provide second argument to
702 the format spec: program_invocation_short_name. Reported by Jim
703 Meyering.
704
705 2006-02-07 Paul Eggert <eggert@cs.ucla.edu>
706
707 * gnulib.modules: Add closeout, exitfial.
708 * lib/.cvsignore: Add __fpending.c, __fpending.h, closeout.c,
709 closeout.h.
710 * src/buffer.c: Incluse closeout.h.
711 (_open_archive): Use freopen rather than fopen, so
712 that stdlis is always either stdout or stderr. Use
713 close_stdout_set_file_name to report its name.
714 * src/tar.c: Include closeout.h and exitfail.h.
715 (parse_opt, usage): Call close_stdout as appropriate, to check for
716 write errors.
717 (decode_options): Exit with status TAREXIT_FAILURE, not 1.
718 (main): Set exit_failure, to exit with proper status on memory
719 allocation failure and the like.
720 Use close_stdout rather than rolling our own test.
721
722 * NEWS: --version now outputs copyright etc., to conform to the
723 GNU coding standards. Remove --license.
724 * gnulib.modules: Add version-etc-fsf.
725 * doc/tar.texi: Document the change.
726 * lib/.cvsignore: Add version-etc-fsf.c, version-etc.c, version-etc.h.
727 * scripts/Makefile.am (SED_CMD): Update PAKCAGE_NAME, not PACKAGE.
728 * scripts/backup.in: Remove --license. Change --version to conform
729 to GCS.
730 * scripts/restore.in: Likewise.
731 * scripts/backup.sh.in (license): Output briefer license in the
732 style of coreutils, for consistency with other changes.
733 * src/tar.c: Include <version-etc.h>.
734 (LICENSE_OPTION): Remove.
735 (options): Remove --license.
736 (license): Remove.
737 (parse_opt): Use version_etc instead of rolling it ourselves.
738 Remove --license.
739 * tests/version.at (tar --version): Check only the first line of
740 output.
741
742 * ChangeLog, NEWS, src/common.h, src/extract.c, src/incremen.c:
743 * src/list.c, src/names.c, src/tar.h, src/xheader.c:
744 Update copyright year to 2006.
745
746 2006-02-07 Jim Meyering <jim@meyering.net>
747
748 * src/xheader.c (sparse_map_decoder): Fix misleading diagnostic.
749
750 2006-01-31 Sergey Poznyakoff <gray@gnu.org.ua>
751
752 * src/common.h (get_gnu_dumpdir): Remove prototype
753 (is_dumpdir): New function
754 * src/extract.c (prepare_to_extract): Use is_dumpdir member to
755 check for dumpdirs.
756 * src/incremen.c (get_gnu_dumpdir): Static
757 (is_dumpdir): New function
758 (purge_directory): Use is_dumpdir
759 * src/list.c (list_archive): Use is_dumpdir
760 Do not wrap skip_member in mv_begin/mv_end, the function itself
761 takes care of it.
762 (decode_header): Set stat_info->is_dumpdir
763 (skip_member): Do nothing if skipped is true
764 * src/tar.h (struct tar_stat_info): New members is_dumpdir and skipped.
765
766 2006-01-22 Sergey Poznyakoff <gray@gnu.org.ua>
767
768 * src/tar.c (decode_options): Refuse using --delete with
769 compression options.
770
771 2006-01-18 Sergey Poznyakoff <gray@gnu.org.ua>
772
773 * NEWS: Updated.
774 * configure.ac (DEFAULT_QUOTING_STYLE): New configuration variable
775 * doc/tar.texi: Initial documentation for --quoting-style,
776 --quote-chars and --no-quote-chars option.
777 * src/tar.c: Implement new options --quoting-style, --quote-chars
778 and --no-quote-chars.
779
780 2006-01-09 Paul Eggert <eggert@cs.ucla.edu>
781
782 * bootstrap: Default to pserver, and switch to cvs.sv.gnu.org,
783 to accommodate recent changes to the GNU CVS server.
784 * lib/.cvsignore: Add argp-pin.c, mkdirat.c, openat-priv.h.
785
786 2005-12-14 Sergey Poznyakoff <gray@gnu.org.ua>
787
788 * src/names.c (name_scan): Take an additional argument requesting
789 exact matching.
790 * src/common.h (name_scan): Change prototype.
791 * src/delete.c, src/incremen.c, src/update.c: Update invocations
792 of name_scan.
793
794 2005-12-13 Sergey Poznyakoff <gray@gnu.org.ua>
795
796 * src/common.h (struct name): New member `explicit'. Remove unused
797 member `isdir'.
798 * src/incremen.c (procdir): If name_scan() returns something,
799 check if it was explicitely given in the command line
800 * src/names.c (addname,add_hierarchy_to_namelist): Initialize
801 explicit member appropriately.
802
803 * src/incremen.c (procdir): If --one-file-system is given and a
804 directory is found to be on another device, *and* this directory
805 is explicitely given in the command line, then do not omit it.
806
807 2005-12-11 Sergey Poznyakoff <gray@gnu.org.ua>
808
809 * NEWS: Update
810 * doc/tar.texi: Document --delay-directory-restore option.
811 (Configuring Help Summary): Document usage of ARGP_HELP_FMT
812 variable to customize help output.
813 * src/common.h (delay_directory_restore_option): New global.
814 * src/extract.c (directories_first): Replaced by
815 delay_directory_restore_option. All uses changed.
816 * src/tar.c (options,parse_opt): New options
817 --delay-directory-restore and --no-delay-directory-restore
818
819 2005-12-09 Sergey Poznyakoff <gray@gnu.org.ua>
820
821 * src/buffer.c (open_archive): Add default case to shut up gcc.
822 * src/common.h (set_file_atime): Add prototype.
823 * src/create.c (to_chars_subst): Remove unused variable
824 Make sure useful result code is returned.
825 * src/incremen.c (read_directory_file): Fix format string
826 Thanks Eric Blake for reporting.
827
828 2005-12-08 Sergey Poznyakoff <gray@gnu.org.ua>
829
830 * doc/tar.texi (Current status): Renamed to 'Changes' and moved to
831 appendices.
832 (Large or Negative Values): Rewritten
833 * src/common.h (gid_to_chars, major_to_chars, minor_to_chars)
834 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
835 (uid_to_chars, uintmax_to_chars): Return bool
836 * src/create.c (gid_to_chars, major_to_chars, minor_to_chars)
837 (mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
838 (uid_to_chars, uintmax_to_chars): Return bool
839 (to_chars): Return bool
840 (start_header): Check return values of convertion routines. Fail
841 if unable to store data in the header.
842
843 2005-12-07 Sergey Poznyakoff <gray@gnu.org.ua>
844
845 * doc/tar.texi: Following the discussion with Karl Berry,
846 discontinue using @value{} substitutions for Texinfo commands.
847 Properly index all long options. Print a
848 separate long option index.
849 * doc/value.texi: Remove @set's
850
851 * doc/tar.texi: Update --info-script documentation
852 Resolve some more FIXMEs.
853 * scripts/dump-remind.in: Use TAR_VOLUME instead of reading volno
854 file.
855 * src/buffer.c (new_volume): Update invocation
856 (change_tape_menu): New function. Disable '!' command if given
857 --restrict option.
858 * src/common.h (sys_exec_info_script): Update declaration
859 (restrict_option): New global
860 * src/system.c (sys_exec_info_script): The script can supply new
861 archive name to use by writing it to file descriptor 3.
862 * src/tar.c (options): Add --restrict option. Use macros for
863 option grouping.
864 (license): Print full list of copyright years
865 * NEWS: Update
866
867 2005-12-06 Eric Blake <ebb9@byu.net> (trivial changes)
868
869 * configure.ac (DENSITY_LETTER): Fix m4 overquoting.
870 * .cvsignore: Ignore .bootstrap.
871
872 2005-12-06 Sergey Poznyakoff <gray@gnu.org.ua>
873
874 * doc/tar.texi: Document --to-command and --info-script
875 options. Add missing xrefs.
876 * src/buffer.c (new_volume): Use sys_exec_info_script() instead of
877 system().
878 * src/common.h (archive_format_string,subcommand_string)
879 (sys_exec_info_script): New prototypes.
880 * src/system.c (sys_exec_info_script): New function.
881 * src/tar.c (archive_format_string): Remove static qualifier.
882 (subcommand_string): New function.
883
884 2005-12-01 Sergey Poznyakoff <gray@gnu.org.ua>
885
886 * src/extract.c: Fix restoring of directory timestamps from
887 incremental archives.
888 (directories_first): New variable.
889 (prepare_to_extract): Set directories_first
890 (extract_archive): Call apply_nonancestor_delayed_set_stat() only
891 if not extracting from an incremental archive
892 (extract_dir): Obtain root_device here, to make sure it works
893 correctly with -C.
894
895 * src/incremen.c (purge_directory): Skip the member and return if
896 the archive is not in incremental format.
897 * tests/incr02.at: New testcase
898 * tests/Makefile.am: Add incr02.at
899 * tests/testsuite.at: Likewise
900
901 * THANKS: Add Guerkan Karaman.
902 * NEWS: Update
903
904 2005-11-30 Paul Eggert <eggert@cs.ucla.edu>
905
906 * doc/tar.texi (Option Summary): Rewrite the
907 --atime-preserve=system description in response to Ian Turner's
908 proposed patch.
909
910 2005-11-30 Ian Turner <ian@zmanda.com>
911
912 * doc/tar.texi (Extracting Specific Files): Remove obsolescent
913 FIXME.
914
915 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
916
917 * NEWS: New option --atime-preserve=system, which uses O_NOATIME.
918 * THANKS: Add Ian Turner.
919
920 * configure.ac: Prefer AC_CHECK_HEADERS_ONCE to AC_CHECK_HEADERS.
921 Check for stropts.h and sys/filio.h too, for _FIOSATIME.
922 * doc/tar.texi: Change "modification time" to "data modification
923 time", "change time" to "status change time", and "filesystem" to
924 "file system", so that we use terminology consistent with POSIX.
925 Use American spacing rather than French for sentence ends.
926 "non-dependable" -> "undependable".
927 (Option Summary, Attributes): Explain better the pitfalls of the
928 --atime-preserve option, and suggest read-only mounts,loopback
929 mounts, and noatime mounts for older systems.
930 * doc/value.texi (op-atime-preserve-system): Renamed from
931 op-atime-preserver-system to fix a misspelling.
932 * src/common.h (enum atime_preserve): Use lower case for enum values.
933 * src/compare.c: Don't include utimens.h; no longer needed.
934 (diff_file): Use set_file_atime rather than utimens; avoid closing
935 diff_handle until after this, so that we can set the file time stamp
936 via the file descriptor rather than via its name.
937 * src/create.c: Don't include utimens.h; no longer needed.
938 (dump_regular_finish): Remove. All callers now do its work inline.
939 (dump_dir): New arg FD. All callers changed.
940 Use fdsavedir rather than savedir.
941 (unknown_file_error): Arg is a const pointer now.
942 (dump_file0): 2nd arg is a const pointer now.
943 Treat directories more like files, with respect to --atime-preserve.
944 For example, also warn if a directory changes while we are dumping it.
945 Prefer file descriptors to file names when retrieving/setting file
946 attributes; this saves path-resolution time and allows us to avoid
947 changing mtime/ctime on Solaris when restoring atime as root.
948 Use O_DIRECTORY when opening directories, to avoid some race conditions.
949 Do not reset atime if mtime has changed. Report an error if
950 we cannot reset atime.
951
952 * lib/.cvsignore: Add malloc.h, regcomp.c, regex.c, regex.h,
953 regex_internal.c, regex_internal.h, regexc.c; used by rpmatch.
954
955 2005-11-29 Ian Turner <ian@zmanda.com>
956
957 First cut at adding support for --atime-preserve=system.
958 * doc/tar.texi (Option Summary): First cut at documenting it.
959 All other uses of --atime-preserve changed to --atime-preserve=replace.
960 * doc/value.texi (op-atime-preserve-replace, op-atime-preserver-system):
961 New.
962 (op-atime-preserve): Mention METHOD.
963 * src/common.h (atime_preserve): New enum.
964 (atime_preserve_option): Now of the enum type rather than bool.
965 All uses changed.
966 * src/compare.c (diff_file): Read with O_NOATIME if asked for.
967 * src/create.c (dump_file0): Read regular and CTG files with O_NOATIME
968 if asked for.
969 * src/tar.c (usage): Mention new usage.
970 (parse_opt): Parse new usage.
971
972 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
973
974 * THANKS: Convert back to UTF-8, sort (using LC_ALL=C on Debian
975 stable), and consistently use tabs rather than spaces.
976
977 2005-11-27 Sergey Poznyakoff <gray@gnu.org.ua>
978
979 * src/xheader.c: Remove parts of code prematurely introduced
980 yesterday. Thanks Eric Blake.
981
982 2005-11-26 Sergey Poznyakoff <gray@gnu.org.ua>
983
984 * src/xheader.c (xheader_format_name): Fix memory leak.
985
986 2005-11-11 Sergey Poznyakoff <gray@gnu.org.ua>
987
988 * gnulib.modules: Add rpmatch
989 * lib/stdopen.h, lib/stdopen.c: New file. Imported from coreutils.
990 * lib/Makefile.tmpl: Add stdopen.h, stdopen.c
991 * po/POTFILES.in: Add rpmatch.c
992 * src/tar.c (confirm): Rewritten using rpmatch.
993 (decode_options): Minor optimizations
994 (main): Call stdopen() to ensure the first three descriptors are
995 open.
996
997 * tests/multiv01.at, tests/multiv02.at, tests/multiv03.at,
998 tests/multiv04.at, tests/sparsemv.at, tests/sparsemvp.at,
999 tests/star/multi-fail.at: Close stdin so that if something fails
1000 causing tar to ask for the next volume, it won't hang the
1001 testsuite.
1002
1003 * src/buffer.c (flush_write,flush_read): Change data type.
1004 (flush_archive): Compute actual buffer fill level before calling
1005 low level function.
1006 (close_archive): Call flush_archive again if the first call
1007 resulted in partially filled buffer.
1008 (try_new_volume): Rewritten handling of initial headers.
1009 (add_chunk_header): New function. Write an additional header
1010 before the continuation chunk. The purpose of the header is to
1011 allow third-party tars to extract the member.
1012 (simple_flush_write): Take an argument.
1013 (_gnu_flush_write): Correctly handle partially filled buffers.
1014 * src/common.h (flush_read,flush_write): Functions, again.
1015 (write_extended): Changed declaration
1016 (xheader_format_name): New declaration
1017 * src/create.c (write_extended): Change type and meaning of
1018 the first argument. All callers updated
1019 * src/xheader.c (xheader_format_name): Remove static
1020 qualifier. Change last argument.
1021 Correct buffer size calculation (allocated too much space).
1022 (xheader_write): Increase global_header_count here ...
1023 (xheader_write_global): ... instead of here
1024
1025 * tests/testsuite.at (AT_TAR_CHECK): Define TEST_TAR_FORMAT
1026 * tests/multiv01.at: Update
1027 * tests/multiv02.at: Update
1028 * tests/multiv03.at: Update
1029 * tests/sparsemvp.at: Update
1030 * tests/star/multi-fail.at: Update
1031
1032 * scripts/tarcat: Handle archives in pax format. Improve handling
1033 of traditional archives.
1034 * doc/tar.texi (Tarcat): New node
1035
1036 2005-11-10 Sergey Poznyakoff <gray@gnu.org.ua>
1037
1038 Fix splitting of sparse files between the volumes.
1039
1040 * src/buffer.c (try_new_volume): Bugfix. Always check
1041 continued_file_name. If it is absent, the volume is out
1042 of sync.
1043 (add_multi_volume_header): Create GNU.volume.filename keyword in
1044 the extended header.
1045 * src/sparse.c (sparse_dump_region): Call mv_size_left.
1046 (sparse_dump_file): Enclose the loop in mv_begin/mv_end.
1047 * src/system.c: Do not pad compressed output if it goes to
1048 stdout.
1049 * src/xheader.c (xhdr_tab): New keyword GNU.volume.filename.
1050
1051 * tests/sparsemv.at: New testcase
1052 * tests/sparsemvp.at: New testcase
1053 * tests/Makefile.am: Add sparsemv.at and sparsemvp.at.
1054 * tests/testsuite.at: Likewise.
1055
1056 2005-11-09 Sergey Poznyakoff <gray@gnu.org.ua>
1057
1058 * src/buffer.c: Rewritten in a more modular fashion to provide
1059 GNU extensions (multi-volume archives and archive labels) in
1060 pax format.
1061 NOTICE, that some of the aspects (e.g. splitting the archive
1062 on the extended header boundary) are still not solved, others
1063 (splitting a sparse file between the volume) require additional
1064 testing. Wait for the next commit.
1065
1066 (volume_label,continued_file_name,continued_file_size)
1067 (continued_file_offset): New globals.
1068 (save_name,save_totsize,save_sizeleft): Make static
1069 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
1070 (open_archive,flush_write,flush_read): Rewritten
1071
1072 * src/common.h (save_name,save_sizeleft,save_totsize): Remove
1073 globals.
1074 (volume_label,continued_file_name,continued_file_size): New
1075 variables.
1076 (flush_read,flush_write): Pointers to functions
1077 (mv_begin,mv_end,mv_total_size,mv_size_left): New functions
1078 (write_extended): New function.
1079
1080 * src/compare.c, src/create.c, src/extract.c, src/incremen.c,
1081 src/list.c: Use mv_.* functions uniformly instead of fiddling
1082 with the global variables.
1083 * src/sparse.c: Use mv_.* functions where necessary.
1084 * src/tar.c (decode_options): Allow to use --multi-volume and
1085 --label with pax archives.
1086 * src/xheader.c (xhdr_tab): Support for new GNU keywords.
1087
1088 * tests/delete01.at, tests/delete02.at, tests/delete03.at,
1089 tests/delete04.at, tests/delete05.at, tests/extrac01.at,
1090 tests/extrac02.at, tests/extrac03.at, tests/extrac04.at,
1091 tests/extrac05.at, tests/incr01.at, tests/incremental.at,
1092 tests/listed01.at, tests/listed02.at, tests/long01.at,
1093 tests/longv7.at, tests/multiv01.at, tests/multiv02.at,
1094 tests/multiv03.at, tests/multiv04.at, tests/options.at,
1095 tests/options02.at, tests/same-order01.at, tests/same-order02.at,
1096 tests/sparse01.at, tests/sparse02.at, tests/sparse03.at,
1097 tests/star/multi-fail.at (AT_KEYWORDS): Improve to allow execution
1098 of related tests in groups.
1099
1100 * doc/tar.texi: Update
1101
1102 2005-11-07 Paul Eggert <eggert@cs.ucla.edu>
1103
1104 * src/xheader.c (struct xhdr_tab.coder): Last arg is void const *,
1105 not void *, to avoid create.c warning from GCC "passing argument 3
1106 of 'xheader_store' discards qualifiers from pointer target type".
1107 (dummy_coder, atime_coder, gid_coder, gname_coder, linkpath_coder):
1108 (ctime_coder, mtime_coder, path_coder, size_coder, uid_coder):
1109 (uname_coder, sparse_size_coder, sparse_numblocks_coder):
1110 (sparse_offset_coder, sparse_numbytes_coder, dumpdir_coder):
1111 (xheader_store): Likewise.
1112 * src/common.h (xheader_store): Likewise.
1113
1114 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
1115 and Paul Eggert <eggert@cs.ucla.edu>
1116
1117 * src/tar.c (NS_PRECISION_FORMAT_MASK): New macro.
1118 (tar_timespec_cmp): New function. Wrapper over
1119 timespec_cmp using the timespec precision provided by the
1120 current archive format.
1121 * src/common.h (tar_timespec_cmp): New declaration.
1122 * src/compare.c (diff_file): Use tar_timespec_cmp.
1123 * src/extract.c (file_newer_p): Likewise.
1124 * src/update.c (update_archive): Likewise.
1125 * tests/truncate.at: Reverted changes
1126 * tests/update.at: Reverted changes
1127
1128 2005-11-07 Sergey Poznyakoff <gray@gnu.org.ua>
1129
1130 Support for incremental formats in pax archives.
1131 Fixed POSIX compatibility of `sparse' extended header keywords.
1132
1133 * src/common.h (dumpdir_size,get_gnu_dumpdir)
1134 (xheader_string_begin,xheader_string_add)
1135 (xheader_string_end): New functions.
1136 * src/create.c (dump_dir0): Handle incremental backups in pax
1137 archives.
1138 * src/incremen.c (dumpdir_size, get_gnu_dumpdir): New functions.
1139 (purge_directory): Use stat_info.dumpdir instead of getting its
1140 value explicitely.
1141 * src/list.c (list_archive): Handle incremental backups in pax
1142 format.
1143 (decode_header): Initialize stat_info.dumpdir
1144 * src/sparse.c (sparse_diff_file): Bugfix: set seekable.
1145 (pax_dump_header): Store sparse map in GNU.sparse.map. If this
1146 variable has been explicitely deleted, use GNU.sparse.offset/
1147 GNU.sparse.numbytes variables.
1148 * src/tar.c (decode_options): Incremental options are allowed with
1149 --format=pax
1150 (tar_stat_destroy): Free dumpdir
1151 * src/tar.h (struct tar_stat_info.dumpdir): New member.
1152 * src/xheader.c (xheader_keyword_deleted_p): Remove static
1153 qualifier.
1154 (struct xhdr_tab.decoder): Change prototype. POSIX allows string
1155 values to contain embedded nulls, so take an extra argument
1156 specifying the length of the string.
1157 (decx,decg,dummy_decoder,atime_decoder,gid_decoder)
1158 (gname_decoder,linkpath_decoder,ctime_decoder,mtime_decoder)
1159 (path_decoder,size_decoder,uid_decoder,uname_decoder)
1160 (sparse_size_decoder,sparse_numblocks_decoder)
1161 (sparse_offset_decoder,sparse_numbytes_decoder): Likewise.
1162 (decode_record): Pass value length to the handler
1163 (run_override_list): Pass value length to the decoder
1164 (xheader_print_n): New function
1165 (xheader_print): Rewritten using xheader_print_n
1166 (xheader_finish): Do not rely om strlen to compute the length of
1167 the collected string: it can contain embedded nulls
1168 (xheader_string_begin,xheader_string_add,xheader_string_end): New
1169 functions.
1170 (sparse_map_decoder,dumpdir_coder,dumpdir_decoder): New
1171 functions. Handle GNU.sparse.map and GNU.dumpdir variables.
1172 (xhdr_tab): Add new variables.
1173
1174 * tests/incr01.at: Test gnu, oldgnu, and posix formats
1175 * tests/incremental.at: Likewise
1176
1177 2005-11-06 Paul Eggert <eggert@cs.ucla.edu>
1178
1179 * NEWS: Minor language and white space fixes.
1180
1181 * tests/truncate.at: Create files whose time stamps must fall on
1182 1-second boundaries. This prevents tests from failing on hosts
1183 like Solaris 8 that have nanosecond-resolution file time stamps.
1184 * tests/update.at: Likewise.
1185
1186 * src/xheader.c (strtoimax, strtoumax): Remove decls; now done
1187 in system.h.
1188
1189 2005-11-06 Sergey Poznyakoff <gray@gnu.org.ua>
1190
1191 * doc/tar.texi: Properly document incremental dumps
1192 * doc/value.texi: Likewise.
1193 * doc/snapshot.texi: Likewise.
1194
1195 2005-11-05 Sergey Poznyakoff <gray@gnu.org.ua>
1196
1197 Improve listed incremental format:
1198
1199 * src/common.h (update_parent_directory): New prototype.
1200 * src/create.c (dump_file): Call update_parent_directory.
1201 * src/incremen.c (struct directory.mtime): New member.
1202 (note_directory): Take additional arguments. All callers updated.
1203 (scan_directory): Updated to use more metadata. In particular,
1204 this allows to correctly detect renamed files.
1205 (read_directory_file,write_directory_file)
1206 (write_directory_file_entry): Support new directory file format.
1207 * tests/listed01.at: Sleep 1 sec before creating second file.
1208 * tests/listed02.at: Never skip the test. It should work on any
1209 filesystem.
1210
1211 * doc/snapshot.texi: New file
1212 * doc/tar.texi: Update.
1213 * doc/Makefile.am: Update.
1214
1215 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
1216
1217 * src/extract.c (set_stat): Rewrite to avoid bug in Forte
1218 Developer 7 C 5.4 Patch 111708-09 (2004-02-19).
1219
1220 2005-11-04 Sergey Poznyakoff <gray@gnu.org.ua>
1221
1222 * bootstrap: Fix quoting in help output.
1223 (update_po): Use backward-compatible wget option --cache instead
1224 of deprecated -C to accomodate for wget 1.10.
1225 Changes proposed by Eric Blake
1226 * THANKS: Add Eric Blake
1227
1228 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
1229
1230 * doc/tar.texi: Consistently put two spaces after sentences,
1231 and put commas after "i.e." and "e.g.". This is the usual GNU
1232 style in manuals.
1233
1234 * lib/.cvsignore: Add creat-safer.c, fcntl--.h, fcntl-safer.h,
1235 open-safer.c, openat-die.c, verify.h, to accommodate recent gnulib
1236 changes.
1237
1238 2005-10-27 Sergey Poznyakoff <gray@gnu.org.ua>
1239
1240 * src/compare.c (diff_dumpdir): Pass a valid device number to
1241 get_directory_contents.
1242
1243 * THANKS: Add John Thomas McDole
1244
1245 * bootstrap: If file `.bootstrap' exists in the cwd and is
1246 readable, prepend its contents to the command line
1247
1248 2005-10-21 Sergey Poznyakoff <gray@gnu.org.ua>
1249
1250 * tests/link01.at: Skip test if ln fails (suppose the OS does
1251 not support hard links).
1252
1253 2005-10-04 Sergey Poznyakoff <gray@gnu.org.ua>
1254
1255 * src/tar.c (decode_options): Report error if -A or -r is used
1256 together with compression option.
1257
1258 2005-09-29 Sergey Poznyakoff <gray@gnu.org.ua>
1259
1260 * doc/tar.texi: Use @option and @kbd consistently.
1261 Document new options.
1262
1263 2005-09-28 Sergey Poznyakoff <gray@gnu.org.ua>
1264
1265 * NEWS: Updated
1266 * src/common.h (show_stored_names_option): New variable
1267 * src/list.c (print_header): If show_stored_names_option is given,
1268 list member names as stored in the archive. Patch proposed by Erik
1269 Cumps <erik.cumps@icos.be>
1270 * src/tar.c: Implement --show-stored-names option
1271
1272 * src/common.h (test_label_option): New variable;
1273 * src/list.c (print_header): Special handling if test_label_option
1274 is set.
1275 * src/names.c (all_names_found): If test_label_option is set
1276 return true.
1277 * src/tar.c: New option --test-label tests the archive volume
1278 label. The option proposed by Wouter Verhelst <wouter@nixsys.be>
1279
1280 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
1281
1282 * tests/Makefile.am (clean-local): Don't attempt to run
1283 $(TESTSUITE) if it doesn't exist. Problem reported by
1284 Eric Blake.
1285
1286 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
1287
1288 Don't filter time stamps through the resolution supported
1289 by struct stat; keep them to full nanosecond resolution.
1290 This affects behavior only on older hosts or file systems
1291 that have lower-resolution time stamps.
1292 * src/common.h (OLDER_STAT_TIME): Parenthesize arg.
1293 (OLDER_TAR_STAT_TIME): New macro.
1294 (code_timespec): New function.
1295 (BILLION, LOG10_BILLION, TIMESPEC_STRSIZE_BOUND): New constants.
1296 * src/compare.c (diff_file): Use full time stamp resolution.
1297 * src/create.c (start_header, dump_file0): Likewise.
1298 (start_header, dump_file0): Adjust to new structure layout.
1299 (dump_regular_finish): Simplify by using timespec_cmp.
1300 * src/extract.c (struct delayed_set_stat): Don't store stat info
1301 that we don't need, to save space. All uses changed.
1302 (struct delayed_set_stat, struct delayed_link, file_newer_p):
1303 (create_placeholder_file, extract_link, apply_delayed_links):
1304 Use full time stamp resolution.
1305 (check_time): Use code_timespec rather than rolling our own code.
1306 (set_stat, delay_set_stat): Arg now points to tar_stat_info to
1307 avoid losing time information. All callers changed.
1308 * src/list.c (read_and, decode_header, print_heaeder):
1309 Use full time stamp resolution.
1310 * src/misc.c (code_timespec): New function.
1311 * src/tar.h (struct tar_stat_info): Record atime, mtime, ctime
1312 separately, for benefit of hosts with lower resolution.
1313 * src/update.c (update_archive): Use full time stamp resolution.
1314 * src/xheader.c (code_time): Use new code_timespec function
1315 to simplify code.
1316 (atime_coder, atime_decoder, ctime_coder, ctime_decoder):
1317 (mtime_coder, mtime_decoder): Use full time stamp resolution.
1318
1319 Report time stamps to full resolution in environment.
1320 Report memory allocation failures rather than ignoring them.
1321 * src/system.c (time_to_env): New function.
1322 (oct_to_env, str_to_env, chr_to_env): Report memory allocation failures.
1323 (stat_to_env): Report full resolution in time stamps.
1324
1325 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
1326
1327 Merge changes from gnulib for file system sub-second time stamps.
1328 * configure.ac: Remove checks for struct stat.st_spare1, struct
1329 stat.st_atim.tv_nsec, struct stat.st_atimespec.tv_nsec, struct
1330 stat.st_atimensec, as gnulib now does this for us.
1331 Similarly for LIB_CLOCK_GETTIME.
1332 * gnulib.modules: Add stat-time.
1333 * lib/.cvsignore: Add stat-time.h.
1334 * src/common.h: Include stat-time.h.
1335 (timespec_lt): Remove. All callers changed to use timespec_cmp.
1336 (get_stat_atime, get_stat_ctime, get_stat_mtime):
1337 (set_stat_atime, set_stat_ctime, set_stat_mtime):
1338 Remove; now defined by stat-time.h.
1339
1340 2005-09-14 Sergey Poznyakoff <gray@gnu.org.ua>
1341
1342 * src/incremen.c (list_dumpdir): New function. Used to dump
1343 contents of GNUTYPE_DUMPDIR blocks.
1344 * src/common.h (list_dumpdir): Likewise.
1345 * src/list.c (list_archive): Use list_dumpdir() to display
1346 GNUTYPE_DUMPDIR blocks. Do that only if two or more -v options are
1347 given.
1348
1349 2005-09-12 Paul Eggert <eggert@cs.ucla.edu>
1350
1351 * lib/.cvsignore: Adjust to current gnulib and modules used.
1352 Add getdelim.c, getdelim.h, mbchar.c, mbchar.h, mbuiter.h, memchr.c,
1353 pipe-safer.c, size_max.h, strdup.c, strdup.h, strnlen.h, strnlen1.c,
1354 strnlen1.h, unistd--.h.
1355 Remove getndelim2.c, getndelim2.h, pathmax.h, sysexits.h, xstrdup.c.
1356
1357 Treat fishy-looking hard links like fishy-looking symlinks.
1358 * src/extract.c (struct delayed_set_stat): Rename after_symlinks
1359 member to after_links. All uses changed.
1360 (struct delayed_link): Renamed from struct delayed_symlink.
1361 All uses changed. New member is_symlink.
1362 (delayed_link_head): Renamed from delayed_symlink_head. All uses
1363 changed.
1364 (create_placeholder_file): New function, taken from extract_symlink.
1365 (extract_link): Create placeholders for fishy-looking hard links.
1366 (extract_symlink): Move code into create_placeholder_file.
1367 (apply_delayed_links): Renamed from apply_delayed_symlinks.
1368 All uses changed. Create both hard links and symlinks.
1369
1370 2005-09-03 Paul Eggert <eggert@cs.ucla.edu>
1371
1372 * README-alpha: Modernize description of software required for
1373 developers.
1374
1375 2005-09-03 Sergey Poznyakoff <gray@gnu.org.ua>
1376
1377 * gnulib.modules: Add strdup
1378 * src/incremen.c (purge_directory): Do not dereference symbolic
1379 links. Bug reported by Ralph Corderoy <ralph@inputplus.co.uk> and
1380 David Brown <davidb@davidb.org>
1381 * tests/incr01.at: New test.
1382 * tests/Makefile.am: Add incr01.at
1383 * tests/testsuite.at: Likewise
1384 * THANKS: Updated
1385
1386 2005-08-17 Sergey Poznyakoff <gray@gnu.org.ua>
1387
1388 * src/incremen.c (read_directory_file): Use strtoumax to read
1389 snapshot file contents.
1390 (write_directory_file_entry): Use umaxtostr().
1391
1392 2005-07-31 Sergey Poznyakoff <gray@gnu.org.ua>
1393
1394 * src/create.c (file_dumpable_p,dump_file0): Fix handling of
1395 sparse files to /dev/null with --totals option.
1396 * tests/update.at: Remove dependency on file order.
1397
1398 2005-07-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1399
1400 * doc/tar.texi: Fix typo.
1401
1402 2005-07-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1403
1404 * tests/pipe.at: Pipe the output from `tar xfv' through sort.
1405
1406 2005-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1407
1408 * src/sparse.c (tar_sparse_init): Fill structure with zeros. Call
1409 sparse_select_optab(). All callers updated.
1410 (sparse_member_p, sparse_fixup_header): Use tar_sparse_init().
1411
1412 2005-06-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1413
1414 * src/sparse.c (pax_sparse_member_p): Checking member size
1415 vs. file size is not reliable enough. Use sparse_map_avail.
1416
1417 * tests/star/gtarfail.at: Adapt to the new output format
1418 * tests/star/gtarfail2.at: Likewise
1419 * tests/star/multi-fail.at: Likewise
1420 * tests/star/pax-big-10g.at: Likewise
1421 * tests/star/ustar-big-2g.at: Likewise
1422 * tests/star/ustar-big-8g.at: Likewise
1423
1424 * tests/sparse03.at: New test.
1425 * tests/Makefile.am: Add sparse03.at
1426 * tests/testsuite.at: Likewise
1427
1428 * src/xheader.c (size_decoder): Do not set archive_file_size.
1429
1430 Fix bugs introduced yesterday:
1431
1432 * src/sparse.c (tar_sparse_init): Initialize
1433 dimped_size to 0.
1434 (sparse_scan_file): Initialize archive_file_size to 0. The
1435 variable keeps size of the file *as stored in the archive*, not
1436 the size reported by stat.
1437
1438 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
1439
1440 A sweep of the sparse code prompted by a bug report by Jim Meyering.
1441 * src/sparse.c: Include <inttostr.h>.
1442 (struct tar_sparse_file): offset and dumped_size are off_t, not
1443 size_t. optab is now const *.
1444 (dump_zeros): Return bool success flag, not off_t.
1445 All callers changed.
1446 Use a constant-zero buffer rather than clearing a buffer each time.
1447 Don't mess up if write fails.
1448 (dump_zeros, check_sparse_region):
1449 Don't assume off_t is no wider than size_t.
1450 (tar_sparse_init): Don't bother clearing a field that is already clear.
1451 (zero_block_p): First arg is const *, not *.
1452 (clear_block, SPARSES_INIT_COUNT): Remove.
1453 (sparse_add_map): First arg is now struct start_stat_info *, not
1454 struct tar_sparse_file *. All callers changed.
1455 Use x2nrealloc to check for size_t overflow.
1456 (parse_scan_file): Cache commonly-used parts of file.
1457 Use an auto buffer, not a static one.
1458 Don't bother clearing the buffer; not needed.
1459 Don't bother clearing items that are already clear.
1460 (oldgnu_optab, star_optab, pax_optab): Now const.
1461 (sparse_dump_region): Don't bother clearing the buffer before
1462 reading into it; just clear the parts that aren't read into.
1463 (sparse_dump_file): Clear the whole local variable 'file'.
1464 (diff_buffer): Remove; now a local var.
1465 (check_sparse_region): Don't bother clearing buffer before
1466 reading into it. Don't assume off_t is promoted to long.
1467 (oldgnu_get_sparse_info, star_get_sparse_info):
1468 Use an auto status, not static.
1469 * src/tar.h (struct tar_stat_info): had_trailing_slash is
1470 now bool, not int.
1471 * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder):
1472 Rewrite to avoid cast.
1473 (sparse_offset_decoder, sparse_numbytes_decoder):
1474 Diagnose excess entries rather than crashing.
1475
1476 2005-06-22 Jim Meyering <jim@meyering.net>
1477
1478 * src/common.h (timespec_lt): Add a return type: bool.
1479
1480 2005-06-21 Paul Eggert <eggert@cs.ucla.edu>
1481
1482 Further improvements inspired by Jim Meyering's fixes.
1483
1484 * NEWS: Better support for full-resolution time stamps.
1485 The -v option now prints time stamps only to 1-minute resolution.
1486 * gnulib.modules: Add utimens.
1487 * lib/.cvsignore: Add imaxtostr.c, inttostr.c, inttostr.h,
1488 offtostr.c, umaxtostr.c, utimens.c, utimens.h. Remove paxconvert.c.
1489 * lib/Makefile.tmpl (libtar_a_SOURCES): Remove paxconvert.c.
1490 * lib/paxconvert.c: Remove; superseded by umaxtostr.c.
1491 * po/POTFILES.in: Remove lib/paxconvert.c. Add lib/xalloc-die.c,
1492 lib/obstack.c.
1493 * src/buffer.c (set_start_time, compute_duration, start_time):
1494 Use gettime rather than rolling our own code.
1495 * src/common.h (OLDGNU_NAME_FIELD_SIZE, MAXOCTAL11, MAXOCTAL7): Remove.
1496 (newer_ctime_option): Remove.
1497 (timespec_lt): New function.
1498 (OLDER_STAT_TIME): Use it.
1499 (string_to_chars): First arg is char const *, not char *.
1500 (tartime): Time arg is now struct timespec. New bool arg.
1501 All callers changed.
1502 (code_ns_fraction): New decl.
1503 (sys_stat_nanoseconds): Remove decl.
1504 (get_stat_atime, get_stat_ctime, get_stat_mtime): New functions.
1505 (set_stat_atime, set_stat_ctime, set_stat_mtime): New functions.
1506 * src/compare.c: Include utimens.h rather than rolling our own.
1507 (diff_dir, diff_file, diff_link, diff_symlink, diff_special):
1508 Prototype.
1509 (diff_dumpdir, diff_multivol): Prototype.
1510 (diff_file): Support higher-resolution time stamps.
1511 * src/create.c: Include utimens.h rather than rolling our own.
1512 (MAX_OCTAL_VAL): New macro.
1513 (tar_copy_str, string_to_chars): Don't bother to zero-fill;
1514 the destination is already zeroed.
1515 (string_to_chars): First arg is char const *.
1516 (start_private_header): Use MINOR_TO_CHARS, not MAJOR_TO_CHARS,
1517 for minor device number.
1518 (write_header_name, dump_hard_link, dump_file0):
1519 Simplify test for old GNU format.
1520 (start_header): Put in placeholders for uid, etc., even when
1521 using extended headers, for benefit of older "tar" implementations.
1522 Don't assume uintmax_t is wider than 32 bits.
1523 Output extended header for mtime if needed.
1524 (dump_regular_finish, dump_file0):
1525 Support extended time stamp resolution.
1526 * src/extract.c: Include utimens.h rather than rolling our own.
1527 (check_time): Support extended time stamp resolution.
1528 * src/list.c: Include <inttostr.h>.
1529 (tartime): Use umaxtostr rather than stringify_uintmax_t_backwards.
1530 * src/xheader.c: Include <inttostr.h>.
1531 Do not include <xstrtol.h>.
1532 (strtoimax) [!HAVE_DECL_STRTOIMAX && !defined strtoimax]: New decl.
1533 (strtoumax) [!HAVE_DECL_STRTOUMAX && !defined strtoumax]: New decl.
1534 (BILLION, LOG10_BILLION): New constants.
1535 (to_decimal): Remove; superseded by inttostr. All callers changed
1536 to use umaxtostr.
1537 (xheader_format_name): Don't assume pids and uintmax_t values
1538 fit in 63 bytes (!) when printed.
1539 (decode_record): Don't bother to check for ERANGE; an out of range
1540 value must be treater than len_max anyway.
1541 If the length is out of range, output it in the diagnostic.
1542 (format_uintmax): Remove; all callers changed to use umaxtostr.
1543 (xheader_print): Don't assume sizes can be printed in 99 bytes (!).
1544 (out_of_range_header): New function.
1545 (decode_time): Use it.
1546 (code_time): Accept struct timespec, not time_t and unsigned long.
1547 All callers changed. Size sbuf properly, and remove unnecessary check.
1548 Don't assume time stamps can fit in 199 bytes.
1549 Handle negative time stamps. Handle fractional time stamps
1550 more consistently. Don't output unnecessary trailing zeros.
1551 (decode_time): Yield struct timespec, not time_t and unsigned long.
1552 All callers changed.
1553 Handle negative time stamps. Truncate towards minus infinity
1554 consistently. Improve overflow checks, and output a better
1555 diagnostic on overflow.
1556 (code_num): Don't assume uintmax_t can be printed in 99 bytes (!).
1557 (decode_num): New function, for better diagnostics.
1558 (atime_coder, atime_decoder, gid_decoder, ctime_coder):
1559 (ctime_decoder, mtime_coder, mtime_decoder, size_decoder):
1560 (uid_decoder, sparse_size_decoder, sparse_numblocks_decoder):
1561 (sparse_offset_decoder, sparse_numbytes_decoder):
1562 Use decode_num, etc., instead of xstrtoumax, etc.
1563
1564 2005-06-21 Jim Meyering <jim@meyering.net>
1565
1566 Carefully crafted invalid headers can cause buffer overrun.
1567 Invalid header fields go undiagnosed.
1568 Some valid time strings are ignored.
1569
1570 * src/xheader.c (sparse_numblocks_decoder): Remove unchecked use
1571 of `calloc'. Use xcalloc instead.
1572 (decode_time, gid_decoder, size_decoder, uid_decoder):
1573 (sparse_size_decoder, sparse_offset_decoder, sparse_numblocks_decoder):
1574 Ensure that the result of calling xstrtoumax is no larger than
1575 the maximum value for the target type. Upon any failure, exit with
1576 a diagnostic.
1577 (sparse_numblocks_decoder): Avoid buffer overrun/heap corruption:
1578 use x2nrealloc, rather than `n *= 2' and xrealloc(p, n,....
1579 (decode_time): Rewrite to accept time strings like
1580 1119018481.000000000. Before, such strings were always ignored.
1581
1582 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1583
1584 * src/create.c (dump_file0): Check for is_avoided_name()
1585 first. Fixes bug reported by Martin Lohmeier
1586 <martin@mein-horde.de>
1587 * tests/update.at: New file
1588 * tests/Makefile.am (TESTSUITE_AT): Add update.at
1589 * tests/testsuite.at: Likewise
1590
1591 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1592
1593 * configure.ac (AC_STRUCT_ST_BLKSIZE)
1594 (AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
1595
1596 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
1597
1598 * src/names.c (excluded_name): excluded_filename ->
1599 excluded_file_name, because the name was changed in gnulib.
1600
1601 2005-05-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1602
1603 * src/tar.c (read_name_from_file,update_argv): Automatically
1604 detect nul-terminated list files.
1605 * NEWS: Updated
1606
1607 2005-05-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1608
1609 * scripts/backup.sh.in: Bugfixes.
1610
1611 2005-05-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1612
1613 * scripts/backup.in: Minor fixes
1614 * scripts/backup.sh.in (mt_begin,mt_rewind)
1615 (mt_offline,mt_status): Use $MT to invoke mt
1616 (init_common): Set --rsh-command option for mt if TAPE_FILE is a
1617 remote archive.
1618 * doc/tar.texi: Document new backup scripts behavior
1619
1620 2005-05-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1621
1622 * lib/.cvsignore: Updated
1623 * lib/Makefile.tmpl: Add new paxutils files
1624 * po/POTFILES.in: Likewise
1625 * src/buffer.c: Update invocations of safer_name_suffix()
1626 * src/create.c: Likewise
1627 * src/extract.c: Likewise
1628 * src/xheader.c: Likewise
1629 * src/common.h: Include paxlib.h instead of paxerror.h
1630 (safer_name_suffix,removed_prefixes_p): Removed. The functions are
1631 imported from paxutils
1632 * src/names.c (hash_string_hasher,hash_string_compare)
1633 (hash_string_insert,hash_string_lookup,removed_prefixes_p)
1634 (safer_name_suffix): Moved to paxutils
1635
1636 2005-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1637
1638 * bootstrap (copy_files): Accept optional third argument: a prefix
1639 to be appended to destination file names.
1640 Import paxutils/paxlib files.
1641 * configure.ac: Remove checking for LIB_SETSOCKOPT, it is handled
1642 by paxutils.
1643 * lib/Makefile.tmpl (libtar_a_SOURCES): Add paxerror.c paxexit.c
1644 paxconvert.c
1645 * po/POTFILES.in: Likewise.
1646 * src/common.h: Remove defines and declarations imported from
1647 paxutils
1648 * src/misc.c: Likewise
1649 * src/list.c (stringify_uintmax_t_backwards): Moved to paxutils
1650
1651 2005-05-17 Paul Eggert <eggert@cs.ucla.edu>
1652
1653 * src/misc.c (remove_any_file): Fix typo in previous change.
1654
1655 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
1656
1657 Port to Solaris 10's treatment of unlinking directories.
1658 * gnulib-modules: Add unlinkdir.
1659 * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c.
1660 * src/common.h (we_are_root): Remove extern decl; it's now static.
1661 * src/extract.c (we_are_root): Now static.
1662 * src/misc.c: Include <unlinkdir.h>.
1663 (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
1664
1665 * ChangeLog, ChangeLog.1, Makefile.am, NEWS, PORTS, README,
1666 README-alpha, TODO, bootstrap, configure.ac, doc/Makefile.am,
1667 doc/convtexi.pl, doc/fdl.texi, doc/gendocs_template,
1668 lib/Makefile.tmpl, lib/prepargs.c, lib/waitpid.c, po/POTFILES.in,
1669 scripts/Makefile.am, scripts/backup-specs, scripts/backup.in,
1670 scripts/backup.sh.in, scripts/restore.in, src/Makefile.am,
1671 src/arith.h, src/buffer.c, src/common.h, src/compare.c,
1672 src/create.c, src/delete.c, src/extract.c, src/incremen.c,
1673 src/list.c, src/mangle.c, src/misc.c, src/names.c, src/sparse.c,
1674 src/system.c, src/tar.c, src/tar.h, src/update.c, src/utf8.c,
1675 src/xheader.c, tests/Makefile.am, tests/append.at,
1676 tests/append01.at, tests/comprec.at, tests/delete01.at,
1677 tests/delete02.at, tests/delete03.at, tests/delete04.at,
1678 tests/delete05.at, tests/extrac01.at, tests/extrac02.at,
1679 tests/extrac03.at, tests/extrac04.at, tests/extrac05.at,
1680 tests/gzip.at, tests/ignfail.at, tests/incremental.at,
1681 tests/link01.at, tests/listed01.at, tests/listed02.at,
1682 tests/long01.at, tests/longv7.at, tests/multiv01.at,
1683 tests/multiv02.at, tests/multiv03.at, tests/multiv04.at,
1684 tests/old.at, tests/options.at, tests/options02.at, tests/pipe.at,
1685 tests/recurse.at, tests/same-order01.at, tests/same-order02.at,
1686 tests/shortrec.at, tests/sparse01.at, tests/sparse02.at,
1687 tests/testsuite.at, tests/truncate.at, tests/version.at,
1688 tests/volume.at, tests/star/gtarfail.at, tests/star/gtarfail2.at,
1689 tests/star/multi-fail.at, tests/star/pax-big-10g.at,
1690 tests/star/quicktest.sh, tests/star/ustar-big-2g.at,
1691 tests/star/ustar-big-8g.at:
1692 Update FSF postal mail address.
1693
1694 2005-05-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1695
1696 * NEWS: Updated
1697 * THANKS: Updated
1698 * bootstrap: Install files from paxutils/doc
1699 * doc/Makefile.am (tar_TEXINFOS): Add genfile.texi
1700 * doc/tar.texi (Genfile): New appendix
1701 * src/compare.c (diff_file): diff_handle was not initialized
1702 * src/create.c (dump_regular_file): Correctly pad archive members
1703 that shrunk during archiving. Repored by Frank Heckenbach.
1704 * src/extract.c (file_newer_p): Return false if file does not
1705 exist
1706 (prepare_to_extract): Correct warning wording.
1707 * tests/truncate.at: New test case
1708 * tests/Makefile.am: Add truncate.at
1709 * tests/testsuite.at: Likewise.
1710
1711 * doc/.cvsignore: Updated
1712 * lib/.cvsignore: Updated
1713 * tests/.cvsignore: Updated
1714
1715 2005-05-02 Paul Eggert <eggert@cs.ucla.edu>
1716
1717 * tests/multivol04.at: Tell awk to read from /dev/null.
1718
1719 Adjust to recent gnulib changes.
1720 * lib/.cvsignore: Add dup-safer.c, fd-safer.c, unistd-safer.h.
1721 * src/common.h (initial_umask): New var.
1722 * src/create.c (start_ueader): Use it, and adjust to new modechange
1723 API.
1724 (hash_link): unsigned -> size_t parameters and result.
1725 * src/incremen.c (hash_directory): Likewise.
1726 * src/names.c (hash_string_hasher): Likewise.
1727 * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
1728
1729 2005-04-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1730
1731 * tests/Makefile.am: Add shortrec.at.
1732
1733 2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
1734
1735 * src/buffer.c (reading_from_pipe): Remove. All uses removed.
1736 (short_read): Don't warn about short reads; they're normal.
1737 * tests/shortrec.at: New file.
1738 * tests/testsuite.at: Include it.
1739
1740 * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
1741 it is sometimes left behind as a garbage file (maybe due to the
1742 multiple traps?).
1743
1744 2005-04-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1745
1746 * src/list.c: Handle Solaris 'X' type flag
1747 * src/tar.h (SOLARIS_XHDTYPE): New define
1748
1749 2005-04-06 Sergey Poznyakoff <gray@mirddin.farlep.net>
1750
1751 * src/tar.c: Minor fixes to text messages. Proposed by Benno
1752 Schulenberg.
1753 * src/extract.c: Likewise
1754 (extract_file): Assign orig_file_name
1755 to save_name uniformly over the program. This fixes matching
1756 directory names at the start of an archive volume.
1757 * src/buffer.c (flush_write): Warn when the name of the archive
1758 straddling volume boundary is longer than 100 characters. Earlier
1759 behavior was to issue a fatal error.
1760 (struct zip_magic): Reverted part of changes from 2005-04-04.
1761 They make the maintenance too costly. Removing `unsigned'
1762 qualifier from `magic' member should be enough.
1763 * src/compare.c (diff_init): Read directory file if in listed
1764 incremental. This prevents spurious 'Contents differ' diagnostics.
1765 (diff_archive): Minor fixes to text messages
1766 (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
1767 to save_name uniformly over the program. This fixes matching
1768 directory names at the start of an archive volume.
1769 * src/create.c: Assign orig_file_name
1770 to save_name uniformly over the program. This fixes matching
1771 directory names at the start of an archive volume.
1772 * src/list.c: Likewise
1773
1774 * tests/multiv03.at: Modified to match the new behavior
1775 * tests/multiv04.at: New file. Test splittind directory members between
1776 the archive volumes.
1777 * tests/Makefile.am: Add multiv04.at
1778 * tests/testsuite.at: Likewise.
1779
1780 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
1781
1782 * configure.ac (AC_CONFIG_AUX_DIR): Rename from config to build-aux,
1783 for reasons discussed in the thread beginning at
1784 <http://lists.gnu.org/archive/html/bug-gnulib/2005-03/msg00119.html>.
1785 * .cvsignore: Remove config; add build-aux.
1786
1787 * src/buffer.c (struct zip_magic): Use char arrays, not pointers.
1788 The unsigned char * pointer ran afoul of pedantic C compilers, and
1789 we didn't need pointers anyway. Put the size field before the
1790 data to avoid unnecessary padding. All uses changed.
1791 (magic) Make it const, since it doesn't change. All uses changed.
1792
1793 2005-04-02 Paul Eggert <eggert@cs.ucla.edu>
1794
1795 * src/xheader.c (decode_record): Don't dump core when given
1796 a corrupted extended header. Problem reported by Jim Meyering.
1797 Also, check for other ways that the header might be invalid,
1798 e.g., missing newline at end. Do not allow keys with nulls.
1799 Allow blanks before and after length, as POSIX requires.
1800 Do not allow leading "-" in length. Check for length overflow.
1801 (xheader_decode, xheader_decode_global): Let decode_record
1802 check for exhaustion of record.
1803 (xheader_read): Null-terminate the extended record;
1804 decode_record relies on this.
1805
1806 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
1807
1808 * bootstrap (TP_URL): Change from
1809 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
1810 <http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
1811 some redirection glitches.
1812 Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
1813 * doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
1814 * lib/.cvsignore: Add intprops.h (new gnulib file).
1815
1816 2005-03-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1817
1818 * src/list.c (print_header): Print UID/GID in case of
1819 empty user/group name. This could occur when dumping
1820 files belonging to non-existing users and when listing
1821 broken archives.
1822 Reported by Igor Lautar.
1823
1824 * src/create.c: Correctly parse empty uname/gname
1825 * src/sparse.c (sparse_scan_file): Bugfix. offset had
1826 incorrect type.
1827
1828 * scripts/backup.in: Use `head -n 1'. Provide missing
1829 argument to ${MT_STATUS}. Proposed by Jan Merka.
1830 * scripts/backup.sh.in: Likewise. Fixed typo in
1831 MT_OFFLINE assignment.
1832 * scripts/restore.in (restore_fs): Use root_fs
1833
1834 2005-02-15 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1835
1836 * src/create.c: Replace strdup with xstrdup
1837 * src/names.c: Likewise
1838 * src/tar.c: Likewise
1839
1840 * tests/append01.at: Added reference to bug-tar archive
1841 * tests/listed02.at: Use -print with find.
1842
1843 2005-02-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1844
1845 * THANKS: Added Tim Adye. Fixed UTF.
1846 * src/list.c (read_header): Removed assignment to
1847 oldgnu_header.isextended. It was breaking append mode.
1848
1849 * tests/append01.at: New test.
1850 * tests/Makefile.am: Added append01.at
1851 * tests/testsuite.at: Likewise
1852
1853 2005-02-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1854
1855 * gnulib.modules: New file. List of required gnulib
1856 modules.
1857 * bootstrap: Merge list of required modules from
1858 paxutils with that from tar proper.
1859 * src/tar.c: Various fixes in help and diagnostic messages.
1860
1861 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1862
1863 * src/common.h (EXTRACT_OVER_PIPE): New macro
1864 * src/compare.c: Code clean up.
1865 * src/extract.c (extract_archive): Do not check for
1866 EXTRACT_OVER_PIPE, decode_options() does this.
1867 * src/misc.c (exec_error,fork_error,dup2_error)
1868 (pipe_error): Removed unneeded functions.
1869 * src/system.c (sys_exec_command): Use xclose, xpipe,
1870 xfork, xdup2 and exec_fatal.
1871 * src/tar.c (options): Improved sorting. Document --backup=off.
1872 (decode_options): Clear backup_option if necessary.
1873
1874 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1875
1876 Initial implementation of --to-command option proposed
1877 by Hansjoerg Lipp.
1878
1879 * bootstrap: Get setenv module from gnulib
1880 * src/buffer.c: Do not use 8-bit chars in comments
1881 * src/common.h (to_command_option)
1882 (ignore_command_error_option): New globals
1883 (sys_exec_command,sys_wait_command): New commands
1884 * src/extract.c (extract_file): Handle to_command_option
1885 Fix error recovery: decrease `size' by `written', not
1886 by `count', otherwise tar misses the next header
1887 Do not diagnose write error if to_command_option
1888 is set, since the command may have exited prematurely.
1889 It would be better to check for sigpipe, though.
1890 (prepare_to_extract): Handle to_command_option
1891 * src/misc.c (exec_error, fork_error, dup_error)
1892 (pipe_error): New functions
1893 * src/system.c (sys_exec_command)
1894 (sys_wait_command): New functions
1895 * src/tar.c: Handle new options --to-command,
1896 --ignore-command-error
1897 * THANKS: Added Hansjoerg Lipp
1898
1899 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
1900
1901 * src/list.c (from_header): New arg OCTAL_ONLY, normally false.
1902 All uses changed. Fix typo that sometimes suppressed all "Archive
1903 contains obsolescent base-64 headers" warnings, not just the first
1904 one.
1905 (tar_checksum): Accept only octal checksums, since they aren't
1906 supposed to overflow into weird formats.
1907
1908 Adjust to gnulib changes.
1909 * lib/.cvsignore: Add chdir-long.c, chdir-long.h, memrchr.c,
1910 memrchr.h, openat.c, openat.h. Remove pathmax.h (added by
1911 mistake, perhaps?), sysexit.h (my typo), xstrdup.c (gnulib removed
1912 this file). Sort entries.
1913
1914 2005-02-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1915
1916 * src/extract.c: Further rewrite.
1917 * src/buffer.c: Removed unused variables.
1918 * src/list.c: Likewise
1919 * src/tar.c (update_argv): Changed type to void
1920
1921 * src/common.h (OLDGNU_NAME_FIELD_SIZE): New constant
1922 * src/create.c (start_private_header,write_header_name)
1923 (dump_hard_link): Restore compatibility with 1.13.25
1924 * src/extract.c (extract_archive): Rewritten
1925 * src/list.c: Add translators' comments
1926 * src/tar.c (options) Minor spelling fix
1927 * tests/star/quicktest.sh: Determine path to the tar executable.
1928
1929 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1930
1931 * po/POTFILES.in: Added tests/genfile.c
1932 * src/buffer.c (short_read): Use ngettext()
1933 (new_volume): use quote().
1934 * src/create.c: Use quote()
1935 * src/extract.c: Likewise
1936 * src/xheader.c: Likewise
1937 * src/misc.c: Add comments to translators
1938
1939 * tests/same-order01.at: sort ls output
1940 * tests/sparse01.at (RE_CHECK): Added missing space
1941
1942 * tests/sparse02.at: Test extracting sparse files over a pipe.
1943 * tests/Makefile.am: Added sparse02.at
1944 * tests/testsuite.at: Likewise
1945 * tests/listed02.at: Skip the test on filesystems that do not
1946 update ctime of a file when renaming it. To be reverted when
1947 the new incremental mode is ready.
1948 * tests/sparse01.at: Extract and compare sparse file
1949
1950 2005-02-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1951
1952 * src/sparse.c: Extract sparse files even if the output
1953 fd is not seekable.
1954
1955 2005-02-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1956
1957 * bootstrap: Add a comment to lib/Makefile.am saying that this
1958 is an autogenerated file.
1959 Exit with code 1 if any of autotools fails.
1960 * lib/Makefile.tmpl: Insert Emacs magic to the first line.
1961 * tests/Makefile.am: Add append.at
1962
1963 * m4/.cvsignore: Ignore all *.m4 files
1964
1965 2005-01-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1966
1967 Rewritten handling of -T (--files-from) option. Now it
1968 inserts the file names immediately into argv array which allows
1969 for:
1970 1) any valid tar options (including another -T) to be used in the file
1971 2) any number of -T options to be given in command line
1972
1973 * configure.ac: Raised version number to 1.15.2
1974 * src/common.h: Include obstack.h
1975 (files_from_option): Removed
1976 (unquote_option): New variable
1977 (stat_fatal): New function
1978 (name_close): Removed function.
1979 * src/incremen.c: Remove inclusion of obstack.h
1980 * src/xheader.c: Likewise.
1981 * src/misc.c (stat_fatal): New function
1982 * src/names.c (name_file): Removed variable.
1983 (read_name_from_file): Removed function. All callers changed.
1984 (name_close): Removed function. All callers changed.
1985 * src/tar.c: New options --unquote (--no-unquote) and
1986 --add-file
1987 (add_file_id,read_name_from_file,update_argv): New functions
1988 (parse_opt): Rewritten handling of -T option. Handle hidden
1989 --HANG option for debugging purposes.
1990 (decode_options): Init unquote_option to true. Init argv_stk.
1991 Remove unneeded references to files_from_option
1992
1993 * doc/tar.texi: Document new options.
1994 Moved rendition macros and option value definitions into
1995 separate files
1996 * doc/rendition.texi: New file
1997 * doc/value.texi: New file
1998 * doc/Makefile.am: Updated
1999
2000 2005-01-13 Paul Eggert <eggert@cs.ucla.edu>
2001
2002 * tests/testsuite.at (RE_CHECK): Use "join - file", not
2003 "join file -", to work around a bug in Solaris 8 join.
2004 Problem reported by Tomohiro Suzuki.
2005
2006 2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2007
2008 * src/list.c (read_header): Fixed calculation of the
2009 size for GNU long name/link. Tar was reading one block
2010 more if name_size was divisible by 512. Thanks Josef
2011 Bauer.
2012 * tests/long01.at: New file. Test listing of GNU long names
2013 divisible by 512.
2014 * tests/pipe.at: Sort tar output.
2015 * tests/Makefile.am: Added long01.at
2016 * tests/testsuite.at: Likewise.
2017 * THANKS: Added Josef Bauer
2018 * lib/.cvsignore: Updated
2019 * m4/.cvsignore: Updated
2020 * NEWS: Updated
2021
2022 2005-01-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2023
2024 * directory: Updated for 1.15.1
2025 * doc/Makefile.am: Use gendocs.sh to generate web documentation
2026 * doc/gendocs_template: Template file for gendocs.sh
2027 * doc/tar.texi: Updated docs for --[no-]same-permissions
2028 * src/tar.c: Reworded docstrings for --[no-]same-permissions
2029
2030 2005-01-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2031
2032 * bootstrap: Create m4/paxutils.m4
2033 * configure.ac: Call tar_PAXUTILS
2034 * tests/options02.at: Test that tar correctly handles non-option
2035 arguments interspersed with options.
2036 * tests/Makefile.am: Add options02.at
2037 * tests/testsuite.at: Likewise
2038 * tests/listed02.at: Do not create useless directory
2039
2040 2005-01-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2041
2042 * src/tar.c (parse_opt): Bugfix: Use ARGP_KEY_ARG. Thanks
2043 Mike Frysinger <vapier@gentoo.org> for reporting.
2044
2045 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
2046
2047 * lib/Makefile.tmpl (localedir.h): Omit needless quotes and a
2048 needless sed command. Problem reported by Paul Jarc.
2049
2050 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
2051
2052 Accommodate latest gnulib.
2053 * doc/.cvsignore: Add getdate.texi.
2054 * bootstrap: Do not treat alloca-opt specially; this is no
2055 longer needed (and breaks builds) with latest gnulib.
2056
2057 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2058
2059 * src/tar.c (main): Reverted recent changes (#ifdef).
2060
2061 2004-12-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2062
2063 * configure.ac: Raise version number to 1.15.1
2064 Check for locale.h
2065 * NEWS: Entry for 1.15.1
2066 * src/buffer.c: Bugfix. Changes introduced 2004-11-26
2067 broke extraction from stdin.
2068 * src/list.c (from_header, tar_checksum): Changed declaration.
2069 All callers updated.
2070 * src/common.h: Likewise
2071 * src/tar.c (main): Protect invocation of setlocale by
2072 ifdef.
2073
2074 * tests/comprec.at: New test
2075 * tests/pipe.at: New test
2076 * tests/Makefile.am (comprec.at,pipe.at): New tests
2077 * tests/testsuite.at: Likewise
2078 * tests/gzip.at: Use AT_GZIP_PREREQ
2079 * tests/star/pax-big-10g.at: Likewise
2080 * tests/star/ustar-big-2g.at: Likewise
2081 * tests/star/ustar-big-8g.at: Likewise
2082
2083 * tests/extrac04.at: Discard stderr from sort, on some
2084 systems it spits out lots of irrelevant info.
2085 * tests/listed02.at: Likewise
2086
2087 * doc/index.html.in: Rewritten in xhtml to follow recent
2088 GNU site standards.
2089 * THANKS: Updated
2090
2091 2004-12-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2092
2093 Released version 1.15. Sources up to this point are
2094 tagged release_1_15.
2095
2096 * configure.ac: Raised version number to 1.15
2097 * NEWS: Likewise
2098 * directory: Updated
2099 * bootstrap (update_po): Give -r to wget. Always remove index.html
2100 Ignore alloca-opt module (it duplicates alloca)
2101
2102 * tests/Makefile.am: Distribute star/quicktest.sh
2103 * tests/star/README: Document quicktest.sh
2104 * tests/star/qucktest.sh: Removed.
2105 * tests/star/quicktest.sh: New file.
2106
2107 2004-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2108
2109 * NEWS: Updated
2110 * doc/tar.texi: Document auto-detection of compressed archive
2111 formats.
2112 * src/tar.c (decode_options): Ignore --seek if used with --delete.
2113 Delete.c is based on the assumption that the archive is being
2114 actually read, not lseeked.
2115
2116 * tests/delete05.at: New file
2117 * tests/extrac02.at: Fixed typo in AT_SETUP
2118 * tests/Makefile.am: Added delete05.at
2119 * tests/testsuite.at: Likewise.
2120
2121 2004-12-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2122
2123 * src/delete.c (delete_archive_members): Bugfix: when
2124 attempting to delete an nonexistent member, the last
2125 blocking_factor blocks were zeroed.
2126
2127 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
2128
2129 * TODO: Mention sub-second resolution, lutimes, lchmod.
2130
2131 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
2132
2133 Adjust to recent gnulib changes.
2134 * doc/getdate.texi: Remove, since bootstrap gets it from gnulib now.
2135 * .cvsignore: Add rmt, rmt/*, rmt/*/*.
2136 * lib/.cvsignore: Add allocsa.c, allocsa.h, allocsa.valgrind,
2137 charset.alias, config.charset, getcwd.c, getcwd.h, localcharset.c,
2138 localcharset.h, ref-add.sed, ref-add.sin, ref-del.sed,
2139 ref-del.sin, setenv.c, setenv.h, unsetenv.c. Remove pathmax.h,
2140 xstrdup.c.
2141 * m4/.cvsignore: Add allocsa.m4, eealloc.m4, getcwd-path-max.m4,
2142 localcharset.m4, realloc.m4, setenv.m4. Remove malloc.m4,
2143 pathmax.m4, realloc.m4.
2144
2145 2004-11-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2146
2147 * configure.ac: Raised version number to 1.14.91
2148 * scripts/tarcat: New file
2149 * scripts/Makefile.am: Added tarcat
2150 * src/buffer.c (hit_eof): Changed type to boolean
2151 (read_full_records,reading_from_pipe): New variables
2152 (check_compressed_archive,open_compressed_archive): New functions
2153 (open_archive): Autodetect compressed archives and act accordingly.
2154 Set reading_from_pipe. This fixes controversial set of changes
2155 introduced 2004-05-11,2004-03-22.
2156 * src/list.c (tar_checksum): New function
2157 (read_header): Use tar_checksum().
2158 * src/common.h (tar_checksum): New function
2159
2160 * tests/star/README: Updated
2161 * NEWS: Updated
2162 * PORTS: Updated
2163
2164 2004-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2165
2166 * src/tar.c (decode_options): Fixed -o semantics. Thanks
2167 Jean Delvare <khali@linux-fr.org>
2168
2169 2004-10-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2170
2171 * bootstrap: Add localcharset
2172 * lib/Makefile.tmpl: Initialize SUFFIXES and CLEANFILES since the
2173 makefile snippet from localcharset uses '+=' on them.
2174 * src/Makefile.am (LDADD): Add LIBICONV
2175 * src/list.c (decode_header): Set uname/gname to NULL if their
2176 header counterparts are empty
2177 * src/tar.c (options): Use OPTION_NO_TRANS
2178 * src/utf8.c: Use locale_charset() from gnulib
2179
2180 * tests/star/README: Updated
2181
2182 * NEWS: Updated
2183 * TODO: Minor fix
2184
2185 2004-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2186
2187 * THANKS: Added Bryan Ford
2188 * doc/Makefile.am (.text): Fixed rule
2189 * po/POTFILES.in: Added argp-help.c
2190
2191 2004-10-04 Bryan Ford <baford@mit.edu>
2192
2193 * src/tar.c: New option --exclude-caches, to exclude
2194 cache directories automatically on archive creation.
2195 Cache directories are directories containing a
2196 standardized tag file, as specified at:
2197 http://www.brynosaurus.com/cachedir/spec.html
2198 * src/common.h: New variable exclude_caches_option.
2199 * src/create.c: New function check_cache_directory(),
2200 called from dump_dir0() if exclude_caches_option is set,
2201 to check for a cache directory tag and exclude the directory
2202 if such a tag is found.
2203 * doc/tar.texi: Updated accordingly.
2204
2205 2004-09-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2206
2207 * doc/tar.texi: Minor fix
2208 * src/tar.c (options): Minor fix
2209
2210 2004-09-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2211
2212 * TODO: Updated
2213 * lib/Makefile.tmpl: Added 'rtapelib.o: localedir.h' dependency
2214 * src/common.h: Comment WANT_DIRECTORY_REMOVE_OPTION.
2215 * src/extract.c: Normalized use of remove_any_file().
2216 * src/misc.c: Likewise.
2217 * src/tar.c (parse_opt): Emit warning if -l option is used.
2218 (show_default_settings): REMOTE_SHELL may be undefined
2219
2220 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2221
2222 Test suite rewritten in autotest.
2223
2224 * configure.ac: Updated for autotest
2225 * src/tar.c (argp_program_version): Modified.
2226 * tests/Makefile.am: Rewritten for autotest.
2227
2228 * tests/.cvsignore: Updated
2229 * tests/append.at: New file
2230 * tests/atlocal.in: New file
2231 * tests/delete01.at: New file
2232 * tests/delete02.at: New file
2233 * tests/delete03.at: New file
2234 * tests/delete04.at: New file
2235 * tests/extrac01.at: New file
2236 * tests/extrac02.at: New file
2237 * tests/extrac03.at: New file
2238 * tests/extrac04.at: New file
2239 * tests/extrac05.at: New file
2240 * tests/gzip.at: New file
2241 * tests/ignfail.at: New file
2242 * tests/incremental.at: New file
2243 * tests/link01.at: New file
2244 * tests/listed01.at: New file
2245 * tests/listed02.at: New file
2246 * tests/longv7.at: New file
2247 * tests/multiv01.at: New file
2248 * tests/multiv02.at: New file
2249 * tests/multiv03.at: New file
2250 * tests/old.at: New file
2251 * tests/options.at: New file
2252 * tests/recurse.at: New file
2253 * tests/same-order01.at: New file
2254 * tests/same-order02.at: New file
2255 * tests/sparse01.at: New file
2256 * tests/testsuite.at: New file
2257 * tests/version.at: New file
2258 * tests/volume.at: New file
2259 * tests/star/gtarfail.at: New file
2260 * tests/star/gtarfail2.at: New file
2261 * tests/star/multi-fail.at: New file
2262 * tests/star/pax-big-10g.at: New file
2263 * tests/star/ustar-big-2g.at: New file
2264 * tests/star/ustar-big-8g.at: New file
2265
2266 * tests/preset.in: Removed
2267 * tests/before: Removed
2268 * tests/after: Removed
2269 * tests/version.sh: Removed.
2270 * tests/append.sh: Removed.
2271 * tests/delete01.sh: Removed.
2272 * tests/delete02.sh: Removed.
2273 * tests/delete03.sh: Removed.
2274 * tests/delete04.sh: Removed.
2275 * tests/extrac01.sh: Removed.
2276 * tests/extrac02.sh: Removed.
2277 * tests/extrac03.sh: Removed.
2278 * tests/extrac04.sh: Removed.
2279 * tests/extrac05.sh: Removed.
2280 * tests/gzip.sh: Removed.
2281 * tests/incremen.sh: Removed.
2282 * tests/ignfail.sh: Removed.
2283 * tests/link01.sh: Removed.
2284 * tests/listed01.sh: Removed.
2285 * tests/listed02.sh: Removed.
2286 * tests/longv7.sh: Removed.
2287 * tests/multiv01.sh: Removed.
2288 * tests/multiv02.sh: Removed.
2289 * tests/multiv03.sh: Removed.
2290 * tests/old.sh: Removed.
2291 * tests/options.sh: Removed.
2292 * tests/same-order01.sh: Removed.
2293 * tests/same-order02.sh: Removed.
2294 * tests/volume.sh: Removed.
2295 * tests/recurse.sh: Removed.
2296 * tests/sparse01.sh: Removed.
2297 * tests/star/gtarfail.sh: Removed.
2298 * tests/star/gtarfail2.sh: Removed.
2299 * tests/star/multi-fail.sh: Removed.
2300 * tests/star/ustar-big-2g.sh: Removed.
2301 * tests/star/ustar-big-8g.sh: Removed.
2302 * tests/star/pax-big-10g.sh: Removed.
2303
2304 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2305
2306 * bootstrap: Install genfile.c from paxutils
2307 * tests/genfile.c: Removed. Integrated into
2308 paxutils.
2309 * tests/mksparse.c: Removed. Integrated into
2310 (paxutils) genfile.c
2311 * tests/Makefile.am: Removed mksparse
2312 * tests/sparse01.sh: Use genfile instead of mksparse
2313
2314 2004-09-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2315
2316 Started merging with cpio into paxutils. Sources before
2317 this point are tagged alpha-1_14_90
2318
2319 * Makefile.am: Updated for use with paxutils
2320 * README-alpha: Likewise
2321 * bootstrap: Likewise
2322 * configure.ac: Likewise
2323 * lib/Makefile.tmpl: Likewise
2324 * po/POTFILES.in: Likewise
2325 * src/Makefile.am: Likewise
2326 * src/buffer.c: Likewise
2327 * src/common.h: Likewise
2328 * src/compare.c: Likewise
2329 * src/create.c: Likewise
2330 * src/delete.c: Likewise
2331 * src/extract.c: Likewise
2332 * src/incremen.c: Likewise
2333 * src/list.c: Likewise
2334 * src/mangle.c: Likewise
2335 * src/misc.c: Likewise
2336 * src/names.c: Likewise
2337 * src/sparse.c: Likewise
2338 * src/system.c: Likewise
2339 * src/tar.c: Likewise
2340 * src/update.c: Likewise
2341 * src/utf8.c: Likewise
2342 * src/xheader.c: Likewise
2343
2344 * src/system.h: Removed
2345 * src/rmt.c: Removed
2346 * src/rmt.h: Removed
2347 * src/rtapelib.c: Removed
2348
2349 2004-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2350
2351 * tests/listed02.sh: Do not depend on any particular ordering
2352 of output.
2353
2354 2004-09-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2355
2356 * doc/tar.texi: Document the use of -C option in
2357 file lists. Document --seek option.
2358 * configure.ac: New option --with-rmt. New configuration variable
2359 DEFAULT_RMT_DIR. Removed DEFAULT_RMT_COMMAND.
2360 * src/Makefile.am: Install rmt into rmtdir
2361 * src/tar.c (usage): Minor fix.
2362 * NEWS: Updated.
2363 * README: Updated.
2364
2365 2004-09-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2366
2367 * configure.ac: Raised version number to 1.14.90
2368 * src/common.h (is_individual_file): New prototype
2369 * src/create.c (dump_file0): Fix bug introduced
2370 2004-02-21.
2371 * src/names.c (register_individual_file)
2372 (is_individual_file): New functions.
2373 * tests/listed01.sh: Use genfile instead of dd.
2374 * tests/listed02.sh: New file.
2375 * tests/Makefile.am: Added listed02.sh
2376
2377 * NEWS: Updated
2378
2379 2004-08-31 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2380
2381 * src/sparse.c (sparse_add_map): Fixed improper initializations
2382 of sparse_map_size. We assume that whatever number it contains
2383 describes adequately the current size of sparse_map. The only
2384 number we need to reset is sparse_map_avail.
2385 * src/compare.c (verify_volume): Call set_next_block_after
2386 if read_header returns HEADER_FAILURE
2387 Destroy and reinitialize content of current_stat_info and
2388 extended_header after each iteration (bug reported by
2389 John L. Males <jlmales@yahoo.com>).
2390 Issue a warning if the created archive contains some members
2391 whose file names were stripped off their leading prefixes.
2392 This is a temporary fix of the issue reported by Bdale Garbee
2393 <bdale@gag.com> (Refs: Debian bug 230064, Message-Id
2394 <87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)
2395
2396 * src/names.c (removed_prefixes_p): New function.
2397
2398 * src/buffer.c: When computing write rate do not take
2399 into account the time needed to verify the archive(s).
2400 The bug reported by John L. Males <jlmales@yahoo.com>
2401 (set_start_time,compute_duration): New functions.
2402 (print_total_written): Use the result of compute_duration().
2403 (close_archive): Call compute_duration.
2404 * src/common.h (set_start_time, removed_prefixes_p): New prototypes.
2405 * src/list.c (decode_header): Fixed initialization
2406 of stat_info->is_sparse
2407 * src/tar.c (main): Call set_start_time().
2408
2409 * src/misc.c (unquote_string): Unquote '\a' and '\v'.
2410 Reported by Helmut Waitzmann <helmut.waitzmann@web.de>.
2411
2412 * NEWS: Updated
2413 * THANKS: Updated
2414
2415 2004-08-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2416
2417 * src/tar.c: Fix copy-n-paste errors in the license
2418
2419 2004-08-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2420
2421 * scripts/backup.in: Renamed LIBPATH to LIBDIR.
2422 Use ROOT_FS with -C option. Do not send mail
2423 if ADMINISTRATOR is set to NONE.
2424 * scripts/backup.sh.in (test_root): Append / to
2425 ROOT_FS if it does not already end in it.
2426 * scripts/restore.in: Renamed LIBPATH to LIBDIR.
2427 New option -a (--all). Do not start restore unless
2428 -a or patterns are given.
2429 (restore_fs,restore_files): Fixed use of --listed option.
2430 * doc/tar.texi: Updated
2431 * NEWS: Updated
2432
2433 2004-08-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2434
2435 * src/tar.c (find_argp_option): Fixed typo
2436
2437 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
2438
2439 Merge argp, getopt, xalloc changes from gnulib.
2440 * bootstrap (gnulib_modules): Add xalloc-die.
2441 Remove code to test for patches; we don't have patches now.
2442 Set LC_ALL=C so that file names sort consistently.
2443 Prefer the gnulib copies of gettext.m4, glibc21.m4,
2444 lib-ld.m4, lib-prefix.m4, po.m4 too.
2445
2446 * patches/getopt.diff: Remove; gnulib now works unpatched.
2447 * configure.ac (_getopt_long_only_r): Remove check.
2448 gl_ARGP now does this for us.
2449 * lib/.cvsignore: Add fnmatch.h, getopt_.h, sysexit.h,
2450 xalloc-die.c.
2451 * src/extract.c: Adjust to changes to gnulib xalloc module.
2452 (extr_init): Remove assignment to xalloc_fail_func; no longer needed.
2453 (xalloc_die): New function.
2454
2455 2004-08-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2456
2457 * NEWS: Updated
2458
2459 * src/buffer.c (flush_write): Limit filenames
2460 of the members that straddle multivolume archive
2461 boundary to 100 characters.
2462 (flush_read): Use strncmp when comparing multivolume member
2463 names.
2464 * tests/multiv03.sh: New file
2465 * tests/Makefile.am: Added multiv03.sh
2466
2467 2004-08-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2468
2469 * src/list.c (read_and): Call decode_header before
2470 calling skip_member()
2471 (skip_member): Use is_sparse field to determine if the
2472 member is a sparse file.
2473
2474 * tests/Makefile.am: Added extrac05.sh
2475 * tests/extrac05.sh: New file
2476 * tests/append.sh: Rearranged leading comments. Added explicit
2477 references to report messages wherever available.
2478 * tests/delete01.sh: Likewise
2479 * tests/delete02.sh: Likewise
2480 * tests/delete03.sh: Likewise
2481 * tests/delete04.sh: Likewise
2482 * tests/extrac01.sh: Likewise
2483 * tests/extrac02.sh: Likewise
2484 * tests/extrac03.sh: Likewise
2485 * tests/extrac04.sh: Likewise
2486 * tests/gzip.sh: Likewise
2487 * tests/ignfail.sh: Likewise
2488 * tests/incremen.sh: Likewise
2489 * tests/link01.sh: Likewise
2490 * tests/listed01.sh: Likewise
2491 * tests/longv7.sh: Likewise
2492 * tests/multiv01.sh: Likewise
2493 * tests/multiv02.sh: Likewise
2494 * tests/old.sh: Likewise
2495 * tests/options.sh: Likewise
2496 * tests/recurse.sh: Likewise
2497 * tests/same-order01.sh: Likewise
2498 * tests/same-order02.sh: Likewise
2499 * tests/sparse01.sh: Likewise
2500 * tests/version.sh: Likewise
2501 * tests/volume.sh: Likewise
2502
2503 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2504
2505 * bootstrap: Extended --update-po option to take an
2506 optional argument specifying the po file to update.
2507 * src/create.c: Improved compatibility with 1.13.25
2508 * tests/link01.sh: New file.
2509 * tests/Makefile.am: Added link01.sh
2510
2511 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
2512
2513 Merge from gnulib.
2514
2515 * patches/argp.diff: Remove; no longer needed.
2516
2517 * lib/.cvsignore: Add stat-macros.h.
2518 Remove addext.c, malloc.c, realloc.c.
2519
2520 * src/extract.c: Include <getcwd.h>.
2521 (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
2522 * src/extract.c (make_directories):
2523 FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
2524 * src/misc.c (must_be_dot_or_slash): Likewise.
2525 * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
2526 Likewise.
2527 * src/tar.c (parse_opt): Likewise.
2528 * src/incremen.c (purge_directory): Fix format buffer typos in warning
2529 strings.
2530 * src/tar.c (options): Add missing initializers to pacify gcc.
2531 (decode_options): Remove unused var.
2532
2533 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
2534
2535 * bootstrap (gnulib_modules): Add getpagesize.
2536 * configure.ac (valloc): Remove check; valloc no longer used.
2537 * lib/.cvsignore: Add getpagesize.h.
2538 * m4/.cvsignore: Add getpagesize.m4.
2539 * src/buffer.c (record_buffer): New var.
2540 (open_archive): Don't use valloc; on older or buggy hosts, you can't
2541 free the result. Use page_aligned_alloc instead.
2542 * src/compare.c (diff_init): Likewise.
2543 * src/buffer.c (open_archive): Record the pointer to be freed
2544 into record_buffer.
2545 (close_archive): Free record_buffer.
2546 * src/common.h (page_aligned_alloc): New decl.
2547 * src/misc.c (quote_n, quote): Remove these redundant functions.
2548 (ptr_align): New function, from coreutils/src/system.h.
2549 (page_aligned_alloc): New function.
2550 * src/system.h (valloc): Remove.
2551
2552 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
2553
2554 * src/extract.c (extract_archive): Do not report an error
2555 when hard-linking X to X when X exists. Problem reported by
2556 Toby Peterson.
2557 * lib/.cvsignore: Add fchown-stub.c.
2558
2559 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2560
2561 * NEWS: Updated
2562 * src/common.h (root_device): New global.
2563 (gnu_restore): Renamed to purge_directory().
2564 * src/extract.c (extr_init): Save the device number
2565 of the root device.
2566 (extract_archive): Renamed gnu_restore() to purge_directory().
2567 * src/incremen.c (gnu_restore): Renamed to purge_directory().
2568 Do not attempt to purge the directory if it is on a different
2569 device and one_file_system_option is set.
2570
2571 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2572
2573 * doc/tar.texi: The actual default for exclude patterns
2574 is --no-anchored. Fixed.
2575 * src/tar.c (options): Likewise.
2576 Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
2577
2578 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2579
2580 * doc/tar.texi: Fixed several inconsistencies.
2581 * src/tar.c: Fixed docstring for --checkpoint option.
2582
2583 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2584
2585 * src/buffer.c (seek_archive): New function
2586 * src/common.h (seek_archive): New function
2587 (seekable_archive): New global.
2588 * src/list.c (skip_file): Use seek_archive() if
2589 possible.
2590 * src/tar.c (struct fmttab): Accept 'pax' as alias
2591 for 'posix'
2592 (options): New option -n (--seek).
2593 * src/update.c: Determine type of the archive before
2594 appending to it.
2595
2596 * TODO: Updated.
2597
2598 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2599
2600 * bootstrap: New option --update-po
2601 * src/tar.c: New option -H (short alias to --format)
2602 * doc/tar.texi: Document -H option
2603 * src/names.c (safer_name_suffix): Fixed bug introduced
2604 2004-05-11.
2605
2606 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2607
2608 * bootstrap: Apply patches from patch subdirectory
2609 * patches: New dir
2610 * patches/argp.diff: New file
2611 * patches/getopt.diff: New file
2612 * configure.ac: Check for _getopt_long_only_r and
2613 force using included version of getopt if the function
2614 is not available.
2615 * src/tar.c: Use argp for command line parsing.
2616 * src/system.h: Minor formatting fix
2617 * m4/.cvsignore: Updated
2618 * lib/.cvsignore: Updated
2619 * doc/tar.texi: Minor fix.
2620 * src/extract.c: Fix improper use of 'path' term
2621 * src/incremen.c: Likewise
2622 * src/list.c: Likewise
2623 * src/misc.c: Likewise
2624 * src/names.c: Likewise
2625 * src/rmt.h: Likewise
2626 * src/rtapelib.c: Likewise
2627 * src/update.c: Likewise
2628 * src/xheader.c: Likewise
2629 * tests/star/README: Minor fix
2630
2631 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2632
2633 * configure.ac: Raised version number to 1.14.1
2634 * src/tar.c: Renamed --strip-path to --strip-components
2635 Changed improper use of _() to ngettext().
2636 * src/extract.c: Renamed strip_path_option to strip_components_option
2637 * src/common.h: Likewise.
2638 * NEWS: Updated.
2639 * doc/tar.texi: Updated
2640
2641 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2642
2643 * src/system.c (sys_child_open_for_uncompress): Do not
2644 set read_full_records_option: the compressed archive is
2645 likely not to contain integer number of records. Should
2646 the user wish to use reblocking, he may always give tar
2647 -B option. This is a minor improvement over the change
2648 dated 2004-03-22.
2649 * src/buffer.c (open_archive): Removed assignment to
2650 read_full_records_option.
2651
2652 * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
2653 as the format argument, rather than a possibly-translated variable
2654 string. Patch provided by Jim Meyering <jim@meyering.net>
2655 * src/tar.c (decode_options): Fixed typo in the comment.
2656 * tests/star/README: Minor correction
2657
2658 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2659
2660 * directory: New file. GNU directory entry for tar.
2661 * doc/Makefile.am: Rewritten. Added rules for generating
2662 documentation for the project's website.
2663 * doc/.cvsignore: Updated
2664 * doc/index.html.in: New file.
2665
2666 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2667
2668 * configure.ac: Raised version number to 1.14
2669 * NEWS: Updated.
2670 * tests/after: Added copyleft statement
2671 * tests/before: Added copyleft statement
2672 * tests/preset.in: Added copyleft statement
2673
2674 Tar 1.14 is released. Sources up to this point are tagged
2675 release_1_14
2676
2677 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2678
2679 * configure.ac: Fixed prerequisite headers for sys/buf.h
2680 (needed on FreeBSD)
2681 * src/system.h: Likewise.
2682 * tests/after (compare): Fixed argument quoting under eval
2683 * tests/before: Quote TAR_ARCHIVE_FORMATS
2684
2685 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2686
2687 * NEWS: Updated
2688 * README: Updated
2689 * PORTS: Updated
2690 * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
2691 DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
2692 the pathname of the rmt utility.
2693 New option --enable-backup-scripts.
2694 * doc/tar.texi: Updated
2695 * scripts/Makefile.am: Install the scripts only if requested
2696 by the configure.
2697 * scripts/backup.in: Fixed --version output.
2698 Fixed initialization of the listing files and printing
2699 the time of the last previous level dump.
2700 * scripts/restore.in: Fixed --version output.
2701 * src/Makefile.am (localedir.h rule): Generate correct
2702 DEFAULT_RMT_COMMAND variable.
2703 * src/common.h (rmt_command_option): New variable.
2704 * src/list.c (read_and): Print block number before
2705 issuing 'Skipping to next header' diagnostics, if
2706 requested by block_number_option.
2707 * src/rtapelib.c: Use rmt_command_option instead of
2708 hardcoded "/etc/rmt".
2709 * src/tar.c: New option --rmt-command.
2710 (decode_options): Handle --rmt-command. Initialize
2711 rmt_command_option to DEFAULT_RMT_COMMAND.
2712
2713 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2714
2715 * doc/tar.texi: Further update.
2716
2717 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2718
2719 * configure.ac: Minor fix
2720 * scripts/Makefile.am: Updated
2721 * scripts/backup-specs: Updated
2722 * scripts/backup.in: Minor fixes
2723 * scripts/backup.sh: Removed
2724 * scripts/backup.sh.in: New file. Source for backup.sh
2725 * scripts/restore.in: New file
2726 * scripts/.cvsignore: Updated
2727 * scripts/WARNING: Removed
2728 * doc/tar.texi: Updated
2729 * NEWS: Updated
2730
2731 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2732
2733 * src/names.c (name_gather): Bugfix: Honor single -C with
2734 --same-order.
2735 * tests/same-order01.sh: New file
2736 * tests/same-order02.sh: New file
2737 * tests/Makefile.am: Updated
2738
2739 * tests/append.sh: Added copyleft header
2740 * tests/delete01.sh: Likewise
2741 * tests/delete02.sh: Likewise
2742 * tests/delete04.sh: Likewise
2743 * tests/extrac01.sh: Likewise
2744 * tests/extrac02.sh: Likewise
2745 * tests/extrac03.sh: Likewise
2746 * tests/extrac04.sh: Likewise
2747 * tests/gzip.sh: Likewise
2748 * tests/ignfail.sh: Likewise
2749 * tests/incremen.sh: Likewise
2750 * tests/multiv01.sh: Likewise
2751 * tests/old.sh: Likewise
2752 * tests/options.sh: Likewise
2753 * tests/recurse.sh: Likewise
2754 * tests/version.sh: Likewise
2755 * tests/volume.sh: Likewise
2756 * tests/star/gtarfail.sh: Likewise
2757 * tests/star/gtarfail2.sh: Likewise
2758 * tests/star/multi-fail.sh: Likewise
2759 * tests/star/pax-big-10g.sh: Likewise
2760 * tests/star/qucktest.sh: Likewise
2761 * tests/star/ustar-big-2g.sh: Likewise
2762 * tests/star/ustar-big-8g.sh: Likewise
2763
2764 * doc/.cvsignore: Updated
2765
2766 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2767
2768 * configure.ac: Check whether date accepts +format argument
2769 (for backup scripts).
2770 * scripts/level-0: Removed
2771 * scripts/level-1: Removed
2772 * scripts/weekly.new: Removed
2773 * scripts/dump-remind: Removed
2774 * scripts/backup.in: New file
2775 * scripts/backup.sh: New file
2776 * scripts/dump-remind.in: New file
2777 * scripts/backup-specs: Updated
2778 * scripts/Makefile.am: Updated for new directory contents.
2779 * scripts/.cvsignore: Updated
2780
2781 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2782
2783 * TODO: Updated
2784 * doc/tar.texi: Updated
2785 * src/tar.c: --utc implies -vv
2786
2787 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2788
2789 * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
2790 does not define it if it fails to find iconv.h.
2791
2792 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2793
2794 * bootstrap: Use gnulib-tool to generate lib/Makefile.am
2795 and parts of configure.ac
2796 * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
2797 * lib/Makefile.am: Removed
2798 * lib/Makefile.tmpl: New file.
2799 * lib/.cvsignore: Updated
2800 * m4/.cvsignore: Updated
2801 * src/xheader.c: Include stpcpy.h
2802
2803 * src/create.c: Produce an error, not warning, if the
2804 filename is too long.
2805 * tests/longv7.sh: Synchronized with the recent changes.
2806
2807 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
2808
2809 * configure.ac: Fixed test for iconv_t
2810 * src/rmt.h: Bugfix by Jürgen Weigert
2811 * THANKS: Add Jürgen Weigert
2812 * tests/star/README: Fixed typo
2813
2814 2004-04-04 Paul Eggert <eggert@twinsun.com>
2815
2816 Merge getdate documentation changes from coreutils.
2817
2818 * doc/getdate.texi: Update from coreutils CVS.
2819 * doc/tar.texi: Fix getdate menu to match getdate.texi's.
2820
2821 Merge recent gnulib changes, and remove some lint.
2822
2823 Improve support for nanosecond-resolution time stamps.
2824 * bootstrap: Add gettime, timespec modules.
2825 * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
2826 * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
2827 timespec.h): Add.
2828 * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
2829 * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
2830 st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
2831 * src/common.h (newer_mtime_option): Now a struct timespec, not
2832 time_t. All uses changed.
2833 (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
2834 * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
2835 * src/incremen.c (scan_path): Likewise.
2836 * src/list.c (read_and): Likewise.
2837 * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
2838 whether newer_mtime_option is initialized.
2839 * src/tar.c (decode_options): Likewise.
2840 * src/tar.c (decode_options): Adjust to new signature for get_date.
2841
2842 * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
2843 result of safe_read, full_write, and similar functions.
2844 Detect safe_read error by comparing to SAFE_READ_ERROR;
2845 detect full_write error by comparing to 0.
2846 All uses changed.
2847 * src/common.h (write_error_details, sys_write_archive_buffer):
2848 Likewise.
2849 * src/misc.c (write_error_details): Likewise.
2850 * src/rmt.c (main): Likewise.
2851 * src/rmt.h (rmt_read__, rmt_write__): Likewise.
2852 * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
2853 * src/sparse.c (sparse_scan_file, sparse_dump_region,
2854 check_sparse_region, check_data_region): Likewise.
2855 * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
2856 sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
2857 * src/update.c (append_file): Likewise.
2858
2859 * src/buffer.c (clear_read_error_count): Use explicit (void)
2860 to indicate a function with no arguments.
2861 * src/create.c (check_links): Likewise.
2862 * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
2863 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
2864 sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
2865 sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
2866 Likewise.
2867 * src/utf8.c (get_input_charset): Likewise.
2868 * src/xheader.c (xheader_ghdr_name, xheader_write_global,
2869 xheader_decode_global, extended_header_init): Likewise.
2870 * tests/mksparse.c (usage): Likewise.
2871
2872 * src/buffer.c (new_volume): Rename local variables to avoid
2873 shadowing warnings.
2874 * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
2875 sparse_file_p, sparse_member_p, sparse_fixup_header,
2876 sparse_dump_file, sparce_extract_file, sparse_skip_file,
2877 sparse_diff_file): Likewise.
2878 * src/compare.c (diff_archive): Likewise.
2879 * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
2880 dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
2881 Likewise.
2882 * src/extract.c (repair_delayed_set_stat): Likewise.
2883 * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
2884 Likewise.
2885 * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
2886 tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
2887 sparse_dump_file, sparse_file_p, sparse_member_p,
2888 sparse_fixup_header, sparse_extract_file, sparse_skip_file,
2889 check_data_region, sparse_diff_file): Likewise.
2890 * src/system.c (sys_stat_nanoseconds): Likewise.
2891 * src/xheader.c (xheader_format_name): Likewise.
2892
2893 * src/common.h (enum old_files): Remove comma before }; not portable.
2894
2895 * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
2896 * src/rmt.c (usage): Likewise.
2897 * src/xheader.c (xheader_set_single_keyword): Likewise.
2898 * tests/genfile.c (usage): Likewise.
2899 * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
2900 to die.
2901
2902 * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
2903 some gcc warnings.
2904 * src/names.c (uname_to_uid, gname_to_gid): Likewise.
2905 * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
2906 langtab.charset, charset_lookup): Likewise.
2907
2908 * src/common.h (name_init): Remove unused args. All callers changed.
2909 * src/names.c (name_init): Likewise.
2910
2911 * src/common.h (usage, xheader_write, xheader_write_global,
2912 sys_reset_uid_gid): New decls.
2913
2914 * src/compare.c (report_difference, process_noop): Add
2915 __attribute__ ((unused)) for unused attributes.
2916 * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
2917 Likewise.
2918 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
2919 gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
2920 path_coder, size_coder, uid_coder, uname_coder,
2921 sparse_numblocks_coder): Likewise.
2922
2923 * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
2924 dump_file0): Now static.
2925 * src/utf8.c (charset_lookup): Likewise.
2926 * src/xheader.c (xheader_protected_pattern_p,
2927 xheader_protected_keyword_p, xheader_set_single_keyword,
2928 xheader_keyword_deleted_p, xheader_keyword_override_p,
2929 xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
2930 Likewise.
2931 * tests/genfile.c (usage): Likewise.
2932 * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
2933 Likewise.
2934
2935 * src/create.c (hash_link): Rewrite to avoid cast.
2936
2937 * src/extract.c (file_newer_p): Use parameter, not global var.
2938 * src/misc.c (write_error_details): Likewise.
2939
2940 * src/extract.c (prepare_to_extract): Remove directory arg; not
2941 used. All callers changed.
2942
2943 * src/misc.c (close_fatal): Remove; not used.
2944 * src/system.c (sys_utimes): Likewise.
2945
2946 * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
2947
2948 * src/rmt.c (main): Update copyright date to 2004.
2949 * src/tar.c (decode_options): Likewise.
2950
2951 * src/rtapelib.c (get_status_string): Don't lose errno when
2952 skipping the error messages.
2953 (get_status): Report an error if atol returns a negative number.
2954
2955 * src/utf8.c (struct langtab, langtab, charset_lookup,
2956 get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
2957 definitions.
2958 (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
2959 Use macros, not definitions, to avoid type clashes with system
2960 headers.
2961 (charset_lookup): Local var is now auto, not static.
2962 (utf8_convert): Use ICONV_CONST instead of const, to avoid
2963 type clashes.
2964
2965 * src/utf8.c (langtab): Initialize all elements of struct, to
2966 avoid gcc warning.
2967 * src/xheader.c (xhdr_tab): Likewise.
2968
2969 * src/xheader.c: Include fnmatch.h, since we use fnmatch.
2970
2971 * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
2972
2973 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
2974
2975 * NEWS: Updated
2976 * configure.ac: Raised version number to 1.13.94
2977 * src/system.h: Protect inclusion of <sys/time.h>
2978 by ifdef.
2979 Declare time() if HAVE_DECL_TIME is 0
2980 * tests/.cvsignore: Added mksparse
2981
2982 * tests/sparse01.sh: New file
2983 * tests/multiv02.sh: New file
2984 * tests/Makefile.am: Add sparse01.sh and multiv02.sh
2985 * tests/longv7.sh: Added missing call to 'after'
2986
2987 * src/common.h: Added missing prototypes
2988 * src/compare.c (diff_archive): Use is_sparse member
2989 instead of GNUTYPE_SPARSE.
2990 * src/create.c: Removed unused variables
2991 * src/extract.c (extract_archive): Use sparse_member_p instead
2992 of GNUTYPE_SPARSE.
2993 Removed unused variables
2994 * src/list.c (decode_header): Use sparse_fixup_header to correct
2995 the st_size value.
2996 (print_header): Do not rely on GNUTYPE_SPARSE type.
2997 Use st->stat.st_size to print real file size.
2998 (skip_member): Assign stat_info.file_name to save_name. This fixes
2999 bug reported by Mads Martin Joergensen <mmj@suse.de>
3000 Use sparse_skip_file() to skip sparse members.
3001 * src/rtapelib.c: include "common.h"
3002 * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
3003 (struct tar_sparse_optab.fixup_header): New member
3004 (tar_sparse_member_p): New function.
3005 (tar_sparse_init): Return true if decode_header is not provided
3006 (tar_sparse_fixup_header)
3007 (sparse_member_p,sparse_fixup_header)
3008 (sparse_skip_file)
3009 (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
3010 (star_fixup_header, pax_sparse_member_p): New function
3011 (pax_decode_header): Remove
3012 * src/system.h: Include <sys/time.h> and <utime.h> when available
3013 * src/tar.c (usage): Prototype moved to common.h
3014 * src/tar.h (struct tar_stat_info.is_sparse): New member
3015 * src/utf8.c (utf8_convert): Changed prototype
3016 (get_input_charset): Removed unused variable
3017 * src/xheader.c: include <fnmatch.h>
3018 (size_decoder): Assign to both st->archive_file_size and
3019 st->stat.st_size.
3020 (st->stat.st_size): Assign to st->stat.st_size
3021 (sparse_numbytes_decoder): Removed unused variable
3022 * src/.cvsignore: Added .gdbinit
3023 * THANKS: Added Mads Martin Joergensen
3024
3025 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3026
3027 * src/create.c (write_long_name): Do not allow more than
3028 NAME_FIELD_SIZE-1 characters in a file name for V7 format
3029 archives.
3030 * tests/longv7.sh: New file.
3031 * tests/Makefile.am: Add longv7.sh
3032
3033 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3034
3035 * src/buffer.c (open_archive): Clear read_full_records_option
3036 if reading from a pipe.
3037 (short_read): Display warning about the deduced record size
3038 if version > 1
3039 * tests/star/pax-big-10g.sh: Updated to match the above changes.
3040 * tests/star/ustar-big-2g.sh: Likewise.
3041 * tests/star/ustar-big-8g.sh: Likewise.
3042
3043 * configure.ac: Added gl_FUNC_STRTOULL
3044 * src/create.c (start_header): Check for GNU_FORMAT
3045 if incremental_option is set.
3046 * src/xheader.c (to_decimal): New function.
3047 (xheader_format_name): Use to_decimal() instead of snprintf.
3048 * tests/listed01.sh: Use genfile instead of dd
3049 * tests/multiv01.sh: Likewise.
3050
3051 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3052
3053 * src/list.c (read_and): Stop processing the archive after
3054 encountering a single zero record. Many old archives contain
3055 arbitrary garbage after it.
3056 The warning is issued anyway.
3057
3058 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3059
3060 * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
3061 conversion buffer was not null terminated. Fix provided
3062 by Leland Lucius <llucius@tiny.net>
3063 * THANKS: Added Leland Lucius
3064 * src/utf8.c (utf8_convert): Indentation fix.
3065
3066 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3067
3068 * src/buffer.c (flush_read): Bugfix: the
3069 condition at line 714 included
3070
3071 || (status > 0 && !read_full_records_option)
3072
3073 which is grossly wrong, since even if new_volume() below succeeds,
3074 the subsequent call to rmtread will overwrite the chunk of data
3075 already read in the buffer and thus spoil everything.
3076 * src/system.c (sys_child_open_for_uncompress): Minor stylistic
3077 fix.
3078 * tests/star/multi-fail.sh: New test.
3079 * tests/Makefile.am: Added multi-fail.sh
3080 * tests/star/README: Updated
3081
3082 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3083
3084 * NEWS: Updated
3085 * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
3086 * src/common.h (utc_option): new global
3087 (enum old_files.KEEP_NEWER_FILES): New element
3088 * src/extract.c: Handle --keep-newer-files option
3089 * src/list.c (tartime): Print UTC if --utc was given.
3090 * src/tar.c: New options: --utc and keep-newer-files
3091
3092 * tests/Makefile.am: Added new tests
3093 * tests/after: Rewritten
3094 * tests/before: Rewritten
3095 * tests/preset.in: Rewritten
3096 * tests/delete03.sh: Accommodate for the new testsuite logic
3097 * tests/gzip.sh: Likewise
3098 * tests/incremen.sh: Likewise
3099 * tests/listed01.sh: Likewise
3100 * tests/multiv01.sh: Likewise
3101 * tests/old.sh: Likewise
3102 * tests/options.sh: Likewise
3103 * tests/version.sh: Likewise
3104 * tests/volume.sh: Likewise
3105
3106 * tests/star: New directory
3107 * tests/star/README: New file
3108 * tests/star/gtarfail.sh: New file
3109 * tests/star/gtarfail2.sh: New file
3110 * tests/star/pax-big-10g.sh: New file
3111 * tests/star/qucktest.sh: New file
3112 * tests/star/ustar-big-2g.sh: New file
3113 * tests/star/ustar-big-8g.sh: New file
3114
3115 2004-02-26 Paul Eggert <eggert@twinsun.com>
3116
3117 * doc/tar.texi (dircategory Individual utilities): Append period,
3118 as suggested by Karl Berry.
3119
3120 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3121
3122 * src/list.c (decode_header): Call xheader_decode before
3123 the assignment to current_stat_info.archive_file_size.
3124
3125 2004-02-23 Paul Eggert <eggert@twinsun.com>
3126
3127 * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
3128
3129 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3130
3131 1.13.93 released.
3132
3133 * NEWS: Updated
3134 * tests/before: Move testing of the prerequisite archive formats
3135 to the separate function 'prereq'. Do not expect any arguments
3136 * tests/delete03.sh: Use prereq() instead of passing arguments
3137 to 'before'.
3138 * tests/incremen.sh: Likewise.
3139 * tests/listed01.sh: Likewise.
3140 * tests/multiv01.sh: Likewise.
3141
3142 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3143
3144 Added UTF-8 support. Finished global extended header
3145 support.
3146
3147 * NEWS: Minor fix
3148 * configure.ac: Detect libiconv
3149 * src/utf8.c: New file. Conversions to and from utf-8.
3150 * src/Makefile.am: Added utf8.c
3151 * src/create.c (write_header_name) In pax format, use
3152 "path" keyword if the file name is not ASCII
3153 (start_header): Likewise for uname and gname.
3154 * src/list.c: Decode encountered global headers.
3155 * src/xheader.c: Use keywords from the global
3156 headers.
3157 Correctly handle UTF-8 conversions.
3158 (xheader_list_destroy): New function.
3159 (xheader_set_single_keyword,xheader_set_keyword_equal): Added
3160 missing gettext markers
3161 (decode_record): Rewritten using caller-provided handler and
3162 data closure.
3163 * tests/listed01.sh: Give credit to Andreas Schuldei.
3164
3165 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3166
3167 * src/create.c (dump_file0): The conditional at line
3168 1296 prevented incremental backups on individual files
3169 from working, as reported by Andreas Schuldei
3170 <andreas@schuldei.org>.
3171
3172 This is due to the condition
3173
3174 (0 < top_level || !incremental_option)
3175
3176 Removing it makes incremental backups work for individual
3177 files as well as for directories. On the other hand, it does
3178 not affect other functionality, as shown by the reasoning below:
3179
3180 To begin with, the two parts of this condition are mutually
3181 superfluous, because
3182
3183 1) when top_level < 0, incremental_option == 1
3184 so the condition yields false
3185 2) when top_level >= 0, incremental_option == 0
3186 so the condition yields true.
3187
3188 In other words, it is completely equivalent to
3189
3190 (!incremental_option)
3191
3192 Now, let's consider the effect of its removal. There are two cases:
3193
3194 1) when incremental_option==1
3195 This means incremental backup in progress. In this case dump_file
3196 is invoked only for directories or for files marked with 'Y' by
3197 get_directory_contents. The latter are those that did not meet the
3198 condition in incremen.c:242, which is exactly the same condition
3199 as this at create.c:1296. So, for these files the check
3200 (!incremental_option) is useless, since the rest of the
3201 conditional will yield false anyway. On the other hand, if
3202 dump_file is invoked on a directory, the conditional will yield
3203 false due to !S_ISDIR assertion, so these will be processed as usual.
3204
3205 Thus, for this case the extra condition (!incremental_option) is
3206 irrelevant, and its removal won't alter the behavior of tar,
3207 *except* that it will enable incremental backups on individual
3208 files, which is the wanted effect.
3209
3210 2) when incremental_option==0
3211 In this case the condition yields true and its removal does not
3212 affect the functionality.
3213
3214 * THANKS: Updated
3215 * configure.ac: Raised patchlevel to 93
3216 * src/incremen.c: Minor stylistic fixes.
3217 * tests/listed01.sh: New test. Check listed incremental
3218 backups on individual files.
3219 * tests/Makefile.am: Added listed01.sh
3220
3221 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3222
3223 * src/common.h (simple_finish_header,start_private_header): New
3224 declarations
3225 (xheader_ghdr_name): Changed declaration
3226 * src/create.c (start_private_header): Removed static qualifier.
3227 (write_extended): Removed superfluous last argument. Use
3228 xheader_write()
3229 (simple_finish_header): New function.
3230 (finish_header): Use simple_finish_header() to break recursive
3231 dependency between this function and write_extended().
3232 * src/tar.c (assert_format): Do not bail out if several
3233 --format arguments are given. This is a common case when
3234 TAR_OPTIONS are used.
3235 (decode_options): New option --show-defaults displays the
3236 compiled-in defaults.
3237 Use POSIX format if no --format option was given and
3238 --pax-option was specified.
3239 Do not allow to use --pax-option unless the archive format is
3240 set to POSIX (or reading subcommand is requested).
3241
3242 * src/update.c (update_archive): Write global extended header if
3243 constructed.
3244 * src/xheader.c (xheader_format_name): Bugfix.
3245 (xheader_xhdr_name): Changed the default extended header name
3246 to '%d/PaxHeaders.%p/%f', as POSIX requires.
3247 (xheader_ghdr_name): Removed unused argument.
3248 (xheader_write,xheader_write_global): New function.
3249 (xheader_decode): Modified to honor overrides whatever
3250 the current archive format is.
3251
3252 * src/delete.c (delete_archive_members): Call xheader_decode
3253 unconditionally.
3254 * src/list.c (decode_header): Likewise.
3255 * src/incremen.c (sort_obstack): Fixed typo in the comment
3256
3257 * doc/tar.texi: Document new default for extended
3258 header names.
3259
3260 * tests/before: Accept an optional list of allowed archive
3261 formats. Exit with the status 77 if the current archive
3262 format does not match any of them.
3263 * tests/delete03.sh: Require gnu, oldgnu or posix format
3264 * tests/incremen.sh: Require gnu or oldgnu format
3265 * tests/multiv01.sh: Likewise
3266
3267 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3268
3269 * doc/tar.texi (Option Summary): Documented --pax-option
3270 * src/tar.c: Likewise.
3271 * NEWS: Likewise.
3272 * src/create.c (to_chars): Added a comment.
3273 * src/tar.h: Comment to GNU_FORMAT
3274
3275 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3276
3277 * README: Updated
3278 * configure.ac: Added stpcpy
3279 * bootstrap: Likewise
3280 * lib/Makefile.am: Likewise
3281 * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
3282 functions
3283 * src/create.c (write_extended): Call xheader_xhdr_name
3284 instead of using hardcoded "././@PaxHeader" name.
3285 * src/tar.c: New option --pax-option (equivalent to -o option
3286 of pax).
3287 * src/xheader.c: Implement pax -o option. Fixed misleading
3288 heading comment (introduced 2003-09-02).
3289 * src/incremen.c: Minor fixes
3290 * m4/.cvsignore: Updated
3291
3292 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3293
3294 * src/incremen.c: Removed accumulator stuff in favor of obstack.
3295 (get_directory_contents): Split into two functions
3296 * src/update.c: Minor changes
3297 * doc/tar.texi: Fixed typo
3298
3299 2004-02-15 Paul Eggert <eggert@twinsun.com>
3300
3301 Fix Debian bug 230872, originally reported by Jeff King in
3302 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
3303
3304 * doc/tar.texi (posix compliance): Remove. The whole section
3305 was a misunderstanding of what POSIXLY_CORRECT is supposed to
3306 mean. The GNU Coding Standards says that POSIXLY_CORRECT
3307 is for disabling extensions that are incompatible with POSIX:
3308 it is not for disabling compatible extensions. All references
3309 to this section removed.
3310 (posix): This format is created only if the posix format is
3311 specified; it is no longer created if gnu format is specified
3312 and POSIXLY_CORRECT is set.
3313 * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
3314 POSIX does not specify the behavior of tar, so we should
3315 not worry about POSIXLY_CORRECT here.
3316
3317 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3318
3319 * Makefile.am: Removed m4
3320 * configure.ac: Require automake-1.8/autoconf-2.59. Removed
3321 m4/Makefile.
3322 * README-alpha: Updated
3323 * bootstrap: Updated TP URL, improved help output. Default
3324 to :ext:anoncvs and set CVS_RSH, unless already set.
3325 * m4/Makefile.am: Removed
3326
3327 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3328
3329 * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
3330 Use $option instead of $1 so all options will be parsed.
3331
3332 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3333
3334 Started rewriting buffer.c ...
3335
3336 * bootstrap: New option --no-po
3337 * src/buffer.c (new_volume,check_label_pattern): Changed return type.
3338 (time_to_start_writing): Changed data type
3339 (file_to_switch_to): Removed. Variable never assigned to.
3340 (open_archive) Moved option compatibility checks to tar.c
3341 Other minor changes.
3342 * src/common.h (maybe_backup_file): Changed return type
3343 * src/misc.c: Likewise.
3344 * src/create.c: Updated invocations of safer_name_suffix
3345 * src/extract.c: Likewise
3346 * src/delete.c: Updated assignment to write_archive_to_stdout
3347 * src/tar.c (decode_options): More option compatibility checks
3348 (moved from buffer.c)
3349 * src/update.c (time_to_start_writing): Changed data type.
3350 * tests/recurse.sh: New test case.
3351 * tests/mksparse.c: New file.
3352 * tests/Makefile.am: Added recurse.sh and mksparse.c
3353
3354 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3355
3356 * src/sparse.c (sparse_diff_file): Bugfix. Thanks
3357 Martin Simmons for the patch.
3358 * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
3359 <pius@pld-linux.org> for the patch.
3360
3361 2003-12-26 Paul Eggert <eggert@twinsun.com>
3362
3363 Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
3364 and translation website.
3365
3366 * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
3367 intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
3368 isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
3369 a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
3370 files are replaced by autoreconf. Also, there seems to be a bug
3371 in gettext/autoconf/automake if we try to omit these files after
3372 autoreconf has replaced them, even though the gettext manual says
3373 they're optional. So give up and just include them for now, even
3374 though they make 'configure' longer and slower.
3375
3376 Change translation URL from
3377 <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
3378 <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
3379 accommodate translator website revamp.
3380
3381 Fail if autoreconf fails.
3382
3383 * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
3384 signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
3385 ignore files now supplied by gettext 0.13.1.
3386
3387 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3388
3389 Synchronized with the backup repository on Mirddin
3390
3391 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3392
3393 * configure.ac: Check for varios members of struct stat
3394 that may represent file modification times with a subsecond
3395 precision.
3396 Check for utimes (for future use)
3397 * src/buffer.c (short_read): Issue a warning on short reads.
3398 * src/common.h (sys_stat_nanoseconds): New function
3399 * src/create.c (dump_file0): Use sys_stat_nanoseconds().
3400 * src/list.c (read_and): Treat only two successive zero
3401 filled blocks as an EOF indicator. Issue a warning if
3402 a single one is encountered.
3403 * src/system.c (sys_stat_nanoseconds): New function
3404 * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
3405 members.
3406 * src/xheader.c (code_time,decode_time): Support for subsecond
3407 precision.
3408 (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
3409 (mtime_coder,mtime_decoder): Update invocations of code_time and
3410 decode_time.
3411 (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
3412 (sparse_numblocks_decoder,sparse_offset_decoder)
3413 (sparse_numbytes_decoder): Updated
3414
3415 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3416
3417 * src/names.c (safer_name_suffix): Reverted change made
3418 2003-11-14. Reason: Discussion with Paul Eggert and
3419 Jean-Louis Martineau. See also ChangeLog entry from
3420 1999-08-14.
3421 * tests/delete03.sh: Likewise.
3422 * tests/extrac04.sh: Likewise.
3423 * tests/multiv01.sh: Likewise.
3424
3425 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3426
3427 * src/incremen.c (write_directory_file): Use sys_truncate
3428 * src/list.c (print_header): Use archive_file_size member
3429 when printing real file size.
3430 * src/sparse.c (sparse_scan_file): Correctly handle files with
3431 a hole at the end.
3432 (sparse_dump_region,sparse_extract_region): Allow for zero size
3433 trailing blocks
3434
3435 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3436
3437 * configure.ac: Raised version number to 1.13.92
3438 * src/list.c (decode_header): Discern between pax and ustar
3439 formats
3440 Initialize current_stat_info.archive_file_size.
3441
3442 NOTE: Modifications from this date on are temporarily
3443 stored on local CVS on mirddin. This repository will
3444 be synchronized with Savannah as soon as the latter
3445 becomes operational again.
3446
3447 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3448
3449 * TODO: Updated
3450 * src/sparse.c: Initial implementation of GNU/pax sparse
3451 file format.
3452 * src/common.h (xheader_store): Changed prototype.
3453 * src/create.c: Update calls to xheader_store
3454 * src/extract.c (extract_archive): Check reported size vs.
3455 archive file size to determine if we have to do with a
3456 sparse file.
3457 * src/tar.c (usage): Cleaned up the sample argument to --newer
3458 option.
3459 (decode_options): Allow --sparse for POSIX_FORMAT archives.
3460 * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
3461 extra argument
3462 Implemented GNU.sparse.* keywords.
3463
3464 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3465
3466 * configure.ac: Check for setlocale. Thanks Bruno Haible for
3467 reporting.
3468
3469 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3470
3471 * src/create.c (write_gnu_long_link): Use oldgnu
3472 magic with @LongLink blocks.
3473
3474 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3475
3476 * src/tar.h: Support for star sparse format.
3477 * src/sparse.c: Likewise.
3478
3479 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3480
3481 * src/sparse.c (sparse_diff_file): New function
3482 * src/common.h (sys_compare_uid,sys_compare_gid): New functions
3483 (sys_compare_uid_gid): Removed.
3484 (sys_compare_links,report_difference): Changed prototype
3485 (sparse_diff_file): New function
3486 * src/system.c (sys_compare_uid,sys_compare_gid): New functions
3487 (sys_compare_uid_gid): Removed.
3488 (sys_compare_links): Changed declaration
3489 * src/compare.c (diff_archive): Use sparse_diff_file.
3490
3491 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3492
3493 Rewritten sparse file handling.
3494
3495 * src/sparse.c: New file. Provides a universal framework
3496 for various methods for sparse files handling.
3497 * src/Makefile.am: Added sparse.c
3498 * src/common.h (struct sp_array,sparsearray,sp_array_size)
3499 (init_sparsearray,fill_in_sparse_array): Removed
3500 (enum dump_status): New data type
3501 (pad_archive,close_diag,open_diag,read_diag_details)
3502 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
3503 functions.
3504 (sparse_file_p,sparse_dump_file,sparse_extract_file): New
3505 functions.
3506 (print_header): Changed prototype declaration.
3507 * src/tar.h (struct sp_array): Declaration from common.h
3508 (struct tar_stat_info): New members archive_file_size,
3509 sparse_map_avail,sparse_map.
3510 * src/create.c: Major rewrite.
3511 * src/extract.c: Use new sparse file interface.
3512 * src/compare.c (diff_sparse_files): Temporary placeholder.
3513
3514 * src/buffer.c: Minor changes
3515 * src/tar.c: Likewise.
3516 * src/list.c: Likewise.
3517 * src/misc.c (close_diag,open_diag,read_diag_details)
3518 (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
3519 diagnostics functions.
3520 * src/incremen.c: Use new diagnostics functions.
3521 * src/names.c: Likewise.
3522
3523 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3524
3525 * configure.ac: Fixed check for setsockopt
3526
3527 * src/create.c: Do not zero-terminate name field if
3528 the name is exactly 100 characters long.
3529 (write_ustar_long_name): Fixed cheking for unsplittable
3530 names.
3531
3532 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3533
3534 * src/create.c (start_header): Removed debugging hook
3535 (dump_file): Fixed handling of linkname field.
3536 * src/names.c (safer_name_suffix): If the input
3537 file name ends with a slash, output one should do so
3538 as well.
3539 * doc/tar.texi: Documented --format=ustar
3540
3541 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3542
3543 * src/tar.h (archive_format): USTAR_FORMAT: New type.
3544 * src/create.c: Added POSIX.1-1988 support.
3545 * src/names.c (safer_name_suffix): Skip leading ./
3546 * src/tar.c: New option --format=ustar forces
3547 POSIX.1-1988 archive format.
3548 * tests/delete03.sh: Updated.
3549 * tests/extrac04.sh: Updated.
3550 * tests/multiv01.sh: Updated.
3551
3552 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3553
3554 * src/list.c (read_and): Initialize current_stat_info
3555 and extended_header at the start of the loop.
3556 * src/names.c (all_names_found): Check if the argument
3557 contains valid filename. Fixes coredump on `not_a_tar_file'
3558 * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
3559 (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
3560 Fixes `pax-big-10g' bug.
3561
3562 2003-11-12 Paul Eggert <eggert@twinsun.com>
3563
3564 Fix some C compatibility bugs reported by Joerg Schilling.
3565
3566 * src/common.h (stripped_prefix_len): Fix misspelling
3567 "stripped_path_len" in declaration.
3568 * src/rmt.c (main): Use "return FOO;" rather than
3569 "exit (FOO);"; we no longer have to worry about
3570 pre-ANSI hosts that mishandled returned values from "main".
3571 * src/tar.c (main): Likewise. This avoids warnings on some
3572 compilers.
3573 * src/system.c: Include signal.h, for 'kill'.
3574 * src/system.h (DEV_BSIZE): Remove.
3575 (DEFAULT_ST_BLKSIZE): New macro.
3576 (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
3577 * src/tar.c (enum): Remove comma just before }.
3578
3579 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3580
3581 * src/list.c (decode_header): Initialize st_atime and
3582 st_ctime.
3583
3584 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3585
3586 * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
3587 Bunk <bunk@fs.tum.de> for reporting.
3588 * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
3589 <martin@xemacs.org> for spotting.
3590
3591 2003-11-04 Paul Eggert <eggert@twinsun.com>
3592
3593 * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
3594 C99 require this.
3595
3596 2003-10-26 Paul Eggert <eggert@twinsun.com>
3597
3598 * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
3599 Bug reported by Christian Weisgerber.
3600
3601 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3602
3603 * AUTHORS: Updated
3604 * NEWS: Updated
3605 * src/tar.c (decode_options): Removed superfluous archive format
3606 check
3607 * doc/tar.texi: Documented new features.
3608
3609 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3610
3611 * NEWS: Updated
3612 * THANKS: Added Wojciech Polak
3613 * configure.ac: Added checks for missing functions. Raised
3614 version number to indicate alpha release.
3615 * lib/Makefile.am: Added missing headers
3616 * lib/waitpid.c: Added missing includes.
3617 * src/extract.c: Likewise.
3618 * src/names.c: Removed spurious includes.
3619 * src/xheader.c: Likewise.
3620 * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
3621 macro overriding broken mkdir prototypes.
3622
3623 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3624
3625 * configure.ac: Check for dev_t and ino_t.
3626 * m4/Makefile.am: Added missing files.
3627 * src/system.c: New file.
3628 * src/Makefile.am: Added system.c
3629 * src/common.h: Prototypes for functions from system.c
3630 * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
3631 * src/buffer.c: Moved system dependencies to system.c
3632 * src/compare.c: Likewise.
3633 * src/create.c: Likewise.
3634 * src/delete.c: Likewise.
3635 * src/extract.c: Likewise.
3636 * src/rtapelib.c: Likewise.
3637
3638 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3639
3640 Implemented --occurrence option.
3641
3642 * NEWS: Updated.
3643 * src/tar.c: New option --occurrence.
3644 * src/common.h (occurrence_option): New global
3645 (struct name): Changed `found' member to `uintmax_t
3646 found_count'.
3647 (names_done): Removed
3648 (all_names_found): Changed prototype.
3649 (ISFOUND,WASFOUND): New macros
3650 * src/delete.c (delete_archive_members): Honor --occurrence
3651 option.
3652 * src/list.c (read_and): Likewise.
3653 * src/names.c: Count number of occurrences of each name in the
3654 archive.
3655 (name_match): Honor --occurrence option.
3656 (names_done): Removed
3657 (all_names_found,names_notfound): Rewritten.
3658
3659 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3660
3661 * src/tar.c: Removed extra precaution regarding
3662 subcommand_option == CAT_SUBCOMMAND
3663 * lib/Makefile.am: Updated
3664
3665 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3666
3667 * src/common.h (names_done): New function.
3668 * src/names.c: Likewise.
3669 * src/list.c (read_and): Use all_names_found() as `while'
3670 condition.
3671 * src/tar.c: New option --first-copy
3672 * NEWS: Updated
3673
3674 2003-09-24 Paul Eggert <eggert@twinsun.com>
3675
3676 * src/rmt.c (main): Don't translate Copyright string; international
3677 law says the word "Copyright" should be in English.
3678 * src/tar.c (decode_options): Likewise.
3679
3680 2003-09-22 Paul Eggert <eggert@twinsun.com>
3681
3682 * doc/tar.texi (extracting untrusted archives): New section.
3683
3684 * src/common.h (stripped_path_len): Renamed from cut_path_elements.
3685 Return size_t, not pointer, so that we don't have to worry about
3686 violating the C standard by converting char const * to char *.
3687 All callers changed.
3688 * src/names.c (stripped_path_len): Likewise. Strip file system
3689 prefix, too. Count adjacent slashes as if they were one slash;
3690 that is the POSIX standard.
3691
3692 2003-09-17 Paul Eggert <eggert@twinsun.com>
3693
3694 * README-alpha: Document maintainer tool assumptions a bit. GNU
3695 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
3696 Debian bug 211447. Fix minor misspellings/whitespace nits.
3697
3698 * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
3699 gl_USE_SYSTEM_EXTENSIONS.
3700
3701 * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
3702 * m4/.cvsignore: Add restrict.m4, time_r.m4.
3703
3704 2003-09-17 Paul Eggert <eggert@twinsun.com>
3705
3706 * bootstrap: Don't use "for option; do";
3707 Solaris 8 /bin/sh doesn't like that.
3708
3709 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3710
3711 * README-alpha: Updated
3712 * bootstrap: Updated
3713
3714 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3715
3716 * README-alpha: Updated
3717 * bootstrap: Updated
3718 * po/POTFILES.in: Added src/xheader.c
3719 * src/common.h (cut_path_elements): Added proto.
3720
3721 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3722
3723 * src/buffer.c: Use ngettext where appropriate.
3724 * src/compare.c: Likewise.
3725 * src/create.c: Likewise.
3726 * src/misc.c: Likewise.
3727 * src/tar.c: Likewise.
3728 * src/update.c: Likewise.
3729
3730 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3731
3732 * .cvsignore: Added *.shar.gz
3733 * NEWS: Updated
3734 * TODO: Updated
3735 * src/common.h (strip_path_elements): New variable.
3736 * src/extract.c (extract_archive): Implemented --strip-path
3737 * src/names.c (cut_path_elements): New function.
3738 * src/tar.c: New option --strip-path=NUM.
3739 (decode_options) Assign boolean values to bool variables.
3740
3741 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3742
3743 * src/delete.c: Fixed deletion from the POSIX archives.
3744 * src/list.c (read_header): Minor change.
3745 * src/tar.c (main): Do not check for volume_label_option
3746 if subcommand_option is not CREATE_SUBCOMMAND.
3747 * src/xheader.c (xheader_decode): Store the header as
3748 well (for eventual delete).
3749
3750 * tests/incremen.sh: Explicitly request GNU format. This will
3751 disappear when GNU extended header keywords are working.
3752 * tests/multiv01.sh: Likewise
3753 * tests/volume.sh: Likewise
3754
3755 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3756
3757 * src/create.c: Support for "linkpath" extended keyword.
3758 * src/xheader.c (decode_record): Reversed the return
3759 condition.
3760
3761 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3762
3763 * configure.ac: Allow to redefine the default output format.
3764 * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
3765 (archive_format_string): New function.
3766 (usage): Updated help output.
3767 * README: Updated.
3768 * NEWS: Updated.
3769 * TODO: Updated.
3770
3771 2003-09-02 Paul Eggert <eggert@twinsun.com>
3772
3773 * src/common.h (destroy_stat, xheader_decode, xheader_store,
3774 xheader_read, xheader_finish, xheader_destroy): Add decls;
3775 C99 requires this.
3776
3777 * src/create.c (write_extended): Remove unused local 'bufsize'.
3778
3779 * src/delete.c (delete_archive_members): Handle case of
3780 HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
3781 * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
3782 occurs, as it's not possible.
3783 * src/update.c (update_archive): Likewise.
3784
3785 Use "const" when possible in new code.
3786 * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
3787 (fmttab): Now const. All uses changed.
3788 * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
3789 (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
3790 decode_record, xheader_store, xheader_print, code_string, code_time,
3791 code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
3792 gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
3793 linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
3794 mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
3795 uid_coder, uid_decoder, uname_coder, uname_decoder):
3796 Use pointers to const when possible.
3797 (xhdr_tab): Now const.
3798
3799 * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
3800 (set_archive_format): Report an error if no format name matches,
3801 instead of returning an undefined value.
3802
3803 * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
3804 atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
3805 ctime_decoder, mtime_decoder, path_decoder, size_decoder,
3806 uid_decoder, uname_decoder): Remove unused keyword arg.
3807 All uses changed.
3808
3809 * src/tar.c (set_archive_format): Now static.
3810 * src/xheader.c (xhdr_tab, format_uintmax): Now static.
3811
3812 * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
3813 atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
3814 linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
3815 ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
3816 size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
3817 Remove forward decls; no longer needed.
3818 (xhdr_tab): Move to end, so that the forward decls aren't needed.
3819 Add a forward declaration.
3820
3821 Use 'bool' in new code, when appropriate.
3822 * src/xheader.c (decode_record): Return bool, not int.
3823 * src/common.h (read_header): Since it accepts bool, change
3824 all callers to use false and true rather than 0 and 1.
3825
3826 * src/xheader.c (decode_record): Fix misspelling in diagnostic
3827 "extended headed" -> "extended header".
3828
3829 GNU coding style fixes.
3830 * src/xheader.c (decode_record, xheader_decode):
3831 Do not use decls like "char *p, *q;".
3832
3833 Minor style fixes.
3834 (xheader_store): Avoid parentheses around object operand of sizeof.
3835
3836 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3837
3838 * src/create.c (start_header): Store long file names
3839 in "path" keyword of an extended header if in POSIX
3840 mode.
3841 (finish_header): print header before calling write_extended().
3842 * src/list.c (list_archive): Always decode the header. This
3843 is necessary so the extended header is processed and the correct
3844 filename is printed no matter what the state of verbose_option.
3845 * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
3846 for the time being).
3847
3848 2003-09-01 Paul Eggert <eggert@twinsun.com>
3849
3850 Update from gnulib, and correct fnmatch to fnmatch-gnu.
3851 * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
3852 Sort.
3853 * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
3854 of AC_GNU_SOURCE.
3855 * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
3856 * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
3857 copying rules from gnulib module descriptions.
3858 (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
3859 Update from gnulib modules alloca, fnmatch, getline, stdbool.
3860 * m4/.cvsignore: Add utimes-null.m4. Sort.
3861
3862 2003-09-01 Sergey Poznyakoff
3863
3864 Added initial support for creating POSIX headers.
3865
3866 * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
3867 (string_to_chars): New functions
3868 (struct xheader): Changed structure
3869 (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
3870 prototypes.
3871 * src/create.c (string_to_chars): New function.
3872 (write_extended): New function
3873 (start_header): Create extended POSIX headers if necessary.
3874 (finish_header): Likewise.
3875 * src/list.c (print_header): Take user/group from
3876 current_stat_info.
3877 * src/names.c (gid_to_gname,gname_to_gid)
3878 (uid_to_uname,uname_to_uid): Changed prototypes.
3879 * src/tar.c: New option --format.
3880 * src/tar.h (OLDGNU_COMPATIBILITY): Removed
3881 (struct extra_header): Removed unused structure.
3882 (union block.extra_header): Removed unused member.
3883 * src/xheader.c: Implemented coder functions.
3884 * bootstrap: Added obstack.
3885 * lib/.cvsignore: Likewise.
3886 * configure.ac: Added 'gl_OBSTACK'
3887 * m4/Makefile.am: Added new files.
3888 * m4/.cvsignore: Likewise.
3889 * TODO: Minor formatting change
3890
3891 2003-08-31 Sergey Poznyakoff
3892
3893 Added initial support for POSIX extended and STAR headers
3894 (only for listing/extracting).
3895
3896 * src/xheader.c: New file.
3897 * src/Makefile.am: Added xheader.c
3898 * src/tar.h (struct star_header): New datatype
3899 (XHDTYPE,XGLTYPE): New defines
3900 (enum archive_format:STAR_FORMAT): New member
3901 (struct tar_stat_info): New datatype.
3902 (union block.star_header): New member.
3903 * src/common.h (orig_file_name,current_file_name)
3904 (current_trailing_slash,current_link_name): Removed variables.
3905 (current_stat_info): New variable
3906 (current_stat): Removed
3907 (extended_header): New variable
3908 (decode_header): Changed prototype.
3909 * src/list.c (decode_header): Added initial support for POSIX extended
3910 and STAR headers.
3911 (skip_member): Check oldgnu_header only if current_format is set
3912 to OLDGNU_FORMAT.
3913 * src/buffer.c: Use current_stat_info
3914 * src/compare.c: Likewise.
3915 * src/create.c: Likewise.
3916 * src/delete.c: Likewise.
3917 * src/incremen.c: Likewise.
3918 * src/mangle.c: Likewise.
3919 * src/update.c: Likewise.
3920 * src/extract.c: Likewise.
3921 (make_directories): Improved check for the existence of the directory
3922 * src/tar.c (destroy_stat): New function.
3923
3924 2003-08-29 Paul Eggert <eggert@twinsun.com>
3925
3926 * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
3927 was worth (e.g., different users in en_GB disagree about -ize
3928 versus -ise).
3929 * po/en_GB.po: Remove.
3930
3931 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3932
3933 * TODO: Updated
3934 * NEWS: Updated
3935 * src/tar.c: Removed support for the obsolete command line
3936 options.
3937 * doc/tar.texi: Removed references to the obsolete command
3938 line options.
3939
3940 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3941
3942 * TODO: Updated
3943 * NEWS: Updated
3944 * doc/tar.texi: Updated
3945 * src/common.h (check_links_option): New variable
3946 (orig_file_name): New variable
3947 (check_links): New proto.
3948 * src/create.c (struct link.nlink): New member
3949 (link_table): Static for the module.
3950 (dump_file): Update `link' member when adding new links
3951 to the link_table.
3952 (check_links): New function.
3953 * src/list.c (print_header): Use orig_file_name.
3954 * src/tar.c: New option --check-links. Changed semantics of
3955 -o to comply to UNIX98 when extracting and to its previous
3956 semantics otherwise.
3957 (main): Call check_links if --check-links. was given.
3958
3959 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3960
3961 * src/list.c (print_header): Revised
3962 * NEWS: Started the entry for 1.13.26
3963 * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
3964
3965 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3966
3967 * .cvsignore: Added to the repository.
3968 * doc/.cvsignore: Likewise.
3969 * lib/.cvsignore: Likewise.
3970 * m4/.cvsignore: Likewise.
3971 * po/.cvsignore: Likewise.
3972 * scripts/.cvsignore: Likewise.
3973 * src/.cvsignore: Likewise.
3974 * tests/.cvsignore: Likewise.
3975
3976 * lib/Makefile.am: Added exitfail.[hc]
3977 * src/misc.c (chdir_do): Fixed call to restore_cwd
3978 * src/buffer.c (flush_read): Fixed behavior on short
3979 reads right after opening the new archive (multiv01.sh test).
3980 (new_volume): Special handling for "-".
3981 * src/list.c (print_header): Print trailing slash if
3982 current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
3983 * tests/multiv01.sh: Minor changes.
3984 * m4/Makefile.am: Added missing files.
3985
3986 2003-07-05 Paul Eggert <eggert@twinsun.com>
3987
3988 Finish the checkin begin yesterday.
3989
3990 * NEWS: Document the user-visible changes installed in the last
3991 two days.
3992
3993 * TODO: New file (actually, resurrected; but with new contents).
3994
3995 * src/list.c (read_and): Give full type for procedure arg.
3996 (read_header): Strip trailing slashes, setting current_trailing_slash.
3997 (tartime): Avoid int overflow when printing year (!).
3998 (print_header): New arg specifying block ordinal. All uses changed.
3999 Print link as 'h' type. Give labels for long links and names.
4000
4001 * src/misc.c (contains_dot_dot): Moved to names.c
4002 (must_be_dot_or_slash): New function.
4003 (safer_rmdir): Use it.
4004 (remove_any_file): Now takes enum as option, not boolean.
4005 Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
4006 to unlink a directory.
4007 (deref_stat): Accept bool, not int.
4008
4009 * src/names.c (namelist_match): Allow partial matches only if
4010 recursive.
4011 (hash_string_hasher): Renamed from hash_avoided_name.
4012 (hash_string_compare): Renamed from compare_avoided_anames.
4013 (hash_string_insert, hash_string_lookup): New functions.
4014 (add_avoided_name, is_avoided_name): Use them.
4015 (safer_name_suffix): New function.
4016 (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
4017
4018 * src/rmt.c: Don't include print-copyr.h.
4019 (prepare_input_buffer): New arg FD.
4020 Do not read more than INT_MAX bytes at once,
4021 since it breaks on some brain damaged Tru64 hosts.
4022 Divide size by two
4023 when retrying instead of subtracting 1024; for speed.
4024 (main): Use gettext to translate (C), not print_copyright.
4025
4026 * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
4027 now that gnulib handles this.
4028 Include <stddef.h> and <limits.h> unconditionally, now that we assume
4029 C89 or better.
4030 Assume that offsetof is defined in stddef.h.
4031 Do not include <sys/param.h>.
4032 (realloc, lseek): Do not declare.
4033 (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
4034 (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
4035 declarations, since we now assume C89 or better.
4036 (PARAMS): Remove, as we now assume C89. All uses changed.
4037 (bindtextdomain, textdomain): Include <gettext.h> to define.
4038 Include <unlocked-io.h>.
4039 (valloc): Define if not defined, and if valloc is not declared.
4040 (xstrdup): Remove decl.
4041
4042 * src/tar.c: Do not include <print-copyr.h>.
4043 Include <getdate.h>.
4044 (get_date): Remove decl.
4045 (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
4046 IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
4047 NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
4048 SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
4049 (long_options, decode_options): Use them.
4050 (OVERWRITE_DIR_OPTION): Remove.
4051 (long_options): New options --index-file, --no-overwrite-dir.
4052 Remove --overwrite-dir option.
4053 (usage): Use PACKAGE_BUGREPORT.
4054 (decode_options): Terminate new argv properly.
4055 Use PACKAGE_NAME, PACKAGE_VERSION.
4056 If verbose, report how we grokked any textual date option.
4057 (main): Add support for index-file.
4058
4059 * tests/Makefile.am: Convert to UTF-8.
4060 (AUTOMAKE_OPTIONS): Remove.
4061 (TESTS): Add delete04.sh, multiv01.sh, options.sh.
4062 (INCLUDES): Remove ../intl.
4063 (LDADD): Don't link libtar.a twice.
4064
4065 * tests/genfile.c: Convert to UTF-8.
4066 Don't include <print-copyr.h>.
4067 (DEFAULT_PATTERN): Renamed from DEFAULT.
4068 (ZEROS_PATTERN): Renamed from ZEROS.
4069 (main): Use gettext to translate (C), not print_copyright.
4070
4071 2003-07-04 Paul Eggert <eggert@twinsun.com>
4072
4073 Revamp to meet current standards of autoconf, automake,
4074 gettext, and gnulib, and incorporate new translations.
4075
4076 * config/config.guess, config/config.sub, config/depcomp,
4077 config/install-sh, config/mdate-sh, config/missing,
4078 config/mkinstalldirs, config/texinfo.texi:
4079 Moved here from parent directory, or from doc.
4080 * config.hin: Renamed from config.h.in.
4081 * config/config.rpath: New file.
4082
4083 * intl: Remove this subdirectory.
4084
4085 * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
4086
4087 * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
4088 lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
4089 lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
4090 lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
4091 lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
4092 m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
4093 stamp-h.in: Remove.
4094
4095 * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
4096 lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
4097 lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
4098 m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
4099 m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
4100 m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
4101 m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
4102 m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
4103 m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
4104 m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
4105 m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
4106 m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
4107 m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
4108 m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
4109 m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
4110 m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
4111 po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
4112 po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
4113 po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
4114
4115 * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
4116 lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
4117 lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
4118 lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
4119 lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
4120 lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
4121 lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
4122 lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
4123 lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
4124 lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
4125 lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
4126 lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
4127 lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
4128 m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
4129 m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
4130 m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
4131 m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
4132 m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
4133 po/Makefile.in.in:
4134 Upgrade to latest version from external source. The file "bootstrap"
4135 now grabs these automatically, so we needn't keep track of them
4136 in this change long any longer.
4137
4138 * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
4139 (SUBDIRS): Remove intl.
4140 * PORTS: Update for star, Macintosh.
4141 * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
4142 Bison 1.875, gettext 0.12.1.
4143 * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
4144 * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
4145 (AC_CONFIG_AUX_DIR): New.
4146 (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
4147 like coreutils.
4148 (AC_PREREQ): Bump from 2.52 to 2.57.
4149 (AC_GNU_SOURCE): New.
4150 (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
4151 we no longer support K&R C.
4152 (YACC): Remove.
4153 (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
4154 sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
4155 (AC_MBSTATE_T): Remove.
4156 (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
4157 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
4158 HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
4159 (AM_STDBOOL_H): Add.
4160 (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
4161 jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
4162 (AC_CHECK_TYPE): Remove ssize_t.
4163 (gt_TYPE_SSIZE_T): Add.
4164 (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
4165 jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
4166 AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
4167 AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
4168 jm_FUNC_MKTIME, jm_FUNC_REALLOC):
4169 Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
4170 (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
4171 (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
4172 (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
4173 napms, poll, select, strstr, usleep.
4174 (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
4175 rmdir, strcasecmp, strncasecmp, strtol, strtoul.
4176 (AM_GNU_GETTEXT): Use external and need-ngettext options.
4177 (AM_GNU_GETTEXT_VERSION): New.
4178 (AC_OUTPUT): Remove intl/Makefile.
4179
4180 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4181 ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
4182 * doc/fdl.texi: Update to current GNU version.
4183 * doc/gettext.texi: Update to current coreutils version,
4184 plus a copyright notice.
4185 * doc/tar.texi: Switch to new method for doing copyright notices.
4186 Use @acronym instead of @sc where appropriate.
4187 Remove empty examples. Give a few more examples.
4188
4189 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4190 (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
4191 are built up in pieces with +=.
4192 (noinst_HEADERS, INCLUDES): Remove.
4193 (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
4194 (libtar_a_LIBADD): Use $ rather than @.
4195 (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
4196
4197 * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
4198 bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
4199 ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
4200 intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
4201 isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
4202 memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
4203 pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
4204 safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
4205 stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
4206 strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
4207 unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
4208 Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
4209 prereq.m4, xstrtoimax.m4.
4210
4211 * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
4212 be translated, since it's not a user-visible tool.
4213
4214 * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4215
4216 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4217 (INCLUDES): Remove ../intl. Put top-srcdir before ., for
4218 consistency with coreutils.
4219 (LDADD): Link LIBINTL after libtar.a, since
4220 it's now external and should stand by itself.
4221
4222 * src/buffer.c (print_total_written): Adjust to new human.h
4223 interface.
4224 (child_open_for_compress): Do not increase size to BLOCKSIZE.
4225 (open_archive): Open index file name.
4226 Strip trailing slahes from file names.
4227 (flush_write): Set size to 0 if not saving names.
4228 (flush_write, flush_read): Use safer_name_suffix rather than
4229 inline code.
4230
4231 * src/common.h: Include <quote.h>.
4232 (absolute_names_option, atime_preserve_option, backup_option,
4233 block_number_option, checkpoint_option, dereference_option,
4234 force_local_option, ignore_failed_read_option, ignore_zeros_option,
4235 incremental_option, interactive_option, multi_volume_option,
4236 numeric_owner_option, one_file_system_option, recursive_unlink_option,
4237 read_full_records_option, remove_files_option, same_order_option,
4238 show_omitted_dirs_option, sparse_option, starting_file_option,
4239 to_stdout_option, totals_option, touch_option, verify_option,
4240 dev_null_output, now_verifying, we_are_root): Now bool, not int.
4241 (current_trailing_slash, index_file_name, recent_long_name_blocks,
4242 recent_long_link_blocks): New vars.
4243 (NO_OVERWRITE_DIR_OLD_FILES): New constant.
4244 (OVERWRITE_OLD_DIRS): Remove.
4245 (enum remove_option): New enum.
4246 (remove_any_file): Use it as option arg, not int.
4247 (is_avoided_name, contains_dot_dot): Return bool, not int.
4248 (safer_name_suffix): New decl.
4249
4250 * src/compare.c (now_verifying): Now bool, not int.
4251 (fill_in_sparse_array): Move to extract.c. Now returns bool;
4252 all callers changed to test for failure.
4253 (diff_sparse_files): Take size from current_stat, not from param.
4254 (diff_archive): Do not count trailing slashes in archives.
4255 (verify_volume): Test for header failure after loop, not before.
4256
4257 * src/create.c (relativize): Remove; replaced by safer_name_suffix.
4258 All callers changed.
4259 (start_header): Clear devmajor and devminor fields, too.
4260 (finish_header): New arg block_ordinal.
4261 (init_sparsearray): Now extern. Set sp_array_size to
4262 SPARSES_IN_OLDGNU_HEADER if it is zero.
4263 (dump_file): Keep link table as a hash.
4264 Do not count "file changed as we read it" as a failure.
4265
4266 * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
4267 Move extern decl to common.h.
4268
4269 * src/extract.c (we_are_root): Now bool, not int.
4270 (check_time): Warn about implausibly old time stamps.
4271 (set_stat): Use utimbuf, not stat_info.
4272 (prepare_to_extract): New arg DIRECTORY.
4273 (fill_in_sparse_array): Moved here from compare.c.
4274 (extract_sparse_file): Now returns off_t, giving size left.
4275 Truncate file at end.
4276 (extract_archive): Use safer_name_suffix rather than rolling our own.
4277 Use fill_in_sparse_array rather than rolling our own.
4278 Strip trailing slashes more effectively.
4279 Check for unsafe names.
4280
4281 * src/incremen.c (struct directory): nfs and found are now of type
4282 bool, not int.
4283 (gnu_restore): Now takes directory name as argument, not offset
4284 of directory name in a global. All uses changed.
4285 (CURRENT_FILE_NAME): Remove.
4286
4287 New tests.
4288 * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
4289 files.
4290
4291 2002-09-30 Paul Eggert <eggert@twinsun.com>
4292
4293 * src/rmt.c (prepare_input_buffer): Renamed form
4294 prepare_record_buffer. All uses changed. Do not assume that
4295 size_t is the same width as int.
4296
4297 2002-03-29 Paul Eggert <eggert@twinsun.com>
4298
4299 * src/incremen.c (get_directory_contents):
4300 If ignore_failed_read_option, only warn about
4301 get_directory_contents failures. Fix suggested by
4302 Mark Costlow.
4303
4304 2002-01-31 Mark W. Eichin <eichin@thok.org>
4305
4306 * src/buffer.c (child_open_for_compress): Don't try to read
4307 past the end of the buffer.
4308
4309 2001-10-11 Jim Meyering <meyering@lucent.com>
4310
4311 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
4312 and quote_n (1, ... to avoid clobbering a buffer.
4313
4314 2001-09-26 Paul Eggert <eggert@twinsun.com>
4315
4316 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
4317
4318 * src/buffer.c (flush_read): Don't diagnose partial blocks before
4319 end of file; just ignore them silently.
4320
4321 * src/list.c (read_header): Don't keep around extended name
4322 and link info indefinitely; keep it only for the next file.
4323 This fixes a bug introduced in 1.13.24, and removes the need
4324 for some static variables. Set recent_long_name and
4325 recent_long_link to zero if there were no long links; this
4326 avoids a violation of ANSI C rules for pointers in delete.c.
4327 * THANKS: Add Christian Laubscher.
4328
4329 2001-09-26 Jim Meyering <meyering@lucent.com>
4330
4331 * doc/tar.texi (Remote Tape Server): is know -> is known
4332
4333 2001-09-25 Paul Eggert <eggert@twinsun.com>
4334
4335 * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
4336 <iconv.h> may define EILSEQ (e.g. libiconv). Define a
4337 replacement EILSEQ to be ENOENT, not EINVAL, since callers may
4338 want to distinguish EINVAL and EILSEQ.
4339
4340 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
4341
4342 * src/extract.c (maybe_recoverable):
4343 Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
4344
4345 2001-09-22 Paul Eggert <eggert@twinsun.com>
4346
4347 * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
4348
4349 * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
4350 with GPL.
4351
4352 * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
4353 * PORTS: Add copyright notice, 'star' reference.
4354 * README-alpha: Add copyright notice, autoconf 2.52 patch.
4355 * THANKS: Add Christophe Kalt.
4356 * config.sub: Upgrade to 2001-09-14 version.
4357
4358 * configure.ac (ALL_LINGUAS): Add ko.
4359 * po/ko.po: Resurrected file.
4360
4361 * doc/convtexi.pl: Add coding advice for Emacs.
4362
4363 * doc/getdate.texi: Add copyright notice.
4364
4365 * doc/mdate-sh: Upgrade to automake 1.5 version.
4366
4367 * doc/tar.texi (extracting files): Mention --to-stdout.
4368 (Option Summary, Dealing with Old Files): New option --overwrite-dir.
4369 (Overwrite Old Files): Likewise.
4370
4371 * lib/Makefile.am (noinst_HEADERS):
4372 Remove copysym.h. Add print-copyr.h, unicodeio.h.
4373 (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
4374
4375 * lib/copysym.c, lib/copysym.h: Remove.
4376 * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
4377 lib/unicodeio.h: New files.
4378
4379 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
4380 lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
4381
4382 * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
4383 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
4384
4385 * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
4386 * m4/isc-posix.m4: Remove.
4387
4388 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
4389
4390 * po/POTFILES.in: Add copyright notice.
4391
4392 * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
4393 well as after.
4394 * tests/Makefile.am (LDADD): Likewise.
4395
4396 * src/buffer.c (write_archive_buffer, close_archive):
4397 If an archive is a socket, treat it like a FIFO.
4398 (records_read, records_written): New vars.
4399 (write_archive_to_stdout): Now bool, not int.
4400 (open_archive, flush_write, flush_read): Keep records_read and
4401 records_written up to date.
4402
4403 * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
4404 (write_archive_to_stdout): Now bool, not int.
4405 (enum read_header): New value HEADER_SUCCESS_EXTENDED.
4406 (read_header): Now takes bool arg. Existing callers modified
4407 to pass 0, unless otherwise specified.
4408
4409 * src/delete.c (records_read): Remove; now a global.
4410 (acting_as_filter): Now bool, not int.
4411 (recent_long_name, recent_long_link, recent_long_name_blocks,
4412 recent_long_link_blocks, records_read, records_written): New decls.
4413 (records_skipped): New var.
4414 (move_archive): Don't divide by zero if arg is 0.
4415 Use the above vars to compute how far to move.
4416 (write_recent_blocks): New function.
4417 (delete_archive_member): Pass 1 to read_header, so that it doesn't
4418 read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
4419 Keep track of how many records have been skipped.
4420 Let the buffer code count records.
4421 When copying a header, copy any extended headers that came before it.
4422
4423 * src/extract.c (extract_archive): When marking a directory to be
4424 updated after symlinks, stat all directories after it in the
4425 delayed-set-stat list too, since they will be checked after
4426 symlinks. Add support for --overwrite-dir.
4427
4428 * src/list.c (recent_long_name, recent_long_link,
4429 recent_long_name_blocks, recent_long_link_blocks): New vars.
4430 (read_and): Pass 0 to read_header.
4431 (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
4432 headers into new vars. Null-terminate incoming symbolic links.
4433
4434 * src/rmt.c: Include print-copyr.h, not copysym.h.
4435 (main): Use print_copyright, not copyright_symbol.
4436 * src/tar.c (decode_options): Likewise.
4437 (OVERWRITE_DIR_OPTION): New constant.
4438 (long_options, usage, decode_options): Add --overwrite-dir.
4439
4440 * src/tar.h: Put copyright notice into documentation.
4441
4442 * tests/Makefile.am (TESTS): Add delete03.sh.
4443 * tests/delete03.sh: New file.
4444
4445 * tests/genfile.c: Include print-copyr.h, not copysym.h.
4446 (main): Use print_copyright, not copyright_symbol.
4447 Include <argmatch.h>.
4448 (pattern_strings): Remove.
4449 (pattern_args, pattern_types): New constants.
4450 (main): Use XARGMATCH, not argmatch.
4451
4452 2001-09-20 Jim Meyering <meyering@lucent.com>
4453
4454 * lib/xstrtol.c (strtoimax): Guard declaration with
4455 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
4456 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
4457 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
4458 (strtoumax): Likewise, for completeness (it wasn't necessary).
4459 * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
4460 Check for declaration of strtoimax.
4461 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
4462 Check for declaration of strtoumax.
4463
4464 2001-09-16 Paul Eggert <eggert@twinsun.com>
4465
4466 * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
4467
4468 2001-09-14 Paul Eggert <eggert@twinsun.com>
4469
4470 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
4471
4472 * README-alpha: Describe automake patch.
4473
4474 * configure.ac (LIBOBJS):
4475 Remove automake 1.4 workaround, as we're using 1.5 now.
4476 (USE_INCLUDED_LIBINTL): New AC_DEFINE.
4477
4478 * lib/copysym.c: Include stddef.h, for size_t.
4479 Include langinfo.h if needed.
4480 Use locale_charset only if USE_INCLUDED_LIBINTL;
4481 if not, use nl_langinfo (CODESET) if available.
4482
4483 2001-09-13 Paul Eggert <eggert@twinsun.com>
4484
4485 * config.guess, config.sub: Sync with canonical versions.
4486
4487 * configure.ac (jm_PREREQ_XGETCWD): Add.
4488
4489 * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
4490 (libtar_a_SOURCES): Add copysym.c.
4491 * copysym.c, copysym.h: New files.
4492
4493 * lib/error.c: Sync with fileutils version.
4494
4495 * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
4496 * m4/getcwd.m4: New file.
4497 * m4/uintmax_t.m4: Remove.
4498
4499 * m4/gettext.m4 (AM_WITH_NLS):
4500 Fix bug with calculating version of Bison 1.29.
4501 Reported by Karl Berry.
4502
4503 * src/Makefile.am (datadir): Remove.
4504
4505 * src/rmt.c: Include copysym.h.
4506 (main): Use copyright_symbol to translate copyright notice,
4507 instead of gettext.
4508 * src/tar.c: Likewise.
4509 * tests/genfile.c: Likewise.
4510
4511 * src/system.h (MB_LEN_MAX): New symbol.
4512
4513 2001-09-11 Paul Eggert <eggert@twinsun.com>
4514
4515 * src/extract.c (struct delayed_set_stat): New member
4516 'after_symlinks'.
4517 (delay_set_stat): Initialize it to 0.
4518 (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
4519 taking an extra stat ourselves. All callers changed.
4520 (set_stat): Likewise.
4521 (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
4522 If false, stop when encountering a struct whose 'after_symlinks'
4523 member is true. Otherwise, go through all structures but check
4524 them more carefully. All callers changed.
4525 (extract_archive): When extracting a deferred symlink, if its parent
4526 directory's status needs fixing, then mark the directory as needing
4527 to be fixed after symlinks.
4528 (extract_finish): Fix status of ordinary directories, then apply
4529 delayed symlinks, then fix the status of directories that are
4530 ancestors of delayed symlinks.
4531
4532 * src/rtapelib.c (rexec):
4533 Remove declaration; it ran afoul of prototypes on Crays.
4534 Reported by Wendy Palm of Cray.
4535
4536 2001-09-06 Paul Eggert <eggert@twinsun.com>
4537
4538 * lib/strtoimax.c (HAVE_LONG_LONG):
4539 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
4540 (strtoimax): Use sizeof (long), not
4541 sizeof strtol (ptr, endptr, base),
4542 to work around bug in IBM C compiler.
4543
4544 2001-09-04 Paul Eggert <eggert@twinsun.com>
4545
4546 * lib/xgetcwd.c: Include "xalloc.h".
4547 (xgetcwd): Do not return NULL when memory is exhausted; instead,
4548 report an error and exit.
4549
4550 * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
4551 (jm_PREREQ): Use it.
4552
4553 2001-09-03 Paul Eggert <eggert@twinsun.com>
4554
4555 * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
4556 (jm_PREREQ_XGETCWD): New macro.
4557
4558 * lib/exclude.c (fnmatch_no_wildcards):
4559 Fix typo that caused us to do case-folding
4560 search even when that was not desired. This occurred only in the
4561 no-wildcard case.
4562
4563 * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
4564 Do not include xalloc.h.
4565 (INITIAL_BUFFER_SIZE): New symbol.
4566 Do not use xmalloc / xrealloc, since the caller is responsible for
4567 handling errors. Preserve errno around `free' during failure.
4568 Do not overrun buffer when using getwd.
4569
4570 * lib/xgetcwd.c (xgetcwd):
4571 Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
4572 to decide whether to use getcwd (NULL, 0).
4573
4574 2001-09-02 Paul Eggert <eggert@twinsun.com>
4575
4576 * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
4577
4578 2001-09-01 Jim Meyering <meyering@lucent.com>
4579
4580 * exclude.c: Use `""', not `<>' to #include non-system header files.
4581 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
4582 and strncasecmp as r-values. Unixware didn't have declarations.
4583
4584 2001-08-31 Jim Meyering <meyering@lucent.com>
4585
4586 * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
4587 Use an initial, malloc'd, buffer of length 128 rather than
4588 a statically allocated one of length 1024.
4589
4590 2001-08-30 Paul Eggert <eggert@twinsun.com>
4591
4592 * lib/utime.c: Include full-write.h.
4593 * lib/xstrtol.c (strtoimax): New decl.
4594
4595 2001-08-29 Paul Eggert <eggert@twinsun.com>
4596
4597 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
4598
4599 * src/create.c (dump_file): Relativize link names before dumping.
4600 This fixes a bug reported by Jose Pedro Oliveira.
4601
4602 * src/create.c (dump_file): Use offsetof when computing sizes for
4603 struct hack; this avoids wasted space in some cases.
4604 * src/incremen.c (note_directory, find_directory): Likewise.
4605 * src/names.c (name_gather, addname): Likewise.
4606
4607 * src/extract.c (extract_archive): Use strcpy, not memcpy,
4608 for consistency with other code that does similar things.
4609 * src/names.c (name_gather): Likewise.
4610
4611 * src/names.c (read_name_from_file, name_next, name_gather,
4612 add_hierarchy_to_namelist): Avoid quadratic behavior when
4613 reallocating buffers. Check for buffer size overflow.
4614 (addname): Avoid unnecessary clearing of memory.
4615
4616 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
4617
4618 * src/extract.c (delay_set_stat): Fix off-by-one error in file
4619 name size allocation that caused core dumps.
4620
4621 2001-08-28 Paul Eggert <eggert@twinsun.com>
4622
4623 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
4624
4625 * configure.ac (GNU_SOURCE): Define to 1, not /**/.
4626 (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
4627 (daddr_t): Remove; no longer used.
4628 (jm_PREREQ_HUMAN): Add.
4629
4630 * acconfig.h: Remove; no longer needed.
4631
4632 * config.guess, config.sub:
4633 New files, from automake 1.5. Gettext 0.10.39 needs them.
4634 * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
4635
4636 * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
4637 (SUBDIRS): Put intl before lib, as gettext requires.
4638
4639 * ABOUT-NLS: Upgrade to gettext 0.10.39.
4640 * intl: Upgrade entire directory to gettext 0.10.39.
4641 * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
4642 New files, from gettext 0.10.39.
4643 * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
4644 Upgrade to gettext 0.10.39,
4645 * po/Makefile.in.in: Likewise, except fix a typo in its copying
4646 permissions.
4647 * po/cat-id-tbl.c, po/stamp-cat-id:
4648 Remove; no longer used by gettext 0.10.39.
4649 * po/ChangeLog: New file.
4650
4651 * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
4652 $(srcdir)/tar.texi: Likewise.
4653 * doc/freemanuals.texi: New file.
4654 * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
4655 `fileds' -> `fields'
4656 * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
4657
4658 * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
4659 (noinst_HEADERS): Add quote.h.
4660 (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
4661
4662 * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
4663
4664 * lib/full-write.c, lib/savedir.c: Comment fix.
4665
4666 * lib/pathmax.h: Remove.
4667
4668 * lib/quote.c, lib/quote.h: New files.
4669
4670 * lib/xgetcwd.c: Don't include pathmax.h.
4671 Include stdlib.h and unistd.h if available.
4672 Include xalloc.h.
4673 (xmalloc, xstrdup, free): Remove decls.
4674 (xgetcwd): Don't assume sizes fit in unsigned.
4675 Check for overflow when computing sizes.
4676 Simplify reallocation code.
4677
4678 * lib/xmalloc.c: Quote failure tests.
4679
4680 * lib/strtoumax.c, lib/xstrtoimax.c: New files.
4681
4682 * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
4683 similar to strtol.c.
4684 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
4685 (verify): New macro.
4686 (strtoumax, uintmax_t, strtoull, strtol): Remove.
4687 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
4688 (strtoimax): Renamed from strtoumax. All uses of unsigned values
4689 changed to signed values. Check sizes at compile-time, not
4690 run-time. Prefer strtol to strtoll if both work.
4691 (main): Remove.
4692
4693 * lib/xstrtol.h (xstrtoimax): New decl.
4694
4695 * m4/Makefile.am (EXTRA_DIST):
4696 Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
4697 longlong.m4, xstrtoimax.m4.
4698
4699 * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
4700 Remove; now done by autoconf.
4701 (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
4702 Use AC_CHECK_TYPE instead of merely looking for the header.
4703
4704 * m4/uintmax_t.m4: Use shorter comment.
4705
4706 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
4707 Quote first arg of AC_DEFUN.
4708 Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
4709 is needed to parse the include file.
4710 Simplify logic behind the args to AC_REPLACE.
4711
4712 * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
4713
4714 * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
4715
4716 * src/rmt.c (main):
4717 Use "Copyright %d" to simplify the translator's job in the future.
4718 Advise translator about circle-C.
4719 * src/tar.c: (decode_options): Likewise.
4720 * tests/genfile.c (main): Likewise.
4721
4722 2001-08-28 Jim Meyering <meyering@lucent.com>
4723
4724 * lib/argmatch.c: Include "quote.h".
4725 (argmatch_invalid): Quote the context.
4726
4727 * lib/dirname.c (dir_name): Fix typo on PC platforms.
4728
4729 * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
4730 Use single-quote for local .h files.
4731
4732 * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
4733
4734 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
4735 glibc versions.
4736
4737 * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
4738 invoking mktime the last time.
4739
4740 * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
4741
4742 * lib/rename.c: Major rewrite by Volker Borchert to use system
4743 rename function, but to work around problems with trailing
4744 slashes.
4745
4746 * lib/strtoll.c: New file, from glibc.
4747 * lib/strtoul.c: Update from glibc.
4748
4749 * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
4750 Add support for signed numbers, too.
4751 (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
4752 is not defined.
4753 (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
4754 not defined.
4755 (strtoumax, uintmax_t, strtoull, strtoul): New macros.
4756 (main): Use generic names in debugging output.
4757 * lib/strtoimax.c: Plus add the following changes of my own:
4758 (main): Use accurate names in debugging output.
4759
4760 * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
4761 Don't use PATH_MAX.
4762
4763 * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
4764 m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
4765 m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
4766 m4/utime.m4, m4/utimes.m4:
4767 Quote the first argument in each use of AC_DEFUN.
4768
4769 * m4/getline.m4: Don't use string.h.
4770
4771 * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
4772
4773 * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
4774
4775 2001-08-27 Paul Eggert <eggert@twinsun.com>
4776
4777 * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
4778
4779 The biggest change is the new --exclude semantics and options.
4780 The basic idea was suggested by Gerhard Poul; thanks!
4781
4782 * NEWS: Describe new --exclude semantics and options, and bug fixes.
4783 * README: ignfail.sh fails on some NFS hosts.
4784 * NEWS, README, lib/xstrtol.h: Add copyright notice.
4785
4786 * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
4787 (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
4788 Remove; the automake bug has been fixed.
4789 * acinclude.m4: Remove.
4790
4791 * configure.ac: Renamed from configure.in.
4792 (AC_PREREQ): Bump from 2.13 to 2.52.
4793 (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
4794 1997-05-30) has an encoding error.
4795 (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
4796 (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
4797
4798 * doc/fdl.texi: Update to current GNU version.
4799
4800 * doc/tar.texi: Put leading '*' in direntry.
4801 Accommodate new gfdl sectioning.
4802 New option --recursion (the default) that is the inverse of
4803 --no-recursion.
4804
4805 New options --anchored, --ignore-case, --wildcards,
4806 --wildcards-match-slash, and their negations (e.g., --no-anchored).
4807 Along with --recursion and --no-recursion, these control how exclude
4808 patterns are interpreted. The default interpretation of exclude
4809 patterns is now --no-anchored --no-ignore-case --recursion
4810 --wildcards --wildcards-match-slash.
4811
4812 * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
4813
4814 * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
4815 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
4816 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
4817 Include if available.
4818 (<xalloc.h>): Include
4819 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
4820 (verify): New macro. Use it to verify that EXCLUDE macros do not
4821 collide with FNM macros.
4822 (struct patopts): New struct.
4823 (struct exclude): Use it, as exclude patterns now come with options.
4824 (new_exclude): Support above changes.
4825 (new_exclude, add_exclude_file):
4826 Initial size must now be a power of two to simplify overflow checking.
4827 (free_exclude, fnmatch_no_wildcards): New function.
4828 (excluded_filename): No longer requires options arg, as the options
4829 are determined by add_exclude. Now returns bool, not int.
4830 (excluded_filename, add_exclude):
4831 Add support for the fancy new exclusion options.
4832 (add_exclude, add_exclude_file): Now takes int options arg.
4833 Check for arithmetic overflow when computing sizes.
4834 (add_exclude_file): xrealloc might modify errno, so don't
4835 realloc until after errno might be used.
4836
4837 * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
4838 New macros.
4839 (free_exclude): New decl.
4840 (add_exclude, add_exclude_file): Now takes int options arg.
4841 (excluded_filename): No longer requires options arg, as the options
4842 are determined by add_exclude. Now returns bool, not int.
4843
4844 * lib/prepargs.c: Include <string.h>; required for C99 since
4845 we use strlen.
4846
4847 * lib/quotearg.c:
4848 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
4849
4850 * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
4851 diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
4852
4853 * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
4854 Remove inttypes_h.m4, largefile.m4, mktime.m4.
4855
4856 * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
4857 subsumed by Autoconf 2.50.
4858
4859 * m4/error.m4: Upgrade to serial 2.
4860
4861 * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
4862 remove test for GNU C library. It's not correct, as some
4863 older glibcs are buggy.
4864
4865 * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
4866
4867 * m4/prereq.m4: Upgrade to serial 20, but then:
4868 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
4869 (jm_PREREQ_EXCLUDE): New macro.
4870 (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
4871 by autoconf 2.5x.
4872
4873 * m4/realloc.m4: Upgrade to serial 4.
4874
4875 * m4/strerror_r.m4: Revert to serial 1002.
4876
4877 * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
4878
4879 * m4/utimes.m4: Upgrade to latest version (still "serial 3").
4880
4881 * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
4882 (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
4883 it is now subsumed by autoconf. Add inttypes.h.
4884
4885 * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4886 po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
4887
4888 * src/buffer.c (new_volume): Stop if the script exits with an error.
4889
4890 * src/common.h (excluded_with_slash, excluded_without_slash):
4891 Remove, replacing by:
4892 (excluded): New decl.
4893 (link_error): New decl.
4894 (excluded_name): Now returns bool.
4895
4896 * src/extract.c:
4897 (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
4898 Support hard links to symbolic links.
4899
4900 (struct delayed_symlink): Remove 'names' member, replacing it with
4901 'sources' and 'target' member. All uses changed.
4902
4903 (struct string_list): New type.
4904
4905 (delayed_set_stat, extract_archive): Use offsetof when computing sizes
4906 for struct hack; this avoids wasted space in some cases.
4907
4908 (extract_archive): Fix test for absolute pathnames and/or "..".
4909 Use link_error to report errors for links.
4910 Remove redundant trailing '/' at "really_dir", for all uses, not
4911 just before invoking mkdir.
4912 If overwriting old files, do not worry so much about existing
4913 directories.
4914 Fix mode computation in the case where the directory exists.
4915
4916 (apply_delayed_symlinks): If we can't make a hard link to a symbolic
4917 link, make a copy of the symbolic link.
4918
4919 * src/incremen.c (get_directory_contents):
4920 If ignore_failed_read_option, only warn about
4921 stat failures.
4922
4923 * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
4924 However, check for error even for '-' or '+' case.
4925
4926 (print_header): Try parsing uids and gids as unsigned integers first,
4927 and as a uid_t or gid_t only if that fails. This adds support for
4928 listing positive uids and gids that are greater than UID_MAX and
4929 GID_MAX.
4930
4931 * src/misc.c (link_error): New function.
4932
4933 * src/names.c (collect_and_sort_names):
4934 If ignore_failed_read_option, only warn about
4935 stat errors.
4936
4937 (excluded_name): Now returns bool. Simplify, as the fancy
4938 features are now all in excluded_filename.
4939
4940 * src/rtapelib.c (base_name): Remove decl, as system.h now
4941 declares it.
4942
4943 * src/system.h: Include stddef.h if available.
4944 (offsetof): Declare if stddef.h doesn't.
4945
4946 Include <dirname.h>.
4947 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
4948
4949 * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
4950 NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
4951 NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
4952 WILDCARDS_MATCH_SLASH_OPTION):
4953 New enum values.
4954
4955 (long_options, usage, decode_options): Add support for --anchored,
4956 --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
4957 --no-wildcards-match-slash, --recursion, --wildcards,
4958 --wildcards-match-slash.
4959
4960 (decode_options): Implement the new way of interpreting exclude
4961 patterns.
4962
4963 (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
4964
4965 (OPTION_STRING, decode_options): Add -I, -y. Currently these options
4966 just print error messages suggesting alternatives.
4967
4968 (add_filtered_exclude): Remove.
4969
4970 * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
4971
4972 * tests/extrac04.sh (out): Remove
4973 directory/subdirectory/file1, as the new semantics for
4974 --exclude exclude it.
4975
4976 * tests/genfile.c (main): Don't use non-ASCII char in msgid.
4977
4978 2001-08-12 Paul Eggert <eggert@twinsun.com>
4979
4980 * lib/addext.c (<errno.h>): Include.
4981 (errno): Declare if not defined.
4982 (addext): Work correctly on the Hurd, where pathconf returns -1 and
4983 leaves errno alone, because there is no limit. Also, work even if
4984 size_t is narrower than long.
4985
4986 2001-07-08 Paul Eggert <eggert@twinsun.com>
4987
4988 * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
4989
4990 2001-05-10 Paul Eggert <eggert@twinsun.com>
4991
4992 * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
4993 Include <backupfile.h> and <dirname.h> after size_t is defined.
4994 (addext): Use base_len to trim redundant trailing slashes instead of
4995 doing it ourselves.
4996
4997 * lib/backupfile.c (ISSLASH, base_name):
4998 Remove decls; now in dirname.h.
4999 Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
5000 is defined.
5001 (find_backup_file_name): Rename locals to avoid new functions.
5002 Use base_len instead of rolling it ourselves.
5003 Work even if dirlen is 0.
5004 Use a dir of '.' if given the empty string.
5005
5006 * lib/basename.c:
5007 Do not include <stdio.h>, <assert.h>; no longer needed.
5008 (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
5009 Include <string.h>, <dirname.h>.
5010 (base_name): Allow file names ending in slashes, other than names
5011 that are all slashes. In this case, return the basename followed
5012 by the slashes.
5013
5014 * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
5015 (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
5016 (dir_len): Renamed from dirlen.
5017 All callers changed.
5018
5019 * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
5020 New macros.
5021 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
5022
5023 2001-02-16 Paul Eggert <eggert@twinsun.com>
5024
5025 * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
5026 Do not declare or define if HAVE_MBRTOWC,
5027 since the test for HAVE_MBRTOWC now requires proper declarations.
5028
5029 * lib/alloca.c (malloc): Undef before defining.
5030
5031 2001-02-13 Paul Eggert <eggert@twinsun.com>
5032
5033 * src/compare.c (read_and_process): Use off_t for size.
5034 From Maciej W. Rozycki.
5035
5036 2001-01-26 Paul Eggert <eggert@twinsun.com>
5037
5038 * lib/quotearg.c: Include stddef.h. From Jim Meyering.
5039
5040 2001-01-12 Paul Eggert <eggert@twinsun.com>
5041
5042 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
5043
5044 * lib/savedir.h (savedir): Remove size arg.
5045
5046 * doc/tar.texi: Add @setchapternewpage odd.
5047 Remove -I as an alias for -T, for now.
5048 Add @dircategory.
5049 Update copyright. Remove "Published by".
5050 Dates beginning with / or . are taken to be file names.
5051
5052 * src/tar.c (<time.h>): Do not include;
5053 (time): Do not declare.
5054 (usage): Remove -I as an alias for -T.
5055 (OPTION_STRING): Remove -I.
5056 (decode_options): Dates that look like an absolute path name,
5057 or that start with '.', are presumed to be file names whose
5058 dates are taken.
5059 Remove 'I' as an aliase for 'T'.
5060 Update copyright.
5061
5062 * src/extract.c (<time.h>): Do not include; system.h now does this.
5063 (make_directories): Skip filesystem prefixes.
5064 Don't assume '/' is the only separator.
5065 (extract_sparse_file): Use new full_write semantics.
5066 On write error, return instead of invoking skip_file.
5067 Do not free sparsearray; caller does this now.
5068 (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
5069 separator.
5070 (extract_archive): Don't assume file name lengths fit in int.
5071 Report what got stripped from member name; it might be more than '/'.
5072 Use new full_write semantics.
5073 Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
5074 mkdir to ignore it.
5075 Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
5076
5077 * src/buffer.c (<time.h>): Do not include; system.h now does this.
5078 (time): Remove decl; likewise.
5079 (child_open_for_uncompress): Use new full_write semantics.
5080 (flush_write): Use ISSLASH instead of testing for '/'.
5081 (flush_read): Likewise.
5082
5083 * src/rmt.h (_remdev): Look for / anywhere in Path.
5084
5085 * src/misc.c (contains_dot_dot): Skip filesystem prefix.
5086 Don't assume '/' is the only separator.
5087 (safer_rmdir): Don't assume '/' is the only separator.
5088
5089 * src/compare.c (diff_archive): Don't assume '/' is the only separator.
5090
5091 * lib/dirname.h (dirlen): New decl.
5092
5093 * src/incremen.c (get_directory_contents):
5094 Remove path_size arg; all callers changed.
5095 Don't assume '/' is the only directory separator.
5096 (gnu_restore): Work even if file name length doesn't fit in int.
5097
5098 * lib/addext.c (ISSLASH): New macro.
5099 (addext): Trim any redundant trailing slashes.
5100
5101 * src/names.c (name_next):
5102 Don't assume '/' is the only directory separator.
5103 (namelist_match): Likewise.
5104 (add_hierarchy_to_namelist): Remove dirsize arg.
5105 Do not assume '/' is the only directory separator.
5106 (new_name): Likewise.
5107
5108 * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
5109 (libtar_a_SOURCES): Add dirname.c.
5110
5111 * src/create.c (relativize):
5112 New function, with much of old start_header's guts.
5113 Handle filesystem prefixes.
5114 (start_header): Use this new function.
5115 (init_sparsearray): Don't bother to zero out the new array;
5116 it's not needed.
5117 (deal_with_sparse): Fix array allocation bug.
5118 (create_archive): Don't assume '/' is the only separator.
5119 (dump_file): Likewise.
5120 Don't worry about leading / in symlink targets.
5121
5122 * lib/savedir.c (savedir):
5123 Remove size arg; it wasn't portable. All callers changed.
5124
5125 * lib/utime.c (utime_null): Adjust to new full_write convention.
5126
5127 * configure.in (YACC): Avoid portability problem with Ultrix sh.
5128
5129 * lib/backupfile.c: Include <dirname.h>.
5130 (ISSLASH): New macro.
5131 (find_backup_file_name): Use dirlen to calculate directory lengths.
5132 (max_backup_version): Strip redundant trailing slashes.
5133
5134 * src/common.h: Include <full-write.h>.
5135 (get_directory_contents): No longer has size arg.
5136 (gnu_restore): Arg is size_t, not int.
5137
5138 * src/system.h: Include <time.h>.
5139 (time): Declare if not defined.
5140
5141 * lib/full-write.c: Include full-write.h, not safe-read.h.
5142 full_write returns size_t, with short writes meaning failure.
5143 All callers changed.
5144
5145 * src/rtapelib.c: Include full-write.h.
5146
5147 * src/rmt.c: Include full-write.h.
5148 (main): Update copyright.
5149
5150 * doc/getdate.texi: Mention that only English is supported.
5151 Show how to use "date" so that the output is acceptable to getdate.
5152 Mention Z as an abbreviation for UTC.
5153
5154 * lib/full-write.h: New file.
5155
5156 * src/list.c: system.h now does time.h stuff.
5157
5158 * lib/dirname.c:
5159 Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
5160 stdlib.h.
5161 Do not include string.h, strings.h, or assert.h; no longer needed.
5162 (strrchr, memrchr, malloc): Remove decls; no longer needed.
5163 Include <xalloc.h>.
5164 (base_name): New decl.
5165 (BACKSLASH_IS_PATH_SEPARATOR): Remove.
5166 (dir_name_r): Remove.
5167 (dirlen): New function.
5168 (dir_name): Use dirlen instead of dir_name_r.
5169 (<string.h>, <strings.h>): Include only if test program.
5170 (main): Use "return 0", not "exit (0)".
5171
5172 2000-12-08 Paul Eggert <eggert@twinsun.com>
5173
5174 * lib/dirname.h: New file.
5175
5176 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
5177
5178 * lib/fnmatch.c: Do not comment out all the code if we are using
5179 the GNU C library, because in some cases we are replacing buggy
5180 code in the GNU C library itself.
5181
5182 2000-10-30 Paul Eggert <eggert@twinsun.com>
5183
5184 * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
5185
5186 2000-10-29 Paul Eggert <eggert@twinsun.com>
5187
5188 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
5189
5190 * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
5191
5192 2000-10-28 Paul Eggert <eggert@twinsun.com>
5193
5194 * doc/tar.texi: --no-recursion now applies to extraction, too.
5195 * src/create.c (dump_file): no_recurse_option -> ! recursion_option
5196 * src/names.c (namelist_match, excluded_name):
5197 Do not match subfiles of a directory
5198 if --no-recursion is specified.
5199 * src/tar.c (NO_RECURSE_OPTION): Remove.
5200 (long_options): Have getopt set the --no-recursion flag.
5201 (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
5202 Remove case for NO_RECURSE_OPTION.
5203 * src/common.h (recursion_option):
5204 Renamed from no_recurse_option, with sense
5205 negated, and with FNM_LEADING_DIR being the nonzero value.
5206
5207 * names.c (namelist_match): New function.
5208 (name_match, name_scan): Use it to eliminate duplicate code.
5209 (names_notfound): Remove special case for Amiga.
5210
5211 2000-10-27 Paul Eggert <eggert@twinsun.com>
5212
5213 * src/misc.c (read_error_details, read_warn_details,
5214 read_fatal_details): Don't assume size_t is unsigned long.
5215
5216 * src/buffer.c (flush_read): If read_full_records_option, try to
5217 fill the input buffer, as --delete -f - needs this.
5218
5219 2000-10-24 Paul Eggert <eggert@twinsun.com>
5220
5221 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
5222
5223 * src/buffer.c (check_label_pattern):
5224 Make sure header name is a string before
5225 passing it to fnmatch.
5226 (init_volume_number): Check for global_volno overflow.
5227 (new_volume): Check for global_volno overflow.
5228
5229 * src/tar.c (decode_options):
5230 Check that volume label is not too long to overflow
5231 name in tar header block.
5232
5233 * Makefile.am (EXTRA_DIST): Remove rebox.el.
5234
5235 * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
5236 (AC_FUNC_STRERROR_R): Use this instead.
5237
5238 2000-10-23 Paul Eggert <eggert@twinsun.com>
5239
5240 * src/extract.c: Include <time.h>, since we invoke "time".
5241
5242 * lib/prepargs.c (prepend_default_options):
5243 Don't use NULL, for portability.
5244
5245 * m4/fnmatch.m4: Add "working" to message.
5246
5247 * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
5248 Include <hash.h>.
5249 (getpwuid, getgrgid): Declare only if system headers don't.
5250 (gid_to_gname): Don't invoke setgrent.
5251 (namelist): Now static, not global.
5252 (nametail): New var. All uses of namelast changed to use
5253 nametail, with one extra level of indirection.
5254 (name_gather): Use memcpy instead of strncpy + assignment of NUL.
5255 (name_match): Set nametail too, when setting namelist to null.
5256 (add_hierarchy_to_namelist): Change type of dir arg from char * to
5257 struct name *, so that we don't have to look up the name again
5258 here. Get change_dir from dir rather than as a separate arg. Add
5259 dirsize arg, and pass it along to get_directory_contents. Remove
5260 unnecessary check of directory type.
5261 (new_name): Do not append a slash if PATH already ends in one.
5262 (avoided_names, struct avoided_name): Remove.
5263 (avoided_name_table): New var, replacing avoided_names.
5264 (hash_avoided_name, compare_avoided_names): New function.
5265 (add_avoided_name, is_avoided_name): Use hash table rather than
5266 linked list.
5267
5268 * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
5269 (child_open_for_compress, child_open_for_uncompress,
5270 close_archive): Propagate any failure of the compression process
5271 back to "tar".
5272 (open_archive, flush_write, flush_read, close_archive): Do not
5273 allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
5274 -1. Instead, allocate an array with the size that's needed.
5275 (open_archive): Don't bother checking S_ISCHR of /dev/null.
5276 (backspace_output): Don't try to backspace past start of archive.
5277 (close_archive): Remove special case for DELETE_SUBCOMMAND.
5278
5279 * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
5280 DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
5281 HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
5282 HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
5283 PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
5284 WITH_DMALLOC, WITH_REGEX):
5285 Remove; now generated automatically.
5286
5287 * configure.in (_GNU_SOURCE): Define to empty, not 1, for
5288 compatibility for glibc fragments.
5289 (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
5290 HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
5291 DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
5292 that we needn't put an entry into acconfig.h.
5293 (ALL_LINGUAS): Add da.
5294 (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
5295 (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
5296 (for strtol.c).
5297 (AC_MBSTATE_T): Add.
5298 (RMT): Append $(EXEEXT).
5299 (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
5300 (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
5301 HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
5302 HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
5303 (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
5304 (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
5305 (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
5306 Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
5307 (EMUL_OPEN3): Remove; no longer needed.
5308 (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
5309
5310 * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
5311
5312 * src/common.h: Do not include basename.h.
5313 * src/rtapelib.c (base_name): Do not include basename.h;
5314 declare base_name instead.
5315
5316 * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
5317 Remove these files.
5318 * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
5319 lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
5320 * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
5321 Adjust to the above changes.
5322
5323 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
5324
5325 * src/open3.c: Remove.
5326
5327 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
5328 (tar_SOURCES): Remove open3.c.
5329 (INCLUDES): Remove -I.., as automake does that.
5330 (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
5331
5332 The following changes are to put LOCALEDIR into localedir.h instead
5333 of passing it on the command line.
5334 (DEFS): Remove.
5335 (DISTCLEANFILES): New macro.
5336 (localedir.h): New rule.
5337 (rmt.o tar.o): Now depend on localedir.h.
5338
5339 * tests/delete02.sh, tests/extrac04.sh: New files.
5340
5341 * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
5342 (TESTS): Add extrac04.sh, and restore delete02.sh.
5343 (DEFS): Remove; LOCALEDIR is now done via localedir.h.
5344 (INCLUDES): Remove -I.. as automake does this now.
5345
5346 * src/rtapelib.c (rexec): Don't declare unless using it.
5347 (do_command): Simplify signal-handling code slightly.
5348
5349 * src/delete.c (blocks_needed): Remove. All uses changed to use
5350 blocking_factor - new_blocks.
5351 (acting_as_filter): New var.
5352 (write_record, delete_archive_members): Use acting_as_filter
5353 rather than archive == STDIN_FILENO to detect whether we're acting
5354 as a filter, as open can return STDIN_FILENO in some cases.
5355 (delete_archive_members): Ignore zero blocks if
5356 ignore_zeros_option is nonzero. Fix bug that messed up last
5357 output block: write_eot can't be used here, as it gets confused
5358 when the input is at end of file.
5359
5360 * src/compare.c (diff_archive): Do not impose an arbitrary limit on
5361 symbolic link contents length. Pass directory size to
5362 get_directory_contents.
5363
5364 * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
5365 m4/strerror_r.m4: New files.
5366 * m4/signedchar.m4: Remove this file.
5367 * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
5368 * m4/Makefile.am (EXTRA_DIST): Likewise.
5369
5370 * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
5371
5372 * po/da.po: New translation file.
5373
5374 * src/mangle.c (extract_mangle):
5375 Fix diagnostic with wrong number of %s'es.
5376
5377 * lib/fnmatch.c (fnmatch):
5378 Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
5379 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
5380
5381 * lib/full-write.c (full_write): Some buggy drivers return 0 when you
5382 fall off a device's end. Detect this.
5383
5384 * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
5385 uses changed.
5386 (open): Remove macro; we no longer support EMUL_OPEN3. Do not
5387 include <pathmax.h> and directory include files like <dirent.h>;
5388 no longer used. Include <savedir.h> instead.
5389 (closedir, signed_char): remove macro; no longer used.
5390 (bool, false, true): Include <stdbool.h> if you have the include
5391 file, otherwise define.
5392
5393 * src/misc.c:
5394 (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
5395 opendir_warn, readdir_error): Remove; no longer needed.
5396 (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
5397 before deciding whether we're trying to remove ".".
5398 (remove_any_file): Try unlink first if we are not root. Use
5399 savedir when recursively removing directories, to avoid exhausting
5400 file descriptors.
5401 (savedir_error, savedir_warn, symlink_error): New functions.
5402
5403 * src/list.c: (read_and): Do not invoke
5404 apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
5405 responsible for that. Do not invoke apply_delayed_set_stat; our
5406 caller is now responsible for that.
5407 (read_header): Use signed char instead of signed_char. Prevent
5408 later references to current_header from mistakenly treating it as
5409 an old GNU header.
5410 (from_header): Quote invalid base-64 strings in diagnostics.
5411 (time_from_header): Do not warn about future timestamps in
5412 archive; check_time now does that.
5413 (print_header): Quote unknown file types.
5414 (skip_member): New function, replacing skip_extended_headers and
5415 now skipping the whole member instead of just the extended
5416 headers. All callers changed. This makes the code handle
5417 extended headers uniformly, and fixes some bugs.
5418
5419 * src/update.c (update_archive): Use skip_member.
5420
5421 * src/extract.c (we_are_root): Now global.
5422 (struct delayed_symlink): New type.
5423 (delayed_symlink_head): New var.
5424 (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
5425 not apply_delayed_set_stat.
5426 (set_mode, set_stat): Pointer args are now const pointers.
5427 (check_time): New function.
5428 (set_stat): Warn if setting a file's timestamp to be the future.
5429 (make_directories): Do not save and restore errno.
5430 (maybe_recoverable): Set errno to ENOENT if we cannot make missing
5431 intermediate directories.
5432 (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
5433 not in caller. Extract potentially dangerous symbolic links more
5434 carefully, deferring their creation until the end, and using a
5435 regular file placeholder in the meantime. Do not remove trailing
5436 / and /. from file names. Do not bother checking for ".." when
5437 checking whether a directory loops back on itself, as loopbacks
5438 can occur with symlinks too. Also, in that case, do not bother
5439 saving and restoring errno; just set it to EEXIST.
5440 (apply_nonancestor_delayed_set_stat): A prefix is a potential
5441 ancestor if it ends in slash too (as well as ending in a char just
5442 before slash).
5443 (apply_delayed_set_stat): Remove.
5444 (apply_delayed_symlinks, extract_finish): New functions.
5445
5446 * doc/fdl.texi: New file.
5447 * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
5448 ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
5449 * doc/tar.texi: Add Free Documentation License. New section
5450 "Overwrite Old Files", and revamp that section to make it easier to
5451 follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
5452 documentation into getdate.texi. Fix several minor typos. Describe
5453 TAR_OPTIONS. Describe incompatibility between incremental backups and
5454 --atime-preserve. Describe incompatibility between --verify and other
5455 options. Mention that tar normally removes symbolic links rather than
5456 following them, when extracting a file of the same name.
5457
5458 * THANKS: Add gpoul. Change skip's address.
5459
5460 * po/POTFILES.in: Add lib/human.c.
5461
5462 * src/common.h (namelist, namelast): Remove decls.
5463 (we_are_root, extract_finish, skip_member, savedir_error,
5464 savedir_warn, symlink_error, gnu_list_name): New decls.
5465 (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
5466 skip_extended_headers, is_dot_or_dotdot, closedir_error,
5467 closedir_warn, opendir_error, opendir_warn, readdir_error,
5468 readdir_warn): Remove decls.
5469 (get_directory_contents): New off_t arg.
5470 (addname): Now returns struct name *.
5471
5472 * src/tar.h, tests/genfile.c: Fix comments.
5473
5474 * src/create.c: Include hash.h.
5475 (gnu_list_name): Remove decl.
5476 (struct link): Remove "next" member.
5477 (linklist): Remove.
5478 (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
5479 consistency with other diagnostics.
5480 (deal_with_sparse): Check for I/O error when closing the file.
5481 (create_archive): Do not allocate an array of size PATH_MAX, as
5482 PATH_MAX might be (size_t) -1. Instead, allocate an array with
5483 the size that's needed.
5484 (hash_link, compare_links): New functions.
5485 (dump_file): Do not exhaust open file descriptors when descending
5486 deeply into a directory, by using savedir rather than
5487 opendir/readdir. Do not zero-fill the name buffer unnecessarily.
5488 Hash the set of links already created, instead of using a linked
5489 list. Fix some bugs in outputting sparse files which caused the
5490 sparse tables to be incorrect. When a file unexpectedly shrinks,
5491 output zeros rather than garbage. Do not allocate an array of
5492 size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
5493 allocate an array with the size that's needed.
5494
5495 * src/incremen.c: Include hash.h.
5496 (struct directory): Remove "next", "dir_text". Change "name" to
5497 be char[1] with struct hack, not const char *. Add "found".
5498 (directory_list): Remove. Replaced by directory_table.
5499 (directory_table): New var.
5500 (nfs_string): Renamed from nfs.
5501 (hash_directory, compare_directories): New functions.
5502 (note_directory): Now returns struct directory *. First arg is
5503 now const pointer. struct stat arg is now dev_t, ino_t, nfs.
5504 Remove text arg. New "found" arg, basically corresponding to the
5505 old text arg not being null. All callers changed.
5506 (note_directory, find_directory): Use hash table rather than
5507 linked list.
5508 (get_directory_contents): New arg "device". Use savedir to do the
5509 hard work. Save the nfs-ness of stat_data, since it might change
5510 under us. Use note_directory instead of find_directory to save
5511 some work. When adding an "A" record, do it with
5512 add_to_accumulator instead of cheating with strcat.
5513 (read_directory_file): Use "+" flag before device to indicate
5514 whether it was NFS. Fix typo in checking for strtoul error.
5515 (write_directory_file_entry): New function.
5516 (write_directory_file): Use it, and use the hash routines to
5517 traverse the directory table.
5518 (gnu_restore): Use savedir rather than opendir/readdir.
5519
5520 * src/tar.c: Include localedir.h, prepargs.h.
5521 (long_options): Now static.
5522 (long_options, usage, decode_options): -j is now short for
5523 --bzip2, and -I is now an alias for -T.
5524 (decode_options, main): argv is not const pointer now.
5525 (decode_options): Invoke prepend_default_options to support
5526 TAR_OPTIONS. In diagnostic, mention the string that was the
5527 invalid blocking factor, tape length, group, owner, or record
5528 size. --delete is no longer incompatible with -f -, undoing
5529 2000-01-07 change.
5530 (main): Invoke extract_finish at end of extraction.
5531
5532 * src/rmt.c: Include localedir.h.
5533 (main): Update copyright date to 2000.
5534
5535 * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
5536 following changes: Use @sc where appropriate. Document the ranges of
5537 supported times more precisely. Add Eggert to getdate authors.
5538 Document old Latin 12m/12pm tradition. Remove list of alphabetic time
5539 zone names, as it wasn't correct and people shouldn't be relying on it
5540 anyway. Relative items also account for non-DST adjustments. Fix
5541 some misspellings.
5542
5543 * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
5544
5545 * tests/ignfail.sh: opendir -> savedir in diagnostics.
5546
5547 * tests/preset.in: Set LANGUAGE to the empty string, for some
5548 brain damaged host.
5549
5550 2000-10-20 Paul Eggert <eggert@twinsun.com>
5551
5552 * m4/fnmatch.m4: Mention the GNU C library.
5553
5554 2000-10-19 Paul Eggert <eggert@twinsun.com>
5555
5556 * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
5557 glibc 2.1.95.
5558
5559 2000-10-17 Paul Eggert <eggert@twinsun.com>
5560
5561 * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
5562 (CHAR_BIT): Remove.
5563
5564 * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
5565 (CHAR_BIT): Define if not defined.
5566
5567 2000-09-09 Paul Eggert <eggert@twinsun.com>
5568
5569 * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
5570
5571 2000-08-07 Paul Eggert <eggert@twinsun.com>
5572
5573 * lib/xmalloc.c: Memory exhausted -> memory exhausted
5574
5575 * lib/xalloc.h (xalloc_msg_memory_exhausted):
5576 change to array from char *.
5577
5578 2000-08-06 Paul Eggert <eggert@twinsun.com>
5579
5580 * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
5581 compatibility with glibc 2.1.3 strftime.c.
5582
5583 2000-07-31 Paul Eggert <eggert@twinsun.com>
5584
5585 * lib/quotearg.c (quotearg_n_options):
5586 Don't make the initial slot vector a constant,
5587 since it might get modified.
5588
5589 * lib/quotearg.c: Add support for more than one preallocated slot.
5590
5591 2000-07-30 Paul Eggert <eggert@twinsun.com>
5592
5593 * lib/quotearg.c (quotearg_n_options):
5594 Preallocate a slot 0 buffer, so that the caller
5595 can always quote one small component of a "memory exhausted" message
5596 in slot 0.
5597
5598 2000-07-23 Paul Eggert <eggert@twinsun.com>
5599
5600 * lib/quotearg.c:
5601 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
5602 mbstate_t is always defined.
5603
5604 Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
5605 some GCC installations, and this configuration error is likely to be
5606 common.
5607
5608 2000-07-22 Paul Eggert <eggert@twinsun.com>
5609
5610 * lib/quotearg.c:
5611 When the system forces us to redefine mbstate_t, shadow its mbsinit
5612 function. From Bruno Haible.
5613
5614 2000-07-14 Paul Eggert <eggert@twinsun.com>
5615
5616 * lib/xmalloc.c: Simplify exhausted message.
5617
5618 * lib/quotearg.h: Update copyright date; from Jim Meyering.
5619
5620 2000-07-13 Paul Eggert <eggert@twinsun.com>
5621
5622 * lib/quotearg.h (enum quoting style):
5623 New constant clocale_quoting_style.
5624
5625 * lib/quotearg.c:
5626 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
5627 Add support for clocale_quoting_style, undoing previous change to
5628 locale_quoting_style.
5629
5630 2000-07-10 Paul Eggert <eggert@twinsun.com>
5631
5632 * lib/quotearg.c:
5633 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
5634 since otherwise we don't need it.
5635 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
5636 since we don't do multibytes in that case.
5637 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
5638 invoke multibyte primitives.
5639
5640 * m4/mbstate_t.m4 (AC_MBSTATE_T):
5641 Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
5642 Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
5643 and mbstate_t, to a single-part test that simply defines mbstate_t.
5644
5645 * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
5646 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
5647 to decide whether to define the BeOS workaround macro;
5648 this adjusts to the change to AC_MBSTATE_T.
5649
5650 * m4/strerror_r.m4: New file.
5651
5652 2000-07-05 Paul Eggert <eggert@twinsun.com>
5653
5654 * lib/quotearg.c: Use double-quote to quote.
5655
5656 * lib/quotearg.c (N_): New macro.
5657 (gettext_default): New function.
5658 (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
5659 "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
5660 for right quote.
5661
5662 * lib/quotearg.c (struct quoting_options):
5663 Simplify quote_these_too dimension.
5664 From Bruno Haible <haible@clisp.cons.org>.
5665
5666 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
5667 Test for mbstate_t only if the test
5668 for an object-type mbstate_t fails.
5669
5670 * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
5671
5672 2000-07-03 Paul Eggert <eggert@twinsun.com>
5673
5674 * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
5675 Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
5676
5677 * lib/quotearg.c (mbrtowc):
5678 Assign to *pwc, and return 1 only if result is nonzero.
5679 (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
5680
5681 2000-07-02 Paul Eggert <eggert@twinsun.com>
5682
5683 * lib/quotearg.c (mbstate_t):
5684 Do not define; it should be defined with AC_CHECK_TYPE.
5685
5686 2000-06-26 Paul Eggert <eggert@twinsun.com>
5687
5688 * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
5689 a bug in glibc 2.1.3.
5690
5691 * lib/xmalloc.c: Fix inaccurate comment for xrealloc.
5692
5693 2000-06-19 Paul Eggert <eggert@twinsun.com>
5694
5695 * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
5696 inclusion of wctype.h to work around solaris2.6 namespace pollution.
5697 (ISPRINT): Likewise.
5698 Reported by Tom Tromey.
5699
5700 2000-06-15 Paul Eggert <eggert@twinsun.com>
5701
5702 * lib/human.c (adjust_value): New function.
5703 (human_readable_inexact): Apply rounding style even when printing
5704 approximate values.
5705
5706 * lib/human.c: Avoid shadowing warnings.
5707 From Jim Meyering.
5708
5709 2000-06-14 Paul Eggert <eggert@twinsun.com>
5710
5711 * lib/human.c (human_readable_inexact): Allow an input block size
5712 that is not a multiple of the output block size, and vice versa.
5713
5714 * lib/getdate.y (get_date): Apply relative times after time zone
5715 indicator, not before.
5716
5717 2000-05-31 Paul Eggert <eggert@twinsun.com>
5718
5719 * m4/largefile.m4: Rewrite so that we don't need to run getconf,
5720 and thus don't need AC_CANONICAL_HOST.
5721
5722 (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
5723 (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
5724 (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
5725 CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
5726 changed. Instead of inspecting the output of getconf, try to
5727 compile the test program without and with the macro definition.
5728 (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
5729 getconf. Instead, check for the needed flags by compiling test
5730 programs.
5731
5732 * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
5733 longer needs it.
5734 * config.guess, config.sub: Remove these files, for similar reasons.
5735
5736 2000-05-03 Paul Eggert <eggert@twinsun.com>
5737
5738 * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
5739 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
5740 bug. This avoids a clash when files like regex.c that define
5741 _GNU_SOURCE.
5742
5743 2000-05-02 Paul Eggert <eggert@twinsun.com>
5744
5745 * m4/largefile.m4 (AC_SYS_LARGEFILE):
5746 Define _GNU_SOURCE if this is needed to make
5747 ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
5748 inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
5749
5750 * lib/quotearg.c (mbrtowc, mbstat_t):
5751 Add definitions if !HAVE_MBSTATE_T_OBJECT.
5752 (<wctype.h>): Include if HAVE_WCTYPE_H.
5753 (iswprint): Define to 1 if we lack it
5754
5755 2000-04-18 Paul Eggert <eggert@twinsun.com>
5756
5757 * m4/mbstate_t.m4: New file.
5758
5759 2000-04-17 Bruno Haible <haible@clisp.cons.org>
5760
5761 * tests/ignfail.sh: Test for uid 0 along with user "root".
5762
5763 2000-04-05 Paul Eggert <eggert@twinsun.com>
5764
5765 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
5766 Don't use -n32 on IRIX if the installer said
5767 otherwise.
5768
5769 2000-02-28 Paul Eggert <eggert@twinsun.com>
5770
5771 * lib/quotearg.c (ALERT_CHAR): New macro.
5772 (quotearg_buffer_restyled): Use it.
5773
5774 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5775
5776 * src/list.c (tartime): Fix off-by-one error when copying year if
5777 OLD_CTIME.
5778
5779 2000-02-18 Paul Eggert <eggert@twinsun.com>
5780
5781 * lib/getdate.y: Handle two-digit years with leading zeros correctly.
5782 (textint): New typedef.
5783 (parser_control): Changed from struct parser_control to typedef
5784 (for consistency). Member year changed from int to textint. All
5785 uses changed.
5786 (YYSTYPE): Removed; replaced by %union with int and textint
5787 members.
5788 (tID): Removed; not used.
5789 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
5790 tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
5791 tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
5792 (tSNUMBER, tUNUMBER): Now of type <textintval>.
5793 (date, number, to_year): Use width of number in digits, not its
5794 value, to determine whether it's a 2-digit year, or a 2-digit
5795 time.
5796 (yylex): Store number of digits of numeric tokens. Return '?' for
5797 unknown identifiers, rather than (unused) tID.
5798
5799 2000-01-16 Paul Eggert <eggert@twinsun.com>
5800
5801 * lib/quotearg.c (quotearg_buffer_restyled):
5802 Do not quote alert, backslash, formfeed,
5803 and vertical tab unnecessarily in shell quoting style.
5804
5805 2000-01-15 Paul Eggert <eggert@twinsun.com>
5806
5807 * m4/c-bs-a.m4:
5808 Change quoting to be compatible with future autoconf versions.
5809
5810 2000-01-11 Paul Eggert <eggert@twinsun.com>
5811
5812 * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
5813
5814 2000-01-07 Paul Eggert <eggert@twinsun.com>
5815
5816 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
5817
5818 Fix bug with fnmatch.h dependency, as follows:
5819 * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
5820 * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
5821
5822 * src/common.h (apply_nonancestor_delayed_set_stat):
5823 Renamed from apply_delayed_set_stat.
5824 (apply_delayed_set_stat, decode_mode, chmod_error_details,
5825 chown_error_details, close_warn, closedir_warn, mkdir_error,
5826 read_error_details, read_fatal_details, read_warn_details,
5827 seek_error_details, seek_warn_details, utime_error,
5828 write_error_details, write_fatal_details): New decls.
5829
5830 Make diagnostic messages more regular.
5831 * src/create.c (dump_file): Quote file names with colons if possible.
5832 * src/compare.c (diff_archive): Likewise.
5833 * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
5834 * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
5835 * src/mangle.c (extract_mangle): Likewise.
5836 * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
5837 Likewise.
5838 * src/buffer.c (archive_write_error, flush_archive, close_archive,
5839 new_volume, xclose):
5840 Use error message functions to report errors consistently.
5841 * src/compare.c (diff_sparse_files, diff_archive): Likewise.
5842 * src/create.c (finish_sparse_file, dump_file): Likewise.
5843 * src/extract.c (set_mode, set_stat, extract_sparse_file,
5844 extract_archive): Likewise.
5845 * src/list.c (list_archive): Likewise.
5846 * src/update.c (append_file): Likewise.
5847 * src/compare.c (diff_init, diff_sparse_files):
5848 Use xalloc_die to report memory exhaustion.
5849 * src/incremen.c (gnu_restore): Likewise.
5850 * src/list.c (read_header): Likewise.
5851 * src/mangle.c (extract_mangle): Likewise.
5852 * src/misc.c (maybe_backup_file): Likewise.
5853 * src/tar.c (decode_options): Likewise.
5854 * src/compare.c (read_and_process, fill_in_sparse_array,
5855 diff_sparse_files):
5856 Use consistent terminology for unexpected-EOF message.
5857 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
5858 * src/list.c (list_archive, read_header, skip_file,
5859 skip_extended_headers): Likewise.
5860 * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
5861 (xdup2): Regularize messages with rest of tar.
5862
5863 * src/buffer.c (flush_read): Don't read past EOF.
5864
5865 * src/extract.c (extr_init):
5866 If we run out of memory, invoke apply_delayed_set_stat.
5867 (prepare_to_extract): Don't complain if we can't remove ".".
5868 (apply_delayed_set_stat): New function.
5869 (apply_nonancestor_delayed_set_stat):
5870 Renamed from apply_delayed_set_stat. All uses changed.
5871 Don't remove head if it doesn't apply.
5872
5873 * src/create.c (find_new_file_size):
5874 Return size instead of storing through pointer.
5875 All callers changed.
5876 (deal_with_sparse): Don't keep reading after read errors.
5877 (finish_sparse_file): Just abort if there is an internal error.
5878 (dump_file): Fix typo: stat_warn and stat_error were interchanged.
5879 Don't restore access times on directories during incremental dumps
5880 until after dealing with the directory.
5881 If ignoring failed reads, count closedir, read, and unknown
5882 file errors as warnings, not errors.
5883 Fix buffer overrun problem when dumping sparse files.
5884
5885 * src/list.c (read_and):
5886 Invoke apply_nonancestor_delayed_set_stat on file names
5887 after handling them.
5888 (decode_mode): Remove; moved to misc.c.
5889
5890 * src/misc.c (safer_rmdir): New function.
5891 (remove_any_file): Use it to avoid problems with rmdir(".").
5892 (maybe_backup_file): Regularize diagnostics.
5893 (undo_backup_file): Likewise.
5894 (decode_mode): Moved here from list.c.
5895 (chmod_error_details, chown_error_details, close_fatal,
5896 close_warn, closedir_warn, mkdir_error, read_error_details,
5897 read_warn_details, read_fatal_details, seek_error_details,
5898 seek_warn_details, utime_error, write_error_details,
5899 write_fatal_details): New functions.
5900
5901 * src/delete.c (save_record): Remove static variable (now local).
5902 (move_archive): Don't position before start of archive.
5903 (write_record): Abort if count is zero at inopportune time.
5904 Plug memory leak.
5905
5906 * src/tar.c (decode_options): --delete and -f - are now
5907 incompatible, since we didn't have time to fix their bugs.
5908
5909 * tests/Makefile.am (TESTS): Remove delete02.sh.
5910 * tests/ignfail.sh: Adjust to new quoting scheme again.
5911
5912 2000-01-06 Paul Eggert <eggert@twinsun.com>
5913
5914 * lib/getdate.y: Sync tm_diff with the GNU C Library.
5915 (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
5916 (tm_diff): Renamed from difftm. All uses changed.
5917 Replace body with that taken from GNU C Library 2.1.3pre1.
5918 (get_date): Prefer tm_gmtoff to tm_diff if available.
5919
5920 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
5921
5922 * tests/incremen.sh: Invoke stat on newly created file so that its
5923 ctime is updated on Nextstep.
5924
5925 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
5926
5927 * lib/getdate.y (get_date):
5928 Fix typo when checking for time_t overflow in time zone calculations.
5929
5930 1999-12-13 Paul Eggert <eggert@twinsun.com>
5931
5932 * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
5933
5934 * README-alpha: New file.
5935 * README: New sections for gzip and bzip2, Solaris.
5936 Remove mention of BACKLOG.
5937
5938 * configure.in (AC_C_BACKSLASH_A): Add.
5939 (AC_CHECK_HEADERS): Add wchar.h.
5940 (AC_CHECK_FUNCS): Add mbrtowc.
5941 (AC_FUNC_CLOSEDIR_VOID): Add.
5942
5943 * tests/Makefile.am (TESTS): Add delete02.sh.
5944 (POSTPONED_TESTS): Remove.
5945 (EXTRA_DIST): Remove $(POSTPONED_TESTS).
5946
5947 * tests/preset.in:
5948 Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
5949
5950 * tests/ignfail.sh (err): Adjust to new quoting scheme.
5951
5952 * tests/delete02.sh: Fix typo: need to list archive2, not archive.
5953
5954 * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
5955
5956 * src/tar.c ("quotearg.h"): New include.
5957 (usage): Now has __attribute__ ((noreturn)).
5958 (confirm): Report errno if we can't open tty.
5959 (confirm, decode_options):
5960 Quote arbitrary strings in diagnostics.
5961 (OVERWRITE_OPTION): New constant.
5962 (long_options, usage, decode_options): New --overwrite option.
5963 (decode_options): --keep-old-files, --overwrite, and --unlink-first
5964 are now mutually exclusive.
5965 Don't assume that gettext preserves errno.
5966 (main): Set default quoting style to escape_quoting_style.
5967
5968 * src/update.c (<quotearg.h>): New include.
5969 (append_file):
5970 Don't assume that gettext preserves errno.
5971 Quote arbitrary strings in diagnostics.
5972 Check for close error.
5973
5974 * src/names.c (<quotearg.h>): New include.
5975 (name_init, name_next, name_close, names_notfound,
5976 collect_and_sort_names): Don't assume that gettext preserves
5977 errno. Quote arbitrary strings in diagnostics.
5978 (excluded_name): Fix typo that caused empty patterns to be
5979 mishandled.
5980
5981 * src/misc.c (<quotearg.h>): New include.
5982 (quote_copy_string): Quote only newline and backslash; the output is no
5983 longer meant for humans, and is locale-independent.
5984 (contains_dot_dot): New function.
5985 (remove_any_file): Don't use lstat; just rmdir the file and then use
5986 unlink if the rmdir fails because the file isn't a directory.
5987 Check for readdir and closedir errors.
5988 (maybe_backup_file): Report "stat" for stat errors.
5989 (maybe_backup_file, chdir_do):
5990 Quote arbitrary strings in diagnostics.
5991 (maybe_backup_file, undo_last_backup):
5992 Don't assume that gettext preserves errno.
5993 (call_arg_error, call_arg_fatal, call_arg_warn,
5994 chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
5995 mknod_error, open_error, open_fatal, open_warn, opendir_error,
5996 opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
5997 readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
5998 stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
5999 write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
6000
6001 * src/system.h (__attribute__): New macro.
6002 (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
6003 (S_ISDOOR): New macro.
6004 (closedir): New macro, if CLOSEDIR_VOID.
6005
6006 * src/rmt.c, src/rtapelib.c (decode_oflag):
6007 O_APPEND might not be defined.
6008
6009 * src/list.c: (read_and, list_archive):
6010 Quote arbitrary strings in diagnostics.
6011 (from_header): Use locale_quoting_style to quote diagnostics.
6012 (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
6013
6014 * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
6015
6016 * src/Makefile.am: Use ## for copyright comments.
6017
6018 * src/extract.c (<quotearg.h>): New include.
6019 (enum permstatus): New enum.
6020 (struct delayed_set_stat): file_name is now at end of buffer, to avoid
6021 two mallocs. New members file_name_len, invert_permissions, permstatus.
6022 (extr_init): Remove hack that silently adjusted newdir_umask.
6023 (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
6024 Use these args to decide whether and how to set modes.
6025 (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
6026 Don't assume that gettext preserves errno.
6027 (set_stat): Remove arg symlink_flag; subsumed by typeflag.
6028 (delay_set_stat, repair_delayed_set_stat): New functions.
6029 (make_directories): Avoid mkdir where last part of path is "..".
6030 Create a struct delayed_set_stat for each directory made.
6031 (prepare_to_extract): Renamed from unlink_destination, and
6032 return 0 immediately if to_stdout_option; all callers changed.
6033 (maybe_recoverable): New parameter interdir_made.
6034 Add support for --overwrite.
6035 (extract_sparse_file, extract_archive):
6036 Quote arbitrary strings in diagnostics.
6037 (extract_archive): By default, warn about ".." in member names, and skip them.
6038 Don't open files with O_NONBLOCK or O_APPEND.
6039 Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
6040 overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
6041 minus the current umask. Keep track of intermediate directories made,
6042 to avoid looping when making x/../x when x doesn't exist; the
6043 earlier code solved this in a different way that didn't fit well
6044 into the new scheme. Don't extract permissions onto existing
6045 directories unless --overwrite is given. Do not add -wx------
6046 permissions to new directories permanently; just do it temporarily.
6047 Remove no-longer-needed hack with MSDOS and directory time stamps.
6048 (apply_delayed_set_stat): New argument specifies which directories to
6049 fix statuses of. Do not wait until the end of extraction to fix
6050 statuses; instead, fix a directory's status once we exit that directory.
6051 This requires less memory and does the right thing in some cases
6052 where the old method didn't.
6053 (fatal_exit): New function.
6054
6055 * src/incremen.c (<quotearg.h>): New include.
6056 (get_directory_contents, gnu_restore):
6057 Check for readdir and closedir errors.
6058 (get_directory_contents, read_directory_file, gnu_restore):
6059 Quote arbitrary strings in diagnostics.
6060 (get_directory_contents, read_directory_file, write_directory_file):
6061 Don't assume that gettext preserves errno.
6062
6063 * src/create.c (<quotearg.h>): New include.
6064 (start_header): Use `member names' to refer to archive member names, not
6065 `archive names'. Warn about `..' in member names.
6066 (finish_sparse_file, dump_file):
6067 Quote arbitrary strings in diagnostics.
6068 (finish_sparse_file, dump_file):
6069 Don't assume that gettext preserves errno.
6070 (dump_file): Don't use `access' to determine whether a directory is readable;
6071 this isn't reliable if tar is setuid. Use `opendir' instead.
6072 Check for readdir and closedir failures.
6073 Don't dump sockets as if they were fifos; just warn and skip.
6074
6075 * src/delete.c (move_archive):
6076 Don't report fatal error merely because sizes don't fit
6077 into struct mtop values; fall back on lseek instead.
6078 Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
6079 Say `reposition' instead of `re-position'.
6080 (delete_archive_members):
6081 Set archive to STDOUT_FILENO before outputting trailing buffer.
6082
6083 * src/compare.c (<quotearg.h>): New include.
6084 (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
6085 and `Cannot' others.
6086 (report_difference, diff_archive):
6087 Quote arbitrary strings in diagnostics.
6088 (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
6089 Don't assume that gettext preserves errno.
6090 (diff_archive): Don't open regular files with O_NONBLOCK.
6091 Preserve access times of files if --atime.
6092
6093 * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
6094 (FATAL_ERROR, USAGE): Don't return 0.
6095 (enum old files): New enum.
6096 (old_files_option): New variable, replacing keep_old_files_option and
6097 unlink_first_option.
6098 (apply_delayed_set_stat): Now takes char const * param.
6099 (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
6100 closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
6101 open_fatal, open_warn, opendir_error, opendir_warn, read_error,
6102 read_fatal, readdir_error, readdir_warn, readlink_error,
6103 readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
6104 truncate_error, truncate_warn, unlink_error, waitpid_error,
6105 write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
6106
6107 * src/buffer.c:
6108 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
6109 archive_write_error, archive_read_error, flush_archive, close_archive,
6110 init_volume_number, new_volume):
6111 Don't assume that gettext preserves errno.
6112
6113 (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
6114 (open_archive): Reject multivolume verify attempts a bit earlier.
6115 Rename local variable `access', in case it's defined by system header.
6116
6117 (open_archive, backspace_output): Use `Cannot' uniformly, instead of
6118 `Could not' sometimes and `Cannot' others.
6119
6120 (open_archive, flush_read, flush_archive, close_archive, new_volume):
6121 Quote arbitrary strings in diagnostics.
6122
6123 (read_error): Set archive to STDOUT_FILENO temporarily when writing
6124 archive buffer.
6125
6126 (init_volume_number): Check for input and output errors in volno_file.
6127
6128 (new_volume): Use new fatal_exit function to exit, and new xfork
6129 function to fork.
6130
6131 * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
6132
6133 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
6134
6135 * doc/tar.texi: Add --overwrite.
6136 --absolute-names rejects ".." in names.
6137
6138 * lib/quotearg.c: Add support for multibyte characters.
6139 (ISGRAPH): Remove.
6140 (ISPRINT): New macro.
6141 (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
6142 (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
6143 defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
6144 (quotearg_buffer_restyled): New function, with most of the old
6145 quotearg_buffer's contents.
6146 Major rewrite to support multibyte characters.
6147 (quotearg_buffer): Now just calls quotearg_buffer_restyled.
6148
6149 * m4/c-bs-a.m4: New file.
6150
6151 * lib/Makefile.am: Use ## for copyright notice.
6152
6153 * scripts/Makefile.am: Use ## on copyright notice.
6154
6155 * doc/Makefile.am:
6156 ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
6157
6158 1999-12-05 Paul Eggert <eggert@twinsun.com>
6159
6160 * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
6161 src/ChangeLog, tests/ChangeLog: Remove these files.
6162 * ChangeLog.1: New file, incorporating the above files, plus old
6163 ChangeLog entries.
6164 * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
6165
6166 1999-12-05 Dale Worley <worley@ariadne.com>
6167
6168 * src/compare.c (<utime.h>, struct utimbuf): Add.
6169 (diff_archive): Restore access times if --atime.
6170 * doc/tar.texi: Explain that --atime also preserves modification time.
6171
6172 1999-12-04 Gerhard Poul <gpoul@gnu.org>
6173
6174 * ABOUT-NLS: Update to latest version from ftp.gnu.org.
6175 * BACKLOG, TODO: Remove.
6176 * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
6177 * README: Bring up to date.
6178
6179 1999-12-03 Paul Eggert <eggert@twinsun.com>
6180
6181 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
6182
6183 * src/compare.c (diff_archive):
6184 Do not set errno to EPIPE; we no longer use perror.
6185
6186 * src/create.c (dump_file):
6187 If a parent directory said that a file should be there but it is
6188 absent, diagnose it as being removed in the meantime.
6189 Do not pass meaningless errno to ERROR when reporting that the
6190 file changed as we read it.
6191 Report that a file changed if its ctime changes; this is more
6192 sensitive than mtime+size, and more accurate.
6193
6194 * src/incremen.c (enum children): New type.
6195 (struct directory): Change old char allnew member to new enum children
6196 children member.
6197 All uses changed.
6198 (get_directory_contents): When doing an incremental dump that does
6199 not cross filesystem boundaries, dump the mount points, even though
6200 they are in a different filesystem. This is for convenience when
6201 restoring, and for consistency with non-incremental dumps.
6202 This requires a 3-way flag for keeping track of which children we want,
6203 so we use enum children rather than boolean.
6204
6205 * src/open3.c (modes): Remove.
6206 (open3): Remove unportable assumptions about flag encodings.
6207 Use `stat' instead of `access' for testing file existence,
6208 to avoid problems with setuid programs.
6209
6210 * src/names.c (name_next): If file names are given both in the
6211 command line (e.g. via -C) and in a file (via -T), do not
6212 ignore the command-line names.
6213
6214 * m4/uintmax_t.m4: Backport to autoconf 2.13.
6215
6216 * doc/tar.texi: Clarify getdate authorship.
6217
6218 1999-11-23 Paul Eggert <eggert@twinsun.com>
6219
6220 * lib/Makefile.am (DISTCLEANFILES): New macro.
6221
6222 * configure.in (tar_fnmatch_hin):
6223 Remove; it runs afoul of a bug in autoconf 2.13.
6224 Instead, always link fnmatch.h to some file, even if it's a throwaway.
6225
6226 1999-11-19 Paul Eggert <eggert@twinsun.com>
6227
6228 * m4/largefile.m4: Update serial.
6229
6230 1999-11-18 Paul Eggert <eggert@twinsun.com>
6231
6232 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
6233 the QNX shell, which doesn't propagate exit status of failed
6234 commands inside shell assignments.
6235
6236 1999-11-07 Paul Eggert <eggert@twinsun.com>
6237
6238 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
6239
6240 * configure.in (AC_PREREQ): Bump to 2.13.
6241 (ALL_LINGUAS): Add pt_BR, ja.
6242 (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
6243 (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
6244 for AIX crossbuilds.
6245
6246 * doc/tar.texi: New node create options for --ignore-failed-read.
6247 Remove unused version control symbols.
6248 Modernize texinfo usage.
6249
6250 * src/tar.c (usage): Add examples.
6251
6252 * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
6253 Include fnmatch.h when testing fnmatch.
6254
6255 * src/common.h (collect_and_sort_names): New decl.
6256
6257 * src/list.c (from_header):
6258 Handle 32-bit two's complement negative time stamps
6259 even if the leading octal digit is 2 or 3.
6260
6261 * src/extract.c (set_stat): Remove duplicate code.
6262
6263 * src/create.c (to_chars): Remove trailing newline from warning.
6264 (dump_file): Ignore doors.
6265 (finish_header): Report block numbers with origin 0, not origin 1.
6266
6267 * src/rmt.c: Include getopt.h.
6268 (long_opts): New constant.
6269 (usage): New function.
6270 (main): Implement --help and --version.
6271 Output usage message if arguments are bad.
6272
6273 1999-10-10 Paul Eggert <eggert@twinsun.com>
6274
6275 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
6276
6277 * README: Remove --with-dmalloc.
6278 Add --disable-largefile.
6279 Remove old NeXT dirent problems, or AIX valloc problems.
6280 Remove old union wait advice, and old %lld advice.
6281 Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
6282
6283 * doc/tar.texi: Clarify documentation for portable file names.
6284
6285 * configure.in (AM_WITH_DMALLOC): Remove.
6286 (ALL_LINGUAS): Add ja.
6287
6288 * src/tar.c (decode_options):
6289 Invalid dates are now treated as (time_t) -1.
6290 Redo version message to conform to GNU standards.
6291
6292 * src/create.c (dump_file):
6293 Fix typo: last two args to dump_file were interchanged.
6294 * src/update.c (update_archive): Likewise.
6295
6296 * src/common.h (tartime): New decl.
6297
6298 * src/list.c (tartime): Now extern.
6299 (read_and): Invalid headers cause errors, not warnings.
6300
6301 1999-10-03 Paul Eggert <eggert@twinsun.com>
6302
6303 * lib/getdate.y (__attribute__):
6304 Don't use if GCC claims to be before 2.8; this is
6305 needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
6306
6307 1999-09-25 Paul Eggert <eggert@twinsun.com>
6308
6309 * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
6310 * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
6311
6312 * tests/incremen.sh: Add yet another sleep.
6313
6314 1999-09-24 Paul Eggert <eggert@twinsun.com>
6315
6316 * NEWS: A read error now causes a nonzero exit status.
6317
6318 * src/create.c (to_chars): Fix base-256 output.
6319
6320 * src/buffer.c (write_error):
6321 Read error is an error, not just a warning.
6322
6323 1999-09-24 Paul Eggert <eggert@twinsun.com>
6324
6325 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
6326
6327 * src/tar.c (<time.h>): Include.
6328 (time): Declare if not defined.
6329 (confirm): Don't read past EOF.
6330 (long_options, usage): Add --no-same-owner, --no-same-permissions.
6331 (main): Use clock_gettime if available.
6332
6333 * tests/Makefile.am (TESTS): Add incremen.sh
6334 (INCLUDES): Add -I../lib, for fnmatch.h.
6335
6336 * src/update.c (update_archive):
6337 Remove call to name_expand; had no effect.
6338 Use chdir_do to change into directory.
6339 Use deref_stat instead of stat.
6340 Use add_avoided_name to mark names to be avoided; the old method of
6341 setting a bit with the name caused all descendants of that name to
6342 be avoided, in some circumstances.
6343
6344 * tests/incremen.sh: Remove unnecessary sleeps.
6345
6346 * src/names.c (name_next): Go back to using plain chdir.
6347 (name_gather): Use chdir_arg to keep track of arguments to chdir.
6348 (addname): Likewise.
6349 (name_match): Use chdir_do to act on chdir args.
6350 (merge_sort): Moved here from incremen.c.
6351 (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
6352 Likewise.
6353 (name_expand): Remove.
6354 (name_from_list): Skip fake names.
6355 Use chdir_do to act on chdir args.
6356 (struct avoided_name): New struct.
6357 (avoided_names): New var.
6358 (add_avoided_name, is_avoided_name): New functions.
6359
6360 * src/system.h (stat, lstat): Define in terms of statx on
6361 STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
6362 (UCHAR_MAX): New macro.
6363 (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
6364
6365 * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
6366
6367 * src/incremen.c (<time.h>): Remove include; no longer used.
6368 (time): Remove decl.
6369 (time_now): Remove.
6370 (get_directory_contents): Use deref_stat.
6371 Consider a subdirectory to be all new only if
6372 listed_incremental_option or if it its timestamp is newer than the
6373 cutoff.
6374 (add_hierarchy_to_namelist, merge_sort): Move to names.c.
6375 (read_directory_file): Now extern. Do not set time_now.
6376 (write_directory_file): Renamed from write_dir_file.
6377 Use start_time instead of time_now.
6378 (compare_names, collect_and_sort_names): Move to names.c.
6379
6380 * src/mangle.c (<time.h>): Remove; not used.
6381 (time): Do not declare.
6382
6383 * src/misc.c (chdir_from_initial_wd): Remove.
6384 (deref_stat): New function.
6385 (struct wd): New struct.
6386 (wd, wds, wd_alloc): New variables.
6387 (chdir_arg, chdir_do): New function.
6388
6389 * src/compare.c (get_stat_data): Use deref_stat.
6390
6391 * src/common.h (name_expand): Remove.
6392
6393 * src/list.c (time): Declare if not defined.
6394 (base_64_digits): Moved here from create.c.
6395 (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
6396 -1.
6397 (read_and): Don't get time from header unless we need it now;
6398 as getting time can cause duplicate diagnostics if bogus.
6399 Remove "Hmm, " from diagnostic.
6400 Use "Skipping to next header" uniformly.
6401 (from_header): Renamed from from_chars. All uses changed.
6402 Allow different forms for unportable 2's complement numbers.
6403 Don't check for extended forms when parsing checksums.
6404 Parse base-256 output.
6405 (gid_from_header): Renamed from gid_from_chars. All uses changed.
6406 (major_from_header): Renamed from major_from_chars. All uses changed.
6407 (minor_from_header): Renamed from minor_from_chars. All uses changed.
6408 (mode_from_header): Renamed from mode_from_chars. All uses changed.
6409 (off_from_header): Renamed from off_from_chars. All uses changed.
6410 (size_from_header): Renamed from size_from_chars. All uses changed.
6411 (time_from_header): Renamed from time_from_chars. All uses changed.
6412 Warn about future timestamps.
6413 (uid_from_header): Renamed from uid_from_chars. All uses changed.
6414 (uintmax_from_header): Renamed from uintmax_from_chars.
6415 All uses changed.
6416 (tartime): New function, incorporating isotime.
6417 (isotime): Delete.
6418 (print_header): Use tartime.
6419
6420 * src/create.c (to_chars): Fix typo in decl.
6421 Don't assign through char const *.
6422 Rename name_expand back to collect_and_sort_names.
6423
6424 * src/extract.c (<time.h>): No need to include.
6425 (time): No need to declare.
6426 (now): Remove variable.
6427 (extr_init): Don't initialize `now'.
6428 Increment same_permissions_option and same_owner_option if we_are_root
6429 is nonzero; this supports the new --no-same-owner option.
6430 (set_stat): Use start_time instead of `now'.
6431
6432 * src/create.c (struct link): Remove unused linkcount member.
6433 (base_64_digits): Move to list.c.
6434 (base_8_digits): Remove.
6435 (to_octal): New function, with some of old contents of to_base.
6436 (to_base): Remove.
6437 (to_base256): New function.
6438 (to_chars): Use base 256, not base 64, for huge values.
6439 (mode_to_chars): Don't use two's complement in GNU format or POSIX
6440 format.
6441 (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
6442 it means we have an incremental dump where we don't know whether this
6443 is a top-level call.
6444 Use deref_stat instead of statx / stat / lstat.
6445 Cast result of alloca.
6446 Check for dates if 0 < top_level, not if listed_incremental_option.
6447 Move multiple-link check after directory check.
6448 Do not dump avoided names.
6449 Dump hard links to symbolic names as links, not as separate
6450 symbolic links.
6451 start_header cannot return a null pointer, so don't test for it.
6452 Likewise for find_next_block.
6453
6454 * src/buffer.c, src/common.h (<human.h>): Include.
6455 (read_error): Read error is an error, not just a warning.
6456 (print_total_written): Also print human-readable byte count, and
6457 bytes/s.
6458 (open_archive, flush_write): Use start_time, not current time.
6459 (flush_read): Report about garbage bytes ignored at end of archive,
6460 but act on non-garbage bytes (instead of ignoring them).
6461 (new_volume): Use WARN for warnings.
6462
6463 * doc/Makefile.am:
6464 ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
6465
6466 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
6467
6468 * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
6469
6470 * lib/Makefile.am (noinst_HEADERS):
6471 Rename fnmatch.h to fnmatch.hin; add human.h.
6472 (libtar_a_SOURCES): Add human.c, xstrtoul.c.
6473 (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
6474
6475 * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
6476
6477 * lib/fnmatch.c (strchrnul):
6478 Define to __strchrnul if _LIBC, to our own replacement otherwise.
6479 Do not define if !_LIBC and if it already exists.
6480 (internal_fnmatch): Use it.
6481
6482 * configure.in (tar_LDADD): New variable, used only when linking tar.
6483 (rmt_LDADD): Similarly, for rmt.
6484 (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
6485 fnmatch.c; otherwise, use the system fnmatch.h.
6486
6487 * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
6488 Modernize sample backup script.
6489
6490 * THANKS: Martin Goik's email address has changed.
6491
6492 * m4/fnmatch.m4: New file.
6493
6494 1999-09-03 Paul Eggert <eggert@twinsun.com>
6495
6496 * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
6497 Use EINVAL instead.
6498
6499 1999-08-29 Paul Eggert <eggert@twinsun.com>
6500
6501 * lib/getdate.y (get_date):
6502 Rename outermost local `probe' to `quarter'.
6503 Rename latter local `tm' to probe_tm.
6504 From: Jim Meyering <meyering@ascend.com>
6505 Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
6506
6507 1999-08-28 Paul Eggert <eggert@twinsun.com>
6508
6509 * lib/getdate.y (PC): New macro; use it when possible.
6510 (number): Handle `Nov 11 1996' example correctly.
6511 See Risks Digest 20.55 (1999-08-27)
6512 http://catless.ncl.ac.uk/Risks/20.55.html#subj18
6513
6514 1999-08-23 Paul Eggert <eggert@twinsun.com>
6515
6516 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
6517
6518 Remove minor cases of lint from many source files: this includes
6519 unnecessary casts, uses of NULL, etc.
6520
6521 * configure.in (AC_PROG_YACC): Remove.
6522 (YACC): Always use bison.
6523 (AC_STRUCT_TIMEZONE): Add.
6524 (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
6525
6526 * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
6527 Fix spelling.
6528
6529 * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
6530 ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
6531
6532 * lib/strcasecmp.c, lib/strncasecmp.c: New files.
6533
6534 * src/common.h (merge_sort): Remove decl; no longer exported.
6535
6536 * src/system.h (voidstar): Remove.
6537 (memcpy, memcmp): Cast args.
6538 ("xalloc.h"): Add include.
6539 (xmalloc, xrealloc): Remove decl.
6540
6541 * src/mangle.c (time): Do not declare if defined.
6542 (first_mangle, mangled_num): Remove.
6543
6544 * src/list.c (from_chars): Report out-of-range values more precisely.
6545 (off_from_chars): Do not allow negative offsets.
6546 (uid_from_chars): Allow negative uids.
6547
6548 * src/create.c (linklist): Now static.
6549 (to_chars): Fix wording of message to match from_chars.
6550
6551 * src/misc.c (merge_sort): Move to incremen.c.
6552 * src/incremen.c (merge_sort): Move here from misc.c; now static.
6553 It's too painful to make it both generic and portable.
6554 (read_directory_file): "timestamp" -> "time stamp" in messages.
6555
6556 * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
6557 (usage): Fix misspelling.
6558 (OPTION_STRING): -y is now -I.
6559 (decode_options): Use -1, not EOF, for getopt_long result.
6560 Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
6561 Handle operands after any "--" argument.
6562 (main): Report any output errors.
6563
6564 * src/rmt.c (main): status is ssize_t, not long.
6565
6566 * src/names.c (name_gather): Handle trailing -C option correctly.
6567 (addname): use memcpy, not strncpy, to copy a string of known length.
6568 (name_match): Handle trailing -C option correctly.
6569 Propagate -C option to following files.
6570 (name_match, name_scan): Remove redundant matching code.
6571
6572 * src/buffer.c (open_archive): Use American spelling in diagnostic.
6573
6574 * lib/getdate.y: Major rewrite. Add copyright notice.
6575 (<stdio.h>): Include only if testing.
6576 (ISUPPER): Remove.
6577 (ISLOWER): New macro.
6578 (<string.h>): Include if HAVE_STRING_H, not USG.
6579 (bcopy): Remove.
6580 (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
6581 bison.
6582 (EPOCH_YEAR): Renamed from EPOCH.
6583 (table): Renamed from TABLE.
6584 (meridian): Now an anonymous enum.
6585 (struct parser_control): New type.
6586 (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
6587 (yyInput, ..., yyRelYear): Migrated into struct parser_control.
6588 (%pure_parser): Added, so that the parser is pure.
6589 (%union): Removed; the type is now just plain int.
6590 All %type directives removed.
6591 (tLOCAL_ZONE): New %token.
6592 (month_day_table): Renamed from MonthDayTable.
6593 (gmtime, localtime, mktime, time): Declare only if not defined.
6594 (meridian_table): New table.
6595 (dst_table): New table.
6596 (units_table): renamed from UnitsTable.
6597 (relative_time_table): Renamed from OtherTable.
6598 (time_zone_table): Renamed from TimezoneTable. Modernized.
6599 (military_table): Renamed from MilitaryTable.
6600 (to_hour): Renamed from ToHour.
6601 (to_year): Renamed from ToYear.
6602 (lookup_zone): New function.
6603 (LookupWord): Renamed from lookup_word. Use lookup_zone for time
6604 zones.
6605 (yylex): Now reentrant. All callers changed.
6606 (get_date): Add support for local time zone abbreviations.
6607 Make it reentrant.
6608
6609 1999-08-20 Paul Eggert <eggert@twinsun.com>
6610
6611 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
6612
6613 * src/create.c (to_chars): Generate GNU base-64 representation
6614 if we are generating an old or new GNU format tar file for a
6615 number that can't be represented with the POSIX format.
6616
6617 * configure.in (AC_CHECK_FUNCS): Add fchdir.
6618 (AM_FUNC_GETLINE): Add.
6619 (LIBOBJS): Add getline.o to workaround comment.
6620 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
6621 * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
6622 * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
6623 (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
6624 * lib/getline.c, lib/getline.h, lib/save-cwd.c,
6625 lib/save-cwd.h, m4/getline.m4: New files.
6626
6627 * src/misc.c (<save-cwd.h>): Include.
6628 (chdir_from_initial_wd): New function.
6629
6630 * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
6631 (name_gather): Handle `-C x -C y' correctly.
6632 Do not rely on addname to handle -C.
6633 (addname): New CHANGE_DIR parameter. All callers changed.
6634 Remove ugly calls to getcwd; no longer needed.
6635 (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
6636
6637 * src/incremen.c (listed_incremental_stream): New var.
6638 (read_directory_file): Remove arbitrary limits on file name length.
6639 Do not attempt to get the working directory; we can bypass this
6640 on fchdir hosts. Open the listed_incremental_option file for both
6641 read and write instead of opening it twice. Check for I/O errors
6642 when doing I/O to this file. Check for invalid data in the file,
6643 and report line numbers of invalid data.
6644 (write_dir_file): Likewise.
6645 (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
6646 Do not invoke write_dir_file; that's our caller's responsibility.
6647
6648 * src/list.c (max): New macro.
6649 (isotime): Now takes time_t, not time_t *. Report the decimal values
6650 of times that can't be broken down.
6651 (print_header): Don't assume that major and minor device numbers can
6652 fit into uintmax_t.
6653
6654 * src/common.h (struct name): change_dir is now char const *.
6655 (write_directory_file): Remove unused decl.
6656 (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
6657 chars; the old `sizeof (b)' broke when b was a pointer not an array.
6658 (chdir_from_initial_wd): New decl.
6659 (addname): New 2nd arg.
6660
6661 * THANKS: Torsten Lull -> Catrin Urbanneck
6662
6663 1999-08-18 Paul Eggert <eggert@twinsun.com>
6664
6665 * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
6666 Don't depend on ac_cv_func variables.
6667 From Albert Chin-A-Young <china@thewrittenword.com>.
6668
6669 1999-08-18 Paul Eggert <eggert@twinsun.com>
6670
6671 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
6672
6673 * m4/signedchar.m4: New file.
6674 * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
6675 * src/system.h (signed_char): New macro.
6676 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
6677 * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
6678
6679 * src/create.c (write_eot): Write at least two zero blocks.
6680
6681 * src/extract.c (extract_archive): Fix sparse array bug:
6682 we did not find end of array correctly.
6683
6684 * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
6685 Don't assume find_next_block yields nonnull.
6686 * src/extract.c (extract_sparse_file, extract_archive): Likewise.
6687 * src/list.c (skip_extended_headers): Likewise.
6688
6689 * src/list.c (read_and, list_archive): Simplify code.
6690 (read_header): Fix computation of signed checksums on machines where
6691 char is unsigned.
6692 Do not consider a block to be zero unless all its bytes are zero,
6693 even the checksum bytes. Do not attempt to parse the checksum of
6694 a zero block. Fix memory leak with long names and links.
6695 (from_chars): Accommodate a buggy tar that outputs leading NUL
6696 if the previous field overflows.
6697
6698 * src/misc.c (quote_copy_string): Generate \177 for '\177', not
6699 \?, for portability to non-ASCII hosts.
6700
6701 1999-08-16 Paul Eggert <eggert@twinsun.com>
6702
6703 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
6704
6705 * src/extract.c (make_directories): Do not chown intermediate
6706 directories, even if we are root.
6707
6708 * src/list.c (read_header): Fix bugs when interpreting
6709 POSIX-compliant headers that do not contain null bytes in the
6710 header or link names.
6711
6712 1999-08-14 Paul Eggert <eggert@twinsun.com>
6713
6714 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
6715
6716 * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
6717 (AC_HEADER_SYS_WAIT): Add.
6718 (AC_REPLACE_FUNCS): Add waitpid.
6719 (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
6720 * lib/waitpid.c: New file.
6721 * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
6722 * src/system.h (WCOREDUMP): Remove; no longer used.
6723 (WIFSTOPPED): Likewise.
6724 (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
6725 * src/buffer.c (child_open_for_compress): Undo previous change.
6726 (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
6727 (new_volume): Likewise.
6728
6729 * src/buffer.c, src/extract.c, src/incremen.c (time):
6730 Don't declare if defined.
6731 * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
6732 * src/incremen.c (read_directory_file):
6733 Invoke `time' the same way everyone else does.
6734 Check validity of --listed-incremental file contents a bit better.
6735 Do not worry about --after-date-option; tar.c now checks this.
6736 * src/list.c (isotime): Report ??? if localtime returns null.
6737 Don't assume years fit into four digits.
6738 Don't append trailing newline.
6739 (print_header): Report ??? if localtime returns null;
6740 Don't assume years fit into four digits.
6741
6742 * src/compare.c (diff_archive): Do not fall back on absolute name
6743 when --absolute-names is not specified.
6744
6745 * src/create.c (start_header):
6746 Include text of ignored filesystem prefix in warning.
6747 (create_archive): Check for excluded names when doing incremental
6748 pass through directory.
6749 (dump_file): Do not dump old files explicitly given on command line
6750 when using --listed-incremental. Do not strip ./ prefix from names.
6751
6752 * src/tar.c: -g now implies after_date_option = 1.
6753 -g and -N are now incompatible options.
6754
6755 * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
6756
6757 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
6758
6759 * src/list.c (read_header): Don't parse OLDGNU_FORMAT
6760 incremental headers as POSIX prefixes.
6761
6762 1999-08-11 Paul Eggert <eggert@twinsun.com>
6763
6764 * NEWS, configure.in: Version 1.13.6.
6765
6766 * configure.in (ALL_LINGUAS): Add pt_BR.
6767 * po/pt_BR.po: New file.
6768
6769 * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
6770 Renamed from tar.info and header.texi; adjust actions so that
6771 they work in other directories.
6772
6773 * doc/tar.texi: Add -y and --bzip2.
6774 Patterns containing / now exclude only file names whose prefix match.
6775
6776 * lib/exclude.h (excluded_filename): New option parameter.
6777 (add_exclude_file): New ADD_FUNC parameter.
6778 (excluded_pathname): Remove decl.
6779 * lib/exclude.c (_GNU_SOURCE):
6780 Remove; no longer needed since we don't use FNM_ macros.
6781 (excluded_filename): Renamed from excluded_filename_opts.
6782 (excluded_filename, excluded_pathname): Remove.
6783 (add_exclude_file): New ADD_FUNC parameter.
6784
6785 * po/POTFILES.in: Add lib/quotearg.c.
6786
6787 * src/buffer.c (_GNU_SOURCE): Define.
6788 (<fnmatch.h>): Include unconditionally.
6789 (child_open_for_compress): Dup after closing, to avoid possible file
6790 descriptor exhaustion.
6791 (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
6792 (flush_read): Likewise.
6793
6794 * src/common.h (LG_8, LG_64): New macros.
6795 (excluded_with_slash, excluded_without_slash): New vars.
6796 (excluded): Remove.
6797 (base_64_digits): New decl.
6798 (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
6799 off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
6800 uintmax_to_chars,
6801 GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
6802 OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
6803 UINTMAX_TO_CHARS):
6804 Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
6805 off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
6806 GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
6807 SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
6808 respectively. All definitions and uses changed.
6809 (excluded_name): New decl.
6810
6811 * src/compare.c (diff_archive):
6812 Open files with O_NONBLOCK instead of O_NDELAY.
6813
6814 * src/create.c (base_64_digits): New constant.
6815 (base_8_digits): New macro.
6816 (MAX_VAL_WITH_DIGITS): New macro.
6817 (to_base): First half of old to_oct. Support base 64 too.
6818 (to_chars): Other half of old to_oct, for 64-bit support.
6819 (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
6820 (gid_substitute, uid_substitute): Look up names dynamically if
6821 GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
6822 (mode_to_chars): Renamed from mode_to_oct.
6823 Support negative values in all the _to_chars functions.
6824 (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
6825 Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
6826 (dump_file): Inspect entire pathname, not just new file name
6827 component, when deciding whether to exclude it.
6828
6829 * src/extract.c (extract_archive):
6830 Open files with O_NONBLOCK instead of O_NDELAY.
6831
6832 * src/incremen.c (get_directory_contents):
6833 Inspect entire pathname, not just new file name
6834 component, when deciding whether to exclude it.
6835
6836 * src/list.c (<fnmatch.h>): Do not include.
6837 (from_chars): Renamed from from_oct. New parameter specifying
6838 the negative of the minimum allowed value. Support negative
6839 and base-64 values.
6840 (base64_map): New var.
6841 (base64_init): New function.
6842 (print_header): Output numeric uids and gids if numeric_owner_option.
6843
6844 * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
6845
6846 * src/names.c (_GNU_SOURCE): Define.
6847 (<fnmatch.h>): Include unconditionally.
6848 (excluded_name): New function, taking over duties of excluded_pathname.
6849 All uses changed.
6850
6851 * src/rmt.c (decode_oflag): New function.
6852 (main): Use it to support symbolic open flags.
6853
6854 * src/rtapelib.c (encode_oflag): New function.
6855 (rmt_open__): Do not allow newlines in the path.
6856 Propagate errno correctly.
6857 Decode symbolic open flags, if present.
6858
6859 * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
6860 New macros.
6861
6862 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
6863 New -y or --bzip2 option.
6864 (add_filtered_exclude): New function.
6865 (decode_options): Put excluded patterns with / into
6866 excluded_with_slash, and without / into excluded_without_slash.
6867 Compare newer_mtime_option to its new initial value
6868 TYPE_MINIMUM (time_t) when deciding whether more than one
6869 threshold date was specified.
6870
6871 1999-07-20 Paul Eggert <eggert@twinsun.com>
6872
6873 * NEWS, configure.in: Version 1.13.5.
6874
6875 * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
6876 before exiting.
6877 * src/buffer.c (new_volume): Likewise.
6878 * src/incremen.c (read_directory_file): Likewise.
6879 * src/tar.c (decode_options):
6880 ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
6881 for consistency.
6882
6883 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
6884 * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
6885
6886 * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
6887 (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
6888 (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
6889 Define to 0 if the corresponding S_IF* macro is not defined.
6890 (mkfifo): Do not define if already defined, or if S_IFIFO
6891 is not defined.
6892
6893 * src/compare.c (diff_archive): Use HAVE_READLINK, not
6894 S_ISLNK, to determine whether to invoke readlink.
6895 * src/create.c (dump_file): Likewise.
6896
6897 * src/extract.c (set_mode):
6898 Do not chmod unless we are root or the -p option was given;
6899 this matches historical practice.
6900 (unlink_destination): New function, which checks for unlink failures.
6901 (maybe_recoverable): Stay quiet if -U.
6902 (extract_archive): Use O_EXCL if unlink_first_option.
6903 Report unlink failures.
6904 Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
6905 Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
6906 mkfifo exists.
6907
6908 * src/incremen.c (get_directory_contents): Depend on
6909 S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
6910
6911 * src/list.c: Remove S_IS* ifdefs.
6912 * src/misc.c (maybe_backup_file): Likewise.
6913
6914 * src/misc.c (maybe_backup_file):
6915 "Virtual memory exhausted" -> "Memory exhausted",
6916 to conform to the other places this message is issued.
6917
6918 * src/mangle.c (extract_mangle):
6919 Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
6920
6921 * src/rtapelib.c (rmt_open__):
6922 Remove typo that caused us to omit the first char
6923 of the basename.
6924
6925 1999-07-16 Paul Eggert <eggert@twinsun.com>
6926
6927 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
6928
6929 * doc/tar.texi: A path name is excluded if any of its file name
6930 components matches an excluded pattern, even if the path name was
6931 specified on the command line.
6932 * src/create.c (create_archive): Likewise.
6933 * src/list.c (read_and): Likewise.
6934 * src/update.c (update_archive): Likewise.
6935 * lib/exclude.h (excluded_pathname): New decl.
6936 * lib/exclude.c (_GNU_SOURCE): Define.
6937 (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
6938 (excluded_filename_opts): New function.
6939 (excluded_pathname): New function.
6940
6941 * lib/Makefile.am (EXTRA_DIST):
6942 xstrtol.c moved here from libtar_a_SOURCES.
6943 (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
6944 Remove xstrtoul.c; no longer needed.
6945 * lib/xstrtol.c: Remove.
6946
6947 * src/tar.c (decode_options):
6948 Set newer_time_option to TYPE_MINIMUM, so that
6949 negative timestamps are handled correctly.
6950 Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
6951 uniformity (and so that we don't need to have the other fns).
6952 (main): Remove call to init_total_written; no longer needed.
6953
6954 * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
6955 checks for unsigned long and long long.
6956 * src/arith.c: Remove.
6957 * src/Makefile.am (tar_SOURCES): Remove arith.c.
6958 * po/POTFILES.in: Remove src/arith.c.
6959 * src/arith.h: Use double, to simplify configuration gotchas.
6960 (tarlong): Now double.
6961 (TARLONG_FORMAT): New macro.
6962 (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
6963 LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
6964 zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
6965 add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
6966 zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
6967 mult_tarlong, print_tarlong): Remove. All callers replaced with
6968 arithmetic ops.
6969
6970 * src/common.h (init_total_written): Remove decl.
6971
6972 * src/buffer.c (total_written):
6973 Remove; replaced with prev_written + bytes_written.
6974 (prev_written): New var.
6975 (init_total_written): Remove.
6976 (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
6977
6978 * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
6979 Make sure that we can shift, multiply
6980 and divide unsigned long long values; Ultrix cc can't do it.
6981
6982 * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
6983 Check for any unknown bits, not just unknown bits left of the leftmost
6984 known bit.
6985
6986 * lib/quotearg.c (quotearg_buffer):
6987 Don't quote spaces if C quoting style.
6988 * src/list.c (from_oct):
6989 Use C quoting style for error; omit trailing NULs.
6990
6991 1999-07-14 Paul Eggert <eggert@twinsun.com>
6992
6993 * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
6994
6995 * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
6996 <inttypes.h> defines strtoumax as a macro (and not as a function).
6997 HP-UX 10.20 does this.
6998
6999 * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
7000 * PORTS, README, TODO, doc/tar.texi: Likewise.
7001
7002 1999-07-12 Paul Eggert <eggert@twinsun.com>
7003
7004 * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
7005 (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
7006
7007 * src/list.c (decode_header):
7008 Do not assume that S_IFBLK and S_IFCHR are defined.
7009
7010 * src/create.c (start_header): Do not assume S_IFMT is defined.
7011 (dump_file): Remove unnecessary check for screwy apollo lossage.
7012 Do not assume S_IFBLK and S_IFCHR are defined.
7013
7014 * src/extract.c (extract_archive):
7015 Test whether S_IFCHR and S_IFBLK are nonzero,
7016 not whether they are defined, for consistency with other tests.
7017
7018 * src/buffer.c (is_regular_file):
7019 Don't succeed on files that we can't access due to
7020 permissions problems.
7021 (open_archive): Fix wording on fatal error message.
7022 Don't bother to stat /dev/null if the archive is not a character
7023 special device.
7024
7025 * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
7026 Report an error, not a warning, for I/O errors.
7027 (process_rawdata, process_dumpdir, diff_sparse_files):
7028 Change ungrammatical "Data differs" to "Contents differ".
7029 (get_stat_data): Find hidden files on AIX.
7030 Accept file name as argument; all uses changed.
7031 (get_stat_data, diff_archive): Use system error message for
7032 nonexistent files rather than rolling our own.
7033 (diff_archive): Unknown file types are errors, not warnings.
7034 Normalize spelling of message to "File type differs".
7035 Use get_stat_data to get link status, for consistency.
7036 Do not inspect st_rdev for fifos.
7037 Do not assume st_mode values contain only file types and mode bits.
7038 Check for mode changes and device number changes separately.
7039
7040 * src/update.c (append_file):
7041 Open the file before statting it, to avoid a race.
7042 Complain about file shrinkage only when we reach EOF.
7043
7044 1999-07-08 Paul Eggert <eggert@twinsun.com>
7045
7046 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
7047
7048 * configure.in (AC_EXEEXT): Add.
7049
7050 * lib/Makefile.am (noinst_HEADERS):
7051 Add basename.h, exclude.h. Remove full-write.h.
7052 (libtar_a_SOURCES): Add exclude.c.
7053
7054 * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
7055 New files.
7056 * lib/full-write.c: Include safe-read.h instead of full-write.h.
7057 * lib/safe-read.h (safe_read): New decl.
7058 * src/rmt.c: Include safe-read.h.
7059 * src/rtapelib.c: Include basename.h, save-read.h.
7060 (rmt_open__): Use base_name to compute base name.
7061
7062 * src/common.h:
7063 Include basename.h, exclude.h; don't include full-write.h.
7064 (exclude_option): Remove decl.
7065 (excluded): New decl.
7066 (add_exclude, add_exclude_file, check_exclude): Remove decls.
7067
7068 * src/list.c (read_and):
7069 Use excluded_filename instead of check_exclude.
7070 Check base name of incoming file name, not entire file name, when
7071 deciding whether to exclude it.
7072
7073 * src/create.c (finish_sparse_file):
7074 Use excluded_filename instead of check_exclude.
7075 Don't bother to stat excluded file names.
7076 * src/incremen.c (get_directory_contents): Likewise.
7077
7078 * src/names.c (exclude_pool, exclude_pool_size,
7079 allocated_exclude_pool_size, simple_exclude_array,
7080 simple_excludes, allocated_simple_excludes,
7081 pattern_exclude_array, pattern_excludes,
7082 allocated_pattern_excludes, add_exclude, add_exclude_file,
7083 check_exclude):
7084 Remove; now done in ../lib/exclude.c.
7085
7086 * src/tar.c (decode_options): Initialize `excluded'.
7087 Use new add_exclude_file and add_exclude functions.
7088
7089 1999-07-05 Paul Eggert <eggert@twinsun.com>
7090
7091 * m4/gettext.m4: Use changequote rather than [[ ]].
7092
7093 * lib/safe-read.c: Renamed from lib/full-read.c.
7094 (safe_read): Renamed from full_read. All uses changed.
7095 * lib/safe-read.h, lib/full-write.h: New files.
7096 * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
7097 (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
7098 * lib/full-write.c: Include full-write.h.
7099 * src/common.h: Include full-write.h, safe-read.h.
7100 * src/system.h: (full_read, full_write): Remove decls.
7101
7102 * src/Makefile.am (datadir): New var; needed for Solaris gettext.
7103
7104 * src/system.h (bindtextdomain, textdomain): undef before
7105 defining, to avoid preprocessor warnings with --disable-nls
7106 on hosts whose locale.h includes libintl.h.
7107
7108 * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
7109 expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
7110 (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
7111 the above decl.
7112
7113 1999-07-02 Paul Eggert <eggert@twinsun.com>
7114
7115 * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
7116 * m4/mktime.m4: New file.
7117 * m4/Makefile.am.in, m4/README: Remove these files.
7118 * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
7119 remove README, Makefile.am.in.
7120 (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
7121 * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
7122 not AM_FUNC_MKTIME.
7123
7124 * src/tar.c: Include signal.h.
7125 (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
7126 (main): Ensure SIGCHLD is not ignored.
7127
7128 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
7129 MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
7130 OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
7131 RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
7132 VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
7133 OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
7134 OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
7135 OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
7136 they don't overlap with char codes. Use an enum instead of a lot
7137 of #defines.
7138
7139 * src/system.h (ISASCII): Remove.
7140 (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
7141 S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
7142 S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
7143 MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
7144 LONG_MAX): New macros.
7145
7146 * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
7147 (read_directory_file): Cast ISSPACE arg to unsigned char.
7148 * src/misc.c (ISPRINT): Remove; now in system.h.
7149 (remove_any_file): Add brackets to pacify gcc -Wall.
7150 * src/list.c: Don't include <ctype.h>; system.h already does this.
7151 (ISODIGIT, ISSPACE): Remove; now in system.h.
7152 (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
7153 does this now.
7154 (from_oct): Cast ISSPACE arg to unsigned char.
7155
7156 * src/create.c (mode_to_oct): Translate modes from internal to
7157 external form.
7158 * src/list.c (mode_from_oct): Translate modes from external to
7159 internal form. Do not complain about unrecognized mode bits.
7160 * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
7161 TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
7162
7163 * src/extract.c: (extr_init, make_directories, extract_archive):
7164 Do not assume mode bits have traditional Unix values.
7165 * src/list.c (decode_mode): Likewise.
7166 * src/create.c (start_header, dump_file): Likewise.
7167 * src/buffer.c (child_open_for_compress,
7168 child_open_for_uncompress, open_archive, (close_archive): Likewise.
7169 * src/compare.c (diff_archive): Likewise.
7170
7171 * src/extract.c (set_mode): Use %04 not %0.4 format.
7172 (extract_sparse_file): Do not use data_block uninitialized.
7173 Check for lseek failures.
7174
7175 * src/rtapelib.c (rmt_lseek__):
7176 Convert lseek whence values to portable integers on the wire.
7177 * src/rmt.c (main): Likewise. Check for whence values out of range.
7178
7179 * src/create.c (finish_sparse_file): Use lseek whence macros
7180 instead of integers.
7181 * src/buffer.c (backspace_output): Likewise.
7182 * src/compare.c (diff_archive, verify_volume): Likewise.
7183 * src/delete.c (move_archive): Likewise.
7184 * src/extract.c (extract_sparse_file): Likewise.
7185
7186 * src/create.c (dump_file): Do not invoke finish_sparse_file
7187 on a negative file descriptor.
7188
7189 * src/buffer.c: Add braces to pacify gcc -Wall.
7190
7191 * src/compare.c (diff_sparse_files): Report lseek errors.
7192
7193 * configure.in (ALL_LINGUAS): Add cs, es, ru.
7194
7195 * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
7196
7197 * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
7198 message to be internationalized; \a doesn't work with msgfmt.
7199
7200 * src/tar.c (long_options, main, usage, OPTION_STRING):
7201 Remove -E or --ending-file.
7202 * src/list.c (read_and): Likewise.
7203 * src/common.h (ending_file_option): Likewise.
7204 * src/buffer.c (close_archive): Likewise.
7205
7206 * tests/after: Don't run two commands together in a pipeline,
7207 as some old shells mishandle pipeline exit status.
7208
7209 1999-06-28 Paul Eggert <eggert@twinsun.com>
7210
7211 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
7212 * NEWS: Describe changes since 1.12.
7213 * README: Update bug reporting address; move paxutils ref to NEWS.
7214
7215 Handle EINTR correctly.
7216 * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
7217 * lib/full-read.c, lib/full-write.c: New files.
7218 * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
7219 Prefer full_read to read and full_write to write.
7220 * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
7221 * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
7222 Likewise.
7223 * src/extract.c (extract_sparse_file): Likewise.
7224 * src/rmt.c (get_string, main, report_error_message,
7225 report_numbered_error): Likewise.
7226 * src/rmt.h (rmtread, rmtwrite): Likewise.
7227 * src/rtapelib.c (do_command, get_status_string, rmt_read__,
7228 rmt_write__, rmt_ioctl__): Likewise.
7229 * src/update.c (append_file): Likewise.
7230 * src/system.h (full_read, full_write): New decls.
7231
7232 * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
7233 lib/xmalloc.c, src/arith.c, src/misc.c.
7234
7235 * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
7236 New macros. All uses of STDIN and STDOUT changed.
7237 * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
7238 instead of 0 and STDOUT_FILENO instead of 1.
7239 * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
7240 instead of fileno (stdin) and fileno (stdout) or 0 and 1.
7241
7242 * src/rmt.c (private_strerror): Avoid const. Translate results.
7243
7244 * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
7245 in the presence of NFS clock skew.
7246
7247 1999-06-25 Paul Eggert <eggert@twinsun.com>
7248
7249 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
7250
7251 * src/buffer.c (write_archive_buffer): New function.
7252 (child_open_for_compress, flush_write, flush_read): Use it to write
7253 buffers.
7254 (open_archive): Report error if fstat of archive fails.
7255 Improve efficiency of check for /dev/null.
7256 Also, fix some corner cases with remote archives and /dev/null checking.
7257 (close_archive): Test for input fifo only if not remote.
7258 Truncate output archive only if it's not remote.
7259
7260 * src/misc.c (remove_any_file):
7261 Don't terminate if you see . or ..; just skip them.
7262
7263 1999-06-18 Paul Eggert <eggert@twinsun.com>
7264
7265 * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
7266
7267 Output sizes using a format that's more compatible with
7268 traditional tar (and with GNU Emacs).
7269 * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
7270 MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
7271 Don't subtract 1 from size.
7272 * src/create.c (to_oct): Prepend leading zeros, not spaces.
7273 Output a trailing NUL unless the value won't fit without it.
7274 (finish_header): No need to append NUL to chksum, now that
7275 to_oct is doing it.
7276
7277 1999-06-16 Paul Eggert <eggert@twinsun.com>
7278
7279 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
7280
7281 * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
7282 @INTLLIBS@ might invoke rpl_realloc.
7283
7284 * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
7285 (intconv): Remove; use xstrto* fns instead.
7286 ("xstrtol.h"): Include.
7287 (check_decimal): Remove.
7288 (long_options, usage, OPTION_STRING, decode_options):
7289 Remove -y, --bzip2, --unbzip2.
7290 (decode_options): Use xget_version instead of get_version.
7291 Check for overflow with -b and -L and RECORD_SIZE_OPTION.
7292 Replace invocations of check_decimal with xstrtoumax.
7293
7294 * tests/preset.in (echo_n, echo_c): Remove.
7295
7296 * tests/after: Don't rely on $echo_c and $echo_n.
7297
7298 * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
7299 lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
7300 lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
7301 lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
7302 m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
7303 m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
7304 m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
7305 m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
7306 m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
7307 m4/xstrtoumax.m4: New files.
7308
7309 * configure.in(fp_PROG_ECHO): Remove; no longer needed.
7310 (AC_SYS_LARGEFILE): Renamed from AC_LFS.
7311 (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
7312 (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
7313 (AC_CHECK_FUNCS): Remove lchown.
7314 (AC_REPLACE_FUNCS): Remove basename, dirname.
7315 Add lchown, strtol, strtoul.
7316 (jm_FUNC_MKTIME): Add.
7317 (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
7318 are also built via the ANSI2KNR-filtering rules.
7319 Use a no-op line to work around bug in automake 1.4 with malloc and
7320 realloc.
7321 (AC_OUTPUT): Add m4/Makefile.
7322
7323 * lib/Makefile.am (EXTRA_DIST):
7324 Add lchown.c, malloc.c, mktime.c, realloc.c,
7325 strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
7326 (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
7327 (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
7328 xstrtoul.c, xstrtoumax.c. Remove getversion.c.
7329 ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
7330
7331 * src/system.h (uintmax_t): Don't declare; configure now does this.
7332
7333 * src/common.h (backup_type): New decl.
7334 * src/common.h, src/misc.c, src/tar.c:
7335 Move include of backupfile.h to common.h.
7336
7337 * src/misc.c (maybe_backup_file):
7338 Pass backup_type to find_backup_file_name.
7339
7340 * src/list.c (print_header): Change sizes of uform and gform from 11 to
7341 UINTMAX_STRSIZE_BOUND.
7342
7343 * doc/tar.texi: Remove --bzip2.
7344 Fix @xref typos reported by latest makeinfo.
7345
7346 * Makefile.am (ACLOCAL_AMFLAGS): New macro.
7347 (SUBDIRS): Add m4.
7348 (M4DIR, ACINCLUDE_INPUTS): New macros.
7349 ($(srcdir)/acinclude.m4): New rule.
7350
7351 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
7352 HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
7353 now generated automatically by autoconf.
7354
7355 1999-05-15 Paul Eggert <eggert@twinsun.com>
7356
7357 * doc/tar.texi: Remove -y.
7358
7359 1999-04-09 Paul Eggert <eggert@twinsun.com>
7360
7361 * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
7362 (we were allocating too much storage).
7363 (uintmax_t): Don't declare; configure now does this.
7364
7365 * ABOUT-NLS: Update to gettext 0.10.35 edition.
7366
7367 1999-03-22 Paul Eggert <eggert@twinsun.com>
7368
7369 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
7370
7371 * acinclude.m4 (AC_LFS_FLAGS):
7372 Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
7373 (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
7374 (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
7375
7376 * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
7377 New macros; needed for latest GNU xmalloc.c.
7378
7379 * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
7380 (libtar_a_SOURCES): Add quotearg.c.
7381 * list.c: Include <quotearg.h>.
7382 (from_oct): Add forward decl.
7383 (read_header): Return HEADER_FAILURE if we can't parse the checksum.
7384 (from_oct): Report an error only if TYPE is nonzero.
7385 Quote any funny characters in bad header.
7386
7387 1999-03-20 Paul Eggert <eggert@twinsun.com>
7388
7389 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
7390
7391 * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
7392 (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
7393 changed.
7394 (AC_LFS): Simplify AIX revision number test.
7395
7396 1999-03-17 Paul Eggert <eggert@twinsun.com>
7397
7398 * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
7399
7400 * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
7401 Remove; it doesn't work that well
7402 with AC_CANONICAL_HOST.
7403 (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
7404
7405 * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
7406
7407 * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
7408
7409 * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
7410
7411 * tar.texi: Fix bug-report addr.
7412
7413 * README: Remove --with-included-malloc.
7414 Upgrade version numbers of build software.
7415
7416 1999-03-07 Paul Eggert <eggert@twinsun.com>
7417
7418 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
7419
7420 * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
7421 where bindtextdomain and gettext require -lintl.
7422 (AC_LFS_FLAGS): Simplify so that it only gets the flags;
7423 `no' means it failed.
7424 (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
7425 (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
7426 _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
7427 to add anything to the command line (it's all in config.h).
7428 Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
7429
7430 1999-03-01 Paul Eggert <eggert@twinsun.com>
7431
7432 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
7433
7434 * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
7435
7436 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
7437 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
7438 uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
7439 like OFF_MAX, which are not reliable
7440 (e.g. OFF_MAX in AIX 4.2 is incorrect).
7441 * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
7442 SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
7443
7444 * src/incremen.c (get_directory_contents):
7445 Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
7446 Have statx depend on STX_HIDDEN, not AIX.
7447
7448 * src/create.c (to_oct):
7449 New parameter substitute, giving a substitute value to use
7450 when the original value is out of range. Do not append a space to the
7451 output; modern tars don't. When a value is out of range, specify the
7452 maximum value, not the number of bits.
7453 (GID_NOBODY, UID_NOBODY): New macros.
7454 (gid_to_oct, uid_to_oct): Use them as substitutes.
7455 (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
7456 (dump_file): Check whether the file changed as we read it.
7457
7458 * src/rmt.c (main): Remove suspicious AIX/386 code.
7459
7460 1999-02-19 Paul Eggert <eggert@twinsun.com>
7461
7462 * intl/localealias.c (read_alias_file): Don't assume that memcpy
7463 returns a type compatible with char *; it doesn't on SunOS
7464 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
7465
7466 * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
7467
7468 * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
7469 * doc/tar.texi: Add --bzip2, --unbzip2 options.
7470
7471 * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
7472 Add.
7473 (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
7474 (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
7475 * acinclude.m4 (AM_WITH_NLS):
7476 Update to latest gettext version (serial 5).
7477 (AC_LFS_FLAGS): New macro
7478 (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
7479 working only with unset variables. Append to CFLAGS, not CPPFLAGS.
7480 Work properly in cross-compilation scenario, by checking for getconf
7481 with AC_CHECK_TOOL and by ditching uname in favor of
7482 AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
7483
7484 * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
7485 replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
7486 * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
7487 since getdate.y now uses ANSI code.
7488
7489 * config.guess, config.sub: New files; taken from automake 1.4.
7490
7491 * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
7492 intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
7493 intl/explodename.c, intl/finddomain.c, intl/gettext.c,
7494 intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
7495 intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
7496 intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
7497 Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
7498
7499 1999-02-01 Paul Eggert <eggert@twinsun.com>
7500
7501 * src/tar.c: Update copyright.
7502
7503 * NEWS: 1.12.64004
7504
7505 1999-02-01 Paul Eggert <eggert@twinsun.com>
7506
7507 * NEWS, configure.in: Version 1.12.64004
7508
7509 * configure.in (AC_LFS): Use this macro, instead of open-coding it.
7510
7511 * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
7512
7513 * src/extract.c (extract_archive): Fix bug when extracting sparse
7514 files: they were trashing the tar file header.
7515
7516 * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
7517 Add -y or --bzip2 or --bunzip2 option.
7518
7519 1999-01-30 Paul Eggert <eggert@twinsun.com>
7520
7521 * src/names.c (cached_no_such_uname, cached_no_such_gname,
7522 cached_no_such_uid, cached_no_such_gid): New vars.
7523 (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
7524 Cache failures, too.
7525
7526 * src/tar.c (decode_options):
7527 Don't pass names longer than UNAME_FIELD_SIZE to
7528 uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
7529
7530 1999-01-27 Paul Eggert <eggert@twinsun.com>
7531
7532 * NEWS, configure.in: Version 1.12.64003
7533
7534 * src/buffer.c (backspace_output, close_archive): Cast
7535 rmtlseek position arg to off_t, for benefit of K&R compilers
7536 with long long.
7537 * src/compare.c (verify_volume): Likewise.
7538
7539 * NEWS, configure.in: Version 1.12.64002
7540
7541 * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
7542 off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
7543 Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
7544 * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
7545 mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
7546 uid_from_oct): Likewise.
7547
7548 1999-01-25 Paul Eggert <eggert@twinsun.com>
7549
7550 * incremen.sh: Fix timing bug in regression test.
7551
7552 1999-01-22 Paul Eggert <eggert@twinsun.com>
7553
7554 * NEWS, configure.in: Update version
7555
7556 * Makefile.am (localedir): Change to $(datadir)/locale.
7557 (DEFS): New macro, defining LOCALEDIR.
7558 (tar.o, tar._o, rmt.o, rmt._o): Remove.
7559 (INCLUDES): Add -I..
7560
7561 * Makefile.am (localedir): Change to $(datadir)/locale.
7562
7563 1999-01-21 Paul Eggert <eggert@twinsun.com>
7564
7565 * NEWS, README, configure.in: Unofficial version 1.12.64001.
7566
7567 * tests/Makefile.am (localedir): Change to $(datadir)/locale.
7568 * src/Makefile.am (localedir): Likewise.
7569 (DEFS): New macro, defining LOCALEDIR.
7570 (tar.o, tar._o, rmt.o, rmt._o): Remove.
7571 (INCLUDES): Add `-I..'.
7572
7573 * tests/incremen.sh: Fix timing bug.
7574
7575 1999-01-20 Paul Eggert <eggert@twinsun.com>
7576
7577 * NEWS, README, configure.in: Unofficial version 1.12.64000.
7578 `lfs.7' changed to `64000' in version number
7579 to conform to gnits standards.
7580
7581 * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
7582 mkinstalldirs, ansi2knr.c: Update to latest public versions.
7583
7584 Rebuild with automake 1.4 and autoconf 2.13, to work around some
7585 porting problems.
7586
7587 1998-12-07 Paul Eggert <eggert@twinsun.com>
7588
7589 * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
7590
7591 * src/list.c (read_header):
7592 Accept file names as specified by POSIX.1-1996 section 10.1.1.
7593
7594 1998-11-30 Paul Eggert <eggert@twinsun.com>
7595
7596 * configure.in: Quote the output of uname.
7597
7598 * src/extract.c (set_stat): chmod after chown even when not root;
7599 if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
7600
7601 1998-11-15 Paul Eggert <eggert@twinsun.com>
7602
7603 * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
7604
7605 * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
7606 ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
7607
7608 1998-10-28 Paul Eggert <eggert@twinsun.com>
7609
7610 * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
7611
7612 * src/system.h (voidstar): Use void * if __STDC__ is defined,
7613 not merely nonzero.
7614
7615 * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
7616 On many installations, rexec is disabled.
7617
7618 1998-08-07 Paul Eggert <eggert@twinsun.com>
7619
7620 * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
7621
7622 * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
7623 for nameless users and groups.
7624
7625 1998-02-17 Paul Eggert <eggert@twinsun.com>
7626
7627 * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
7628 * NEWS, README: Add explanation of why this isn't an official version.
7629
7630 1998-02-02 Paul Eggert <eggert@twinsun.com>
7631
7632 * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
7633 This is an unofficial version.
7634
7635 1997-12-17 Paul Eggert <eggert@twinsun.com>
7636
7637 * src/incremen.c (ST_DEV_MSB): New macro.
7638 (NFS_FILE_STAT): Use most significant bit of st_dev,
7639 even if it's unsigned.
7640
7641 1997-12-08 Paul Eggert <eggert@twinsun.com>
7642
7643 * src/system.h (ST_NBLOCKS): Fix typo in definition.
7644
7645 1997-11-19 Paul Eggert <eggert@twinsun.com>
7646
7647 * configure.in (HAVE_INTTYPES_H):
7648 Don't ignore cache variable if it's already set.
7649
7650 1997-11-10 Paul Eggert <eggert@twinsun.com>
7651
7652 * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
7653 * src/delete.c (records_read): Now off_t.
7654 (move_archive): Don't assume mt_count is of type daddr_t.
7655
7656 1997-10-30 Paul Eggert <eggert@twinsun.com>
7657
7658 * configure.in (CPPFLAGS, LDFLAGS, LIBS):
7659 Set to appropriate values if large file support
7660 needs explicit enabling.
7661 (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
7662 ssize_t):
7663 New macros to configure.
7664 (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
7665
7666 * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
7667 major_t, minor_t, ssize_t): New macros.
7668
7669 * src/arith.h (TARLONG_FORMAT):
7670 Fix typo: %uld -> %lu. Use unsigned when long long
7671 (%lld -> %llu).
7672 (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
7673 (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
7674
7675 * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
7676 2nd arg is now unsigned long.
7677
7678 * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
7679 (prepare_record_buffer): Arg is now size_t.
7680 Remove now-useless casts.
7681
7682 (main): Use `long' for status, so that it can store ssize_t.
7683 Use daddr_t, mode_t, size_t, off_t when appropriate.
7684 Convert daddr_t and off_t values ourselves, since they might be longer
7685 than long. Convert other types using `long' primitives.
7686 When processing MTIOCTOP, do not try to pass resulting
7687 count back, since it won't work (it could be too large) and it's
7688 not expected anyway.
7689
7690 * src/update.c:
7691 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
7692 now-useless casts. Use unsigned long to print *_t types, except use
7693 STRINGIFY_BIGINT for off_t.
7694 (update_archive): Cast -1 to dev_t when necessary.
7695
7696 * src/tar.c (check_decimal):
7697 Now returns 1 if successful, 0 otherwise, and returns
7698 uintmax_t value into new arg. Check for arithmetic overflow.
7699 (decode_options): Avoid overflow if record_size fits in size_t but not int.
7700 Check for overflow on user or group ids.
7701
7702 * src/compare.c (diff_init, process_rawdata, read_and_process,
7703 diff_sparse_files, diff_archive):
7704 Use off_t, pid_t, size_t, ssize_t when appropriate.
7705 Remove now-useless casts. Use unsigned long to print *_t types,
7706 except use STRINGIFY_BIGINT for off_t.
7707
7708 (process_noop, process_rawdata, process_dumpdir, read_and_process):
7709 Size arg is now size_t.
7710
7711 (diff_sparse_files): Arg is now off_t. Check for size_t overflow
7712 when allocating buffer.
7713
7714 * src/rtapelib.c:
7715 (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
7716 Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
7717 Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
7718 off_t.
7719
7720 (get_status_string, get_status_off): New function.
7721 (get_status): Now returns long, so that it can store ssize_t.
7722 Invoke get_status_string to do the real work.
7723 (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
7724 (rmt_lseek__): Now returns off_t, using new get_status_off function.
7725 (rmt_ioctl__): Convert mt_count by hand,
7726 since it might be longer than long.
7727
7728 * src/mangle.c (extract_mangle):
7729 Check for overflow when converting off_t to size_t.
7730 Use off_t, size_t when appropriate. Remove now-useless casts.
7731
7732 * src/system.h (mode_t): Remove; now done by autoconf.
7733 (ST_NBLOCKS): Do not overflow if st_size is near maximum.
7734 Return number of ST_NBLOCKSIZE-byte blocks,
7735 not number of 512-byte blocks;
7736 this also helps to avoid overflow.
7737 (st_blocks): Declare if needed.
7738 (ST_NBLOCKSIZE): New macro.
7739 (<limits.h>, <inttypes.h>): Include if available.
7740 (CHAR_BIT): New macro.
7741 (uintmax_t): New typedef.
7742 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
7743 UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
7744 OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
7745
7746 * src/names.c (name_init):
7747 Fix typo in error message: FILE* was passed, but char*
7748 was wanted.
7749
7750 (read_name_from_file, name_gather, addname, name_match, name_scan,
7751 add_exclude): Use size_t when appropriate. Remove now-useless casts.
7752
7753 (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
7754
7755 * src/extract.c (newdir_umask, current_umask): Now mode_t.
7756 (extract_sparse_file): Args now use off_t.
7757
7758 (set_mode, set_stat, make_directories, extract_sparse_file,
7759 extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
7760 now-useless casts. Use unsigned long to print *_t types, except use
7761 STRINGIFY_BIGINT for off_t.
7762
7763 * src/misc.c (quote_copy_string):
7764 Use size_t when appropriate. Remove now-useless casts.
7765
7766 * src/list.c (read_and, list_archive, read_header, decode_mode,
7767 print_header, print_for_mkdir):
7768 Use mode_t, off_t, size_t when appropriate. Remove
7769 now-useless casts. Use unsigned long to print *_t types, except use
7770 STRINGIFY_BIGINT for off_t.
7771
7772 (read_header): Check for overflow when converting header size.
7773
7774 (from_oct): Now static. Now returns uintmax_t. `where' arg is now
7775 const char *. Size arg is now size_t. Now takes new type and maxval
7776 args. Compute result using uintmax_t, not long. Report error if
7777 field does not contain octal number in range.
7778 (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
7779 off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
7780 uintmax_from_oct): New functions.
7781
7782 (stringify_uintmax_t_backwards): New function.
7783
7784 (decode_mode, print_for_mkdir): Mode arg is now mode_t.
7785 (skip_file): Offset arg is now off_t.
7786
7787 * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
7788 real_s_totsize, real_s_sizeleft, current_block_ordinal):
7789 Now off_t.
7790 (write_error): Arg is now ssize_t.
7791 (child_pid): Now pid_t.
7792 (available_space_after): Now size_t.
7793
7794 (child_open_for_compress, child_open_for_uncompress, flush_write,
7795 open_archive, flush_write, write_error, flush_read, close_archive):
7796 Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
7797 casts. Use unsigned long to print *_t types, except use
7798 STRINGIFY_BIGINT for off_t.
7799
7800 * src/delete.c (records_read): Now daddr_t.
7801 (move_archive): Arg is now daddr_t. Check for overflow when
7802 computing offset.
7803 (move_archive, delete_archive_members): Use daddr_t, off_t when
7804 appropriate. Remove now-useless casts.
7805
7806 * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
7807 (rmt_lseek): Now returns off_t.
7808
7809 * src/create.c (to_oct):
7810 Now static. Value arg is now uintmax_t. Accept new args
7811 giving name of type of octal field, for error messages. Report an
7812 error if the value is too large to fit in the field.
7813 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
7814 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
7815
7816 (write_eot, write_long, finish_header, deal_with_sparse,
7817 finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
7818 appropriate. Remove now-useless casts. Use unsigned long to print
7819 *_t types, except use STRINGIFY_BIGINT for off_t.
7820
7821 (find_new_file_size): 1st arg is now off_t*.
7822 (finish_sparse_file): Args now use off_t, not long.
7823 Check for lseek error.
7824 (create_archive, dump_file): Cast -1 to dev_t when necessary.
7825 (dump_file): Device arg is now dev_t.
7826 Avoid overflow when testing whether file has holes
7827 by using the new ST_NBLOCKSIZE macro.
7828
7829 * src/incremen.c (struct accumulator, add_to_accumulator,
7830 get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
7831 Use size_t for sizes.
7832 (struct directory, get_directory_contents, add_hierarchy_to_namelist):
7833 Use dev_t, ino_t for devices and inodes.
7834 (gnu_restore): Use off_t for file offsets.
7835 (struct directory): Use char for flags. Add new flag `nfs'.
7836 (nfs): New constant
7837 (NFS_FILE_STAT): New macro.
7838 (note_directory): Accept struct stat * instead of
7839 device and inode number. All callers changed.
7840 (note_directory, get_directory_contents):
7841 Use NFS_FILE_STAT to determine whether directory is an NFS directory.
7842 (write_dir_file): Cast time_t to unsigned long before printing as %lu.
7843
7844 * src/common.h (record_size, struct name, struct sp_array,
7845 available_space_after):
7846 Use size_t for sizes.
7847 (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
7848 Use off_t for file offsets.
7849 (struct name): dir_contents is now const char *, not char *.
7850 (dump_file, get_directory_contents): Use dev_t for devices.
7851 (to_oct): Remove decl.
7852 (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
7853 UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
7854 GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
7855 OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
7856 UINTMAX_FROM_OCT): New macros.
7857 (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
7858 size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
7859 stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
7860 minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
7861 time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
7862 (print_for_mkdir): 2nd arg is now mode_t.
7863
7864 See ChangeLog.1 for earlier changes.
7865
7866
7867 \f
7868 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
7869 Free Software Foundation, Inc.
7870
7871 This file is part of GNU tar.
7872
7873 GNU tar is free software; you can redistribute it and/or modify
7874 it under the terms of the GNU General Public License as published by
7875 the Free Software Foundation; either version 2, or (at your option)
7876 any later version.
7877
7878 GNU tar is distributed in the hope that it will be useful,
7879 but WITHOUT ANY WARRANTY; without even the implied warranty of
7880 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7881 GNU General Public License for more details.
7882
7883 You should have received a copy of the GNU General Public License
7884 along with GNU tar; see the file COPYING. If not, write to
7885 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
7886 Boston, MA 02110-1301, USA.
7887 \f
7888 Local Variables:
7889 mode: change-log
7890 version-control: never
7891 End:
This page took 0.459405 seconds and 5 git commands to generate.