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