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