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