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