*** empty log message ***
[coreutils.git] / old / fileutils / ChangeLog
blobad1881146ce2b24e6bc27e63a21874b7570ce3f3
1 2000-05-20  Jim Meyering  <meyering@lucent.com>
3         * Version 4.0s.
5         * tests/mv/Makefile.am (TESTS): Add i-2, for 2000-05-12 change.
7         * tests/rm/r-2: Clean up.
8         * tests/ls/time-1 (LC_ALL): Set it unconditionally.
10 2000-05-19  Jim Meyering  <meyering@lucent.com>
12         Save device number as well as inode number for each directory,
13         and use both in comparisons.  This makes the directory cycle
14         test more robust, and closes the small remaining hole whereby
15         an attacker could subvert a running `rm -r' command.
17         * src/remove.c (struct active_dir_ent) [st_dev]: New member.
18         [st_ino]: Rename from `inum'.
19         (make_active_dir_ent) [device]: New parameter.
20         (hash_compare_active_dir_ents): Compare using SAME_INODE macro.
21         (fspec_init_common): New function, factored out.
22         (fspec_init_file): Initialize have_device member.
23         (fspec_get_full_mode): Remove parameter.  Update caller.
24         Set have_device and st_dev members.
25         * src/remove.h (struct File_spec) [have_device, st_dev]:  New members
27 2000-05-18  Jim Meyering  <meyering@lucent.com>
29         * src/remove.c (rm): Combine adjacent fputc and fprintf.
31         * tests/rm/Makefile.am (TESTS): Add hash.
32         * tests/rm/hash: New test for the fix in lib/hash.c.
34 2000-05-17  Jim Meyering  <meyering@lucent.com>
36         * src/remove.c (remove_dir): Detect (and fail upon) attempt to subvert
37         a running `rm -r'.  Reported by Morten Welinder.
39 2000-05-15  Jim Meyering  <meyering@lucent.com>
41         * src/ln.c (do_link): Use complete strings in diagnostics so they
42         are easier to translate.  Reported by Michel Robitaille.
43         (main): Drop support for the case in which S_ISLNK wasn't defined.
44         It was broken in any case.
46         * tests/ls/time-1: Set LC_ALL to `C' to avoid failure when the
47         current locale is not C (POSIX).  From Matthew Clarke.
49 2000-05-13  Jim Meyering  <meyering@lucent.com>
51         * src/help-version: New test.
52         * src/Makefile.am (TESTS): Define.
53         (TESTS_ENVIRONMENT): Likewise.
54         (EXTRA_DIST): Add help-version.
56         * src/chgrp.c: Arrange to call close_stdout only upon exit.
57         * src/chmod.c: Likewise.
58         * src/chown.c: Likewise.
59         * src/cp.c: Likewise.
60         * src/df.c: Likewise.
61         * src/dircolors.c: Likewise.
62         * src/du.c: Likewise.
63         * src/install.c: Likewise.
64         * src/ln.c: Likewise.
65         * src/ls.c: Likewise.
66         * src/mkdir.c: Likewise.
67         * src/mkfifo.c: Likewise.
68         * src/mknod.c: Likewise.
69         * src/mv.c: Likewise.
70         * src/rm.c: Likewise.
71         * src/rmdir.c: Likewise.
72         * src/shred.c: Likewise.
73         * src/sync.c: Likewise.
74         * src/touch.c: Likewise.
76         * src/dd.c: Include closeout.h.
77         (usage): Don't call close_stdout here.
78         (close_stdout_wrapper): New, kludgey, function and file-scoped global.
79         (main): Register it with atexit.
81 2000-05-12  Jim Meyering  <meyering@lucent.com>
83         Unlike for mv, -i doesn't cancel the effect of -f
84         and -f doesn't cancel the effect of -i.
85         * src/cp.c (main) ['f']: Don't reset `x.interactive'.
86         ['i']: Don't reset `x.force'.
87         * src/copy.c (copy_internal): Fix force and interactive tests.
88         Patch from Michael Stone, reported by Jeff Sheinberg.
90 2000-05-09  Jim Meyering  <meyering@lucent.com>
92         * src/shred.c: Include sys/types.h in shred.c before including
93         sys/stat.h or system.h.  From John David Anglin.
95 2000-05-08  Jim Meyering  <meyering@lucent.com>
97         * tests/shred/remove: Don't use touch in root test.  Instead, append to
98         the test file, since now touch operates even on files which deny owner
99         write access.
101 2000-05-06  Jim Meyering  <meyering@lucent.com>
103         * src/Makefile.am (shred_LDADD): Add @LIB_CLOCK_GETTIME@.
105         * src/rmdir.c (EEXIST): Remove now-unused definition.
106         (ENOTEMPTY): Likewise.
107         (errno_rmdir_non_empty): Rewrite to use RMDIR_ERRNO_NOT_EMPTY,
108         which is determined by the autoconf test in m4/rmdir-errno.m4.
110 2000-05-03  Bruno Haible  <haible@clisp.cons.org>
112         Don't fail when running `make check' with non-`C' locale.
113         * tests/cp/symlink-slash: During ls, set LANGUAGE (for GNU gettext)
114         and LC_ALL (for systems which look at LC_MESSAGES).
115         * tests/rm/r-2: Define LC_ALL instead of LANG, in case the user has
116         LC_CTYPE or LC_ALL set.  Define it and LANGUAGE before the first use
117         of sort.
119 2000-05-03  Jim Meyering  <meyering@lucent.com>
121         With a recent glibc, _GNU_SOURCE, and -O, strndup may be a macro.
122         * src/sys2.h (!HAVE_DECL_STRNDUP): Declare strndup.
123         * src/dircolors.c: Remove declaration of strndup.
124         Reported by Bruno Haible.
126 2000-05-02  Jim Meyering  <meyering@lucent.com>
128         * src/rm.c (usage): Add the answer to `How do I remove a file named -f?'
130 2000-05-01  Jim Meyering  <meyering@lucent.com>
132         * src/install.c (change_attributes): Don't even attempt the chmod
133         if the chown fails.  Before, when a non-root user ran `install -m 4755
134         -o nobody FILE DEST', DEST would set-uid not to `nobody' but rather to
135         the ID of the installing user.  Reported by Marc Olzheim.
137 2000-04-30  Jim Meyering  <meyering@lucent.com>
139         * src/touch.c (O_NOCTTY): Define if not defined already.
140         (touch): Add O_NOCTTY to the flags passed to open.
142 2000-04-29  Jim Meyering  <meyering@lucent.com>
144         * Version 4.0r.
146         * src/cp.c [LSTAT_FOLLOWS_SLASHED_SYMLINK] (lstat): Define to rpl_lstat.
148 2000-04-27  Jim Meyering  <meyering@lucent.com>
150         Clean up.
151         * tests/mkdir/Makefile.am (TESTS_ENVIRONMENT): Set PATH, not MKDIR.
152         * tests/mkdir/p-1: Use mkdir, not $MKDIR.
153         * tests/mkdir/p-2: Likewise.
155         * configure.in (AC_OUTPUT): Add tests/du/Makefile.
156         * tests/Makefile.am (SUBDIRS): Add du.
157         * tests/du: New directory.
158         * tests/du/two-args: New test.
160         * tests/mkdir/special-1: New test.
161         * tests/mkdir/Makefile.am (TESTS): Add special-1.
163 2000-04-25  Paul Eggert  <eggert@twinsun.com>
165         * src/du.c (pop_dir): Remove through_symlink arg; use null cwd
166         for that purpose instead.
167         (count_entry): Also save the directory if we're saving more
168         than one level.
169         Fix file descriptor and memory leak when chdir fails.
171 2000-04-26  Jim Meyering  <meyering@lucent.com>
173         * src/mkdir.c: Rename global: s/path_mode/create_parents/.
174         (main): No longer perform explicit chmod when creating
175         parent directories, since make_path now does the chmod.
177 2000-04-17  Jim Meyering  <meyering@lucent.com>
179         * src/chown.c: New option: --from=CURRENT_OWNER:CURRENT_GROUP.
180         (enum) [FROM_OPTION]: New member.
181         (long_options): New getopt spec.
182         (change_file_owner): Add old_user, old_group parameters.  Use them.
183         (change_dir_owner): Likewise.
184         (usage): Describe.
185         (main): New case.
186         From Andries Brouwer.
187         * doc/fileutils.texi (invoking chown): Document it.
189 2000-04-16  Jim Meyering  <meyering@lucent.com>
191         * src/cp.c: New option: --strip-trailing-slashes.
192         (enum) [STRIP_TRAILING_SLASHES_OPTION]: New member.
193         (remove_trailing_slashes): New global.
194         (long_opts): New getopt spec.
195         (usage): Describe.
196         (do_copy): Strip trailing slashes on SOURCE names only if the new
197         option has been specified.
198         (main): New case.
200         * tests/cp/symlink-slash: New test for the change in behavior.
201         * tests/cp/Makefile.am (TESTS): Add symlink-slash.
203         * doc/fileutils.texi (Trailing slashes): Factor out discussion on
204         trailing slashes into its own node.
205         Cross reference from cp and mv.
207 2000-04-14  Jim Meyering  <meyering@lucent.com>
209         * src/touch.c (touch): Add O_NOCTTY to the list of open-time flags.
211 2000-04-13  Jim Meyering  <meyering@lucent.com>
213         Move some code into m4/.
214         * configure.in (_GNU_SOURCE): Don't define here.
215         (AC_SYS_LARGEFILE): Don't use here.
216         (AM_C_PROTOTYPES): Don't use here.
217         * acconfig.h: Remove now-unused file.
219 2000-04-08  Jim Meyering  <meyering@lucent.com>
221         * doc/fileutils.texi (cp invocation): Mention that there is an
222         application for cp's --sparse=never option.  From Martin Hippe.
223         (cp invocation): Describe how --backup and --force
224         can be useful together.
226 2000-03-10  Alan Iwi <iwi@atm.ox.ac.uk>
228         * src/ls.c: Add support for "ln=target" in the LS_COLORS variable,
229         to colorize links as for the file/directory pointed to.
230         * src/dircolors.hin: Add a few words of documentation of the above.
232 2000-04-08  Jim Meyering  <meyering@lucent.com>
234         * src/cp.c (usage): Document that while the --backup option takes an
235         optional argument, the -b option accepts none.
236         (main): Use `backup type' in call to xget_version, not the
237         now-deprecated `--version-control'.
238         * src/install.c: Likewise.
239         * src/ln.c: Likewise.
240         * src/mv.c: Likewise.
242 2000-03-12  Jim Meyering  <meyering@lucent.com>
244         Merge from textutils.
245         * src/system.h: (O_BINARY, O_TEXT): Define if necessary.
246         (SET_BINARY, SET_BINARY2): Define.
247         (DEV_BSIZE): Define to BBSIZE if appropriate.
249 2000-03-10  Jim Meyering  <meyering@lucent.com>
251         * tests/mv/mv-special-1: Make the message more like that in the
252         similar touch and shred tests.
253         * tests/touch/fifo: Accommodate SunOS-NFS-mounting-OpenBSD mkfifo
254         bug and `exit 77' if the fifo cannot be created.
255         Report and suggestion from Volker Borchert.
257 2000-03-03  Jim Meyering  <meyering@lucent.com>
259         * po/Makefile.in.in (dist distdir): Don't use `ln' (which was just a
260         space optimization anyway) to populate $(distdir).  Otherwise, the dist
261         rules that change permissions would end up affecting the master sources.
263 2000-03-01  Paul Eggert  <eggert@twinsun.com>
265         * src/df.c (show_point): Ignore shortcuts based on path
266         prefixes that are loop file system mount points, since they
267         yield undesirable output.
269 2000-02-29  Jim Meyering  <meyering@lucent.com>
271         * src/ls.c (decode_switches): Remove `e' from getopt_long's list of
272         option characters.  Reported by John Summerfield.
274 2000-02-28  Jim Meyering  <meyering@lucent.com>
276         * tests/install/basic-1: Use ginstall, not install.
278 2000-02-27  Jim Meyering  <meyering@lucent.com>
280         * Version 4.0q.
282         * src/sys2.h: Guard declaration of strtoull also with
283         `&& HAVE_UNSIGNED_LONG_LONG'.
285         * src/sys2.h: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL...'
286         now that autoconf always defines the HAVE_DECL_ symbols.
288         * src/install.c (install_file_to_path): Always use install_file_in_file.
289         Based on a patch from Adam Klein via Michael Stone.
291         * tests/install/Makefile.am (TESTS): Add create-leading.
292         * tests/install/create-leading: New file.
294         * tests/install/basic-1: Clean up.
295         * tests/install/Makefile.am (TESTS_ENVIRONMENT): Add PATH. Remove cruft.
297 2000-02-26  Jim Meyering  <meyering@lucent.com>
299         Tranform the generated src/Makefile.in file so it falls back on
300         using /bin/rm when necessary.  The old rule didn't always work.
301         This is necessary only on certain losing systems, and because this
302         package builds an `rm' executable and some people put `.' too
303         early in their PATH.
304         * Makefile.am (DISTCLEANFILES): Remove .deps and `FIXME' comment.
305         (EXTRA_DIST): Add .kludge-stamp.
306         (.kludge-stamp): New rule.
307         * src/Makefile.am (AUTOMAKE): Remove definition.
308         (Makefile.in): Remove dependency on automake-wrap script.
309         (EXTRA_DIST): Remove automake-wrap.
310         * src/automake-wrap: Remove file.
312         * tests/rm/r-2: Don't make the success of the test depend on the
313         order in which directory entries are processed.
314         Reported by Andreas Schwab.
316 2000-02-12  Jim Meyering  <meyering@lucent.com>
318         * po/POTFILES.in: Add lib/userspec.c.
320         * doc/fileutils.texi (chown invocation): Deprecate use of `.'.
322         * src/chown.c (usage): Mention only `:', and not `.' as the separator,
323         since POSIX allows only the former.
324         Prompted by a report from Manas Garg.
326 2000-02-11  Jim Meyering  <meyering@lucent.com>
328         * src/df.c (main): Count the stat'able arguments.
329         Print the header line only if there is at least one valid argument.
330         Reported by Andy Longton <alongton@metamark.com>
332 2000-02-10  Jim Meyering  <meyering@lucent.com>
334         Make du work when invoked from an unreadable directory.
336         * src/du.c (pop_dir): New function.
337         (count_entry): Factor out common code (pop_dir), and call the new
338         function instead.
339         Move declaration of global, `stat_buf' into this function.
340         (du_files): Don't stat `.' or call save_cwd, since count_entry
341         never returns with a changed working directory.
343 2000-02-09  Jim Meyering  <meyering@lucent.com>
345         * tests/mv/mv-special-1: Use $null and $dir in place of literals
346         in `here' script.
347         Exit 77 if we can't set up the framework (Volker Borchert reported
348         that this test would fail because mknod failed when run on SunOS4.1.4
349         using NFS-mounted disk from an OpenBSD system).
351 2000-02-05  Jim Meyering  <meyering@lucent.com>
353         * src/copy.c (copy_internal): Don't allow mv to move a directory onto
354         a non-directory.  Reported by Brian Kimball via Michael Stone.
356 2000-02-03  Jim Meyering  <meyering@lucent.com>
358         * tests/mv/Makefile.am (TESTS): Add dir-file.
359         (TESTS_ENVIRONMENT): Remove vestiges of old tests.
360         * tests/mv/dir-file: New file.
362 2000-02-02  Jim Meyering  <meyering@lucent.com>
364         * tests/touch/Makefile.am (TESTS): Add fifo.
365         * tests/touch/fifo (fail): New file.
367 2000-02-01  Jim Meyering  <meyering@lucent.com>
369         * src/touch.c (O_NDELAY): Define to 0 if not defined.
370         (O_NONBLOCK): Define to O_NDELAY if not defined.
371         (touch): Open with O_NONBLOCK, so one can touch a fifo without hanging.
372         Reported by Eric G. Miller via Michael Stone.
374         * man/*.x: Change ." to .\".
375         Reported by Andreas Schwab and Brendan O'Dea.
377 2000-01-31  Jim Meyering  <meyering@lucent.com>
379         * man/Makefile.maint (ginstall_filter): Define.
380         ($(man_MANS)): Use it here so that the install.1 man page refers
381         to `install', not `ginstall'.  Reported by Andreas Schwab.
383 2000-01-30  Jim Meyering  <meyering@lucent.com>
385         * Version 4.0p.
387         * configure.in: Move library-related tests into m4/lib-check.m4.
389         * src/system.h (ST_NBLOCKS): Use st_size only for regular files and
390         for directories.  From H. J. Lu.
392         * src/dd.c (main): Exit with nonzero status if ftruncate fails.
394 2000-01-24  Jim Meyering  <meyering@lucent.com>
396         * src/ln.c (usage): Describe behavior when LINK_NAME is omitted.
397         From Michael Stone.
399         * src/mv.c (main): Don't expect array index `n_files - 1' to evaluate
400         to `-1' for unsigned int n_files == 0.  Doing so lead to a segfault on
401         alpha.  From Michael Stone.
403 2000-01-23  Jim Meyering  <meyering@lucent.com>
405         * configure.in (AM_FUNC_OBSTACK): Remove. (move to m4/.)
406         Remove nearly all function checks (moved to m4/.)
407         (AC_SUBST(DF_PROG)): Move this to m4/.
408         (ftruncate test): Move into new file: m4/ftruncate.m4.
409         (AC_HEADER_MAJOR, AC_HEADER_DIRENT): Move into m4/.
410         Remove df-related tests.  i.e., move jm_LIST_MOUNTED_FILESYSTEMS,
411         jm_FSTYPENAME, and jm_FILE_SYSTEM_USAGE) into m4/.
413 2000-01-22  Jim Meyering  <meyering@lucent.com>
415         * configure.in: Move addext.c prerequisites from this file into m4/.
416         (AC_CHECK_HEADERS): Move these checks into m4/.
418 2000-01-17  Paul Eggert  <eggert@twinsun.com>
420         * src/dd.c (interrupt_handler): Likewise.
421         (install_handler): Use SA_NOCLDSTOP, not _POSIX_VERSION,
422         to decide whether to call sigaction; this fixes an old typo.
424 2000-01-16  Jim Meyering  <meyering@lucent.com>
426         * lib/Makefile.am: Sync with sh-utils/lib/Makefile.am.
428         * configure.in: Remove AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME,
429         jm_FUNC_GROUP_MEMBER, jm_FUNC_GETGROUPS, AC_FUNC_VPRINTF, and
430         AC_FUNC_ALLOCA.  They're now in m4/.
432         Sync with the version from emacs-20.5.
433         * lib/alloca.c
434         (<string.h>): Include if HAVE_STRING_H.
435         (<stdlib.h>): Include if HAVE_STDLIB_H.
436         (alloca): Abort if malloc fails.
437         Reported by Paul Eggert.
439 2000-01-15  Jim Meyering  <meyering@lucent.com>
441         * configure.in (AC_REPLACE_FUNCS): Remove these: euidaccess memcpy
442         memcmp memset mkdir rmdir rpmatch stpcpy strndup strstr strtol
443         strtoul strverscmp.  Now they're in m4/.
445 2000-01-12  Jim Meyering  <meyering@lucent.com>
447         * tests/shred/remove: Make the warning that this shred test may not
448         be run as root more prominent.  Suggestion from Volker Borchert.
450 2000-01-11  Paul Eggert  <eggert@twinsun.com>
452         Quote multibyte characters correctly.
454         * lib/quotearg.c (ISGRAPH): Remove.
455         (ISPRINT): New macro.
456         (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
457         (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
458         defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
459         (quotearg_buffer_restyled): New function, with most of the old
460         quotearg_buffer's contents.
461         Major rewrite to support multibyte characters.
462         (quotearg_buffer): Now just calls quotearg_buffer_restyled.
464         * m4/c-bs-a.m4: New file.
465         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
466         (jm_PREREQ): Use it.
468 2000-01-11  Paul Eggert  <eggert@twinsun.com>
470         * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned
471         long, to parse numeric modes.  Check for any unknown bits, not
472         just unknown bits left of the leftmost known bit.
474 2000-01-11  Paul Eggert  <eggert@twinsun.com>
476         * lib/getdate.y: Update copyright notice.
478 2000-01-11  Paul Eggert  <eggert@twinsun.com>
480         * COPYING: Sync with latest FSF version (fixing a minor Y2k problem).
482 2000-01-11  Paul Eggert  <eggert@twinsun.com>
484         * lib/exclude.c, lib/exclude.h: Sync to the slightly more
485         general version of GNU tar.
487         * src/du.c (count_entry):
488         Adjust to new calling convention for excluded_filename.
489         (main): Likewise, for add_exclude_file.
491 2000-01-11  Jim Meyering  <meyering@lucent.com>
493         * lib/memcpy.c (memcpy): Protoize.
495         Prepare to sync lib/ directories of fileutils, sh-utils, and textutils.
496         * lib/Makefile.am: s/fu/fetish/
497         * src/Makefile.am: s/libfu/libfetish/
499         * lib/hash.c (hash_initialize): Fix typo in comment.
500         From François Pinard.
502 2000-01-10  Jim Meyering  <meyering@lucent.com>
504         * Version 4.0o.
506         * lib/Makefile.am (noinst_HEADERS): Add nanosleep.h.
508 2000-01-09  Jim Meyering  <meyering@lucent.com>
510         * Version 4.0n.
512         * src/ln.c (do_link): Produce the same sort of one-line output for
513         `--backup --verbose' as cp, mv, install.  Before this, the backup
514         file name wasn't printed at all.
516         This affects cp, install, and mv.
517         * src/copy.c (copy_internal): When making backup files in verbose
518         mode, print the backup file name on the same line as the rest of the
519         information, e.g., `a -> b (backup: b.~13~)' rather than on a separate
520         line by itself.  Suggestion from Karl Berry.
522 2000-01-08  Jim Meyering  <meyering@ascend.com>
524         * lib/error.c (error): Use __strerror_r's return value only if
525         HAVE_WORKING_STRERROR_R.
526         (error_at_line): Likewise.
528         * Makefile.maint (null_AM_MAKEFLAGS): Define.
529         (my-distcheck): Use it to avoid distributing out of date files
530         whose derivation would require a maintainer tool.
532 2000-01-07  Jim Meyering  <meyering@ascend.com>
534         * lib/euidaccess.c: Sync with the GNU C library.
536         * tests/dir/Makefile.am: (TESTS_ENVIRONMENT): Add `pwd`/ prefix
537         to exported PATH value (though not strictly necessary, here).
538         * tests/dd/Makefile.am: Likewise.
539         * tests/dircolors/Makefile.am: Likewise.
540         * tests/rm/Makefile.am: Likewise.
541         * tests/rmdir/Makefile.am: Likewise.
542         * tests/shred/Makefile.am: Likewise.
543         * tests/touch/Makefile.am: Likewise.
544         * tests/shred/Makefile.am: Likewise.
546 2000-01-06  Jim Meyering  <meyering@ascend.com>
548         * man/help2man: Import version 1.020.
550         * lib/strftime.c: Sync with the GNU C Library.
552 2000-01-06  Paul Eggert  <eggert@set.twinsun.com>
554         * tar/lib/getdate.y: Sync tm_diff with the GNU C Library.
555         (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN.  All uses changed.
556         (tm_diff): Renamed from difftm.  All uses changed.
557         Replace body with that taken from GNU C Library 2.1.3pre1.
558         (get_date): Prefer tm_gmtoff to tm_diff if available.
560 2000-01-04  Paul Eggert  <eggert@twinsun.com>
562         * savedir.c (savedir): Don't store past the end of an array if
563         name_size is zero and the directory is empty.
565         * Makefile.maint (PREV_VERSION): Tweak so it handles e.g., 2.0a -> 2.0.
566         (alpha): Create xdelta diffs.
568 2000-01-02  Jim Meyering  <meyering@ascend.com>
570         * Version 4.0m.
572         * src/mv.c: New option: --strip-trailing-slashes.
574         1999-11-18  Paul Eggert  <eggert@twinsun.com>
576         * lib/strftime.c (my_strftime): Some old compilers object to
577         '\a', so don't bother optimizing for it.
579 2000-01-01  Paul Eggert  <eggert@twinsun.com>
581         Fix bug: `df PATH' sometimes misbehaves when there is an
582         inaccessible mount point unrelated to PATH.
583         * configure.in (AC_CHECK_FUNCS): Add realpath, resolvepath.
584         * src/df.c (#pragma alloca): Add if _AIX is defined.
585         (path-concat.h): Include.
586         (show_point): If HAVE_REALPATH or HAVE_RESOLVEPATH is defined,
587         find the real absolute path for PATH, and use that to find the
588         mount point.
590         (show_point): Prefer non-dummy entries in shortcuts, too.
591         Disable bogus mount dirs instead of restatting them each time.
593 1999-12-30  Jim Meyering  <meyering@ascend.com>
594         1999-12-17  Kalle Olavi Niemitalo  <tosi@stekt.oulu.fi>
596         * src/rmdir.c (remove_parents, main): Don't pass errno to error
597         when printing "removing directory" message.  Failure of rmdir is
598         handled elsewhere.
600 1999-12-23  Jim Meyering  <meyering@ascend.com>
602         * configure.in: Remove clock_gettime tests.
603         Now they're in m4/jm-macros.m4.
605         * src/ln.c (usage): Correct typos.
606         List new --target-directory=... usage.
607         Reported by Göran Uddeborg
609         * src/mv.c (usage): List new --target-directory=... usage.
611 1999-12-22  Jim Meyering  <meyering@ascend.com>
613         * lib/getdate.y (get_date): Fix typo in time_t overflow test.
614         From Michael Stone.
616 1999-12-21  Andreas Schwab  <schwab@suse.de>
618         * tests/shred/remove: Use $file, not $tmp/file.  Exit 77 if run as
619         root.
621 1999-12-20  Paul Eggert  <eggert@twinsun.com>
623         * src/df.c (ceil_percent): Remove.
624         (show_dev): Avoid overflow problems when calculating percent.
625         Do not display negative percents.
627 1999-12-19  Jim Meyering  <meyering@ascend.com>
629         * Version 4.0l.
631         * doc/fileutils.texi: Clarify and combine descriptions of -c and of
632         --time=ctime.
633         Likewise for -u/--time=atime.
635         * src/ls.c [! LSTAT_FOLLOWS_SLASHED_SYMLINK]: Use lstat wrapper.
636         [Notice the new configure-time test in m4/lstat-slash.m4. ]
637         (main): Back out change from 1999-02-19 that made ls remove
638         trailing slashes from command line arguments to accommodate early
639         versions of Linux.  Now, `ls symlink-to-dir/' acts like
640         `ls symlink-to-dir/.' thus following the symbolic link, as POSIX says
641         it should.  Suggestion from Bruno Haible and Andreas Schwab.
643         * lib/xstat.in (slash_aware_lstat): New function.
644         (rpl_@xstat@): Use it.
645         * lib/Makefile.am (lstat.c): Adapt rule to handle new parts of xstat.in.
646         (lstat.c): Likewise.
648         Make sure ls does the right thing with symlinks and trailing slashes.
649         * tests/ls/Makefile.am (TESTS): Add symlink-slash.
650         * tests/ls/symlink-slash: New test, for above-fixed bug.
652 1999-12-18  Jim Meyering  <meyering@ascend.com>
654         * src/shred.c (wipename): When repeatedly renaming a file, making the
655         name shorter and shorter, skip to the next shorter length length if a
656         rename fails (e.g. due to permission denied).  Otherwise, this loop
657         would iterate for so long that shred would appear to be stuck in an
658         infinite loop for any but the shortest file names.
659         Reported by Joe Orton.
661         * configure.in (AC_OUTPUT): Add tests/shred/Makefile.
662         * tests/Makefile.am (SUBDIRS): Add shred.
663         * tests/shred: New directory
664         * tests/shred/remove: New file.  Tests for the above-fixed bug.
666 1999-12-13  Jim Meyering  <meyering@ascend.com>
668         * lib/makepath.c (make_path): Consistently use `error' to output
669         the verbose, `created directory ...' messages.
670         Reported by Bernhard Rosenkraenzer.
672 1999-12-12  Jim Meyering  <meyering@ascend.com>
674         Move 120+ lines of stat.h-related macros from system.h (not shared)
675         to sys2.h, which is shared between fileutils, sh-utils, textutils.
676         * src/system.h: Move them from here...
677         * src/sys2.h: ... to here.
679         * src/system.h (S_IRUSR, S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Define
680         if not defined.  This was necessary on a NeXT Turbostation running
681         Mach 3.3.  Reported by Nelson H. F. Beebe.
683         * src/ls.c (decode_switches): If -c or -u is specified and not -l
684         (or any other option that implies -l), and no sort-type was specified,
685         then sort by the ctime (-c) or atime (-u).  Part of this change reverts
686         the 1998-01-10 delta.
687         (usage): Update to reflect this change.
688         Reported by Paul Slootman via Michael Stone.
690 1999-12-09  Jim Meyering  <meyering@ascend.com>
692         * src/df.c (BLOCK_SIZE_OPTION, SYNC_OPTION, NO_SYNC_OPTION): Define
693         these and use them instead of `CHAR_MAX + n'.
694         * src/du.c (BLOCK_SIZE_OPTION, EXCLUDE_OPTION, MAX_DEPTH_OPTION):
695         Likewise.
696         * src/touch.c (TIME_OPTION): Likewise.
697         * src/rmdir.c (IGNORE_FAIL_ON_NON_EMPTY_OPTION): Likewise.
699         * tests/ls/time-1: Test more of the framework (touch's -a and -m
700         options) before running the actual ls test.
702 1999-12-07  Jim Meyering  <meyering@ascend.com>
704         * tests/cp/cp-mv-backup: Use 1>&2 rather than `1<&-'.
705         Suggestion from Volker Borchert.
707 1999-12-05  Jim Meyering  <meyering@ascend.com>
709         * Makefile.maint: Remove ftp.enst.fr.
711 1999-12-04  Jim Meyering  <meyering@ascend.com>
713         * Version 4.0k.
715         * tests/mv/into-self-2: Adapt to reflect this change in behavior.
716         Make sure the VERSION_CONTROL envvar is not set.
717         Run diff if comparison fails.
719         * src/copy.c (copy_internal): In move mode, if the rename attempt
720         fails, then unlink any existing destination file.  This makes a
721         cross-device `mv' more consistent with the intra-device behavior.
722         This change is required by POSIX to make a cross-device move act with
723         semantics similar to those of the rename syscall.  For example now
724         `mv' can move a file onto a symlink to itself when that symlink
725         is on a separate partition.  With fileutils-4.0j, it would fail with
726         a diagnostic saying they were the same file.
727         Reported by Bruno Haible.
729         * tests/mv/to-symlink: New file.  Adds test for the above.
730         * tests/mv/Makefile.am (TESTS): Add to-symlink.
732         * tests/cp/cp-mv-backup (trap): Be careful to close $actual before
733         removing the containing directory.  Otherwise, on some systems rmdir
734         fails to remove the containing directory.
736         * tests/ls/time-1: List --full-time dates upon failure.
738 1999-12-02  Andreas Schwab  <schwab@suse.de>
740         * src/ls.c (check_symlink_color): New variable.
741         (main): Set it if we need to check for dangling symlinks when
742         displaying colors.
743         (gobble_file): Check check_symlink_color instead of print_with_color.
745 1999-11-30  Paul Eggert  <eggert@twinsun.com>
747         * src/ls.c (usage): Shorten help for --show-control-chars.
749 1999-11-30  Jim Meyering  <meyering@ascend.com>
751         Give the right diagnostic when failing to create a file in an
752         unwritable directory.
753         * src/touch.c (touch): Record errno upon failed errno and use that
754         saved value if a subsequent fstat, stat or utime call fails.
755         Reported by Wichert Akkerman via Michael Stone.
757 1999-11-27  Jim Meyering  <meyering@ascend.com>
759         Clean up test scripts.
760         * tests/mv/setup: Don't set/use DF or MKDIR.  Use df and mkdir instead.
761         * tests/mv/mv-special-1: Likewise for these: LS MV MKDIR MKNOD RM TOUCH
762         * tests/mv/backup-is-src: Likewise for RM and MV.
763         * tests/mv/hard-link-1: Likewise.
764         * tests/mv/into-self: Likewise.
765         * tests/mv/into-self-3: Likewise.
767         Add test for 1999-05-23 change to src/copy.c (copy_internal).
768         * tests/mv/partition-perm: New file.
769         * tests/mv/Makefile.am (TESTS): Add partition-perm.
771         * Version 4.0j.
773 1999-11-22  Paul Eggert  <eggert@twinsun.com>
775         * src/df.c (df_readable): Now returns char const *, not char *.
776         New arg NEGATIVE.
777         (ceil_percent): Now returns double, not int.
778         Be more careful about adding 1 to a wild value.
779         (show_dev): Don't filter out wild sizes from the underlying operating
780         system; instead, show them to the user as faithfully as possible.
782 1999-11-23  Jim Meyering  <meyering@ascend.com>
784         * doc/getdate.texi (Calendar date item): Correction regarding 0..68/
785         69-99 split for 1900 vs 2000.  From Peter Moulder.
787 1999-11-22  Jim Meyering  <meyering@ascend.com>
789         * lib/Makefile.am (DISTCLEANFILES): Add lstat.c and stat.c.
791 1999-11-20  Jim Meyering  <meyering@ascend.com>
793         * src/rmdir.c (errno_rmdir_non_empty): New function to encapsulate
794         errno comparison.
795         (remove_parents): Use it.
796         (main): Use it.
798         * tests/cp/cp-mv-backup: Run `diff -c' if the test fails.
800         * tests/ls/time-1: Use `ls' and `touch', not $LS and $TOUCH.
801         * tests/ls/Makefile.am (TESTS_ENVIRONMENT): Specify PATH, etc.
803         * src/chgrp.c: Declare lstat;  needed on e.g. SunOS4.
804         Reported by Tom Tromey.
806 1999-11-19  Jim Meyering  <meyering@ascend.com>
808         * lib/strstr.c (strstr): Include config.h.
809         Add a `;' between shloop label and `}'.
810         From Akim Demaille.
812 1999-11-17  Jim Meyering  <meyering@ascend.com>
814         * src/mkdir.c (S_IRWXUGO): Define if necessary.
815         (main): Use chmod to set the permissions if bits other than those
816         of S_IRWXUGO were requested.  Reported by Sami Farin.
818 1999-11-14  Paul Eggert  <eggert@twinsun.com>
820         * touch.c (touch): Simplify code a tad, using fd == -1 instead
821         of separate valid_fd variable.
823 1999-11-13  Jim Meyering  <meyering@ascend.com>
825         * src/touch.c (touch): Don't fail just because we couldn't open
826         an existing file.  This makes it so that touching a read-only
827         file now works.  Also clean up and simplify.
828         Based on a patch from Chip Salzenberg.
829         * tests/touch/no-rights: New test for this.
830         * tests/touch/Makefile.am (TESTS): Add no-rights.
832 1999-11-12  Jim Meyering  <meyering@ascend.com>
834         * src/remove.c (print_nth_dir): Write one fewer byte so we don't print
835         a trailing slash.
836         (rm): Fix bugs in (and test, this time) the very rarely used code
837         to warn about directory cycles.
838         Reported by michael@roka.net.
840 1999-11-11  Jim Meyering  <meyering@ascend.com>
842         * src/copy.c (copy_internal): Treat src and dest as the `same' in
843         `mv src symlink-to-src' when src and dest are on different partitions.
844         Otherwise, that `mv' command would silently remove `src'.
845         Reported by Michael Stone.
846         * tests/mv/into-self-2: Add a test for this fix.
848         * lib/makepath.c (make_path): Fix long-latent bug: s/&&/||/ (others
849         just like that also dated back to 1992 were fixed in 1998-01-02).
850         Richard Braakman reported that using `install -d -g foo 1/2`
851         only sets the group on the intermediate directory, not the final
852         component.  From Michael Stone.
854 1999-11-07  Paul Eggert  <eggert@set.twinsun.com>
856         * human.c (default_block_size): New function.
857         (humblock): Use it if no block size is specified.
858         (human_block_size): If the specified block size is zero, report an
859         error if report_errors is nonzero; otherwise use the default.
861 1999-11-07  Jim Meyering  <meyering@ascend.com>
863         * src/dircolors.hin: Add several more TERM types.
864         Add .bz2 suffix.
865         Add .png for real this time.
866         Change the image types colors to be visible in a black-on-white xterm.
867         From Michael Stone.
869         * src/chgrp.c (xstat): New global.
870         (main): Define it.
871         (change_file_group): Use it.  Before this change, when running chgrp
872         on a symlink without --dereference (-h) and when the requested group
873         is the same as the group for the *symlink*, chgrp would do nothing.
874         Now it changes the group of the file referenced through the symlink.
875         Reported by Martin Mitchell.
877         * src/chmod.c: Use REFERENCE_FILE_OPTION instead of bare `CHAR_MAX + 1'.
878         * src/chown.c: Define and use REFERENCE_FILE_OPTION and
879         DEREFERENCE_OPTION in place of bare `CHAR_MAX + N'.
880         * src/chgrp.c: Likewise.
882         * tests/ln/misc: Add hard-link-to-symlink test.
883         Move framework_failure test to the end.
884         Fix a typo: s/||/&&/.
886         * src/ln.c (do_link): Warn that making a hard link to a symbolic link
887         is not portable.
889         * tests/ln/misc: Use --b=simple, not the now-deprecated `-V simple'.
890         * tests/ln/backup-1: Likewise.
892         * configure.in (AC_OUTPUT): Add tests/rmdir/Makefile.
893         * tests/Makefile.am (SUBDIRS): Add rmdir.
894         * tests/rmdir: New directory
895         * tests/rmdir/ignore: New file.
897         * src/rmdir.c (remove_parents): Use the correct test (just as in
898         main) in handling --ignore-fail-on-non-empty.  From Michael Stone.
899         (usage): Improve description of --parents.  Based on suggestion from
900         Torsten Landschoff.
902 1999-11-06  Jim Meyering  <meyering@ascend.com>
904         Allow hard links to symlinks on systems that support it.
905         * src/ln.c (STAT_LIKE_LINK): Define.
906         (do_link): Use STAT_LIKE_LINK, rather than bare `stat', and perform
907         the extra lstat only on systems where LINK_FOLLOWS_SYMLINKS.
909         * src/ls.c (long_options): Correct typo (s/'F'/'p'/) so that `-p' is
910         accepted as the short form of --file-type, per the documentation.
911         From James Sneeringer.
913         * src/ln.c (do_link): Fix typo (in which the function name `symlink'
914         was tested instead of the variable `symbolic_link') that could make
915         ln perform an unneeded `stat' call.
917 1999-11-05  Jim Meyering  <meyering@ascend.com>
919         * src/system.h: Use HAVE_STRUCT_STAT_ST_BLOCKS, not deprecated
920         HAVE_ST_BLOCKS.
921         * src/copy.c: Likewise.
922         * lib/fileblocks.c: Likewise.
924         * configure.in: Move some type/header/member tests into
925         m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of
926         fileutils, textutils, and sh-utils.
928 1999-11-02  Jim Meyering  <meyering@ascend.com>
930         * man/help2man: Import version 1.018.
931         * man/Makefile.maint ($(man_MANS)): Remove use of --name=... option.
932         * man/*.x: Include one-line summary in [NAME] section.
933         * man/Makefile.summ: Remove the one-line summaries.
934         Suggestion for clean-up from Akim Demaille.
936         * configure.in (ALL_LINGUAS): Add Galician (gl).
938 1999-11-01  Jim Meyering  <meyering@ascend.com>
940         * src/cp.c (usage): Warn about mixing use of `-r' with FIFOs and
941         other special files like /dev/zero.
943         * lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
945 1999-10-31  Jim Meyering  <meyering@ascend.com>
947         * Makefile.maint (my-distcheck): Remove $(DEPDIR) to work around
948         automake bug.
950         * doc/fileutils.texi: Document new --backup[=METHOD] option for
951         cp, mv, ln, and install.
953         * src/ln.c: Convert --backup to take an optional argument.
954         Deprecate --version-control (-V) in comments.
955         (usage): Remove mention of --version-control.
956         (main): Make -V warn then fall through into --backup case.
957         [--backup case]: Handle optional arg.
958         * src/install.c: Likewise.
960 1999-10-24  Jim Meyering  <meyering@ascend.com>
962         * src/cp.c (do_copy): Constify `dest', and cast-away the new
963         const in assignment to new_dest.
965 1999-10-23  Jim Meyering  <meyering@ascend.com>
967         * tests/touch/Makefile.am (TESTS): Add dangling-symlink.
968         * tests/touch/dangling-symlink: New file.
970 1999-10-23  Paul Eggert  <eggert@twinsun.com>
972         * src/touch.c (full_write): Remove unused decl.
973         (open_maybe_create): Remove.
974         (touch): Don't record whether the file was created; this isn't
975         possible to do reliably and portably without race conditions.
976         If the file was created and if amtime_now is nonzero, this
977         change means we'll have to do another utime system call, but
978         that's no more harmful than the previous version of this code.
979         Reported by Gabor Z. Papp.
981 1999-10-21  Jim Meyering  <meyering@ascend.com>
983         * configure.in (ALL_LINGUAS): Add Japanese (pa).
985 1999-10-17  Jim Meyering  <meyering@ascend.com>
987         * tests/mv/backup-is-src: Remove use of mv's now-deprecated
988         -V option.  Use --b=simple instead of -b -V simple.
990         * src/mv.c: Convert --backup to take an optional argument.
991         Deprecate --version-control (-V) in comments.
992         (usage): Remove mention of --version-control.
993         (main): Make -V warn then fall through into --backup case.
994         [--backup case]: Handle optional arg.
996         Accept new option: --target-directory=DIR
997         * src/cp.c (TARGET_DIRECTORY_OPTION): Define.
998         (SPARSE_OPTION): Define.
999         (usage): Describe it.
1000         (do_copy): Change meanings/names of first two parameters: use `n_files'
1001         in place of `argc - optind', and `file' instead of `argv + optind'.
1002         Add parameter, target_directory.
1003         (main): Pass new arg, target_directory.
1005 1999-10-16  Jim Meyering  <meyering@ascend.com>
1007         * tests/cp/backup-is-src: Remove use of cp's now-deprecated -V option.
1008         Use --b=simple instead of -b -V simple.
1009         * tests/cp/backup-1: Replace use of cp's now-deprecated
1010         --version-control option with use of --backup=simple.
1012         * src/cp.c: Convert --backup to take an optional argument.
1013         Deprecate --version-control (-V) in comments.
1014         (usage): Remove mention of --version-control.
1015         (main): Make -V warn then fall through into --backup case.
1016         [--backup case]: Handle optional arg.
1018         * tests/cp/Makefile.am (TESTS): Add cp-mv-backup.
1019         * tests/cp/cp-mv-backup: New file.
1021 1999-10-11  Jim Meyering  <meyering@ascend.com>
1023         * lib/getopt.c: Merge changes from latest glibc.
1024         * lib/getopt.h: Likewise.
1025         * lib/getopt1.c: Likewise.
1027 1999-10-09  Jim Meyering  <meyering@ascend.com>
1029         Accept new option: --target-directory=DIR
1030         * src/ln.c (TARGET_DIRECTORY_OPTION): Define.
1031         (usage): Describe it.
1032         (main): Implement it.
1033         Make code clearer:  use new variable `n_files' in place of
1034         `argc - optind'.  Use `file' instead of `argv + optind'.
1036 1999-10-04  Jim Meyering  <meyering@ascend.com>
1038         * depcomp: New file, for automake's new dependency support.
1039         * missing: New version, from automake's user-dep-gen-branch.
1041         * lib/xalloc.h (__attribute__): Apply 1999-10-03 change here, too.
1042         * src/sys2.h (__attribute__): Likewise.
1043         Wrap with #ifndef __attribute__.
1045 1999-10-03  Paul Eggert  <eggert@twinsun.com>
1047         * getdate.y (__attribute__): Define to empty if GCC claims to
1048         be before 2.8; this is needed for OPENStep 4.2 cc.  Also,
1049         define to empty if strict ANSI.
1051 1999-10-03  Jim Meyering  <meyering@ascend.com>
1053         Accept new option: --target-directory=DIR
1054         * src/mv.c (TARGET_DIRECTORY_OPTION): Define.
1055         (usage): Describe it.
1056         (main): Implement it.
1057         Remove unused variable, stdin_tty.
1058         Make code clearer:  use new variable `n_files' in place of
1059         `argc - optind'.  Use `file' instead of `argv + optind'.
1061 1999-09-28  Jim Meyering  <meyering@ascend.com>
1063         * src/system.h: Do s/#ifdef HAVE_/#if HAVE_/ -- solely for aesthetics.
1064         Do the same for other config.h macros like CLOSEDIR_VOID and MAJOR_*.
1065         * src/sys2.h: Likewise.
1067         * lib/xalloc.h (__attribute__): Protect against redefinition.
1068         From Akim Demaille.
1070 1999-09-26  Jim Meyering  <meyering@ascend.com>
1072         * lib/xmalloc.c (xalloc_die): Rename from xalloc_fail and
1073         update callers.
1074         Use explicit exit to help avoid warnings.
1075         From Akim Demaille.
1077         * lib/path-concat.c (DIRECTORY_SEPARATOR): Define.
1078         (ISSLASH): Define.
1079         (path_concat): Allow parameter DIR to be NULL.
1080         (xpath_concat): New function.
1081         From Akim Demaille.
1083         * lib/xalloc.h (__attribute__): Define.
1084         (ATTRIBUTE_NORETURN): Define.
1085         (xalloc_die): Declare.
1086         (NEW): Define as yet unused macro.
1087         (XFREE): Likewise
1088         (CCLONE): Likewise.
1089         (CLONE): Likewise.
1090         From Akim Demaille.
1092         * lib/basename.c (base_name): Add prototype.  From Akim Demaille.
1094 1999-09-19  Jim Meyering  <meyering@ascend.com>
1096         * lib/lchown.c [STAT_MACROS_BROKEN] (S_ISLNK): Undefine.
1097         (S_ISLNK): Define if necessary.
1098         This is necessary on a NEC SX-4 with SUPER-UX 9.1.
1099         Based on a patch from Holger Berger.
1101         * src/dd.c (siginfo_handler): Mark parameter with ATTRIBUTE_UNUSED.
1102         Change many counter and index variables to be of unsigned type.
1103         (dd_copy): Add new unsigned variable, n_bytes_read, in place of
1104         many uses of `nread'.
1106         * src/sys2.h (__attribute__): Define.
1107         (ATTRIBUTE_NORETURN): Remove #else clause.
1108         (ATTRIBUTE_UNUSED): Define.
1110 1999-09-17  Jim Meyering  <meyering@ascend.com>
1112         * configure.in (AC_REPLACE_FUNCS): Remove strdup, now that this
1113         is done in m4/jm-macros.m4.
1115 1999-09-09  Jim Meyering  <meyering@ascend.com>
1117         * src/touch.c (usage): Remove misleading sentence in --help output.
1118         From Karl Heuer.
1120         * src/Makefile.am (EXTRAdir): Remove unused variable.
1122 1999-09-03  Paul Eggert  <eggert@twinsun.com>
1124         * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
1125         Use EINVAL instead.
1127 1999-09-01  Jim Meyering  <meyering@ascend.com>
1129         * src/cp.c: Remove declaration of xstrdup.
1130         * src/df.c: Likewise.
1131         * src/ls.c: Likewise.
1133 1999-09-01  Akim Demaille  <akim@epita.fr>
1135         * lib/xmalloc.c (xalloc_fail_func): Use `PARAMS'.
1136         * lib/xalloc.h (xalloc_fail_func): Likewise.
1137         (xstrdup): Add protoype.
1139         * lib/version-etc.c (version_etc_copyright): Default copyright string.
1140         (version_etc): Use it.
1141         * lib/version-etc.h: Declare it.
1143 1999-08-29  Jim Meyering  <meyering@ascend.com>
1145         * configure.in (AC_YACC): Remove use, now that we require bison.
1147         * src/dircolors.hin: Add .rpm, .png, and .fli.
1148         From Andres Soolo.
1150 1999-08-28  Paul Eggert  <eggert@twinsun.com>
1152         * getdate.y: Add copyright notice.
1154         (number): Handle `Nov 11 1996' example; see Risks Digest 20.55
1155         http://catless.ncl.ac.uk/Risks/20.55.html#subj18
1156         (1999-08-27)
1158         (<stdio.h>): Include only if testing.
1159         (ISUPPER): Remove.
1160         (ISLOWER, PC): New macros.
1161         (<string.h>): Include if HAVE_STRING_H, not USG.
1162         (bcopy): Remove.
1163         (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
1164         bison.
1165         (EPOCH_YEAR): Renamed from EPOCH.
1166         (table): Renamed from TABLE.
1167         (meridian): Now an anonymous enum.
1168         (struct parser_control): New type.
1169         (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
1170         (yyInput, ..., yyRelYear): Migrated into struct parser_control.
1171         (%pure_parser): Added, so that the parser is pure.
1172         (%union): Removed; the type is now just plain int.
1173         All %type directives removed.
1174         (tLOCAL_ZONE): New %token.
1175         (month_day_table): Renamed from MonthDayTable.
1176         (gmtime, localtime, mktime, time): Declare only if not defined.
1177         (meridian_table): New table.
1178         (dst_table): New table.
1179         (units_table): renamed from UnitsTable.
1180         (relative_time_table): Renamed from OtherTable.
1181         (time_zone_table): Renamed from TimezoneTable.  Modernized data.
1182         (military_table): Renamed from MilitaryTable.
1183         (to_hour): Renamed from ToHour.
1184         (to_year): Renamed from ToYear.
1185         (lookup_zone): New function.
1186         (LookupWord): Renamed from lookup_word.
1187         Use lookup_zone for time zones.
1188         (yylex): Now reentrant.  All callers changed.
1189         (get_date): Add support for local time zone abbreviations.
1190         Make it reentrant.
1192 1999-08-22  Jim Meyering  <meyering@ascend.com>
1194         * src/sys2.h (IF_LINT): Define new macro.
1195         * src/df.c (main): Rename locals i and j.
1196         Use IF_LINT macro instead of #ifdef lint...
1198         * src/dd.c (parse_integer): Add `const' to char* parameter and
1199         add a separate `suffix' variable.
1201 1999-08-20  Jim Meyering  <meyering@ascend.com>
1203         * src/chown.c (usage): Tweak --help output to make it more consistent
1204         with that of chgrp.
1205         * src/chgrp.c (usage): Tweak --help output to make it more consistent
1206         with that of chown.
1208 1999-08-17  Jim Meyering  <meyering@ascend.com>
1210         * configure.in: Remove check for rename and the code that would
1211         enable building of the `mvdir' program.
1212         * src/Makefile.am (libexec_PROGRAMS): Remove reference to @MVDIR@.
1213         (EXTRA_PROGRAMS): Remove obsolete mvdir.
1214         * lib/rename.c: Remove obsolete file. (it had a bug, too)
1215         * src/mvdir.c: Remove obsolete file.
1216         * po/POTFILES.in: Remove mvdir.c
1218         * doc/fileutils.texi (chown, chgrp invocation): Make these sections
1219         consistent with each other.
1221 1999-08-16  Jim Meyering  <meyering@ascend.com>
1223         * src/chown.c (groupname): Declare to be `const'.
1224         (change_dir_owner): Declare statp parameter to be `const'.
1225         (usage): Make the output be more consistent with that from chgrp.
1227         This change is nearly identical to the chown.c change of 1998-05-24
1228         * src/chgrp.c: Accept new option, --dereference.
1229         --no-dereference is now the default. Include lchown.h.
1230         (enum Change_status) [CH_NOT_APPLIED]: New member.
1231         (change_symlinks): Enable this by default, now.
1232         (describe_change): Handle new case.
1233         (change_file_group): Add new parameter: cmdline_arg.  Update callers.
1234         Reorganize to reflect changed semantics.
1235         (LCHOWN): Remove definitions.
1236         From Bruno Haible.
1238 1999-08-10  Jim Meyering  <meyering@ascend.com>
1240         * po/POTFILES.in: Add lib/quotearg.c.
1242 1999-08-09  Paul Eggert  <eggert@twinsun.com>
1244         * NEWS, doc/fileutils.texi, src/ls.c (usage):
1245         Add ls --quoting-style=locale.
1247         * lib/argmatch.c (ARGMATCH_QUOTING_STYLE):
1248         Change from escape_quoting_style to locale_quoting_style.
1249         (argmatch_invalid): Use new quotearg_style primitive for simplicity.
1250         Also, use ARGMATCH_QUOTING_STYLE to quote, instead of quoting ourselves.
1252         * lib/quotearg.h (locale_quoting_style): New enum value.
1253         (quotearg_n_style, quotearg_style): New decls.
1255         * lib/quotearg.c: Include <libintl.h> if ENABLE_NLS.
1256         (_): New macro.
1257         (quoting_style_args, quoting_style_v, quotearg_buffer): Add support
1258         for locale_quoting_style, using _("`") and _("'") for open and close
1259         quote symbols.
1260         Do not quote spaces in escape_quoting_style.
1261         (quotearg_n_style, quotearg_style): New functions.
1263 1999-08-08  Jim Meyering  <meyering@ascend.com>
1265         * src/touch.c (usage): Clarify description of --time=WORD.
1266         From Karl Berry.
1268         * lib/savedir.c (savedir): Change type of name_size parameter to off_t.
1269         * lib/savedir.h (savedir): Update prototype.
1270         * src/chmod.c (change_dir_mode): Remove cast of savedir arg.
1271         * src/chown.c (change_dir_owner): Likewise.
1272         * src/chgrp.c (change_dir_group): Likewise.
1273         * src/copy.c (copy_dir): Likewise.
1274         * src/du.c (count_entry): Likewise.
1275         Suggestion from Bob Proulx.
1277 1999-08-07  Jim Meyering  <meyering@ascend.com>
1279         * po/POTFILES.in: Add lots of lib/*.c files.
1280         Remove src/cp-hash.c, since it doesn't use _().
1282 1999-08-04  Jim Meyering  <meyering@ascend.com>
1284         * configure.in: Remove getline-testing code.  Now it's in m4/.
1286 1999-08-01  Paul Eggert  <eggert@twinsun.com>
1288         * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS.
1290 1999-07-30  Jim Meyering  <meyering@ascend.com>
1292         * src/ls.c (usage): Explain about default wrt --hide-control-chars and
1293         --show-control-chars.  Reported by Germano Leichsenring.
1295 1999-07-28  Jim Meyering  <meyering@ascend.com>
1297         * configure.in (ALL_LINGUAS): Add Brazilian Portuguese (pt_BR).
1299 1999-07-24  Jim Meyering  <meyering@ascend.com>
1301         * src/dd.c (PTR_ALIGN, ROUND_UP_OFFSET): New macros.
1302         (dd_copy): Use those to page-align both the input and output buffers.
1304 1999-06-01  Volker Borchert  <bt@teknon.de>
1306         * tests/Makefile.am: Make envvar-check depend on check-recursive rather
1307         than on `check' so that its tests are performed before any real tests.
1309 1999-07-15  Jim Meyering  <meyering@ascend.com>
1311         * src/dd.c: Include getpagesize.h.
1312         (dd_copy): Page-align the input buffer.
1313         Based on a patch from Scott Lurndal.
1315         * getpagesize.h: New file.
1316         * lib/Makefile.am (noinst_HEADERS): Add getpagesize.h.
1318         * lib/fsusage.c (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]:
1319         Work around SunOS botch also when block size is different from 1k.
1320         From Jürgen Fluk.
1322 1999-07-10  Jim Meyering  <meyering@ascend.com>
1324         * man/help2man: Import version 1.012.
1326 1999-07-04  Jim Meyering  <meyering@ascend.com>
1328         * lib/xstrtol.c [!defined strtoumax]: Declare strtoumax.
1330 1999-07-04  Paul Eggert  <eggert@twinsun.com>
1332         * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
1333         expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
1334         (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
1335         the above decl.
1337 1999-06-27  Paul Eggert  <eggert@twinsun.com>
1339         Fix some incompatibilities between `df -P' and POSIX.2.
1341         * lib/human.h (enum human_inexact_style): New enum.
1342         (human_readable_inexact): New decl.
1344         * lib/human.c (human_readable): New function.
1345         (human_readable_inexact): Renamed from human_readable, with new arg
1346         INEXACT_STYLE.  Add support for ceiling and floor.
1348         * src/df.c (print_header): Conform to POSIX if posix_format).
1349         (df_readable): Take ceiling if posix_format.
1350         (ceil_percent): New function.
1351         (show_dev): Take ceiling of percent if posix_format.
1352         Align with POSIX-conforming header if posix_format.
1354         * doc/fileutils.texi: Document these changes.
1356 1999-05-27  Volker Borchert  <bt@teknon.de>
1358         * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix.
1360 1999-05-23  Jim Meyering  <meyering@ascend.com>
1362         * src/copy.c (copy_internal): Don't apply the umask in move_mode.
1363         Otherwise, `mv' would not preserve the permissions when copying
1364         between partitions.  Reported by David Godfrey
1366         * Version 4.0i.
1368         * tests/cp/same-file: Correct erroneous expected output from
1369         the `cp -f foo foo' tests.
1370         * po/POTFILES.in: Add same.c.
1371         * lib/same.h: New file.
1372         * lib/same.c: New file (function extracted from ln.c).
1373         * lib/Makefile.am (libfu_a_SOURCES): Add same.c.
1374         (noinst_HEADERS): Add same.h.
1375         * src/copy.c: Include same.h.
1376         * src/ln.c (same_name): Remove function.
1377         <same.h>: Include this instead.
1378         <dirname.h>: No longer include this.
1379         * tests/mv/force: Be sure we still allow `mv -f FILE LINK-TO-FILE'.
1381         * src/copy.c (copy_internal): Make it so `cp/mv -f FILE FILE' does not
1382         remove FILE.  Suggestion from Chris Yeo.
1383         * tests/mv/force: New test, for the above fix.
1384         * tests/mv/Makefile.am (TESTS): Add force.
1385         (TESTS_ENVIRONMENT): Change PATH to be absolute.
1387         * tests/mv/force (mv): New test.
1389 1999-05-17  Paul Eggert  <eggert@twinsun.com>
1391         * lib/getdate.y (get_date): Let mktime deduce tm_isdst if we
1392         have an absolute timestamp, or if the relative timestamp
1393         mentions days, months, or years.  Reported by Volker Borchert.
1395         * lib/human.c (human_readable): Allow from_block_size to be zero.
1397 1999-05-14  Jim Meyering  <meyering@ascend.com>
1399         * tests/Makefile.am (envvar-check): Renamed from check-local.
1400         (check): Depend on envvar-check so the envvar check is performed
1401         before all other tests.  Reported by Volker Borchert.
1402         * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects,
1403         so CDPATH is mentioned in the message.  Reported by Volker Borchert.
1405         * src/df.c (main): When asking for info on an explicit file name,
1406         just warn rather than failing if the table of mounted filesystems
1407         cannot be read.  Based on a patch from Mark Kettenis.
1409         * lib/version-etc.c (version_etc): Put version info and author names
1410         on the first two lines respectively rather than putting the three
1411         lines of copyright info between them.
1413         * src/touch.c (open_maybe_create): Handle Solaris' failure mode when
1414         FILE is a directory.  Reported by Vin Shelton.
1416         * lib/human.c: Include <string.h> or <strings.h> for strlen prototype.
1417         * lib/getline.h [__GLIBC__ >= 2]: #if-out prototypes.
1418         * src/remove.c (pop_dir): Cast length to `int' to avoid a warning on
1419         64-bit systems.  From Ulrich Drepper.
1421 1999-05-12  Jim Meyering  <meyering@ascend.com>
1423         * src/shred.c (main): Put `u' for -u in getopt_long's string argument.
1424         Remove the `R'.
1426 1999-05-07  Jim Meyering  <meyering@ascend.com>
1428         * Version 4.0h.
1430         * tests/touch/dir-1: New test.
1431         * tests/touch/Makefile.am (TESTS_ENVIRONMENT): Remove individual
1432         upper-case program names.  Add a definition of PATH.
1433         (TESTS): Add dir-1.
1435         * src/mkdir.c (main): Use better wording in diagnostic: `cannot
1436         create directory' rather than `cannot make directory'.  The former
1437         also matches the one in makepath.c.
1439         * src/dd.c: (apply_translations): Use TOUPPER and TOLOWER,
1440         not toupper and tolower.
1442 1999-05-05  Jim Meyering  <meyering@ascend.com>
1444         * lib/makepath.c (make_dir): When reporting a mkdir failure and the
1445         target cannot be `stat'ed, use the errno from the failed mkdir call,
1446         not the one from the stat call.  Before this change, running
1447         `mkdir -p /no-dir/no-dir' as an unprivileged user would wrongly
1448         elicit `No such file or directory' instead of `Permission denied'.
1450         * lib/strtol.c (TYPE_SIGNED, TYPE_MAXIMUM, TYPE_MINIMUM): Define.
1451         (ULONG_LONG_MAX, LONG_LONG_MAX, LONG_LONG_MIN): Define if not defined.
1452         Based on a patch from Kaveh Ghazi.
1454         * src/ls.c (USE_ACL): Define this only #if
1455         (HAVE_SYS_ACL_H && HAVE_ACL && defined GETACLCNT).
1456         Use `USE_ACL' in place of `HAVE_ACL' everywhere else.  From Kaveh Ghazi.
1458 1999-05-04  Jim Meyering  <meyering@ascend.com>
1460         * lib/makepath.c: Include makepath.h libintl.h, not after it.
1461         Otherwise, we'd get the wrong definition of PARAMS from libintl.h.
1462         (The method of defining PARAMS in libintl.h doesn't check PROTOTYPES,
1463         which is necessary on Irix4 since cc doesn't define __STDC__.)
1464         From Kaveh Ghazi.
1466 1999-04-30  Jim Meyering  <meyering@ascend.com>
1468         * Makefile.maint: Define several tag-related make variables.
1469         (cvs-dist): Use the make variables instead of shell ones.
1470         (announcement): Automatically generate diffs for all ChangeLog files,
1471         not just the top level one.
1473 1999-04-30  Paul Eggert  <eggert@twinsun.com>
1475         * lib/dup2.c: New file.
1477 1999-04-30  Jim Meyering  <meyering@ascend.com>
1479         * src/touch.c (touch): Only do the fstat if we need to.
1480         Resort to calling stat for directories, but only when necessary.
1481         (usage): Mention --no-create.
1483         * src/copy.c (copy_internal): Move the one-file-system test so that
1484         it follows the `if (new_dst || !S_ISDIR (dst_sb.st_mode))' block.
1485         Prior to this change, `cp --one-file-system' would traverse a file-
1486         system boundary if the destination directory existed.  From Ton Hospel.
1488 1999-04-27  Paul Eggert  <eggert@twinsun.com>
1490         * src/dd.c: Always use STDIN_FILENO for input and STDOUT_FILENO
1491         for output, to avoid confusion with closed input and output fds.
1492         (input_fd, output_fd): Remove; all uses changed to STDIN_FILENO
1493         and STDOUT_FILENO.
1494         (open_fd): New function.
1495         (main): Use it, instead of open, to ensure that file descriptors
1496         don't get confused.
1498 1999-04-26  Paul Eggert  <eggert@twinsun.com>
1500         * src/ls.c (decode_switches): Use STDIN_FILENO, STDOUT_FILENO instead
1501         of 0, 1.
1503         * src/dd.c (skip): Don't fstat the input file; the result is
1504         no longer used.
1506 1999-04-26  Jim Meyering  <meyering@ascend.com>
1508         * tests/mv/into-self-2: Update to reflect this change by reversing
1509         the order of arguments so the symlink is the source, not the
1510         destination (otherwise, the mv command would now succeed).
1512         * src/copy.c (copy_internal): Don't make `mv foo symlink-to-foo' fail.
1513         That is, even though source and destination are `the same,' don't fail
1514         if the destination is a symlink.  From Peter Samuelson.
1516 1999-04-26  Paul Eggert  <eggert@twinsun.com>
1518         * src/dd.c (main): If you can't open an output file (with
1519         seek=...) read-write, then open it for write and report an
1520         error if we can't seek.
1522         * lib/filemode.c (setst, ftypelet, mode_string):
1523         * lib/mkdir.c (mkdir):
1524         * lib/makepath.c (make_path):
1525         * lib/modechange.c (make_node_op_equals, mode_compile,
1526           mode_create_from_ref, mode_adjust):
1527         * lib/modechange.h (mode_adjust):
1528         * src/chmod.c (describe_change, change_file_mode):
1529         * src/copy.c (copy_reg, copy_internal):
1530         * src/copy.h (struct cp_options.umask_kill):
1531         * src/cp.c (do_copy, cp_option_init, main):
1532         * src/dd.c (main):
1533         * src/install.c (mode, cp_option_init, DIR_MODE):
1534         * src/mkdir.c (main):
1535         * src/mkfifo.c (main):
1536         * src/mknod.c (main):
1537         * src/mv.c (cp_option_init):
1538         * src/touch.c (open_maybe_create):
1539         Use proper mode_t types and macros.
1540         Don't assume the traditional Unix values for mode bits.
1542         * lib/filemode.c (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH,
1543         S_IXOTH): Define if not defined.
1544         (rwx): Remove.
1545         * lib/mkdir.c (S_IRWXU, S_IRWXG, S_IRWXO): Define if not defined.
1546         * lib/makepath.c (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRWXU):
1547         Define if not defined.
1548         * src/system.h (S_ISUID, S_ISGID, S_ISVTX, S_IRWXU, S_IRWXG, S_IRWXO):
1549         Define if not defined.
1550         (CHMOD_MODE_BITS): New macro.
1551         * src/install.c (isodigit): Remove unused macro.
1553         * src/mkfifo.c, src/mknod.c (usage):
1554         Use symbolic mode as default, not octal.
1556         * lib/utime.c (utime_null):
1557         Don't pass 0666 to open; it's not needed and isn't
1558         guaranteed to be portable.
1560         * lib/filemode.h: <config.h>, <sys/types.h>: Include for mode_t.
1561         (mode_string): Now takes mode_t.
1563         * lib/modechange.h: Include <config.h>, <sys/types.h> for mode_t.
1564         (struct mode_change): Members affected and value are now mode_t instead
1565         of unsigned short.
1567         * doc/fileutils.texi, doc/perm.texi:
1568         Don't assume traditional Unix mode numbering.
1570         * lib/modechange.c: modechange.h now includes sys/types.h.
1571         Include xstrtol.h.
1572         (isodigit, oatoi): Remove.
1573         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP,
1574         S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRWXU, S_IRWXG,
1575         S_IRWXO): Define if not defined.
1576         (CHMOD_MODE_BITS): New macro.
1577         (mode_compile): Convert from octal with xstrtoul, not our own routine.
1579 1999-04-24  Jim Meyering  <meyering@ascend.com>
1581         * Version 4.0g.
1583 1999-04-22  Jim Meyering  <meyering@ascend.com>
1585         * src/shred.c (word32): Don't use `#error'; it runs afoul of
1586         SunOS 4.1.4 cc.  From Paul Eggert.
1588         * lib/strtoull.c: Guard strong_alias and weak_alias with #ifdef _LIBC.
1590 1999-04-20  Paul Eggert  <eggert@twinsun.com>
1592         Replace our temporary hack implementation of strtoumax with
1593         something very close to the real code in glibc.
1595         * lib/xstrtoumax.c: Remove the temporary strtoumax replacement;
1596         we now have a true replacement in strtoumax.c.
1597         (__strtol): Always define to strtoumax.
1598         (<stdlib.h>): No need to include.
1599         (PARAMS): Remove.
1600         (my_strtoumax): Move this to strtoumax.c,
1601         rename it to strtoumax, and simplify.
1603         * lib/strtoull.c, lib/strtoumax.c: New files.
1605         * lib/strtol.c: Update to glibc 2.1.1 version.
1607 1999-04-20  Jim Meyering  <meyering@ascend.com>
1609         * tests/Makefile.am (EXTRA_DIST): s/posix-warn/env-warn/.
1610         (check-local): Also test and warn if CDPATH is set.
1612 1999-04-20  Paul Eggert  <eggert@twinsun.com>
1614         * configure.in (AC_CANONICAL_HOST): Add; needed for new AC_LFS's
1615         cross-compilation.
1616         * config.guess: New file (from autoconf).
1617         * config.sub: New file (from autoconf).
1619         * src/shred.c <config.h>: Include first, since it can do
1620         things like #define const, and this must be done before
1621         including any system headers.
1623         * lib/xstrtoumax.c (my_strtoumax): Fix typo in computing
1624         whether overflow occurred.  Improve overflow-detection to use
1625         only one conditional branch total, rather than 2N+1
1626         conditional branches for an N-digit number.
1628 1999-04-18  Jim Meyering  <meyering@ascend.com>
1630         * configure.in (AC_CHECK_FUNCS): Remove strtoull, strtoumax, and
1631         strtouq, now that they're checked in m4/xstrtoumax.m4.
1633 1999-04-18  Paul Eggert  <eggert@twinsun.com>
1635         * doc/fileutils.texi, src/shred.c (main, longopts):
1636         Use -u instead of -R for --remove, so that we can preserve
1637         future compatibility with rm.
1639 1999-04-18  Jim Meyering  <meyering@ascend.com>
1641         * src/shred.c [!HAVE_CONFIG_H] (ST_BLKSIZE): Define to 65536.
1642         (do_wipefd): Use ST_BLKSIZE instead of referring to the st_blksize
1643         member directly.
1645 1999-04-18  Paul Eggert  <eggert@twinsun.com>
1647         Fix shred to do the right thing with off_t longer than long.
1648         Merge large-integer parsing code with similar code in dd.c,
1649         and put the resulting in lib/xstrtoumax.c so that other programs
1650         can use it.  Instead of adding a new lib/xstrtoumax.h I thought
1651         it cleaner to put all the xstroto* declarations into a single
1652         header, which for now is lib/xstrtol.h for lack of a better place.
1653         (Mayby lib/xstdlib.h would be better?  :-)
1655         I thought of several other problems with shredding regular files;
1656         shredding devices is much more reliable.  So I changed the defaults
1657         to be more suitable for shredding devices; this should help encourage
1658         users to do the right thing.
1660         pfstatus isn't portable to environments with varying width
1661         fonts, or with internationalized environments where the byte
1662         count of the message is not the same as its print width.
1663         Rather than deal with this, I just simplified it to not do
1664         tricks with carriage-returns and spaces.  (I'm also worried
1665         that vprintf may not return the right value on some hosts; I
1666         vaguelly recall this being a problem.)  As a result, -v and -
1667         no longer conflict.
1669         When removing a special file, try to truncate it first, but don't
1670         worry if this reports an error.
1672         Try to find the size of a non-regular file by seeking to its end.
1674         Various porting fixes, mostly because of a port to SunOS 4.1.4 cc.
1676         Some other minor bug fixes.
1678         * lib/xstrtoul.h: Remove this file.
1679         * lib/xstrtoumax.c: New file.
1681         * configure.in (AC_CHECK_FUNCS): Add strtoull, strtoumax, strtouq.
1683         * lib/xstrtoul.c (STRING_TO_UNSIGNED): Remove.
1684         (__strtol, __strtol_t, __xstrtol): New macros.
1686         * lib/xstrtol.c (__strtol, __strtol_t, __xstrtol):
1687         New macros to specify the
1688         underlying function, its returned type, and our function.  Default to
1689         values suitable for xstrtol.
1691         Include <ctype.h>, since we use its macros.
1693         (ULONG_MAX, LONG_MAX, ISBLANK): Remove: no longer needed.
1694         (ISSPACE): New macro.
1696         (bkm_scale, bkm_scale_by_power, __xstrtol, main): __unsigned long int
1697         -> __strtol_t.
1699         (__xstrtol): Depend on whether __strtol_t is an unsigned type, not on
1700         whether STRING_TO_UNSIGNED is defined.  Skip isspace chars, not
1701         isblank chars, to match strtol.  When returning
1702         LONGINT_INVALID_SUFFIX_CHAR, store the value that we computed into
1703         *val.
1705         * lib/xstrtol.h (__xstrtol, __strtol, __unsigned): Remove macro decls.
1706         <inttypes.h>: Include if HAVE_INTTYPES_H.
1707         (_DECLARE_XSTRTOL): New macro.
1708         (xstrtol, xstrtoul, xstrtoumax): Declare all three functions, so that
1709         we need only one include file, not three.
1710         (_STRTOL_ERROR): Do not undef, as this is no longer needed.
1711         Reword overflow message so that it's independent of type.
1713         * lib/Makefile.am (libfu_a_SOURCES): Add xstrtoumax.c.
1714         (noinst_HEADERS): Remove xstrtoul.h.
1716         * lib/xmalloc.c (xalloc_fail):
1717         Pass xalloc_msg_memory_exhausted through gettext.
1719         * lib/getdate.y:
1720         <stdlib.h>: Include if HAVE_STDLIB_H, since bison 1.27 invokes "free".
1721         (LookupWord, yylex): Don't pass negative char to ctype macros.
1723         * doc/fileutils.texi:
1724         Explain why shredding devices is more reliable, and why the
1725         default options are more suitable for devices.
1727         Remove withdrawn options -b or --no-contents, -c or --freed-contents,
1728         -C or --all-contents, -k or --no-links, -l or --ordinary-links, -L or
1729         --all-links.
1731         Add -R or --remove, -s or --size.
1733         -v can no longer be doubled.
1735         `file system' --> `filesystem' uniformly.
1737         * src/chgrp.c: Include xstrtol.h, not obsolete file xstrtoul.h.
1739         * src/shred.c: Include xstrtol.h, not obsolete file xstrtoul.h.
1740         "human.h", "xalloc.h": Include.
1741         (attribute): Remove; no longer needed.
1742         (xstrdup): New decl.
1743         (STDOUT_FILENO): New macro.
1744         (O_NOCTTY): Make sure it's always defined, even if HAVE_CONFIG_H.
1746         The following changes have effect only if !HAVE_CONFIG_H.
1747         <ctype.h>: New include.
1748         (RETSIGTYPE): Remove bogus semicolon at end.
1749         (STDOUT_FILENO, uintmax_t, human_readable, LONGEST_HUMAN_READABLE):
1750         New macros.
1751         (xstrtoumax): Renamed from xstrtoul, with corresponding type changes.
1752         Handle suffixes like the real routine does.
1753         (error): Remove bogus assignment of errno to errnum.
1754         (xmalloc, xstrdup): New functions.
1756         (O_NOCTTY): Define even if !HAVE_CONFIG_H.
1757         (S_ISFIFO, S_ISSOCK): New macros, if not already defined.
1758         (OUTPUT_BLOCK_SIZE): New macro.
1759         (struct Options.verbose): Now a boolean, since we no longer have two
1760         levels of verbosity.
1761         (long_opts, usage, main): Remove -D or --device option.  Invert -p or
1762         --preserve option, and rename it to -R or --remove.
1763         (usage): Describe G suffix.
1764         (usage): "-" no longer conflicts with -v.
1765         (UCHAR_MAX): Indent `#error' so that SunOS 4.1.4 cc doesn't reject it.
1766         (ind): Portability fixes: return word32, not unsigned; multiply by
1767         sizeof (word32) instead of shifting left by 2.
1768         (isaac_refill, isaac_mix): Comment out size of array parameter, as
1769         ansi2knr mishandles this.
1770         (status_visible, status_pos, pfstatus, flushstatus): Remove, since
1771         pfstatus isn't portable to users with varying width fonts, or
1772         internationalized messages, and vfprintf is problematic.  All callers
1773         of pfstatus changed to use error instead; this removes incompatibility
1774         of -v with -.  All calls to flushstatus removed.
1775         (dopass, do_wipefd): Do not translate non-English msgs with gettext.
1777         (dopass): Cast lseek constant arguments to (off_t) for benefit
1778         of pre-ANSI compilers; fix one lseek call whose args were interchanged.
1779         Remove unnecessary casts to (off_t).  Do not check for EIO
1780         when determining file size; this was just my earlier wild guess.
1781         Use human_readable to print off_t, instead of casting to unsigned long
1782         (which doesn't work in Solaris 2.6, where off_t is longer than long).
1783         Output human-readable sizes, instead of always using "K".
1784         Check for offset overflow (it happened to me in SunOS 4.1.4).
1785         (do_wipefd): Do not insist on regular files, but do check for special
1786         files that cannot possibly be shredded.
1787         Use xmalloc instead of malloc + check.
1788         Do not inspect st_size for non-regular files.
1789         Try to find the size of a non-regular file by seeking to its end.
1790         Do not assume that a regular file of size-0 has unknown size.
1791         Check for regular files with negative sizes,
1792         and for overflow after rounding to next block.
1793         Always try to truncate, even for special files, but do not report an
1794         error if truncation fails on a special file.
1796         (dopass, wipefile): Do not return 1 for special files; the caller
1797         doesn't care any more.
1799         (wipefd): Remove unnecessary (and nonportable) check for
1800         whether the file descriptor is read-only.  Remove
1801         no-longer-needed check for `-v -'.
1803         (incname): Return 1 for carry bit, like the documentation says.
1805         (wipename, wipefile): Accept new argument, specifying the
1806         quoted file name.  All callers changed.
1808         (wipename): Use xstrdup instead of strdup+error check.
1810         (wipefile): Check for ENOTDIR when opening /dev/fd/NNN. Check for
1811         errors in NNN more carefully. Restore errno after the check.
1812         Check for errors when closing the file descriptor.
1813         Use more consistent wording when unable to remove a file.
1815         (main): Do not remove files by default.
1816         Use xstrtoumax instead of xstrtoul uniformly, since xstrtoul won't
1817         exist if !HAVE_CONFIG_H.
1818         In diagnostics, quote invalid operands to -n and -s options.
1819         Allow T, P, E, Z, and Y suffixes in -s operand.
1820         flags.verbose is now a boolean, not a counter.
1821         Use STDOUT_FILENO instead of 1, for clarity.
1823         * lib/human.c:
1824         Include xstrtol.h, not xstrtoul.h, since xstrtol.h now defines all the
1825         xstrto... functions.
1827         * src/dd.c: Include xstrtol.h.
1828         (parse_integer): Migrate most of the work into the new xstrtoumax fn.
1830         * lib/xstrtoumax.c: New file.
1832 1999-04-18  Jim Meyering  <meyering@ascend.com>
1834         * src/dd.c (main): Open the output file with *read* access
1835         only if we might need to read to satisfy a `seek=' request.
1836         From Matthias Urlichs.
1838 1999-04-10  Jim Meyering  <meyering@ascend.com>
1840         * Makefile.maint (alpha): Add trailing slash for ncftp.
1842         * Version 4.0f.
1844         * configure.in (AC_OUTPUT): Add tests/dd/Makefile.
1845         * tests/Makefile.am (SUBDIRS): Add dd.
1846         * tests/dd: New directory
1847         * tests/dd/misc: New file.
1849         `ls --color' would segfault
1850         * src/ls.c: Include assert.h.
1851         (color_indicator[]): Add an entry for the type, `door.'
1852         (main): Assert that the lengths of the color_indicator and
1853         indicator_name arrays are appropriately related.
1854         Reported by John Gotts.
1856         * src/dd.c (scanargs): Fix bug introduced with last change: now that
1857         the loop is gone, manually decrement argc and increment argv.
1858         Reported by Andreas Jaeger and jvogel@linkny.com.
1860 1999-04-07  Jim Meyering  <meyering@ascend.com>
1862         * lib/getdate.y (difftm): Protoize.
1864 1999-04-06  Jim Meyering  <meyering@ascend.com>
1866         * lib/strftime.c: Update from master source in libc.
1868 1999-04-04  Jim Meyering  <meyering@ascend.com>
1870         * tests/ln/misc: Comment out the test added on 1999-01-31.
1872         * Makefile.maint (url_dir_list): Define properly.
1873         (real_dir_list): Likewise.
1875         * src/shred.c: Don't include string.h.
1876         [!HAVE_CONFIG_H]: Include string.h here.
1877         [!HAVE_CONFIG_H]: Hard-code RETSIGTYPE to `int'.
1878         (sigill_handler): Change return type and type of local `oldhandler' to
1879         RETSIGTYPE.
1880         (isaac_seed_machdep): Change and type of local `oldhandler' to
1881         RETSIGTYPE.
1882         From Colin Plumb.
1884         * Version 4.0e
1886         * tests/cp/same-file: Change the sed command used to extract the
1887         filename from ls -l output, to accommodate the change in format.
1889         * src/ls.c (print_long_format): Add a space between %s and %3u.  This
1890         assures that even when modebuf has the trailing `+' and there are more
1891         than 99 hard links to a file, the permissions string and the link count
1892         will be separated.
1894 1999-04-03  Jim Meyering  <meyering@ascend.com>
1896         * src/shred.c (dopass): add curly braces to avoid warning about
1897         ambiguous `else'.
1898         (wipefd): Add parentheses suggested by gcc.
1899         (do_wipefd): Remove declaration of unused local.
1901 1999-04-02  Colin Plumb  <colin@nyx.net>
1903         * shred.c [!HAVE_CONFIG_H] (xstrtoul, error, close_stdout): Added stubs
1904         to allow standalone compilation.
1906         (wipefile): Added support for emulating /dev/fd/# files even if
1907         the OS doesn't support them.  From Paul Eggert.
1909         (main, usage): Changed --device short option to -D.
1911         (wipefd, do_wipefd): Renamed function to do_wipefd and added
1912         separate wipefd that performs sanity checks on externally-opened file
1913         descriptors, such as not append-only.  From Paul Eggert.
1915         (do_wipefd, isaac_seedfd): Do not read file for any reason.
1916         if the file is low-entropy, it's a security hole.
1917         (wipefile) Changed to open O_WRONLY and chmod to write-only when
1918         forcing.
1919         (isaac_seedfd) Function deleted as unnecessary.
1920         From Paul Eggert.
1922         (dopass): Dynamically fall back to fsync() if fdatasync() fails,
1923         since POSIX, in their infinitesimal wisdom, encourage implementations
1924         that return constant -1, making compile-time testing useless.
1925         From Paul Eggert.
1927         (dopass): Changed to support a size of -1 to mean "unknown".
1928         This entailed changing to a counting-up offset rather than couting-down
1929         cursize for the central state variable.  Also changed size argument to
1930         be call-by-reference so that it can be passed back once known.
1931         (sizer) Function deleted as unnecessary.
1932         (wipefd): Changed to match.  From Paul Eggert
1934         (dopass): Try to skip over bad blocks in destination files.
1935         Also added ftruncate() for more complete destruction of metadata.
1937         (main, usage): Changed "-" to stand for standard output.
1938         (wipefd): Added error message to detect conflict with -v.
1940         (dopass): Added periodic fsync() calls to keep the pass progress
1941         display in sync with reality.  Hopefully they're sufficiently far spaced
1942         that throughput isn't affected.  It might be a good thing to do even in
1943         non-verbose mode, to avoid filling up the kernel caches with dirty data.
1944         Also added ftruncate() for more complete destruction of metadata.
1946         (quotearg_colon): New function to print
1947         pathological filenames properly.
1948         [!HAVE_CONFIG_H] (quotearg_colon_buf) New internal helper function
1949         that does most of the work.
1950         (wipefd, do_wipefd, dopass) Now take a qname (pre-quoted name) argument.
1951         (wipename, wipefile, main) Changed diagnostics to use quotearg_colon.
1952         Error messages are also in a more uniform format.
1953         From Paul Eggert.
1955         (struct Options, main, do_wipefd): Added -s/--size=N flag.
1956         (xstrtoul): Added support for valid_suffixes to help this.
1957         (usage) Documented it.
1959         (error): Changed some arguments from N_() to _(), since error()
1960         does not translate its argument.  I think this is a bug.
1962         (struct Options do_wipefd, wipefd, wipefile, main): moved passes
1963         argument into the Options structure as n_iterations, which is now a
1964         size_t.  From Paul Eggert.
1966         (isaac_seed_start, isaac_seed_data, isaac_seed_finish): New functions
1967         to manage seeding of RNG with arbitrary-sized data.
1968         (isaac_init): commented out as dead code.
1969         (isaac_seed): changed to use new functions to prevent any possibility of
1970         a buffer overflow.
1972         (isaac_seed): Added support for Solaris' gethrtime()
1973         configure.in: Corresponding feature test.  From Paul Eggert.
1975         (wipename): Change remove() to unlink() for speed & portability.
1976         Use lstat() instead of access() to see if a filename is taken.  This
1977         works even on dangling symlinks and avoids the suid problems of
1978         access(2).  From Paul Eggert.
1980         (isaac_seed_machdep): New function for reading cycle counters
1982 1999-04-02  Paul Eggert  <eggert@shade.twinsun.com>
1984         * configure.in (AC_CHECK_FUNCS): Add gethrtime.
1986         * src/shred.c (isaac_seed): Don't overrun the s->mm buffer.
1987         Use gethrtime if available.  Don't assume that clock_gettime succeeds.
1988         Put most random sources first.
1990 1999-04-02  Paul Eggert  <eggert@twinsun.com>
1992         shred: Add new options -bcCklL and fix some porting problems.
1993         Remove options -dp.  Do not read output files.
1995         * src/shred.c (long_opts, usage, main, wipefile): Adjust to
1996         new options.
1997         ("human.h", "quotearg.h"): New includes.
1998         (struct Options): New members contents, links, n_iterations.
1999         Remove allow_devices, remove_file.  Change n_iterations to size_t.
2000         All uses changed.
2001         (output_block_size): New var.
2002         (usage): Declare __noreturn__ attribute.
2003         (fdatasync): Define to -1 if not present, since we need to invoke both
2004         fdatasync and fsync if both are present.  All invokers of fdatasync
2005         now try fdatasync, then fsync.
2006         (MIXIN): New macro.
2007         (isaac_seed): Use it to mix in values.  Add uid, gid to mix.
2008         Don't use gettimeofday, as it has too many porting problems.
2009         (isaac_seedfd): Remove, since we no longer read the output files.
2010         (sizefd): Remove; we now determine size by writing sequentially.
2011         (dopass, wipename, wipefile, main): Clean up error messages.
2012         (dopass): Keep track of offset relative to start of file, not
2013         end, since we may not know how large the file is.  If size is
2014         negative, write until we fall off the end of the file.
2015         (wipefd): Do not read output file.
2016         Return 0 if successful, -1 if not; do not make a special case for
2017         non-regular files, since our callers have that info now.
2018         (wipename): Now static.  Return errno if error.
2019         (main): "-" now stands for standard output.
2020         Do not shred append-only standard output.
2021         (wipefile): Do not grant read permission to file when wiping it.
2022         Use symbolic permission (S_IWUSR), not octal.
2024         * src/system.h (S_IWUSR): Define if not already defined.
2026         * configure.in (AC_SEARCH_LIBS): Prefer rt to posix4, for Solaris 7.
2027         (AC_CHECK_FUNCS): Remove gettimeofday.
2029         * doc/fileutils.texi: Document recent changes.
2031 1999-04-01  Jim Meyering  <meyering@ascend.com>
2033         * configure.in (AC_CHECK_FUNCS): Add acl.
2034         (AC_CHECK_HEADERS): Add sys/acl.h.
2035         * src/ls.c [HAVE_SYS_ACL_H]: Include sys/acl.h.
2036         (struct fileinfo): New member `have_acl'.
2037         (gobble_file): Initialize it.
2038         (print_long_format): Use it.
2039         Mostly from Alen Muzinic.
2041         * src/touch.c (open_maybe_create): New function.
2042         (touch): Rewrite not to use `creat' and to eliminate a race
2043         condition that could make touch truncate a nonempty file.
2044         Report and suggestions from Andrew Tridgell.
2046 1999-03-31  Jim Meyering  <meyering@ascend.com>
2048         * src/du.c: Remove prototypes and tsort function definitions.
2050         * src/chown.c (main): Move the declaration of `e' into the scope
2051         where it's used and make it `const'.
2053         * src/install.c (main): Qualify a char* with the `const' keyword.
2054         (install_file_in_dir): Likewise.
2055         * src/ln.c (main): Likewise.
2056         * src/mkdir.c (main): Likewise.
2057         * src/mkfifo.c (main): Likewise.
2058         * src/mknod.c (main): Likewise.
2059         * src/mv.c (main): Likewise.
2060         * src/touch.c (touch): Likewise.
2062 1999-03-30  Jim Meyering  <meyering@ascend.com>
2064         * src/*.c: Don't include closeout.h or version-etc.h explicitly.
2065         Now, they're included via sys2.h.
2067 1999-03-29  Jim Meyering  <meyering@ascend.com>
2069         * configure.in (GNU_PACKAGE): Remove related code -- now it's in
2070         the catch-all for shared autoconf code, m4/jm-macros.m4.
2071         (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use
2072         this instead.
2074 1999-03-29  Paul Eggert  <eggert@twinsun.com>
2076         Minor lint removal in code that forks and execs.
2078         * lib/mkdir.c (mkdir): Use pid_t instead of int; check status
2079         against zero.  This is to improve portability.
2080         * lib/rename.c (rename): Likewise.
2081         * lib/rmdir.c (rmdir): Likewise.
2083         * lib/rename.c (rename):
2084         (rename): Do not print any error messages, so that the messages
2085         are internationalized properly.
2087         * src/install.c (strip): Use standard "cannot fork" message.
2088         Check for strip nonzero exit status.
2090 1999-03-28  Jim Meyering  <meyering@ascend.com>
2092         `chmod =OP' did not properly apply the umask
2093         * lib/modechange.c (make_node_op_equals): New function.
2094         (mode_append_entry): Likewise.
2095         (mode_compile): When none of [ugoa] is specified in an `=OP' change
2096         mode request, insert a `=0' entry into the linked list so that all
2097         bits are cleared first.  Use the new functions.
2098         Reported by Andrew Dalke.
2100         New test for the above.
2101         * configure.in (AC_OUTPUT): Add tests/chmod/Makefile.
2102         * tests/Makefile.am (SUBDIRS): Add chmod.
2103         * tests/chmod: New directory
2104         * tests/chmod/equal-x: New file.
2106 1999-03-27  Jim Meyering  <meyering@ascend.com>
2108         * lib/modechange.c (mode_compile): Upon allocation failure, free
2109         everything starting with the head, not the tail.
2111         * src/install.c (strip): Use pid_t, not int.  From John Bley.
2113 1999-03-26  Jim Meyering  <meyering@ascend.com>
2115         * src/dd.c (PROGRAM_NAME, AUTHORS): Define
2116         (long_options): Remove unused struct.
2117         (scanargs): Remove useless loop.
2118         (main): Use PROGRAM_NAME and AUTHORS in call to parse_long_options.
2119         * src/mvdir.c: Likewise.
2120         * src/sync.c (PROGRAM_NAME, AUTHORS): Define and use.
2122 1999-03-25  Jim Meyering  <meyering@ascend.com>
2124         * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c.
2125         (noinst_HEADERS): Add version-etc.h.
2127         * lib/long-options.c (parse_long_options): Remove version-, copyright-,
2128         and author-printing code.  Do it via version_etc.
2130         * lib/version-etc.c: New file.
2131         * lib/version-etc.h: Prototype for same.
2133         * src/sys2.h (GETOPT_HELP_CHAR): Define.
2134         (GETOPT_VERSION_CHAR): Define.
2135         (GETOPT_HELP_OPTION_DECL): Define.
2136         (GETOPT_VERSION_OPTION_DECL): Define.
2137         (case_GETOPT_HELP_CHAR): Define.
2138         (case_GETOPT_VERSION_CHAR): Define.
2140         * src/chgrp.c: No longer include long-options.h.
2141         Include version-etc.h instead.
2142         (PROGRAM_NAME, AUTHORS): Define.
2143         [long_options]: Add entries for --help and --version.
2144         Remove parse_long_options call.
2145         (main) [getopt switch]: Add a case for each of --help and --version.
2146         * src/chgrp.c: Likewise.
2147         * src/chmod.c: Likewise.
2148         * src/cp.c: Likewise.
2149         * src/df.c: Likewise.
2150         * src/dircolors.c: Likewise.
2151         * src/du.c: Likewise.
2152         * src/install.c: Likewise.
2153         * src/ln.c: Likewise.
2154         * src/ls.c: Likewise.
2155         * src/mkdir.c: Likewise.
2156         * src/mkfifo.c: Likewise.
2157         * src/mknod.c: Likewise.
2158         * src/mv.c: Likewise.
2159         * src/rm.c: Likewise.
2160         * src/rmdir.c: Likewise.
2161         * src/shred.c: Likewise.
2162         * src/touch.c: Likewise.
2164 1999-03-24  Jim Meyering  <meyering@ascend.com>
2166         * man/help2man: Import version 1.010.
2168 1999-03-22  Jim Meyering  <meyering@ascend.com>
2170         * src/chmod.c (usage): Add one-liner.  Suggestion from Karl Berry.
2172 1999-03-19  Jim Meyering  <meyering@ascend.com>
2174         * src/automake-wrap: Rewrite the automake-generated rule for
2175         clean-binPROGRAMS so that it removes rm even with a losing PATH on a
2176         losing system (PATH with `.' before /bin on a system where you can't
2177         unlink a running executable).  Reported by William Bader.
2179         * configure.in: Use jm_WINSIZE_IN_PTEM.
2180         * src/ls.c [WINSIZE_IN_PTEM]: Include sys/stream.h and sys/ptem.h.
2181         Required by SCO ODT 2.0 systems.  Reported by William Bader.
2183 1999-03-18  Jim Meyering  <meyering@ascend.com>
2185         * src/remove.c (remove_cwd_entries): Reflect changes in hash_insert.
2186         (remove_init): Call hash_initialize with one more argument.
2188 1999-03-15  Jim Meyering  <meyering@ascend.com>
2190         Revamp to allow fine-tuning to control when and by how
2191         much the table grows and shrinks.
2192         * lib/hash.c (next_prime): Don't assert.
2193         (hash_reset_tuning): New function.
2194         (check_tuning): New function.
2195         (hash_initialize): Accept and use new tuning parameter.
2196         (hash_rehash): Rewrite, updating for tuning.
2197         (hash_insert): Honor tuning semantics.
2198         (hash_delete): Likewise.
2199         From François Pinard.
2201         * lib/hash.h (struct hash_tuning): Define.
2202         (struct hash_table) [tuning]: Add member.
2203         (hash_initialize): Add `tuning' parameter.
2205         * lib/hash.c (hash_insert): Remove last parameter and change semantics.
2206         * lib/hash.h (hash_insert): Update prototype.
2208         * lib/hash.c (hash_insert): Don't increment n_entries unconditionally --
2209         otherwise, we'd do so even when the insertion failed.
2210         From François Pinard.
2212 1999-03-07  Jim Meyering  <meyering@ascend.com>
2214         * lib/xmalloc.c (xalloc_fail): Use "%s" format so the message doesn't
2215         have to be scanned for % signs.  Suggestion from François Pinard.
2217         * Makefile.maint: Add two more URLs and the loops to use them.
2219         * lib/long-options.c (parse_long_options): Include `Copyright...' line
2220         in --version output.
2221         Add the `...NO warranty...' message.
2223 1999-03-03  Jim Meyering  <meyering@ascend.com>
2225         * lib/long-options.c (_): Define it.
2226         (parse_long_options): Accept new parameter, authors, and print it.
2228         * lib/long-options.h: Update prototype.
2230         * src/chgrp.c: Include long-options.h
2231         [long_options]: Remove the "help" and "version" entries.
2232         (main): Use parse_long_options, including author name(s).
2233         Remove the show_version and show_help blocks.
2234         * src/chmod.c: Likewise.
2235         * src/chown.c: Likewise.
2236         * src/cp.c: Likewise.
2237         * src/dd.c: Likewise.
2238         * src/df.c: Likewise.
2239         * src/dircolors.c: Likewise.
2240         * src/du.c: Likewise.
2241         * src/install.c: Likewise.
2242         * src/ln.c: Likewise.
2243         * src/ls.c: Likewise.
2244         * src/mkdir.c: Likewise.
2245         * src/mkfifo.c: Likewise.
2246         * src/mknod.c: Likewise.
2247         * src/mv.c: Likewise.
2248         * src/mvdir.c: Likewise.
2249         * src/rm.c: Likewise.
2250         * src/rmdir.c: Likewise.
2251         * src/shred.c: Likewise.
2252         * src/sync.c: Likewise.
2253         * src/touch.c: Likewise.
2255 1999-02-18  Paul Eggert  <eggert@twinsun.com>
2257         * getdate.y: <alloca.h>: Include if HAVE_ALLOCA_H, not FORCE_ALLOCA_H.
2258         The FORCE_ALLOCA_H was a relic of the bad old pre-autoconf Emacs days.
2260 1999-02-17  Jim Meyering  <meyering@ascend.com>
2262         * src/shred.c (wipename): Fix string thinko.  Now, shredding files
2263         in subdirectories works (dir/file).  From Janos Farkas.
2265 1999-02-13  Jim Meyering  <meyering@ascend.com>
2267         * src/dircolors.c (dc_parse_stream): Don't try to dereference
2268         NULL if there's an error in our built-in list.
2269         Suggestion from François Pinard.
2271 1999-02-13  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2273         * src/install.c (main): Set x.backup_type only if backups are requested.
2274         (cp_option_init): Initialize backup_type.
2275         (backup_type): Remove unused variable.
2277         * doc/fileutils.texi: Fix use of @item vs @itemx.
2279 1999-02-08  Jim Meyering  <meyering@ascend.com>
2281         * src/dircolors.c (slack_codes): Add "DOOR".
2282         (ls_codes): Add corresponding "do".
2283         Reported by John Gotts.
2285         * configure.in (ALL_LINGUAS): Add Italian (it).
2287 1999-02-07  Jim Meyering  <meyering@ascend.com>
2289         * Version 4.0d (aka 4.1-b4).
2291         * Makefile.maint (my-distcheck): Don't depend on dist, now that this
2292         is hooked up to the distcheck rule.
2293         * Makefile.am (distcheck-hook): New target and rule -- link to shared
2294         rule, my-distcheck, in Makefile.maint.
2296         * doc/fileutils.texi (shred invocation): New section.  From Colin Plumb.
2298         * configure.in (jm_FUNC_GETGROUPS): Move the test into a new file,
2299         group-member.m4, and just use this new macro.
2300         Use `.$ac_objext', not the literal `.o'.
2302 1999-02-02  Jim Meyering  <meyering@ascend.com>
2304         * src/ls.c (S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR):
2305         Define to zero if not already defined.
2306         (HAVE_SYMLINKS): Define.
2307         (gobble_file): Remove #ifdef.
2308         (get_link_name, make_link_path): Guard these with #if HAVE_SYMLINKS
2309         rather than #ifdef S_ISLNK.
2310         (print_type_indicator): Remove #ifdefs and reorganize.
2311         (print_color_indicator): Remove #ifdefs.
2312         (length_of_file_name_and_frills): Likewise.
2314 1999-02-01  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2316         * src/dircolors.hin: Handle DOOR.
2318         * src/ls.c (print_type_indicator): Print doors as '>'.
2319         (length_of_file_name_and_frills): Account for this.
2320         (indicator_no): Define C_DOOR.
2321         (indicator_name): Add corresponding name.
2323         * lib/filemode.c (ftypelet): Handle doors.
2325         * lib/filemode.c, src/system.h (S_ISDOOR): Define if missing.
2327 1999-02-01  Jim Meyering  <meyering@ascend.com>
2329         * lib/strcasecmp.c (STRXCASECMP_FUNCTION): Don't increment within macro
2330         argument list.  From Akim Demaille.
2332 1999-01-31  Jim Meyering  <meyering@ascend.com>
2334         * doc/fileutils.texi: Wrap the @top node in @ifnottex instead of
2335         @ifinfo so `makeinfo --html ...' works.  From Karl Berry.
2337         * tests/ln/misc: Add test for this.
2338         * src/ln.c (do_link): Allow creation of a hard link to a dangling
2339         symlink.  Reported by Alexey Solovyov.
2341         * src/copy.c (copy_internal): Describe any backup-related renaming
2342         operations when in verbose mode.
2343         (copy_internal): Likewise.
2344         Based on changes from Marty Leisner.
2346         * lib/lchown.c: Declare chown.
2348 1999-01-30  Jim Meyering  <meyering@ascend.com>
2350         * acconfig.h: Remove uintmax and STAT* #undefs.
2351         * configure.in: Require autoconf 2.13.
2352         Remove test for AFS.
2353         Use 3-argument form of AC_DEFINE*.
2355 1999-01-28  Jim Meyering  <meyering@ascend.com>
2357         * po/POTFILES.in: Add src/shred.c.
2359         * src/system.h: Use TIME_WITH_SYS_TIME-based #if test rather than
2360         TM_IN_SYS_TIME based one (for shred).
2362         * acconfig.h: Remove lots of `#undef's, now that we use the
2363         3-argument forms of AC_DEFINE* macros.
2365 1999-01-25  Jim Meyering  <meyering@ascend.com>
2367         * configure.in (fdatasync): Use AC_CHECK_FUNCS instead of
2368         AC_REPLACE_FUNCS.
2369         (AC_CHECK_FUNCS): Add clock_gettime.
2371         * src/shred.c (isaac_seed): Guard clock_gettime with test of
2372         HAVE_CLOCK_GETTIME, not CLOCK_REALTIME.
2373         (wipename): Rename local dirfd to dir_fd to avoid shadowing the
2374         function declared in Linux's dirent.h.
2376 1999-01-25  Akim Demaille  <demaille@inf.enst.fr>
2378         * lib/argmatch.h (ARRAY_CARDINALITY): Define.
2379         (ARGMATCH_ASSERT): New macro.
2381         * lib/argmatch.c (program_name): Remove dcl.
2382         Include error.h.
2383         (argmatch_invalid): Use error rather than fprintf.
2385 1999-01-24  Jim Meyering  <meyering@ascend.com>
2387         * src/ansi2knr.c: Exit nonzero upon failed write to stdout.
2388         New version from L. Peter Deutsch.
2390         * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n'
2391         (and hence that of the local `n1', too) to `int' at Paul's request.
2393         * lib/closeout.c: Add comments.
2395         * src/shred.c (fdatasync): Remove function.  instead, ...
2396         (fdatasync) [! HAVE_FDATASYNC]: Define to fsync.
2397         From Colin Plumb.
2399 1999-01-23  Jim Meyering  <meyering@ascend.com>
2401         * src/Makefile.am (bin_PROGRAMS): Add shred.
2402         * src/shred.c: New file.
2403         Portability tweaks.
2404         Internationalize.
2405         (wipename): Print the `FILE: deleted' and `FILE: deleting' messages
2406         only when in verbose mode.
2407         (fdatasync) [! HAVE_FDATASYNC]: New function.
2409         * man/Makefile.am (man_MANS): Add shred.1.
2410         * man/Makefile.summ (shred-summary): Define.
2411         * man/shred.x: New file.
2413         * src/shred.c: New file.  From Colin Plumb.
2414         Include config.h, getopt.h, system.h and error.h.
2415         Use #else/#if, not #elif.
2417 1998-11-05  Paul Eggert  <eggert@twinsun.com>
2419         * lib/mktime.c (__mktime_internal): Adopt the traditional (and
2420         problematic) notion of what to do when tm_isdst doesn't match.
2422 1999-01-17  Jim Meyering  <meyering@ascend.com>
2424         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set PATH here, rather
2425         than setting RM and CP.
2426         * tests/cp/*: Now that PATH is set properly, use rm and cp rather
2427         than $RM and $CP.
2429         * tests/ln/Makefile.am (TESTS): Add backup-1.
2430         (TESTS_ENVIRONMENT): Set PATH here, rather than setting LN.
2431         * tests/ln/*: Now that PATH is set properly, use ln rather than $LN.
2432         * tests/ln/backup-1: New test for this.
2433         * src/ln.c (do_link): Try to remove DEST even after renaming it.
2434         This fixes a bug reported by Jamie Lokier.
2436         * src/ln.c (same_name): Use SAME_INODE rather than open coding it.
2438 1999-01-16  Jim Meyering  <meyering@ascend.com>
2440         * lib/argmatch.c (ARGMATCH_DIE_DECL): Use it.
2442         * acconfig.h: Remove @BOTTOM@ section.
2443         Instead, add the define and decl via m4/jm-macros.m4.
2445         * src/ls.c: Don't declare base_name.
2446         Use function-style XARGMATCH once again.
2447         * src/touch.c: Likewise.
2448         * acconfig.h: Add a @BOTTOM@ section.
2449         (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1).
2450         Declare usage.
2451         From Akim Demaille.
2453         * src/cp.c: Remove declarations of base_name and get_version.
2454         (main): Don't call getenv ("VERSION_CONTROL"); xget_version does it.
2455         Use xget_version and function-style XARGMATCH.
2456         * src/mv.c (main): Likewise.
2457         * src/ln.c (main): Likewise.
2458         * src/install.c (main): Likewise.
2459         * lib/quotearg.c (quotearg_n_options): Declare n1 to be of type
2460         unsigned int, not just int.
2461         * lib/backupfile.h (get_version): Adjust prototype.
2462         (xget_version): Add prototype.
2463         (base_name): Remove prototype.
2464         * lib/backupfile.c [!HAVE_DECL_GETENV]: Declare getenv.
2465         (backup_args): Reorder enum members.
2466         (backup_types): Likewise.
2467         (get_version): Take an additional parameter, `context'.
2468         (xget_version): Like get_version, but if the `version' argument is NULL,
2469         use the value of the envvar VERSION_CONTROL.
2470         (base_name): Declare.
2471         Mostly from Akim Demaille.
2473         * lib/addext.c: (base_name): Declare.
2474         * src/sys2.h: Add prototype for base_name.
2476         * lib/argmatch.c: s/argmatch_exit_failure/argmatch_die/
2477         * lib/argmatch.h: Likewise.
2479         * lib/argmatch.h (XARGMATCH): Define to return a value once again.
2480         (XARGCASEMATCH): Likewise.
2482         * lib/argmatch.c (EXIT_FAILURE): Define.
2483         (ARGMATCH_DIE): Provide default.
2484         (__xargmatch_internal): New function.
2485         s/rogram_name/program_name.
2486         From Akim Demaille.
2488 1999-01-14  Akim Demaille  <demaille@inf.enst.fr>
2490         * src/touch.c (usage): Don't make it static so that it can be
2491         called from libfu.a by xargmatch.
2492         * src/chgrp.c (usage): Likewise
2493         * src/chmod.c (usage): Likewise
2494         * src/chown.c (usage): Likewise
2495         * src/cp.c (usage): Likewise
2496         * src/dd.c (usage): Likewise
2497         * src/df.c (usage): Likewise
2498         * src/dircolors.c (usage): Likewise
2499         * src/du.c (usage): Likewise
2500         * src/install.c (usage): Likewise
2501         * src/ln.c (usage): Likewise
2502         * src/ls.c (usage): Likewise
2503         * src/mkdir.c (usage): Likewise
2504         * src/mkfifo.c (usage): Likewise
2505         * src/mknod.c (usage): Likewise
2506         * src/mv.c (usage): Likewise
2507         * src/mvdir.c (usage): Likewise
2508         * src/rm.c (usage): Likewise
2509         * src/rmdir.c (usage): Likewise
2510         * src/sync.c (usage): Likewise
2512 1999-01-12  Akim Demaille  <demaille@inf.enst.fr>
2514         * lib/backupfile.c (get_version): added the parameters KIND.
2515         (xget_version): like get_version, but if argument is NULL, honor
2516         the envvar VERSION_CONTROL.
2517         * src/cp.c: Remove declarations of base_name and get_version.
2518         (main): Use xget_version.
2519         * src/mv.c (main): Likewise.
2520         * src/ln.c (main): Likewise.
2521         * src/install.c (main): Likewise.
2523 1999-01-12  Jim Meyering  <meyering@ascend.com>
2525         * configure.in (ALL_LINGUAS): Add Greek (el).
2526         * po/el.po: New file.
2528         * install-sh: New version from autoconf.
2529         * missing: New version from automake.
2530         * src/ansi2knr.c: Likewise.
2531         * lib/getopt.c: New version from glibc.
2532         * lib/getopt.h: Likewise.
2533         * lib/getopt1.c: Likewise.
2534         * lib/regex.c: Likewise.
2535         * lib/regex.h: Likewise.
2536         * lib/ylwrap: Remove unused file.
2538 1999-01-10  Jim Meyering  <meyering@ascend.com>
2540         * Version 4.0c (aka 4.1-b3).
2542         * Upgrade to autoconf-2.13 and automake-1.3b.
2544         * src/copy.c (copy_internal): Handle two more values of errno from
2545         failed rename of a directory into a subdirectory of itself.
2546         Thanks to Volker Borchert for testing many types and combinations
2547         of systems.
2549         * lib/argmatch.c (ARGMATCH_QUOTING_STYLE): Change from c_quoting_style
2550         to escape_quoting_style.
2551         (argmatch_invalid): Now that the quoted quantity is no longer double
2552         quoted, remove the code that removed leading and trailing double quotes.
2554         * src/ls.c (decode_switches): Now that escape_quoting_style no longer
2555         escapes the SPACE character, arrange for SPACEs to be quoted here.
2556         * lib/quotearg.c (quotearg_buffer): Change escape_quoting_style so that
2557         it no longer escapes ` '.
2558         Suggestion from Paul Eggert.
2560 1999-01-05  Jim Meyering  <meyering@ascend.com>
2562         * configure.in (space): Add `for' in message of statvfs check.
2563         From Ulrich Drepper.
2565 1999-01-04  Jim Meyering  <meyering@ascend.com>
2567         * Version 4.1-b2.
2569 1999-01-02  Jim Meyering  <meyering@ascend.com>
2571         * lib/argmatch.c (argmatch_invalid): Remove double quotes from the
2572         offending quoted argument before using it in explanatory diagnostic.
2573         Use a single fprintf stmt.
2575         * lib/argmatch.h (XARGMATCH): Don't return a value;  instead,
2576         modify a parameter.  Add a `Die_stmt' parameter.
2577         Add parentheses.
2578         * lib/argmatch.c (__xargmatch_internal): Remove now-unused function.
2579         (argmatch_to_argument): Add `const' attribute to first parameter.
2581         * configure.in (AC_REPLACE_FUNCS): Remove strcasecmp (now it's
2582         done in m4/jm-macros.m4).
2584         * lib/backupfile.c (get_version): Adapt to use new interface to
2585         XARGMATCH.
2586         * src/cp.c: Likewise.
2587         * src/ls.c: Likewise.
2588         * src/touch.c: Likewise.
2590 1999-01-01  Jim Meyering  <meyering@ascend.com>
2592         * lib/makepath.c (make_dir): New function, factored out of make_path.
2593         (make_path): Use make_dir rather than open-coding it twice.
2594         This effectively reverses the order of the latter pair of stat/mkdir
2595         calls and fixes a race condition bug whereby one of two concurrent
2596         `mkdir -p' processes could fail with EEXIST.
2597         Include locale.h and libintl.h, and define `_()'.
2598         Mark translatable strings.
2600         * lib/xmalloc.c: Add comments.
2601         (xcalloc, xmalloc, xrealloc): Remove prototypes.
2602         (xcalloc): Remove `#ifdef NOT_USED' that used to hide this function.
2603         * lib/xalloc.h: Add comments.
2604         (PARAMS, XMALLOC, XCALLOC, XREALLOC): Define.
2605         (xcalloc, xmalloc, xrealloc): Add prototypes here.
2606         Based on changes from Akim Demaille.
2608         * lib/quotearg.c (quotearg_buffer): Cast -1 to size_t before comparing.
2609         (quotearg_n): Change type of 1st parameter from int to unsigned int.
2610         (quotearg_n_options): Likewise.
2611         * lib/quotearg.h (quoting_style_vals): New public array.
2612         From Akim Demaille.
2613         (quotearg_n_options): Declare `options' parameter to be `const'.
2615         * lib/human.c (humblock): Use ARGMATCH in place of argmatch.
2617         * lib/backupfile.c (get_version): Use XARGMATCH in place of
2618         argmatch & co.
2620 1998-12-31  Jim Meyering  <meyering@ascend.com>
2622         * src/ls.c (indicator_style_types): New variable.
2623         (format_types): Rename from `formats'.
2624         (color_args): Remove unnecessary `no' string.
2625         (color_types): Remove corresponding `color_never' entry.
2626         (main): Use ARGMATCH_TO_ARGUMENT.
2627         (decode_switches): Use ARGMATCH instead of argmatch code
2628         in each of several cases.
2629         From Akim Demaille.
2631         * src/cp.c (main): Use XARGMATCH in place of argmatch & co.
2632         * src/touch.c (main): Likewise.
2633         * lib/backupfile.c (get_version): Likewise.
2634         From Akim Demaille.
2636         * lib/strncasecmp.c: New file.
2637         * lib/strcasecmp.c: Add #ifdefs so it can be used for strncasecmp, too.
2638         * lib/argmatch.c (strncasecmp): Move to a separate file.
2639         Add curly braces around some one-stmt-but-multiline blocks.
2641         * lib/argmatch.c: Improvements from Akim Demaille.
2642         * lib/argmatch.h: Likewise.
2644         * lib/addext.c (addext): Protoize.
2645         Indent cpp directives to match nesting.
2647         Fix warnings from gcc -W -Wall
2648         * lib/posixtm.c (posix_time_parse): Change type of index `i' from
2649         int to unsigned int.
2650         * lib/getdate.y (__attribute__): Define.
2651         (ATTRIBUTE_UNUSED): Define.
2652         (yyerror): Mark parameter as unused with ATTRIBUTE_UNUSED.
2653         (MonthDayTable): Add initializers for last entry.
2654         (UnitsTable): Likewise.
2655         (OtherTable): Likewise.
2656         (MilitaryTable): Likewise.
2658 1998-12-22  Jim Meyering  <meyering@ascend.com>
2660         * Version 4.1-b1.
2662         * configure.in (ALL_LINGUAS): Add chinese (zh).
2664 1998-12-19  Jim Meyering  <meyering@ascend.com>
2666         * tests/ln/misc: Use absolute path for final rm.
2668         * Makefile.maint (my-distcheck): Run make with
2669         CFLAGS='-Wformat -Werror'.
2671 1998-12-18  Jim Meyering  <meyering@ascend.com>
2673         * src/copy.c (copy_internal): Remove errnoeous `%s: ' prefix
2674         from format string.  From Michiel Bacchiani.
2676         * src/chgrp.c (MAXGID): Define.
2677         Use gid_t (not int) as the type for `group' variables.
2678         (parse_group): Use MAXGID, not INT_MAX.
2680         * src/install.c (UID_T_MAX, GID_T_MAX): Remove definitions.
2681         * src/sys2.h (UID_T_MAX, GID_T_MAX): Define them here instead.
2683 1998-12-13  Jim Meyering  <meyering@ascend.com>
2685         * lib/Makefile.am (EXTRA_DIST): Add xstat.in.
2687 1998-12-12  Jim Meyering  <meyering@ascend.com>
2689         1998-10-15  Akim Demaille  <demaille@inf.enst.fr>
2690         * src/ls.c: Group DIRED's code together.
2691         (full_time, inhibit_group, col_ext_type): Declare static.
2692         (dired_dump_obstack): Apply sizeof to variable, instead of its type.
2693         (parse_ls_color): Rename ext2 as e2.  Move into the block where it
2694         is used.
2696         1998-10-15  Akim Demaille  <demaille@inf.enst.fr>
2697         * src/ls.c: In order to distinguish col(umn|or):
2698         (init_column_info): Renamed from init_col_info.
2699         (struct column_info): Renamed from struct col_info.
2700         (struct color_ext_type): Renamed from struct col_ext_type.
2702 1998-12-11  Jim Meyering  <meyering@ascend.com>
2704         * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in.
2705         (stat.c): Likewise.
2706         * lib/stat.c: Remove file.
2707         * lib/lstat.c: Remove file.
2708         * lib/xstat.in (xstat@): New file.
2710         * lib/quotearg.c (quotearg_buffer): Use `7' as the mask, not `3'.
2711         From Bruno Haible.
2712         * tests/ls-2/tests: Add a test for this.
2714         * man/help2man: import version 1.006.
2716 1998-12-07  Jim Meyering  <meyering@ascend.com>
2718         * src/copy.c: Use dir_name, not dirname.  Include dirname.h.
2719         * src/cp.c: Likewise.
2720         * src/df.c: Likewise.
2721         * src/install.c: Likewise.
2722         * src/ln.c: Likewise.
2723         * src/mvdir.c: Likewise.
2725         * lib/dirname.c (dir_name): Rename from dirname.
2726         Make argument `const'.  Include "dirname.h"
2727         * lib/dirname.h: New file.
2728         * lib/Makefile.am (noinst_HEADERS): Add dirname.h.
2730 1998-12-06  Jim Meyering  <meyering@ascend.com>
2732         * lib/rpmatch.c (rpmatch) [!ENABLE_NLS]: Hard-code tests to use
2733         `^[yY]' and `^[nN]' (avoiding regex).  From Karl Heuer.
2735         * lib/*.c: Ansideclify.
2737         Fix `ls -R .' formatting bug that broke mktexlsr.
2738         * src/ls.c: Include path-concat.h.
2739         (basename_is_dot_or_dotdot): New function, derived from
2740         is_not_dot_or_dotdot.
2741         (is_not_dot_or_dotdot): Remove function.
2742         (extract_dirs_from_files): Use `!basename_is_dot_or_dotdot'
2743         instead of is_not_dot_or_dotdot and use path_concat instead of attach.
2745         * tests/ls-2/tests: New file (renamed from quoting),
2746         with new test for the `ls -R .' fix.
2747         * tests/ls-2/quoting: Remove file.
2748         * tests/ls-2/Makefile.am (TESTS): s/quoting/tests/.
2750 1998-11-29  Jim Meyering  <meyering@ascend.com>
2752         * src/remove.c (DOT_OR_DOTDOT): Move definition from this file...
2753         * src/sys2.h (DOT_OR_DOTDOT): ...to this one.
2755         * src/dd.c (dd_copy): Rename function from `copy'.
2757         * src/cp.c (do_copy): Rename local: s/unused/copy_into_self/.
2759         Per Kristian Hove reported that a certain move-directory-into-self
2760         wasn't properly diagnosed.
2762         * tests/mv/into-self-3: New file.
2763         * tests/mv/Makefile.am (TESTS): Add into-self-3.
2764         * src/copy.c (copy_internal): Remove earlier (but less effective)
2765         test for move/copy-into-self.
2766         Instead, deduce the move-into-self condition from errno==EINVAL
2767         after a failed rename.
2768         * src/mv.c (do_move): Don't arrange to remove DEST in the
2769         copied-into-self case.
2771 1998-11-15  Jim Meyering  <meyering@ascend.com>
2773         Bob McCracken reported that mv couldn't handle certain combinations
2774         of hard linked source files.
2776         * tests/mv/hard-link-1: New file.
2777         * tests/mv/Makefile.am (TESTS): Add hard-link-1.
2778         * src/mv.c (movefile): Don't free new_dest.
2780         * lib/error.c (error): Don't use strerror_r's return value.
2781         From Johan Danielsson.
2783 1998-11-14  Jim Meyering  <meyering@ascend.com>
2785         * Version 4.0.
2787         * Makefile.maint (cvs-dist): Search for `$tag:' rather than just $tag
2788         to avoid matching a prefix of another tag.
2790 1998-11-10  Jim Meyering  <meyering@ascend.com>
2792         * configure.in (ALL_LINGUAS): Add Greek (el).
2793         * po/el.po: New file.
2795 1998-11-07  Jim Meyering  <meyering@ascend.com>
2797         * Version 4.0-b7.
2799         Accommodate the Hurd (defining lstat to rpl_lstat via config.h didn't
2800         work on Hurd systems because of an inline definition of lstat in a
2801         system header file).  This also makes it so that you may run `ls '' '
2802         on systems that let l?stat operate on the empty string.
2804         * src/remove.c [HAVE_LSTAT_EMPTY_STRING_BUG]: Define lstat to rpl_lstat
2805         and declare the latter.
2806         * lib/stat.c [stat]: Remove #undef.
2807         (rpl_stat): Protoize.
2808         * lib/lstat.c [lstat]: Remove #undef.
2809         (rpl_lstat): Protoize.  Use ENOENT, not EINVAL, to be consistent
2810         with lib/stat.c.
2811         * acconfig.h: Remove #undef's for lstat and stat.
2813 1998-10-31  Jim Meyering  <meyering@ascend.com>
2815         * tests/rm/Makefile.am (TESTS): Add new test `empty-name',
2816         but comment it out.
2817         * tests/rm/empty-name: New file.
2819         * acconfig.h (stat): New #undef.
2820         This omission was uncovered when Mark Kettenis reported that
2821         `rm -r ''' got a failed assertion on the Hurd.  This change
2822         doesn't fix *that* problem -- see above.
2824 1998-10-25  Jim Meyering  <meyering@ascend.com>
2826         * Version 4.0-b6.
2828         * README: Man pages will now be supported to the extent that
2829         people send patches.
2831         * tests/rm/unreadable: Two new tests.
2832         * tests/rm/Makefile.am (TESTS): Add new test `unreadable'.  But comment
2833         it out since we're so close to release and since the test compares the
2834         text of diagnostics that are likely to vary between systems.
2835         (TEST_ENVIRONMENT): Add required framework.
2837         * src/remove.c (remove_cwd_entries): Don't apply CLOSEDIR to a NULL
2838         pointer. (provoke with `mkdir -m 0100 x; rm -rf x')
2839         Upon CLOSEDIR failure, set `status' to RM_ERROR, not RM_OK.
2840         (remove_dir): Return `status', rather than always RM_OK.
2842 1998-10-18  Jim Meyering  <meyering@ascend.com>
2844         * Version 4.0-b5.
2846         * lib/mktime.c: Update from libc with this additional change from Paul.
2847         * lib/strftime.c: Likewise.
2849         1998-10-17  Paul Eggert  <eggert@twinsun.com>
2851         Don't invoke localtime_r or gmtime_r unless it's the GNU C
2852         library's localtime_r and gmtime_r; there are too many buggy
2853         implementations of localtime_r and gmtime_r out there, and
2854         it's not worth keeping track of all the different bugs.
2856         * mktime.c (__EXTENSIONS__, HAVE_LOCALTIME_R): Remove.
2857         (my_mktime_localtime_r): Renamed from localtime_r; all uses changed.
2858         Base it on localtime unless _LIBC.
2860         * strftime.c (__EXTENSIONS__): Remove.
2861         (my_strftime_gmtime_r): Renamed from gmtime_r; all uses changed.
2862         (my_strftime_localtime_r): Renamed from localtime_r; all uses changed.
2863         Base them on localtime/gmtime if not _LIBC.
2865 1998-10-17  Jim Meyering  <meyering@ascend.com>
2867         * Version 4.0-b4.
2869         * lib/mktime.c: Declare localtime_r if necessary.
2870         * lib/strftime.c: Likewise.
2872         * tests/Fetish.pm (run_tests): Run $prog with --version only
2873         if $verbose.
2875 1998-10-11  Jim Meyering  <meyering@ascend.com>
2877         * Version 4.0-b3.
2879 1998-10-08  Paul Eggert  <eggert@twinsun.com>
2881         * mktime.c (__mktime_internal): When the requested time falls
2882         in a spring-forward gap of size DT, return a time that is DT
2883         away from the requested time, preferring a time whose tm_isdst
2884         differs from the requested value.  Bump the max number of
2885         probes from 4 to 6 to account for the extra probes needed to
2886         discover a spring-forward gap in the worst case.
2888 1998-10-08  Paul Eggert  <eggert@twinsun.com>
2890         * mktime.c (my_mktime_localtime_r): Renamed from localtime_r.
2891         Define also if HAVE_LOCALTIME_R && defined (localtime_r), with
2892         a body that merely expands localtime_r; this works around a
2893         bug in Digital Unix 4.0A and 4.0D.
2895 1998-10-05  Jim Meyering  <meyering@ascend.com>
2897         * po/Makefile.in.in (uninstall): Remove (historical?) command that
2898         removed po-Makefile.in.in.  From Akim Demaille.
2900         * src/install.c (long_options): Add entry for --suffix=SUFFIX option.
2901         From aldomel.
2903 1998-10-04  Jim Meyering  <meyering@ascend.com>
2905         * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define PERL.
2906         From Kaveh Ghazi.
2908 1998-10-03  Jim Meyering  <meyering@ascend.com>
2910         * Version 4.0-b2.
2912         * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Add PATH.
2914         * man/Makefile.maint ($(man_MANS)): Don't depend on actual executables.
2915         Instead, depend on corresponding source file and on configure.in.
2916         Based on suggestion and code from Akim Demaille.
2917         Factor out irregular men into Makefile.summ.
2919         * man/Makefile.am (EXTRA_DIST): Add Makefile.summ.
2921         * man/Makefile.summ: New file.
2922         * man/Makefile.maint: Include it.
2924         * tests/Fetish.pm: Make `DEBUG' be a little more verbose.
2926         * tests/mv/Makefile.am (TESTS): Add i-1.
2927         * tests/mv/i-1: New test.
2929 1998-10-02  Jim Meyering  <meyering@ascend.com>
2931         * tests/ls-2/Makefile.am (EXTRA_DIST): Remove run-test.
2932         * tests/ls-2/run-test: Remove file.
2933         * tests/ls-2/quoting: Include /bin/sh driver framework.
2935         * tests/dircolors/simple: Remove file.
2936         * tests/dircolors/run-test: Embed it here instead.
2937         * tests/dircolors/simple: Rename from run-test.
2939 1998-10-01  Jim Meyering  <meyering@ascend.com>
2941         * tests/Makefile.am (EXTRA_DIST): Remove README.
2942         From Akim Demaille.
2944 1998-09-28  Jim Meyering  <meyering@ascend.com>
2946         * Version 4.0-pre1.
2948         * Use automake-1.3b.  See notes in README.
2950         * src/copy.c (copy_internal): Do honor `n' reply in move-mode.
2951         Otherwise, `touch a b; echo n|mv -i a b' would remove b.
2952         From Bernd Leibing.
2954 1998-09-27  Jim Meyering  <meyering@ascend.com>
2956         * Version 3.16z.
2958         * Makefile.maint (alpha): New target.
2959         (my-distcheck): Tweak.
2961         * lib/backupfile.h: Protect against multiple inclusion.
2962         From Akim Demaille.
2964         * configure.in: Remove use of AC_FUNC_FNMATCH and associated code.
2965         Now, it is invoked through jm_MACROS.
2967         * lib/strftime.c (my_strftime): Update from FSF.
2969 1998-09-26  Jim Meyering  <meyering@ascend.com>
2971         * src/copy.c (copy_internal): Don't preserve hard-linked directories
2972         to avoid damaging the destination filesystem when copying from a
2973         Netapp snapshot directory.  With code from Kjetil Torgrim Hollstein
2974         and Paul Eggert.
2976 1998-09-24  Jim Meyering  <meyering@ascend.com>
2978         * man/Makefile.maint ($(man_MANS)): Correct typo: s/-tmp/-t/.
2979         From Akim Demaille.
2981 1998-09-21  Jim Meyering  <meyering@ascend.com>
2983         * man/Makefile.maint ($(man_MANS)): Remove `echo'.
2985 1998-09-20  Jim Meyering  <meyering@ascend.com>
2987         * Version 3.16y.
2989         * src/install.c (install_file_to_path) [-D]: Create any leading
2990         directories with permissions of 0755.
2992 1998-09-19  Jim Meyering  <meyering@ascend.com>
2994         * src/install.c (install_file_to_path): Copy the file after creating
2995         any leading directories.
2996         (main) [case 'v']: Set `x.verbose' to 1, not 0.
2997         Reported by Marty Leisner.
2999         * man/Makefile.am (transform): Define.
3000         (man_MANS): Include ginstall.1, not install.1, to match the name
3001         of the executable in ../src.
3002         * man/ginstall.x: New file.
3003         * man/install.x: Remove file.
3004         * man/Makefile.maint (ginstall-summary): Renamed from install-summary.
3006         * man/Makefile.am (EXTRA_DIST): Add Makefile.maint and GNUmakefile.
3007         Reported by Akim Demaille.
3009         * lib/modechange.c: Fix post-protoization typo.
3011         * lib/posixtm.h (PARAMS): Define and use.
3012         From Kaveh Ghazi.
3014 1998-09-12  Jim Meyering  <meyering@ascend.com>
3016         * Version 3.16x.
3018         * src/remove.c (remove_cwd_entries): Declare to be static.
3020         Automatically generate man pages from combination of --help
3021         output and the contents of new, man/*.x files.
3022         * man/Makefile.am (HELP2MAN): Define.
3023         (man_aux): Define.
3024         (EXTRA_DIST): Add $(HELP2MAN) and $(man_aux).
3025         (MAINTAINERCLEANFILES): Add $(man_MANS).
3026         * man/*.x: New files.
3027         * man/GNUmakefile: New file.
3028         * man/Makefile.maint: New file.
3029         * man/help2man: New file.
3031 1998-09-09  Jim Meyering  <meyering@ascend.com>
3033         * lib/modechange.c: Protoize.
3035 1998-09-07  Jim Meyering  <meyering@ascend.com>
3037         * Version 3.16w.
3039         * src/df.c (show_dev) [!posix_format]: When using --print-type,
3040         let the device path and the file system type share a single (wider)
3041         field if their combined lengths allow it.  From Andries Brouwer.
3043         * tests/touch/empty-file: Upon failure, suggest how to rerun the test
3044         with longer delay, in case NFS clock skew was the cause of the failure.
3045         Reported by Kaveh Ghazi.
3047         * tests/ls-2/quoting: Add tests.
3048         * tests/Fetish.pm (run_tests): Add simple PRE/POST hooks.
3049         (_create_file): Don't include $$ in temp file name.
3050         (run_tests): Use shorter suffixes for temp file names.
3052 1998-09-06  Jim Meyering  <meyering@ascend.com>
3054         * src/touch.c: Include posixtm.h.
3055         (usage): Correct the description of the format of the
3056         date string argument to -t option.
3057         (main): Update to use rewritten posixtime function.
3058         Reported by Andries Brouwer.
3060         * lib/Makefile.am (libfu_a_SOURCES): Change posixtm.y to posixtm.c.
3061         (noinst_HEADERS): Add posixtm.h.
3063         * lib/posixtm.h: New file.
3064         * lib/posixtm.c: New file.  Rewritten based on posixtm.y.
3065         * lib/posixtm.y: Remove file.
3067 1998-09-05  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3069         * src/ls.c (print_dir_name): Put back.
3070         (print_dir): Also print directory name header if print_dir_name is
3071         true.
3073 1998-08-29  Jim Meyering  <meyering@ascend.com>
3075         * Version 3.16v.
3077         * src/du.c (long_options): Use corresponding short-option character
3078         in place of `1', and `NULL' in place of pointer in initialization.
3079         * src/cp.c (long_opts): Likewise.
3080         * src/ln.c (long_options): Likewise.
3081         * src/mkdir.c (longopts): Likewise.
3082         * src/rmdir.c (longopts): Likewise.
3083         * src/chown.c: Replace 12 and 13 with CHAR_MAX + 1 and CHAR_MAX + 2
3084         respectively.
3085         * src/chmod.c (long_options): Replace 12 with CHAR_MAX + 1.
3086         * src/chgrp.c (long_options): Replace 12 with CHAR_MAX + 1.
3088         * tests/Fetish.pm: New file -- moved from ls-2/.
3089         * configure.in (AC_OUTPUT): Add tests/dircolors/Makefile.
3090         * tests/Makefile.am (SUBDIRS): Add dircolors.
3091         (EXTRA_DIST): Add Fetish.pm.
3092         * tests/dircolors: New directory
3094         * src/ls.c (print_dir_name): Remove global variable.
3095         (print_dir): When trace_dirs is set, always print the directory
3096         name header.
3098 1998-08-26  Jim Meyering  <meyering@ascend.com>
3100         * src/dircolors.c (dc_parse_stream): Don't segfault when a line
3101         contains only one token.  Reported by Olav Morkrid.
3103 1998-08-24  Paul Eggert  <eggert@twinsun.com>
3105         * src/system.h (CHAR_MIN, CHAR_MAX):
3106         Renamed from SCHAR_MIN, SCHAR_MAX, since these
3107         macros apply to char, not signed char.
3109         * src/df.c, src/du.c, src/touch.c (long_options, main):
3110         Don't assume ASCII.
3112 1998-08-18  Paul Eggert  <eggert@twinsun.com>
3114         Port nanosecond-resolution times to UnixWare 2.1.2 and
3115         pedantic Solaris 2.6.
3117         * configure.in (AC_STRUCT_ST_MTIM_NSEC): Renamed from AC_STRUCT_ST_MTIM.
3118         * acconfig.h (ST_MTIM_NSEC): New #undef.
3119         * src/system.h: (ST_TIME_CMP_NS, ATIME_CMP, CTIME_CMP, MTIME_CMP):
3120         Use new ST_MTIM_NSEC macro.
3122 1998-08-16  Jim Meyering  <meyering@ascend.com>
3124         * lib/filemode.h (PARAMS): Define and use.
3125         From Kaveh Ghazi.
3127 1998-08-15  Jim Meyering  <meyering@ascend.com>
3129         * Version 3.16u.
3131         * Makefile.maint (announcement): New target.
3133         * tests/mv/into-self: Update to reflect changed behavior of mv.
3134         * src/mv.c (do_move): Fail upon attempt to move a directory into itself.
3135         With prodding from François Pinard :-)
3137         * tests/ls-2/Fetish.pm: New file
3138         * tests/ls-2/run-test: New file
3140         * src/copy.c (copy_internal) [one-file-system]: Do copy mount point
3141         directories (but none of their entries).  This makes `cp --archive
3142          --one-file-system' use the same policy `tar --one-file-system' does.
3143         From Marty Leisner.
3145         * src/ls.c (qmark_funny_chars): Add comment from Paul eggert.
3147 1998-08-14  Jim Meyering  <meyering@ascend.com>
3149         * tests/mv/setup: Work around another bug in Ultrix4.3a's /bin/sh.
3150         Reported by Christian von Roques.
3152         * configure.in (AC_OUTPUT): Add tests/ls-2/Makefile.
3153         * tests/Makefile.am (SUBDIRS): Add ls-2.
3154         * tests/ls-2: New directory
3156 1998-08-14  Christian von Roques  <roques@pond.sub.org>
3158         * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETMNT]: Don't
3159         infloop on getmnt(2) returning 0.
3161         * tests/cp/backup-is-src: Avoid bug in Ultrix4.3a /bin/sh,
3162         not initializing output redirection of : command.
3163         * tests/mv/backup-is-src: Likewise.
3164         * tests/rm/i-1: Likewise.
3166 1998-08-12  Jim Meyering  <meyering@ascend.com>
3168         * po/Makefile.in.in: Provide automake-style DESTDIR support.
3169         From Johan Danielsson.
3170         (DISTFILES): Remove ChangeLog.
3171         po/ChangeLog: Remove empty file.
3173         * configure.in (AC_STRUCT_ST_DM_MODE): Use it.
3175         * src/ls.c: Include filemode.h.
3176         * src/chmod.c: Likewise.
3178         * lib/filemode.c (ftypelet): Add comments for Cray DMF support.
3179         From Johan Danielsson.
3180         Protoize.  Tsort function definitions and remove prototypes of
3181         static functions.
3182         (mode_string): Remove prototype.
3183         * lib/filemode.h (mode_string): New file.
3184         * lib/Makefile.am (noinst_HEADERS): Add filemode.h.
3186 1998-08-09  Jim Meyering  <meyering@ascend.com>
3188         * Version 3.16t.
3190 1998-07-31  Paul Eggert  <eggert@twinsun.com>
3192         Add support for filesystems whose timestamps have better resolution
3193         than 1 second (e.g. Solaris 2.6, recent Linux kernels).
3195         * configure.in (AC_STRUCT_ST_MTIM): Add.
3197         * src/copy.c (copy_internal): Compare time stamps with
3198         subsecond resolution if available.
3200         * src/ls.c (compare_ctime, rev_cmp_ctime, compare_mtime,
3201         rev_cmp_mtime, compare_atime, rev_cmp_atime): Compare time
3202         stamps with subsecond resolution if available.
3204         * src/system.h: (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP,
3205         CTIME_CMP, MTIME_CMP): New macros.
3207 1998-08-01  Jim Meyering  <meyering@ascend.com>
3209         * configure.in (ALL_LINGUAS): Add slovak (sk) and norwegian (no).
3211 1998-07-28  Paul Eggert  <eggert@twinsun.com>
3213         * lib/mountlist.c (read_filesystem_list): Remove all_fs
3214         argument, but put the necessary information into the result so
3215         that the caller can ignore filesystems that he's not
3216         interested in.
3218         * lib/mountlist.h (struct mount_entry):
3219         New members me_dummy, me_remote.
3220         (read_filesystem_list): Remove all_fs argument.
3221         (REMOTE_FS_TYPE): Remove.
3222         (ME_DUMMY, ME_REMOTE): New macros.
3224         * lib/xstrtol.c: Remove duplicate include of <stdio.h>.
3226         * src/df.c (show_all_fs):
3227         Revert to boolean value; the old negative value is
3228         now in show_local_fs.
3229         (show_local_fs): New variable.
3230         (show_dev): New args me_dummy and me_class.  Use show_local_fs
3231         and boolean show_all_fs in combination with these new args
3232         to decide whether to show a device.
3233         (show_disk): Pass flags to show_dev.
3234         (show_point): Use a non-dummy mount entry if possible.
3235         (show_all_entries): Pass flags to show_dev.
3236         (main): --local sets show_local_fs now.  Ask for file system types if
3237         show_local_fs is nonzero, since ME_REMOTE might need them.
3239 1998-07-27  Jim Meyering  <meyering@ascend.com>
3241         * tests/install/Makefile.am (TESTS_ENVIRONMENT): Set LS, MKDIR, and RM.
3243         * tests/install/basic-1: Add a test for this.
3244         * src/install.c: Make copy create each destination file initially
3245         with mode 0600 so strip will work, then apply specified mode.
3246         Arne Henrik Juul reported that `./ginstall -s -c -m 555 dd /tmp' failed.
3248 1998-07-25  Jim Meyering  <meyering@ascend.com>
3250         * src/mv.c (chown): Remove unused definition.
3251         Reported by Kaveh Ghazi.
3253         * src/rmdir.c (main): rmdir fails with EEXIST on some systems.
3254         Handle that, so --ignore-fail-on-non-empty works.
3255         (EEXIST): Define to zero if not defined.
3256         (ENOTEMPTY): Likewise.
3258         * tests/cp/same-file: Remove `diff' I'd put in for debugging.
3259         Exit with the status from cmp.
3261         * Version 3.16s.
3263         * tests/cp/same-file: Skip three more unportable tests.
3264         These failed on SunOS4.1.4.
3266         * src/copy.c (SAME_INODE): Remove definition.
3267         * src/sys2.h (SAME_INODE): Define it here instead.
3269         * src/remove.c (same_file): New function.
3270         (remove_dir): Use it to give a better diagnostic when rmdir fails
3271         because it can't remove the current directory.
3273         * src/df.c (long_options): Changes table entries not to use this form:
3274         {"all", no_argument, &show_all_fs, 1},
3275         but rather this form:
3276         {"all", no_argument, NULL, 'a'},
3277         Using the latter, all the option handling in one place: the getopt loop.
3279         * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETMNTINFO]:
3280         Use fsp_to_string.
3281         (fsp_to_string): Don't xmalloc return value (yet).
3282         (xatoi): Ansideclify.
3283         (fstype_to_string): Ansideclify.
3284         * lib/mountlist.h: Define and use PARAMS macro.
3286         * lib/utime.c: New file.
3287         * src/touch.c (utime_now): Moved into m4/utimes.m4.
3288         (touch) [!HAVE_UTIME_NULL]: Remove #ifdef and the use of utime_now
3289         in the if-block.
3291         * configure.in (jm_FUNC_UTIME): Use this, not AC_FUNC_UTIME.
3293 1998-07-22  Paul Eggert  <eggert@twinsun.com>
3295         * lib/human.c (human_readable): amt -> damt, to fix typo when
3296         computing which power to use after overflow occurs during
3297         multiplication.
3299         * lib/xstrtol.c: Include <stdio.h> if NDEBUG is not defined;
3300         needed on SunOS 4.
3302 1998-07-21  Paul Eggert  <eggert@twinsun.com>
3304         Add df -l or --local option.
3305         * doc/fileutils.texi: Document it.
3306         * lib/mountlist.h (REMOTE_FS_TYPE): New macro.
3307         * lib/mountlist.c (read_filesystem_list):
3308         If all_fs is negative, omit non-local filesytems.
3310         * src/df.c (show_dev): Omit local devices if show_all_fs is negative.
3311         (show_all_fs): If negative, omit non-local filesystems.
3312         All uses of (all_fs != 0) changed to (all_fs > 0).
3313         (long_options, usage, main): Add -l or --local option.
3314         (main): When asking for df of an explicit file name, get all
3315         the mount points, so that we're more likely to find it when
3316         we look it up.
3318 1998-07-18  Jim Meyering  <meyering@ascend.com>
3320         * src/copy.c (copy_internal): Add another exclusion from the
3321         sameness test: when --force has been specified, the destination
3322         is unlinked before any copy.
3323         (copy_internal): Add yet another: when both src and dest are symlinks.
3325         * tests/touch: New subdir.
3326         * tests/Makefile.am (SUBDIRS): Add touch.
3327         * configure.in (AC_OUTPUT): Add tests/touch/Makefile.
3329         * tests/mv/into-self-2: New test.
3330         * tests/mv/Makefile.am (TESTS): Add into-self-2.
3332 1998-07-06  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3334         * lib/mountlist.c (read_filesystem_list): Fix more memory leaks on
3335         failure.
3337 1998-07-16  Jim Meyering  <meyering@ascend.com>
3339         Work around failure of chown calls on m68k-motorola-sysv systems.
3340         * src/chown.c: Include lchown.h.
3341         * lib/Makefile.am (noinst_HEADERS): Add lchown.h.
3342         * lib/lchown.h: New file, just to define ENOSYS on systems that lack it.
3343         * lib/lchown.c: Include lchown.h.
3344         Reported by and with suggestions from Manfred Hollstein.
3346 1998-07-12  Paul Eggert  <eggert@twinsun.com>
3348         * src/df.c (print_header): Print "1k-blocks", not "1.0k-blocks".
3350 1998-07-07  Jim Meyering  <meyering@ascend.com>
3352         * src/sys2.h [HAVE_FCLOSE_UNLOCKED]: Remove unnecessary block.
3353         Suggestion from Ulrich Drepper.
3355 1998-07-04  Jim Meyering  <meyering@ascend.com>
3357         * lib/safe-read.c (safe_read): Change type of pointer parameter to
3358         `void' to avoid Irix4 cc errors.  Reported by Kaveh Ghazi.
3359         * lib/safe-read.h: Update prototype.
3361         * src/dircolors.c (parse_line): Add casts to avoid errors from
3362         Irix4's `cc' C compiler.  From Kaveh Ghazi.
3364         * lib/xstrtol.c: Include stdio.h.  Required on some systems when
3365         using assert.  From Kaveh Ghazi.
3367         * tests/mv/backup-is-src: Use cmp, not diff.
3368         Reported by Kaveh Ghazi.
3370 1998-07-03  Jim Meyering  <meyering@ascend.com>
3372         * Version 3.16r.
3374         * src/remove.c (remove_dir): Use fprintf (not error) to avoid
3375         newline in prompt.
3377 1998-06-30  Paul Eggert  <eggert@shade.twinsun.com>
3379         * lib/mountlist.c: (read_filesystem_list):
3380         Don't leak memory on failure.
3381         Don't create a dummy struct mount_entry entry;
3382         use the address-of-the-tail-address method instead.
3383         Preserve errno if possible on failure, setting it to 0 if inapplicable.
3384         Close file descriptor leak if the F_SETLKW failed.
3385         Report an error if SVR4 lock file cannot be opened for some reason
3386         other than a nonexistent lock file.
3388 1998-07-03  Jim Meyering  <meyering@ascend.com>
3390         * configure.in (AM_WITH_REGEX): Remove.  Now the replacement
3391         macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS.
3392         * acconfig.h (WITH_REGEX): Remove undef.
3393         * lib/Makefile.am (noinst_HEADERS): Add regex.h.
3394         * lib/rpmatch.c: Remove #ifdef around <regex.h> inclusion.
3395         * lib/rx.c: Remove file.
3396         * lib/rx.h: Remove file.
3398         * src/df.c (df_readable): Rename local so as not to shadow global.
3400         * src/copy.c (SAME_INODE): New macro.
3401         Use it to replace open-coded equivalents.
3402         (copy_internal): Rename variable and reverse sense of tests
3403         to make the code a little clearer.
3405 1998-07-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3407         * src/copy.c (copy_internal): Try harder identifying a relative
3408         symbolic link in the current directory.
3410         * src/copy.c (copy_internal): Don't skip test for same file if
3411         creating a hardlink from symlink over a non-symlink while making
3412         backups.
3413         * tests/cp/same-file: Skip tests that depend on link(2) not
3414         following symlinks.
3416 1998-07-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3418         * src/copy.c (copy_internal): Don't call chown on a symlink.
3420 1998-07-01  Jim Meyering  <meyering@ascend.com>
3422         * lib/xstrtol.c: Don't define NDEBUG here, now that it's done via
3423         configure's --disable-assert option.
3425 1998-06-29  Paul Eggert  <eggert@twinsun.com>
3427         * lib/mountlist.c (read_filesystem_list):
3428         Plug file descriptor leak on failure.
3429         Report failure if lock file can't be opened for some reason
3430         other than nonexistence.
3432 1998-06-29  Jim Meyering  <meyering@ascend.com>
3434         * Version 3.16q.
3436         * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETMNTENT2]:
3437         Always close stream and file descriptor before returning.
3439         * src/df.c (main): Move the test of the result of the
3440         read_filesystem_list call up out of if-block -- code in the
3441         else-block depends on it too.
3443 1998-06-29  Paul Eggert  <eggert@twinsun.com>
3445         * lib/mountlist.c: (read_filesystem_list): If SVR4, lock
3446         /etc/.mnttab.lock if available, to avoid race conditions
3447         (e.g. with the automounter on Solaris 2.6).
3449         Include <errno.h>, <fcntl.h>, <unistd.h>.
3451 1998-06-29  Jim Meyering  <meyering@ascend.com>
3453         * lib/mountlist.c (fstype_to_string): Guard with
3454         #if ! HAVE_F_FSTYPENAME_IN_STATFS.
3456 1998-06-28  Paul Eggert  <eggert@twinsun.com>
3458         Add support for new --block-size option and
3459         BLOCK_SIZE. DF_BLOCK_SIZE, etc. variables to `df', `du', and `ls'.
3460         Adjust df output slightly to accommodate larger filesystems.
3462         * lib/human.c, lib/human.h (human_readable): Coalesce last two args
3463         into one, for convenience.  All callers changed.
3464         (human_block_size): New function.
3465         * lib/human.c: Include <config.h> only if HAVE_CONFIG_H.
3466         Include <stdlib.h> if HAVE_STDLIB_H;
3467         declare getenv unless HAVE_DECL_GETENV.
3468         (_): New macro.
3469         Include <argmatch.h>, <error.h>, <xstrtoul.h>.
3470         (DEFAULT_BLOCK_SIZE): New macro.
3471         (block_size_args, block_size_types): New constants.
3472         (humblock): New function.
3473         * lib/xstrtol.h (__ZLONG_MAX): Remove.
3474         * lib/xstrtol.c (bkm_scale): Don't assume that you can convert
3475         unsigned long to double without losing information.
3476         (bkm_scale_by_power): New function.
3478         * lib/xstrtol.c (__xstrtol), src/dd.c (parse_integer):
3479         Add support for SI-like suffixes like "GB" and "TD".
3480         * src/dd.c (usage): Describe it.
3482         * src/df.c, src/du.c, src/ls.c (human_readable_base, output_units):
3483         Remove; replace with new variable output_block_size.  All uses changed.
3484         (long_options, usage, main): Add --block-size.
3485         (main, decode_switches): Use new human_block_size function to
3486         initialize output block size consistently with other programs.
3488         * src/df.c (print_header, show_dev): Shrink some columns and expand
3489         others, to squeeze in support for today's larger filesystems.
3490         (print_header): Print output block size using power-of-1024 SI format.
3491         (df_readable): Coalesce last two args into one, for convenience.
3492         All callers changed.
3493         (main): Remove check for portable output format and larger
3494         or human-readable block sizes.
3496         * NEWS, doc/fileutils.texi: Describe above changes.
3498 1998-06-28  Jim Meyering  <meyering@ascend.com>
3500         * src/ls.c (usage): Make --kilobytes description consistent with
3501         that in du and df.  From Göran Uddeborg.
3503         * lib/mountlist.c (fsp_to_string): Clean out some crufty #ifdefs
3504         now that we're using the jm_FSTYPENAME autoconf macro.
3505         James Tanis reported the old version didn't compile on BSDI3.
3507         * configure.in: Move big block of list_mounted_fs checks into
3508         new jm_LIST_MOUNTED_FILESYSTEMS macro.
3509         Use new jm_FSTYPENAME macro.
3511         * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers.
3512         * src/ls.c: Add DIRED_ prefix to the macros: PUTCHAR, FPUTS, and
3513         FPUTS_LITERAL
3515 1998-06-27  Jim Meyering  <meyering@ascend.com>
3517         * src/copy.c (copy_reg): Detect identical source and dest here.
3518         (copy_internal): Make the test symmetric.
3520         * tests/cp/same-file: New file.
3521         * tests/cp/Makefile.am (TESTS): Add it.
3523 1998-06-26  Jim Meyering  <meyering@ascend.com>
3525         * src/remove.c (remove_file): Remove `non-directory' part of
3526         `removing non-directory FILE' verbose message.
3528 1998-06-23  Jim Meyering  <meyering@ascend.com>
3530         * src/df.c (show_dev): Increase field width for blocks, used,
3531         and available columns from 7 to 8.
3533 1998-06-21  Jim Meyering  <meyering@ascend.com>
3535         * aclocal.m4: Regenerate with fixed gettext.m4 installed.
3536         See README-alpha for details.
3538 1998-06-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3540         * src/automake-wrap: Quote `&' in sed replacement text.
3542 1998-05-31  Jim Meyering  <meyering@ascend.com>
3544         * Version 3.16p.
3546         * src/install.c (main): Fix argv-handling bug in my 1998-05-09 change.
3547         Reported by Don Parsons.
3549 1998-05-30  Jim Meyering  <meyering@ascend.com>
3551         * tests/ls/time-1: Clean up ctime test.  Note that it fails also
3552         on Solaris5.5.1 tmpfs file systems.
3554         Solve the `rm -f rm' problem more cleanly.
3555         * src/.rm-warning: Remove file.
3556         * src/automake-wrap: New file.
3557         * src/Makefile.am (AUTOMAKE): Define to use automake-wrap.
3558         (Makefile.in): Depend on automake-wrap.
3559         (EXTRA_DIST): Add automake-wrap.
3560         (DISTCLEANFILES): Remove definition.
3561         (rm_DEPENDENCIES): Likewise.
3562         (.rm-warn-stamp): Remove rule.
3564 1998-05-27  Jim Meyering  <meyering@ascend.com>
3566         * tests/ls/Makefile.am (TESTS): s/cr-1/rt-1/
3567         * tests/ls/rt-1: New file, renamed from cr-1.
3569 1998-05-26  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3571         * src/Makefile.am (.rm-warn-stamp): Cope with $(srcdir) != ".".
3573         * tests/ls/cr-1: Don't use the ctime for testing, it is impossible
3574         to set it reliably.
3576 1998-05-25  Jim Meyering  <meyering@ascend.com>
3578         * configure.in (_GNU_SOURCE): AC_DEFINE it here.
3579         * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section.
3580         [!_GNU_SOURCE]: Add #undef instead.
3582 1998-05-24  Jim Meyering  <meyering@ascend.com>
3584         * Version 3.16o.
3586         * src/ansi2knr.c: Use new version from automake-1.3.
3588         * src/chown.c: Accept new option, --dereference.
3589         --no-dereference is now the default.
3590         (enum Change_status) [CH_NOT_APPLIED]: New member.
3591         (change_symlinks): Enable this by default, now.
3592         (describe_change): Handle new case.
3593         (change_file_owner): Add new parameter: cmdline_arg.  Update callers.
3594         Reorganize to reflect changed semantics.
3595         (LCHOWN): Remove definitions.
3597         * lib/lchown.c: New file.
3599 1998-05-21  Jim Meyering  <meyering@ascend.com>
3601         * configure.in (ALL_LINGUAS): Add russian (ru).
3603 1998-05-16  Jim Meyering  <meyering@ascend.com>
3605         * src/remove.c (hash_compare_strings): Return true or false, not 1/0.
3606         (remove_cwd_entries): Use RM_OK, not equivalent literal `1'.
3608         * lib/hash.c (is_prime): Ansideclify.
3609         (next_prime): Ansideclify.  Add an assertion.
3611         * lib/Makefile.am (EXTRA_DIST): Remove.  Automake groks the `LIBOBJS='
3612         lines from the m4/*.m4 macros, so the hack of including some
3613         custom-replaced C source file names here is no longer needed.
3615         * configure.in (jm_MACROS): New wrapper macro.
3616         Remove uses of most jm_* macros.
3618         * acconfig.h (HAVE_STRUCT_UTIMBUF): Remove #undef.  Now it's handled
3619         as part of utimbuf.m4.
3620         (memcmp): Add #undef.
3622 1998-05-12  Jim Meyering  <meyering@ascend.com>
3624         * configure.in: Use my replacement AC_ISC_POSIX rather than
3625         open-coding it.
3627         * src/copy.c (copy_internal): Plug a small leak.
3629 1998-05-10  Jim Meyering  <meyering@ascend.com>
3631         * src/mv.c (do_move): Remove lots of code that was duplicated in
3632         copy.c (copy), now that copy() has better support for mv.  This fixes
3633         a bug with cross-filesystem `mv -i' whereby you could get two prompts
3634         for the same destination file and eventually remove the destination
3635         file even though one of the responses was negative.
3636         Reported by Dirk Lattermann.
3638         * src/copy.h: Better support for mv:
3639         [struct cp_options] (move_mode): New member.
3640         * src/copy.c (copy_internal): Use new move_mode member.
3641         Add parameter.
3642         (copy): Add parameter.
3644         * tests/cp/Makefile.am (TESTS): Add backup-is-src.
3645         * tests/mv/Makefile.am (TESTS): Likewise.
3647         * lib/userspec.c: Don't declare strdup if it's defined as a macro.
3648         Reported by Lorne Baker.
3650         * src/Makefile.am (ginstall_SOURCES): Add copy.c and cp-hash.c.
3652         * src/mv.c (cp_option_init): Initialize new members.
3653         * src/cp.c (cp_option_init): Likewise.
3654         (main): Set new preserve_* options.
3656 1998-05-09  Jim Meyering  <meyering@ascend.com>
3658         * src/copy.h: Support for install:
3659         [struct cp_options] (failed_unlink_is_fatal): New member.
3660         (preserve_owner_and_group): New member.
3661         (preserve_chmod_bits): New member.
3662         (preserve_timestamps): New member.
3663         (preserve): Remove member.
3664         (set_mode): New member.
3665         (mode): New member.
3666         * src/copy.c (new_nondir_mode): New function.  Use where appropriate.
3667         Use more-specific preserve_* members in place of removed `preserve'.
3668         (copy_internal): Honor failed_unlink_is_fatal.
3670         * src/install.c (main): Rewrite argv-handling to be clearer.
3671         (copy_file): Rewrite to use copy.c (copy).
3672         (change_attributes): Get rid of now-(with chown wrapper)-unnecessary
3673         `no_need_to_chown' parameter.  Fix caller.
3674         (install_file_in_file): Remove now-unnecessary `to_created' parameter.
3675         (cp_option_init): New function.
3676         Update several functions to take new parameter specifying copy options.
3678         * tests/install: New subdir, with one basic test.
3679         * tests/Makefile.am (SUBDIRS): Add install.
3680         * configure.in (AC_OUTPUT): Add tests/install/Makefile.
3682         * src/dd.c: Include safe-read.h.
3683         Don't declare safe_read.
3684         * src/touch.c: Likewise.
3686         * configure.in (jm_TYPE_SSIZE_T): Use it.
3687         * acconfig.h (ssize_t): Add undef.
3689 1998-05-03  Jim Meyering  <meyering@ascend.com>
3691         * po/: Update from gettext-0.10.35.
3692         * intl/: Likewise.
3693         * configure.in: Remove use of AC_LINK_FILES.
3694         (AC_OUTPUT): Remove po/Makefile-generating sed command.
3696 1998-04-28  Jim Meyering  <meyering@ascend.com>
3698         * src/dircolors.c (parse_line): Use ISSPACE, not isspace.
3699         Use unsigned char * pointers, not potentially signed ones, to avoid
3700         sign extension.
3702 1998-04-26  Jim Meyering  <meyering@ascend.com>
3704         * configure.in: Use jm_ASSERT.
3705         * acconfig.h: Add NDEBUG.
3707         * src/mv.c: Don't define NDEBUG.
3708         * src/cp.c: Likewise.
3710 1998-04-14  Jim Meyering  <meyering@ascend.com>
3712         * src/.rm-warning: New file.
3713         * src/Makefile.am (EXTRA_DIST): Add .rm-warning
3714         (DISTCLEANFILES): Add .rm-warn-stamp.
3715         (rm_DEPENDENCIES): Depend on .rm-warn-stamp.
3716         (.rm-warn-stamp): New rule.
3717         (rm_prep): Comment out rule.
3719         * src/df.c (main): Use STREQ in string equality tests, not strcmp.
3720         * src/dircolors.c (dc_parse_stream): Likewise.
3721         (dc_parse_file): Likewise.
3722         * src/du.c (main): Likewise.
3723         * src/ls.c (decode_switches): Likewise.
3724         * src/remove.c (hash_compare_strings): Likewise.
3725         * src/touch.c (main): Likewise.
3727 1998-04-13  Jim Meyering  <meyering@ascend.com>
3729         * lib/Makefile.am (noinst_HEADERS): Add safe-read.h.
3731 1998-04-11  Jim Meyering  <meyering@ascend.com>
3733         * lib/hash.c: Add curly braces around statements in
3734         if/else/while/do/etc. that span more than a line -- even around
3735         multiline simple statements or single-line simple statements
3736         preceded by a comment line.
3738 1998-04-09  Jim Meyering  <meyering@ascend.com>
3740         * configure.in: Don't use AC_PATH_PROG to check for perl, now that
3741         we use jm_PERL.
3743 1998-04-06  Jim Meyering  <meyering@ascend.com>
3745         * src/cp-hash.c (cph_hash_insert): Rename from now-conflicting
3746         hash_insert.  Also declare to be static.
3747         * src/cp-hash.h (hash_insert): Remove declaration.
3749         * lib/hash.c: Lots of minor spec and name changes, and new comments.
3750         (hash_rehash): Rewrite to be easier on the allocator.
3751         From François Pinard.
3752         * lib/hash.h: More comments.
3753         * src/remove.c: Change names/usage of hash-related functions to work
3754         with the above.
3756 1998-04-05  Jim Meyering  <meyering@ascend.com>
3758         * lib/regex.c (WIDE_CHAR_SUPPORT): Define.
3759         This now depends on HAVE_BTOWC so systems that lack btowc (like
3760         solaris-2.5.1) don't lose.
3762 1998-04-04  Jim Meyering  <meyering@eng.ascend.com>
3764         * GNUmakefile: Add conditionals so that running `make' in an
3765         unconfigured source directory will get a reasonable diagnostic.
3767         * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal
3768         know about the m4/ subdirectory.
3769         * Makefile.maint (aclocal-files): Remove now-unnecessary (with
3770         automake-1.2h and the above change) aclocal-related rules and includes.
3772 1998-04-01  Jim Meyering  <meyering@eng.ascend.com>
3774         * tests/ls/cr-1: New file.
3775         * tests/ls/Makefile.am (TESTS): Add cr-1.
3777 1998-03-31  Jim Meyering  <meyering@eng.ascend.com>
3779         * src/system.h (TYPE_MAXIMUM): Cast result to `(t)' so this macro
3780         works with `unsigned char'.
3781         From Greg Wooledge.
3782         (SCHAR_MIN, SCHAR_MAX, SHRT_MIN, SHRT_MAX, LONG_MAX, ULONG_MAX): Define.
3784         * lib/xstrtol.c: Merge with the version from textutils.
3786         * lib/memcmp.c (rpl_memcmp): Rename from memcmp.
3788 1998-03-30  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3790         * src/ls.c (compare_ctime, rev_cmp_ctime, compare_mtime,
3791         rev_cmp_mtime, compare_atime, rev_cmp_atime, compare_size,
3792         rev_cmp_size): Use file name as secondary sort key to get
3793         consistent sorting.
3795 1998-03-28  Jim Meyering  <meyering@eng.ascend.com>
3797         * src/copy.c: Add copyright.
3798         * src/remove.c: Add copyright.
3799         [_AIX]: Add #pragma alloca.
3801 1998-03-27  Jim Meyering  <meyering@eng.ascend.com>
3803         * Makefile.maint ($(ACLOCAL_M4)): Replace old rule with this
3804         dependency and the := assignment of ACLOCAL to make the default
3805         rule use the `-I m4' option.
3807         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h.
3809 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
3811         * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
3812         automatically handles it.
3814 1998-03-21  Jim Meyering  <meyering@eng.ascend.com>
3816         * lib/quotearg.h: Update from patch-2.5.3.
3817         * lib/quotearg.c: Likewise.
3818         * src/ls.c (decode_switches): Pass a null pointer instead of address
3819         of quotearg_quoting_options.
3821 1998-03-19  Paul Eggert  <eggert@twinsun.com>
3823         * lib/fsusage.h (struct fs_usage): New member
3824         fsu_bavail_top_bit_set.
3825         * lib/fsusage.c: Include <limits.h>.
3826         (CHAR_BIT, EXTRACT_TOP_BIT, PROPAGATE_TOP_BIT): New macros.
3827         (get_fs_usage): If top bit of system variable corresponding to
3828         fsu_bavail is set, then set fsu_bavail_top_bit_set, and
3829         sign-extend the value when storing it into fsu_bavail.
3830         * src/df.c (show_dev): If fsu_bavail_top_bit_set is nonzero,
3831         assume the original value corresponding to fsu_bavail was negative.
3832         Reported by Arne Juul.
3834 1998-03-18  Jim Meyering  <meyering@eng.ascend.com>
3836         * src/Makefile.am (rm-prep): Add dependency and rule to save users
3837         with `.' too early in their PATH from the `rm: cannot unlink `rm':
3838         Text file busy' error.  Suggestion from Philippe De Muyter.
3840 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
3842         * Version 3.16n.
3844         * lib/chown.c: Use #if, not #ifdef with HAVE_ macros.
3845         * lib/closeout.c: Likewise.
3846         * lib/dirname.c: Likewise.
3847         * lib/euidaccess.c: Likewise.
3848         * lib/fileblocks.c: Likewise.
3849         * lib/filemode.c: Likewise.
3850         * lib/ftruncate.c: Likewise.
3851         * lib/group-member.c: Likewise.
3852         * lib/isdir.c: Likewise.
3853         * lib/long-options.c: Likewise.
3854         * lib/mountlist.c: Likewise.
3855         * lib/path-concat.c: Likewise.
3856         * lib/save-cwd.c: Likewise.
3857         * lib/savedir.c: Likewise.
3858         * lib/strcasecmp.c: Likewise.
3859         * lib/strdup.c: Likewise.
3860         * lib/userspec.c: Likewise.
3861         * lib/yesno.c:: Likewise.
3863         * src/chgrp.c: Use #if, not #ifdef with HAVE_ macros.
3864         Use #if !, not #ifndef with HAVE_ macros.
3865         * src/chown.c: Likewise.
3866         * src/copy.c: Likewise.
3867         * src/dd.c: Likewise.
3868         * src/dircolors.c: Likewise.
3869         * src/install.c: Likewise.
3870         * src/ls.c: Likewise.
3871         * src/mv.c: Likewise.
3872         * src/touch.c: Likewise.
3874         * configure.in: Use jm_PREREQ.
3876 1998-03-14  Jim Meyering  <meyering@eng.ascend.com>
3878         Revert most `getdate.h -> get-date.h' changes of 1998-02-20.
3879         With automake-1.2f, that hack is no longer needed.
3881         * src/remove.c: Use `virtual memory exhausted' message, not
3882         `Memory exhausted' to be consistent with the majority of other
3883         such messages.
3884         Say `removing all...', not `removing any...'.
3885         * src/rmdir.c (remove_parents): Be consistent with documentation of
3886         --verbose option and with remove.c in saying `removing...' before
3887         the operation is attempted.
3888         (main): Likewise.
3889         Suggestions from Santiago Vila.
3891         * src/copy.c (copy_dir): Add new parameter, copy_into_self, and set it.
3892         (copy_internal): Likewise.
3893         (copy): Likewise.
3894         Update all callers.
3895         * src/copy.h (copy): Update prototype.
3896         * src/cp.c (do_copy): Add unused arg in calls to copy.
3897         * src/mv.c (do_move): Add &copy_into_self arg in call to copy.
3898         Don't remove source directory when copy_into_self is nonzero.
3899         Reported by Arne Henrik Juul.
3901         * tests/mv/into-self: Test for the above.
3902         * tests/mv/Makefile.am (TESTS): Add into-self.
3904 1998-02-28   Eli Zaretskii  <eliz@is.elta.co.il>
3906         * userspec.c (parse_user_spec) [__DJGPP__]: Make function know
3907         about any arbitrary user and group by pretending to be the user
3908         and to belong to the group specified in `spec_arg' argument.
3910         * idcache.c (getuidbyname) [__DJGPP__]: Make function know about
3911         any arbitrary user name.
3912         (getgidbyname) [__DJGPP__]: Make function know about any arbitrary
3913         group name.
3915 1998-02-24  Jim Meyering  <meyering@eng.ascend.com>
3917         * lib/xstrtol.c (TYPE_SIGNED): Define.
3918         (TYPE_MAXIMUM): Define.
3919         (ULONG_MAX): Use TYPE_MAXIMUM.
3920         (LONG_MAX): Use TYPE_MAXIMUM.
3922         * lib/fnmatch.c: Update from libit.
3923         * lib/idcache.c: Update from libit.
3925 1998-02-23  Paul Eggert  <eggert@twinsun.com>
3927         * lib/quotearg.h, lib/quotearg.c: New files.
3928         * lib/Makefile.am (libfu_a_SOURCES): Add quotearg.c.
3929         (noinst_HEADERS): Add quotearg.h.
3931         * src/ls.c: Include new file quotearg.h.
3932         (enum indicator_style): Rename all to classify, and not_programs
3933         to file_type, to match option spellings.  All users changed.
3934         (indicator_style_args): New constant.
3935         (quote_funny_chars, quote_as_string, quote_shell): Remove;
3936         (filename_quoting_options, dirname_quoting_options): Use these
3937         variables instead.
3938         (long_options): Add --indicator-style, --quoting-style,
3939         --show-control-chars.  Remove --quote-shell.
3940         (dired_dump_obstack): Remove style parameter and don't output style.
3941         (main): Go back to previous method of outputting //DIRED//
3942         and //SUBDIRED// lines, without style.  But add a new
3943         //DIRED-OPTIONS// line that does output style.
3944         (decode_switches, usage): Add --indicator-style, --quoting-style,
3945         --show-control-chars.  Remove --quote-shell.
3946         (decode_switches): Default from QUOTING_STYLE environment variable.
3947         Set new quoting vars.
3948         (quote_name): Renamed from quote_filename.
3949         Take new arg specifying quoting options.
3950         Always print; do not have a special case for null FILE * argument.
3951         All callers changed.
3952         Move the guts of this function to new file quotearg.c.
3953         (length_of_file_name_and_frills): Use quotearg_buffer instead
3954         of (old) quote_filename to find length of file name.
3956         (decode_switches, parse_ls_color, print_dir, gobble_file,
3957         get_link_name): Quote output in diagnostics.
3959         * NEWS, doc/fileutils.texi: Describe above changes.
3960         * doc/fileutils.texi: Mention that control characters are output
3961         as question marks if output is a terminal.
3963 1998-02-22  Jim Meyering  <meyering@eng.ascend.com>
3965         * Version 3.16m.
3967         * ChangeLog-1997: New file.
3968         * Makefile.am (EXTRA_DIST): Add ChangeLog-1997.
3970 1998-02-21  Jim Meyering  <meyering@eng.ascend.com>
3972         * configure.in (AC_OUTPUT): Add tests/mv/Makefile.
3973         * tests/Makefile.am (SUBDIRS): Add mv.
3974         * tests/mv: New directory
3975         * tests/mv/mv-special-1: New test.
3977 1998-02-20  Jim Meyering  <meyering@eng.ascend.com>
3979         * src/touch.c: Include get-date.h.
3980         Remove get_date decl.
3982         * lib/getdate.h: Removed.  Could cause confusion with an
3983         automake-generated `.y.h' rule.
3984         * lib/get-date.h: Renamed from getdate.h.
3985         * lib/getdate.y: s/getdate.h/get-date.h/
3986         * lib/Makefile.am (noinst_HEADERS): s/getdate.h/get-date.h/
3988 1998-02-19  Jim Meyering  <meyering@eng.ascend.com>
3990         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
3991         * lib/fileblocks.c [__DJGPP__]: Add missing typedef for daddr_t.
3993 1998-02-13  Jim Meyering  <meyering@eng.ascend.com>
3995         * src/mv.c (cp_option_init): Set copy_as_regular to 0, not 1.
3996         Otherwise, mv tries to open special files.
3997         Reported by Kjetil Torgrim Homme.
3999 1998-02-08  Jim Meyering  <meyering@eng.ascend.com>
4001         * Makefile.maint (cvs-dist): Update po/ to clear modified status
4002         of *.po files before running cvs tag -c.
4004         * src/ln.c (usage): Reword to use `TARGET' and `LINK_NAME' in
4005         description.
4007 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
4009         * GNUmakefile: New file.
4010         * Makefile.am (EXTRA_DIST): Add GNUmakefile.
4011         Don't include Makefile.maint from here.  It's included from GNUmakefile.
4013         * configure.in: Don't use AM_MAINTAINER_MODE.
4014         (jm_PERL): Use this.
4016         * src/Makefile.am (EXTRA_DIST): Remove dcgen.pl.  Add dcgen.
4017         (CLEANFILES): Remove dcgen.
4018         (dircolors.h): Use $(PERL).
4019         (.pl): Remove rule.
4021 1998-02-01  Jim Meyering  <meyering@na-net.ornl.gov>
4023         * POTFILES.in: Add remove.c.  Reported by Santiago Vila.
4025 1998-01-28  Jim Meyering  <meyering@na-net.ornl.gov>
4027         * src/df.c (print_header): Tweak format to align heading over
4028         last column of `df -i' output.  From Andreas Schwab.
4030 1998-01-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
4032         * Makefile.am: Include Makefile.maint from $(srcdir).
4034 1998-01-25  Jim Meyering  <meyering@na-net.ornl.gov>
4036         * Version 3.16l.
4038         * Makefile.maint: New file.
4039         * Makefile.am: Move rules common to textutils, fileutils, sh-utils
4040         into Makefile.maint.
4041         Include Makefile.maint.
4042         (EXTRA_DIST): Add Makefile.maint.
4044         * src/cp.c (re_protect): Don't fail for non-root when chown fails
4045         due not only to lack of permission (EPERM), but also to lack of
4046         support (EINVAL).  Reported by Bengt Martensson.
4047         * src/copy.c (DO_CHOWN):  Likewise.
4049 1998-01-24  Jim Meyering  <meyering@na-net.ornl.gov>
4051         * tests/ls/time-1 (test_failure): Rename does not update ctime;
4052         link does -- so use ln, not mv.
4053         Note that the SunOS4.1.4 failure of the ctime test is expected.
4055         * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
4056         bug in Cray C 5.0.3.0 when T == time_t.
4058         * tests/rm/r-1: Adjust expected output for changed format of
4059         `rm --verbose'.
4060         * tests/rm/r-2: Likewise.
4062 1998-01-23  Jim Meyering  <meyering@na-net.ornl.gov>
4064         * lib/mktime.c (__mktime_internal): Work around bug in Irix4.0.5's
4065         C compiler.  From Kaveh Ghazi.
4066         (TYPE_MINIMUM): Define.
4067         (TYPE_MAXIMUM): Define.
4068         (TIME_T_MIN): Use TYPE_MINIMUM.
4069         (TIME_T_MAX): Use TYPE_MAXIMUM.
4071 1998-01-22  Jim Meyering  <meyering@na-net.ornl.gov>
4073         * src/dd.c: Reorder functions to obviate forward dcls.
4074         (quit): Declare to be inline to stifle compile warning.
4076         * src/cp.c (do_copy): Add unreachable `return 0' to stifle warning.
4078         * tests/rm/sunos-1: Don't use -f.  Do adjust $RM if it's a
4079         relative path.
4081         * tests/ls/time-1: Use GNU touch to work around problems with NFS
4082         caching and/or clock skew.  Reported by Kaveh Ghazi.
4084         * tests/ls/Makefile.am (TESTS_ENVIRONMENT): Add TOUCH.
4086         * src/Makefile.am (noinst_HEADERS): Add remove.h.
4087         (mv_SOURCES): Define.
4088         (rm_SOURCES): Define.
4090 1998-01-21  Jim Meyering  <meyering@na-net.ornl.gov>
4092         * src/install.c: Declare new global, backup_type.
4093         (main): Initialize backup_type unconditionally.
4094         (copy_file): Call find_backup_file_name with new argument, backup_type.
4095         * src/ln.c: Declare new global, backup_type.
4096         (main): Initialize backup_type unconditionally.
4097         (do_link): Call find_backup_file_name with new argument, backup_type.
4099         * src/copy.c (copy_internal): Use x->backup_type, not the global.
4100         (valid_options): Use VALID_BACKUP_TYPE and VALID_SPARSE_MODE.
4102         * src/copy.h: (VALID_SPARSE_MODE): Define.
4103         [struct cp_options] (backup_type): New member.
4105         * src/cp.c [NDEBUG]: Comment out definition.
4106         (do_copy): Use x->backup_type, not the global.
4108         * src/remove.c: New file.  Contains guts of old rm.c.
4109         (remove_init): New function.
4110         (remove_fini): New function.
4111         (rm): Take third argument, specifying options.
4112         * src/remove.h: New file.  Associated dcls.
4113         * src/rm.c: Remove and minimally librarify guts for use in mv.c.
4114         (main): Pass options (`&x') to rm.
4115         Call remove_init and remove_fini instead of open-coding them.
4117         * src/mv.c (rm_option_init): New function.
4118         (cp_option_init): New function.
4119         (copy_reg): Remove now-unused function.
4120         (do_move): Set up for and use `copy.c (copy)' in place of copy_reg.
4121         Set up for and use `remove.c (rm)' in place of unlink.
4123 1998-01-20  Jim Meyering  <meyering@na-net.ornl.gov>
4125         * lib/backupfile.c: Use ANSI function definitions.
4126         Remove global declaration of backup_type.
4127         (simple_backup_suffix): Default to `~', not `.orig'.
4128         Use PARAMS, not __BACKUPFILE_P.
4129         (find_backup_file_name): Add parameter, backup_type.
4130         * lib/backupfile.h: Remove extern declaration of backup_type.
4131         Use PARAMS, not __BACKUPFILE_P.
4132         (VALID_BACKUP_TYPE): Define.
4133         (find_backup_file_name): Adjust prototype.
4135 1998-01-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
4137         * src/df.c (print_header): Fix inode format header to line it up
4138         with the rest of the output.
4140 1998-01-13  Jim Meyering  <meyering@na-net.ornl.gov>
4142         * lib/stat.c: Set errno to ENOENT, not EINVAL.  This is consistent
4143         with most other implementations.
4145 1998-01-12  Jim Meyering  <meyering@na-net.ornl.gov>
4147         * lib/fileblocks.c: Include sys/param.h only #if HAVE_SYS_PARAM_H.
4148         Move function-spanning `#if ...BSIZE' directive to follow inclusion
4149         of sys/param.h since BSIZE is sometimes defined in sys/param.h.
4150         Reported by Philippe De Muyter.
4152 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
4154         * Version 3.16k.
4156         * src/install.c (install_file_to_path): New function.
4157         FIXME: update fileutils.texi.
4158         (main): Handle new option, -D.
4159         Based on a patch from Marty Leisner.
4160         (usage): Describe -D.
4162         * src/ls.c (decode_switches) [-u]: Fix bug whereby -u worked only
4163         with -l or -t.  Now, -u (like -c) implies --sort=time.
4164         (usage): Correct descriptions of --sort, --time, and -t.
4165         Suggestions from Andreas Schwab.
4167         Add test for the above fix.
4168         * configure.in (AC_OUTPUT): Add tests/ls/Makefile.
4169         * tests/Makefile.am (SUBDIRS): Add ls.
4170         * tests/ls: New directory.
4171         * tests/ls/Makefile.am: New file.
4172         * tests/ls/time-1: New file.
4174         * lib/makepath.c (make_path): Reformat 3 if-stmts to test
4175         `if (newly_created_dir)' only once.  Suggestion from Andreas Schwab.
4177 1998-01-06  Jim Meyering  <meyering@na-net.ornl.gov>
4179         * lib/getdate.y: Move inclusion of getdate.h and dependent extern
4180         declarations down so getdate.h's prototype follows the sometimes-
4181         enabled definition of `const' to nothing.  Otherwise, the prototype
4182         wouldn't match the definition because of the defined-away `const'.
4183         From Kaveh Ghazi.
4184         (get_date): ANSI-fy definition.
4185         Add %expect directive.
4187 1998-01-05  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
4189         * lib/makepath.c (make_path): Put only newly created directories
4190         on the LEADING_DIRS list.
4192 1998-01-05  Paul Eggert  <eggert@twinsun.com>
4194         * lib/fsusage.c (PROPAGATE_ALL_ONES): New macro.
4195         (get_fs_usage): If a value consists entirely of 1 bits,
4196         propagate this info to the output by setting it to (uintmax_t) -1.
4197         * src/df.c (df_readable): New function.
4198         (show_dev): If a value consists entirely of 1 bits, or is derived
4199         from some other value that consists entirely of 1 bits, report "-".
4200         Check inode and block counts more carefully for plausibility,
4201         to avoid arithmetic overflow when computing percentages.
4203 1998-01-04  Jim Meyering  <meyering@na-net.ornl.gov>
4205         * Version 3.16j.
4207         * lib/Makefile.in: Regenerated with patched automake-1.2d.
4208         See README-alpha.
4210         * src/chgrp.c: Use a single enumerated type, Verbosity, instead of
4211         the two booleans, verbose and changes_only.  This fixes a bug whereby
4212         --change had the same effect as --verbose.
4213         * src/chmod.c: Likewise.
4214         * src/chown.c: Likewise.
4215         Reported by Paul Eggert.
4217 1998-01-04  Paul Eggert  <eggert@twinsun.com>
4219         Check for write errors more carefully.
4221         * lib/Makefile.am (libfu_a_SOURCES): Add closeout.c.
4222         (noinst_HEADERS): Add closeout.h.
4223         * lib/closeout.c, lib/closeout.h: New files.
4224         * lib/long-options.c (parse_long_options),
4225         src/chgrp.c, src/chmod.c, src/chown.c, src/cp.c, src/dd.c,
4226         src/df.c, src/dircolors.c, src/du.c, src/install.c, src/ln.c,
4227         src/ls.c, src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mv.c,
4228         src/mvdir.c, src/rm.c, src/rmdir.c, src/sync.c, src/touch.c
4229         (main, usage): Check for write error to stdout before exiting.
4230         Include "closeout.h".
4232 1998-01-03  Jim Meyering  <meyering@na-net.ornl.gov>
4234         * src/df.c (show_dev): Treat `fsu.fsu_bavail == (unsigned long) -1'
4235         just like `fsu.fsu_blocks == 0' as an indicator that usage information
4236         is invalid.  This happens with Solaris-5.5.1 CD-ROM mount points.
4238         * lib/save-cwd.h: Guard PARAMS-enabling definition with
4239         `defined PROTOTYPES || (defined __STDC__ && __STDC__)' to avoid
4240         problems with Irix4's cc.  From Kaveh Ghazi.
4241         * lib/getdate.h: Likewise, but just to be consistent.
4243         * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
4244         those files will be built via the ANSI2KNR-filtering rules if necessary.
4245         Reported by Kaveh Ghazi.
4247 1998-01-02  Jim Meyering  <meyering@na-net.ornl.gov>
4249         * Version 3.16i.
4251         Fix problem with `install -d'.  Reported by Marty Leisner.
4253         * src/install.c (get_ids): When otherwise unspecified,
4254         set uid and gid to -1.
4255         * lib/makepath.c (make_path): Try to change ownership only if we've
4256         just created the directory.  Fix latent bug (s/&&/||/ in two places --
4257         also, note that it could not be exercised via install or mkdir)
4258         whereby chown would not be invoked when only one of owner/group is
4259         not -1.
4261 1998-01-01  Jim Meyering  <meyering@na-net.ornl.gov>
4263         * src/rm.c (remove_cwd_entries): Initialize the entry-name obstack
4264         only once and never free it.
4266 Local Variables:
4267 version-control: never
4268 End: