Version 6.3.
[coreutils.git] / ChangeLog
blob7104ccbed02497233e2a847f708c2db1abd04deb
1 2006-09-30  Jim Meyering  <jim@meyering.net>
3         Version 6.3.
4         * NEWS: Record the 6.3 release date.
5         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
7         * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
9         * src/c99-to-c89.diff: Update offsets.
11 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
13         * tests/rm/readdir-bug: Don't use $(...) in a shell script,
14         as it doesn't work with Solaris /bin/sh.
16 2006-09-29  Jim Meyering  <jim@meyering.net>
18         * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
19         the pinky segfault.
21         * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
22         use .1 as the increment.  Actual output varies too much.
23         [eq-wid-3]: New, commented out test.
25         * src/shuf.c (read_input): Fix an off-by-one error that
26         would cause an infloop for piped input of 8KB or more.
27         * NEWS: Mention the fix.
28         * tests/misc/shuf: Test for the above fix.
30         Since any system may be affected by the Darwin readdir bug,
31         perform the extra rewinddir unconditionally.  The performance
32         impact of rewinding a directory is negligible.
33         * src/remove.c (NEED_REWIND): Define to use
34         CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
36         * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
37         increment translates to a slightly larger value.
38         This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
39         The final expected value wasn't being printed.
41         Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
42         and NFS, whereby rm would not remove all files in a directory.
43         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
44         (NEED_REWIND): New macro, so that we incur the cost of the work-around
45         rewinddir only on afflicted systems.
46         * NEWS: Clarify and correct.
47         * tests/rm/readdir-bug: New file.  Test for the above fix.
48         * tests/rm/Makefile.am (TESTS): Add it.
49         Prompted by testing and analysis from Bruno Haible:
50         http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
52 2006-09-28  Paul Eggert  <eggert@cs.ucla.edu>
54         * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
55         suggested for Debian stable, which uses Perl 5.8.4.
57 2006-09-28  Jim Meyering  <jim@meyering.net>
59         Automatically generated dependencies are important even
60         when all of the sources in a directory come from gnulib.
61         * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
62         option that gnulib-tool adds to what becomes our lib/gnulib.mk.
64         * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
65         Ensure that IFS is set properly and unset PATH.
66         Sanitize inputs.
67         Work properly even when the name of the selected file starts with "-".
68         Invoke rm via "../../src/rm", and adjust expected output.
69         Prompted by a patch from Tim Waugh.
71         * README-cvs: Add Bison to the list of required packages.
73 2006-09-26  Jim Meyering  <jim@meyering.net>
75         * src/c99-to-c89.diff: Update offsets.
77         * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
78         it from removing a directory containing 188 or more entries.
79         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
80         20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
81         Reported by Matthew Woehlke.
83 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
85         * NEWS: "groups user" no longer outputs "user :"; you need at least
86         two users.  "groups" now processes options like --help more compatibly.
87         * src/groups.sh: Implement the option-processing change.
88         Handle user and group names with special characters more robustly.
89         Report write errors instead of exiting silently with status 1.
91 2006-09-26  Jim Meyering  <jim@meyering.net>
93         * README: Warn not to run autoreconf manually.  Use bootstrap instead.
95         * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
96         Rewrite to avoid using temporary, $status.
98         * NEWS: Mention the bug fix.
99         * src/groups.sh: Don't hide a write failure.
100         Reported by Iain Calder <ic56@rogers.com>.
102 2006-09-25  Jim Meyering  <jim@meyering.net>
104         * src/chown.c (usage): Clarify --dereference description.
105         * src/chgrp.c (usage): Likewise.  Suggestion from Jamie McClelland.
107 2006-09-24  Jim Meyering  <jim@meyering.net>
109         * NEWS: Mention these fixes.
110         * src/copy.c (copy_reg): With --verbose (-v), print
111         "removed `file_name'" just after unlinking a file.
112         (copy_internal): Likewise, in three more places.
113         Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
114         * tests/mv/hard-verbose: New file.  Test for the above fix.
115         * tests/mv/Makefile.am (TESTS): Add hard-verbose.
117         * tests/help-version (sync_args): Don't call sync, since it spins up
118         disks that I've deliberately caused to spin down (but not unmounted).
120         * NEWS: Mention the improvement to sort.
122         * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
123         as well as existing.
125         * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
126         since that predated addition of d_type support.
128 2006-09-23  Jim Meyering  <jim@meyering.net>
130         * gl/modules/getloadavg.diff: New file.  Work around the way the latest
131         version of the getloadavg module interacts with our bootstrap script.
132         * bootstrap (gnulib_tool_options): Add "--local-dir gl".
133         * Makefile.am (EXTRA_DIST): Sort file names.
134         Add bootstrap and gl/modules/getloadavg.diff
136 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
138         * bootstrap: Add support for --force.
139         (usage): New function.  Describe usage less tersely.
140         (CVS_only_file): New var.
142         * NEWS: Document fix for cp -i and mv -i.
143         * src/copy.c (copy_internal): With -i, prompt even if the source
144         is a directory and the destination is not.  This is required by
145         POSIX and gives the user a chance to bail out before failing.
146         * tests/cp/Makefile.am (TESTS): Add cp-i.
147         * tests/cp/cp-i: New file.
148         * tests/mv/Makefile.am (TESTS): Add i-5.
149         * tests/mv/i-5: New file.
151 2006-09-20  Jim Meyering  <jim@meyering.net>
153         * NEWS: Mention the chmod bug fix.
155         * tests/chmod/inaccessible: New test, specifically for this bug.
156         Based on a test case from Paul Eggert.
157         * tests/chmod/Makefile.am (TESTS): Add inaccessible.
159         Fix the 2006-09-18 bug differently.
160         * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
161         tell fts_read to stat the file again, in case it has become
162         accessible since the initial fts_open call.
163         * src/chown-core.c (change_file_owner): Likewise.
165         * src/chmod.c: Revert last change.  There is a better way.
166         * src/chown-core.c: Likewise.
168 2006-09-19  Paul Eggert  <eggert@cs.ucla.edu>
170         * src/ln.c (target_directory_operand): Rewrite to avoid porting
171         problem on Tandem reported by Matthew Woehlke in
172         <https://savannah.gnu.org/bugs/?17172>.
174 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
176         Fix bug where chmod, chown, and chgrp did not process operands
177         left-to-right in some cases.
178         * src/chmod.c (wd_errno): New var.
179         (chmod_file): New function, with most of the contents of the
180         old prcess_file function.
181         (process_files): Use it.  This gives file names to fts one
182         at a time, so that they are processed left-to-right as POSIX
183         requires.
184         * src/chown-core.c (wd_errno, chown_files): Likewise.
185         (chown_file): New function.
186         * tests/install/basic-1: Redo test so as to not workaround
187         the chmod bug, thereby testing for it.
189         * src/shuf.c (main): Quote the entire range when reporting an
190         invalid one, rather than just the part that contained the error.
192         * tests/stty/row-col-1: Rewrite to avoid temporary file that is
193         sometimes left behind if the test is skipped or interrupted.
195         * bootstrap (symlink_to_gnulib): New function.
196         (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
197         to copies-of-gnulib.
198         (cp_mark_as_generated, slurp, gnulib_files):
199         Avoid making a copy if it's the same as the old version.
200         (gnulib_files): Add support for this variable (used by Bison).
202         * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
203         indicating flaw in kernel.  Reword to say that the flaw isn't
204         serious for coreutils, since the flaw does affect ls -i.
206         * tests/chgrp/basic: Fix bug in test case exposed by building on
207         Solaris 8 in a setgid directory.  The test case incorrectly
208         assumed that 'symlink' would be in group $g1.
210 2006-09-18  Jim Meyering  <jim@meyering.net>
212         * NEWS: Add a line for 6.3-cvs.
213         * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
215         Version 6.2.
216         * NEWS: Record the 6.2 release date.
217         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
219 2006-09-17  Jim Meyering  <jim@meyering.net>
221         * tests/chgrp/basic: On an OpenBSD system, rather than failing
222         due to a known problem, merely warn about it.
223         Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
224         Instead, use stat to test file system for desired results, directly.
225         * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
227         * tests/envvar-check: Add more variable names to the list of those
228         that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
229         QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
231 2006-09-16  Paul Eggert  <eggert@cs.ucla.edu>
233         * NEWS: Document that mkdir -p and install -d now fork on occasion.
234         * bootstrap.conf (gnulib_modules): Add savewd.
235         * src/install.c: Include savewd.h.
236         (process_dir): New function.
237         (main, install_file_in_file_parents): Use it, along with the new
238         savewd module, to avoid some race conditions.
239         * src/mkdir.c: Include savewd.h.
240         (struct mkdir_options): New members make_ancestor_function, mode,
241         mode_bits.
242         (make_ancestor): Return 1 if the resulting directory is not readable.
243         (process_dir): New function.
244         (main): Use it, along with new savewd module, to avoid some
245         race conditions.  Fill in new slots of struct mkdir_options, so
246         that callees get the values.
247         * tests/install/basic-1: Test for coreutils 5.97 bug that was
248         fixed in coreutils 6.0, and which should still be fixed with
249         this change.
250         * tests/mkdir/p-3: Likewise.
252 2006-09-15  Jim Meyering  <jim@meyering.net>
254         * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
255         The 2006-09-08 changes made it so "mv dir new-name/" would
256         fail on NetBSD 1.6.  This makes it work once again.
258 2006-09-14  Jim Meyering  <jim@meyering.net>
260         * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
261         Instead, since it's a little fragile, assert the condition.
262         (target_directory_operand): Update comment to reflect latest change.
264 2006-09-12  Paul Eggert  <eggert@cs.ucla.edu>
266         * src/who.c (print_user): Rewrite to avoid warning from
267         GCC 4.1.1 with -Wall.
269 2006-09-12  Jim Meyering  <jim@meyering.net>
271         * tests/mv/atomic: Check for specific strace output, rather than
272         simply nonempty.  RHEL AS 4 would fail this test due to strace
273         generating "[ Process PID=14434 runs in 32 bit mode. ]".
274         Reported by Nelson Beebe.
276 2006-09-11  Jim Meyering  <jim@meyering.net>
278         * src/remove.c (remove_dir): Move new cache_stat_init call onto
279         it's own line.
280         (rm_1): Move declaration of "st" and new cache_stat_init call
281         "down" to nearer where they're used.
282         * src/c99-to-c89.diff: Add another set of curly braces.
284 2006-09-10  Paul Eggert  <eggert@cs.ucla.edu>
286         * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
287         substr's last operand is very large.  Performance problem reported
288         by Sebastian Kreft.
290 2006-09-09  Jim Meyering  <jim@meyering.net>
292         * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
293         are no .m4 files.
294         (sc_require_config_h): Skip this test if there are no version-
295         controlled .c files.
296         (sc_prohibit_assert_without_use): Likewise.
298 2006-09-08  Jim Meyering  <jim@meyering.net>
300         * bootstrap: Export CVS_RSH separate from its assignment, to work
301         even with Solaris 10's /bin/sh.  Suggestion from Mark D. Baushke.
303 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
305         * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
306         no file operand is given, and standard input is any FIFO.
307         This is in response to Open Group XCU ERN 114.
308         * src/tail.c (main): Likewise.
310 2006-09-08  Jim Meyering  <jim@meyering.net>
312         mv and "cp -r" no longer fail when invoked with two arguments
313         where the first one names a directory and the second name ends in
314         a slash and doesn't exist.  E.g., "mv dir B/", for nonexistent B,
315         now succeeds, once more. This reverts part of the 2004-06-27
316         change for 5.3.0.
317         * NEWS: Say the above.
318         * src/mv.c (target_directory_operand): Don't require (here)
319         that the target operand "look like" a directory.  This change
320         pushes the test down to the rename syscall level, where a
321         "mv dir existing-non-dir/" will mistakenly succeed on older systems
322         that ignore trailing slashes in the rename destination argument.
323         * src/cp.c (target_directory_operand): Likewise, but for cp.
324         * tests/mv/trailing-slash: Exercise the above fixes.
325         * tests/cp/trailing-slash: New file.
326         * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
328         * bootstrap: Use the previously unused variable, $src,
329         to avoid repeating "$GNULIB_SRCDIR/$file".
331         * bootstrap (cp_mark_as_generated): Don't use "local", to
332         accommodate ancient "/bin/sh".  Suggested by Ralf Wildenhues.
333         Rename now-global "$src" and "$dst" to have cp_ prefix.
334         Safer, and avoids confusion.
336         * bootstrap (cp_mark_as_generated): New function.
337         (slurp): Use it to prepend editor hints and a warning that
338         the file we're copying is generated.
339         Suggestion from Bruce Korb.
340         (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
341         Fix last-minute typo.
343 2006-09-07  Jim Meyering  <jim@meyering.net>
345         * bootstrap: Revert last change.  There are less disruptive ways
346         to mark these generated files as read-only.
348         * src/c99-to-c89.diff: Update to have proper offsets.
350 2006-09-06  Jim Meyering  <jim@meyering.net>
352         Ensure that some gnulib-tool-generated files are read-only.
353         * bootstrap (slurp): Put the body of this function in a sub-shell,
354         with "umask a-w" so that all new files are read-only.  Remove each
355         file before we write to it, in case it's read-only.
356         Make po/Makevars and runtime-po/Makevars read-only, too.
358 2006-09-05  Jim Meyering  <jim@meyering.net>
360         * tests/cp/acl: Skip this test when cp lacks ACL support.
361         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
363         * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
364         context from change of 2006-09-02.
366 2006-09-04  Jim Meyering  <jim@meyering.net>
368         * README-cvs: Fix typo in update command.
370 2006-09-03  Jim Meyering  <jim@meyering.net>
372         * NEWS: Tweak the wording in the new change description so that
373         no one can think this change causes e.g., `rm -fr foo../' to fail.
375         * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
376         Use $CONFIG_HEADER, rather than hard-coding it.
377         * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
379 2006-09-02  Paul Eggert  <eggert@cs.ucla.edu>
381         * NEWS: rm now rejects attempts to remove /, ./, and ../.
382         * src/basename.c: Don't include dirname.h, since system.h does it now.
383         * src/chmod.c: Likewise.
384         * src/copy.c: Likewise.
385         * src/cp.c: Likewise.
386         * src/df.c: Likewise.
387         * src/dircolors.c: Likewise.
388         * src/dirname.c: Likewise.
389         * src/du.c: Likewise.
390         * src/install.c: Likewise.
391         * src/ln.c: Likewise.
392         * src/ls.c: Likewise.
393         * src/mkdir.c: Likewise.
394         * src/mv.c: Likewise.
395         * src/remove.c: Likewise.
396         * src/rm.c: Likewise.
397         * src/rmdir.c: Likewise.
398         * src/shred.c: Likewise.
399         * src/split.c: Likewise.
400         * src/su.c: Likewise.
401         * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
402         now.
403         (dot_or_dotdot): Succeed even if "." or ".." is followed by a
404         slash.
405         * src/rm.c (usage, main): --preserve-root is now the default.
406         * src/remove.h: Fix comment.
407         * src/remove.c (cache_fstatat, cache_stat_init): New functions.
408         (cache_statted, cache_stat_ok): New functions.
409         (write_protected_non_symlink): Remove struct stat ** buf_p arg,
410         which is no longer needed with the new functions.  All callers
411         changed.
412         (prompt, is_dir_lstat, remove_entry, remove_dir):
413         New struct stat * arg.  All callers changed.
414         (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
415         (remove_cwd_entries, remove_dir, rm_1):
416         Use and maintain the file status cache.
417         (prompt, remove_entry): Omit the first "directory" in the diagnostic
418         "Cannot remove directory `foo': is a directory".  This causes "rm"
419         to pass a test case that it would otherwise fail now that it
420         "knows" more about its argument.  I think the diagnostic is better
421         without the first "directory" anyway.
422         (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
423         (rm_1): Reject attempts to remove /, ./, or ../.
424         * tests/rm/Makefile.am (TESTS): Add r-4.
425         * tests/rm/r-4: New file.
427 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
429         * src/stat.c: Include <stddef.h>
430         (alignof): New macro.
431         (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
432         Remove.
433         (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
434         (FSID_VAL): Remove.
435         (print_statfs): If f_fsid isn't an integer, grab its words one
436         at a time in little-endian order.  This is a bit easier to configure
437         and should avoid a compilation failure on MacOS reported by Bruno
438         Haible.
440 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
442         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
443         work around a Mac OS X porting problem reported by Bruno Haible in
444         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
445         (print_statfs): Use them.
447         * bootstrap.conf (gnulib_modules): Add isapipe.
448         * src/tail.c: Include isapipe.h.
449         (IS_PIPE_LIKE_FILE_TYPE): Remove.
450         (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
451         tailable, since this seems to be portable.
452         (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
453         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
455         * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
456         it for us.
458 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
460         * src/copy.c (copy_internal): Don't test whether macros like
461         S_ISLNK are defined, since they're always defined now.
462         * src/cp.c (main): Likewise.
463         * src/ln.c (main): Likewise.
464         * src/ls.c (get_link_name, make_link_name): Likewise.
465         * src/mknod.c (main): Likewise.
466         * src/mkfifo.c (usage): Likewise.
467         * src/who.c (S_IWGRP): Likewise.
469         Adjust to recent gnulib changes for the gnulib module.
470         * bootstrap.conf (gnulib_modules): Add fcntl.
471         * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove.  Other code
472         is already assuming these macros are defined.
473         (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
474         (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
475         Remove; the fcntl module now handles these.
477         Adjust to recent gnulib changes for the inttypes module.
478         * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
479         (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
481         * src/system.h: Don't bother to include <stdint.h>, since we can
482         now assume inttypes.h does the equivalent of including stdint.h.
484 2006-08-27  Jim Meyering  <jim@meyering.net>
486         * src/copy.c (copy_internal): Don't make a backup if the last
487         component of the source name is "." or "..".
488         Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
489         * NEWS: Mention this.
490         * tests/cp/src-base-dot: New file.  Test for the above fix.
491         * tests/cp/Makefile.am (TESTS): Add src-base-dot.
493         * src/system.h (DOT_OR_DOTDOT): Remove macro.  Rewrite as a...
494         (dot_or_dotdot): ...new static inline function.
495         * src/remove.c (rm_1): Reflect this renaming.
496         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
498         * src/copy.c (copy_internal): Add comments.
500 2006-08-26  Paul Eggert  <eggert@cs.ucla.edu>
502         * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
503         since Automake supplies them for us.  It always did -I$(srcdir),
504         and with the recent change to AC_CONFIG_HEADERS in configure.ac it
505         is now also doing -I../lib.
507         * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
508         Fail if the first "echo" fails.  Suppress diagnostics from "ls po/*.po"
509         since there might not be any .po files.
510         (WGET_COMMAND): Set to empty if wget doesn't
511         seem to be available.
513 2006-08-26  Jim Meyering  <jim@meyering.net>
515         This test was failing in some environments.
516         * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
517         to set LS_COLORS in the environment.
518         * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
519         Reported by Bob Proulx.
521         * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
523         * Makefile.am (EXTRA_DIST): Remove these files here, too:
524         .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
525         .x-sc_two_space_separator_in_usage.
527         Fix "mv --verbose --backup" so its output includes the
528         " (backup: foo.~1~)" suffix also when backing up a directory.
529         * NEWS: Report this bug fix.
530         * src/copy.c (emit_verbose): New function, factored out of...
531         (copy_internal): ...here.  Use the new function.
532         * tests/mv/backup-dir: Test for the above fix.
533         * tests/mv/Makefile.am (TESTS): Add backup-dir.
535 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
537         * .x-sc_no_if_have_config_h: Remove; no longer needed.
538         * .x-sc_prohibit_assert_without_use: Remove; it was empty.
539         * .x-sc_two_space_separator_in_usage: Likewise.
540         * Makefile.maint (sc_no_have_config_h): Renamed from
541         sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
542         is absent everywhere.
543         * bootstrap.conf (gnulib_modules): Add config-h.
544         * src/shred.c: Include <config.h> unconditionally, since
545         we now assume config.h exists.
546         * src/dircolors.c: Likewise.
548 2006-08-26  Jim Meyering  <jim@meyering.net>
550         "ls --color" would highlight other-writable and sticky directories
551         no differently than regular directories on a file system with
552         dirent.d_type support.
553         * NEWS: Say the above.
554         * src/ls.c (gobble_file): With --color, also stat the file when
555         we know it is a directory.
556         Derived from an anonymous one-line fix and bug report:
557         <http://savannah.gnu.org/bugs/?15043>.
558         * tests/ls/color-dtype-dir: New file.  Test for the above fix.
559         * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
561 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
563         * .cvsignore: Remove stamp-h1.  Add coreutils-*, to ignore
564         tarballs.
565         * bootstrap.conf: Add configmake, verify.
566         * src/.cvsignore: Remove localedir.h.
567         * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
568         subsumed by configmake.
569         * src/system.h: Include configmake.h rather than localedir.h
570         (LOCALEDIR): New macro.
572         Rewrite to avoid some unnecessary casts, macros, literals.
573         * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
574         not macros.
575         (SECTOR_SIZE, SECTOR_MASK): New constants.
576         (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
577         and use the SECTOR_* constants when applicable.  Check for size <
578         0 rather than size == -1, since negative-size files are a sign of
579         trouble anyway.
581 2006-08-25  Bruno Haible  <bruno@clisp.org>
583         * src/shred.c (dopass): Assume a continuable error if EIO even
584         if the current position is not a multiple of 512.
586 2006-08-24  Jim Meyering  <jim@meyering.net>
588         * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
590 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
592         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define.  This
593         macro was being used without being defined.
594         (SB_F_NAMEMAX): Remove cast.
595         (f_fsid) [BeOS]: Likewise.
596         (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
597         All uses changed.
598         (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
599         functions.
600         (xstrcat): Remove.  All uses changed to use the above functions.
601         (print_statfs, print_stat): 2nd arg is now the prefix len, not the
602         buffer len.  All uses changed.  Output '?', not '*', for unknown
603         data or errors.  Do not assume signed values can be interchanged
604         with unsigned when printing.
605         (print_statfs): For %i, print the fsid as a single int, not as a
606         pair.
607         (print_it): Quote invalid format better.
609         * NEWS: printf supports the I flag.
610         * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
612 2006-08-23  Bruno Haible  <bruno@clisp.org>
614         * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
615         (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
616         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
618         * src/ls.c (SA_RESTART): Fallback define.
620 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
622         * src/system.h (EDQUOT): Define if not already defined.
623         Problem reported by Bruno Haible for BeOS.
625         * .cvsignore: Remove config.h, config.hin, as they are now
626         in lib.
627         * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
628         to lib.
629         * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
631         * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
632         to accommodate today's gnulib change.
634 2006-08-23  Jim Meyering  <jim@meyering.net>
636         * NEWS: Mention the sweeping infrastructure changes.
638 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
640         * bootstrap.conf (gnulib_modules): Add gnupload.
641         * Makefile.maint (emit_upload_commands): gnupload is now
642         in build-aux.
643         * gnupload: Remove from CVS, since it's now a gnulib module.
645         * bootstrap (bootstrap_conf_cleanup): Remove.
646         (excluded_files): New var.
647         * bootstrap.conf: Likewise.
648         * bootstrap (slurp): Exclude files early if they're in the
649         excluded_files list.  That way, their names don't get put into
650         .cvsignore.
652         * aclocal.m4, config.hin, configure:
653         Remove from CVS, since ./bootstrap generates them automatically.
654         * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
655         configure, *.cache, *.lineno, *.log.
656         Remove more-specific entries.  This catches files like configure.lineno.
657         * man/.cvsignore: Add Makefile.in.
658         * src/.cvsignore: Add Makefile.in.
659         Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
661         * tests/.cvsignore:
662         * tests/chgrp/.cvsignore:
663         * tests/chmod/.cvsignore:
664         * tests/chown/.cvsignore:
665         * tests/cp/.cvsignore:
666         * tests/cut/.cvsignore:
667         * tests/dd/.cvsignore:
668         * tests/dircolors/.cvsignore:
669         * tests/du/.cvsignore:
670         * tests/expr/.cvsignore:
671         * tests/factor/.cvsignore:
672         * tests/fmt/.cvsignore:
673         * tests/head/.cvsignore:
674         * tests/install/.cvsignore:
675         * tests/join/.cvsignore:
676         * tests/ln/.cvsignore:
677         * tests/ls/.cvsignore:
678         * tests/ls-2/.cvsignore:
679         * tests/md5sum/.cvsignore:
680         * tests/misc/.cvsignore:
681         * tests/mkdir/.cvsignore:
682         * tests/mv/.cvsignore:
683         * tests/od/.cvsignore:
684         * tests/pr/.cvsignore:
685         * tests/readlink/.cvsignore:
686         * tests/rm/.cvsignore:
687         * tests/rmdir/.cvsignore:
688         * tests/seq/.cvsignore:
689         * tests/sha1sum/.cvsignore:
690         * tests/shred/.cvsignore:
691         * tests/sort/.cvsignore:
692         * tests/stty/.cvsignore:
693         * tests/sum/.cvsignore:
694         * tests/tac/.cvsignore:
695         * tests/tail/.cvsignore:
696         * tests/tail-2/.cvsignore:
697         * tests/tee/.cvsignore:
698         * tests/test/.cvsignore:
699         * tests/touch/.cvsignore:
700         * tests/tr/.cvsignore:
701         * tests/tsort/.cvsignore:
702         * tests/unexpand/.cvsignore:
703         * tests/uniq/.cvsignore:
704         * tests/wc/.cvsignore:
705         Add Makefile.in.  Sort entries if necessary.  Remove *.I, *.E,
706         *.X, *.O, *-tests, build-script, mk-script if they're never
707         created in this directory.
709 2006-08-22  Bruno Haible  <bruno@clisp.org>
711         BeOS portability.
712         * src/uptime.c: Include OS.h if it exists.
713         (print_uptime): On BeOS, use the get_system_info function (actually a
714         macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
715         (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
717 2006-08-22  Jim Meyering  <jim@meyering.net>
719         * .cvsignore: Add ABOUT-NLS.
721         Move the check-AUTHORS rule to be run as part of "make distcheck",
722         rather than "make check".
723         * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
724         cause "make check" to fail on systems unable to build all binaries.
725         * Makefile.maint (check-AUTHORS): New rule.
726         (local-checks-available): Add it here.
727         Reported by Bruno Haible.  Needed for BeOS.
729 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
731         * src/df.c (print_header, show_dev): Use a column width that
732         depends on the block size of -P is specified and not autoscaling.
733         Problem reported by Gustavo G. Rondina in:
734         http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
736 2006-08-21  Jim Meyering  <jim@meyering.net>
738         * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
739         when the shell variable, SHELL, is not set.
740         Trigger the failure with "(unset SHELL; make check TESTS=simple)".
741         Reported by Sven Joachim in <http://bugs.debian.org/355368>.
743         * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
744         in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
745         Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
746         od: invalid type string `u8';
747         this system doesn't provide a 8-byte integral type
748         FIXME: add a test for this, but skip it when sizeof uintmax < 8.
750 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
752         Add a bootstrap procedure, so that the CVS version contains fewer
753         files and we bootstrap the rest from gnulib, gettext, etc.
754         * README-cvs: New file.
755         * bootstrap: New file.
756         * bootstrap.conf: New file.
757         * .x-sc_trailing_blank: Remove config-log, .gdb-history.  Add .po.
758         * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
759         of gnulib-tool.
760         (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
761         (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
762         (gl_EARLY): Add.
763         (gl_MACROS): Call just after gl_EARLY, just for clarity.
764         * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
765         * src/kill.c (strtoimax): Remove decl.
766         * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
767         * src/wc.c: Likewise.
768         * src/ls.c (sort_files): Rewrite to avoid need for C99-style
769         declaration, so that we don't need to patch this file.
770         * src/printf.c (strtoimax, strtoumax): Remove decls.
771         * src/su.c: Include getpass.h.
772         (getpass): remove.
773         * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
774         Include inttypes.h unconditionally.
775         (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
776         (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
777         (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
778         (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
779         (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
781         * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
782         * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
783         * tests/chmod/Makefile.in, tests/chown/Makefile.in:
784         * tests/cp/Makefile.in, tests/cut/Makefile.in:
785         * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
786         * tests/du/Makefile.in, tests/expr/Makefile.in:
787         * tests/factor/Makefile.in, tests/fmt/Makefile.in:
788         * tests/general/Makefile.in, tests/head/Makefile.in:
789         * tests/install/Makefile.in, tests/join/Makefile.in:
790         * tests/ln/Makefile.in, tests/ls/Makefile.in:
791         * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
792         * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
793         * tests/mv/Makefile.in, tests/od/Makefile.in:
794         * tests/pr/Makefile.in, tests/readlink/Makefile.in:
795         * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
796         * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
797         * tests/shred/Makefile.in, tests/sort/Makefile.in:
798         * tests/stty/Makefile.in, tests/sum/Makefile.in:
799         * tests/tac/Makefile.in, tests/tail/Makefile.in:
800         * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
801         * tests/test/Makefile.in, tests/touch/Makefile.in:
802         * tests/tr/Makefile.in, tests/tsort/Makefile.in:
803         * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
804         * tests/wc/Makefile.in:
805         Remove from CVS, since ./bootstrap generates them automatically.
807 2006-08-20  Eric Blake  <ebb9@byu.net>
809         * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
810         the patch from 2006-08-18 broke on cygwin.
812 2006-08-20  Jim Meyering  <jim@meyering.net>
814         * NEWS: Add a line for 6.2-cvs.
815         * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
817 2006-08-19  Jim Meyering  <jim@meyering.net>
819         * Version 6.1.
820         * NEWS: Record the 6.1 release date.
821         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
823         * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
825         Avoid test failure when `make check' is run through debuild.
826         * tests/help-version: Ensure that $SHELL is set to some value
827         and exported.  Patch from Sven Joachim.  For details, see
828         <http://bugs.debian.org/355368>.
830         * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
832         * README: Describe potential "pre-C99 build failure", and work-around.
834         Some of my 2006-07-03 changes to tests/*/Makefile.am were being
835         backed out due to updates provoked by the copyright changes.
836         * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
837         it propagates to the derived Makefile.am files.
838         ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
839         so we don't mistakenly edit them again.
840         * tests/cut/Makefile.am: Regenerate.
841         * tests/head/Makefile.am: Likewise.
842         * tests/join/Makefile.am: Likewise.
843         * tests/pr/Makefile.am: Likewise.
844         * tests/sort/Makefile.am: Likewise.
845         * tests/tac/Makefile.am: Likewise.
846         * tests/tail/Makefile.am: Likewise.
847         * tests/test/Makefile.am: Likewise.
848         * tests/tr/Makefile.am: Likewise.
849         * tests/uniq/Makefile.am: Likewise.
850         * tests/wc/Makefile.am: Likewise.
852         * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
853         when the file's apparent size is not a multiple of its block size.
854         * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
855         For some file sizes, writing that single byte would unnecessarily
856         waste a few file blocks.  That write may have been necessary in the
857         early days of Linux, but now, removing it should be safe.
858         Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
859         * tests/cp/sparse: New test for the above.
860         * tests/cp/Makefile.am (TESTS): Add sparse.
862         * tests/sparse-file: New file, essence factored out of...
863         * tests/du/8gb: ... here.  Use the new script.
865 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
867         * src/system.h (select_plural): Reduce by 1000000, not 1000, since
868         the CVS gettext manual now suggests 1000000.
870 2006-08-18  Bruno Haible  <bruno@clisp.org>
872         Add support for NetBSD 3.0.
873         * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
874         f_fstypename.
875         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
876         has a field f_fstypename.
877         This undoes the 2006-08-15 to src/stat.c.
879 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
881         Copyright notice fixes.
883         * COPYING: Upgrade to latest version from FSF.
885         * src/uname.c: Use (C) in copyright notice.
887         * .vg-suppressions: Add copyright notice.
888         * ChangeLog: Likewise.
889         * ChangeLog-2005: Likewise.
890         * Makefile.am: Likewise.
891         * NEWS: Likewise.
892         * README: Likewise.
893         * README-valgrind: Likewise.
894         * TODO: Likewise.
895         * announce-gen: Likewise.
896         * man/Makefile.am: Likewise.
897         * man/chmod.x: Likewise.
898         * man/chown.x: Likewise.
899         * man/df.x: Likewise.
900         * man/du.x: Likewise.
901         * man/rm.x: Likewise.
902         * src/dircolors.hin: Likewise.
903         * src/du-tests: Likewise.
904         * src/extract-magic: Likewise.
905         * src/tac-pipe.c: Likewise.
906         * src/wheel-gen.pl: Likewise.
907         * tests/Coreutils.pm: Likewise.
908         * tests/Makefile.am.in: Likewise.
909         * tests/acl: Likewise.
910         * tests/envvar-check: Likewise.
911         * tests/expensive: Likewise.
912         * tests/group-names: Likewise.
913         * tests/help-version: Likewise.
914         * tests/mk-script: Likewise.
915         * tests/priv-check: Likewise.
916         * tests/rwx-to-mode: Likewise.
917         * tests/sample-test: Likewise.
918         * tests/setgid-check: Likewise.
919         * tests/chgrp/basic: Likewise.
920         * tests/chgrp/deref: Likewise.
921         * tests/chgrp/no-x: Likewise.
922         * tests/chgrp/posix-H: Likewise.
923         * tests/chgrp/recurse: Likewise.
924         * tests/chmod/c-option: Likewise.
925         * tests/chmod/equal-x: Likewise.
926         * tests/chmod/equals: Likewise.
927         * tests/chmod/no-x: Likewise.
928         * tests/chmod/octal: Likewise.
929         * tests/chmod/setgid: Likewise.
930         * tests/chmod/umask-x: Likewise.
931         * tests/chmod/usage: Likewise.
932         * tests/chown/basic: Likewise.
933         * tests/chown/deref: Likewise.
934         * tests/chown/separator: Likewise.
935         * tests/cp/Makefile.am: Likewise.
936         * tests/cp/acl: Likewise.
937         * tests/cp/backup-1: Likewise.
938         * tests/cp/backup-is-src: Likewise.
939         * tests/cp/cp-HL: Likewise.
940         * tests/cp/cp-deref: Likewise.
941         * tests/cp/cp-mv-backup: Likewise.
942         * tests/cp/cp-parents: Likewise.
943         * tests/cp/deref-slink: Likewise.
944         * tests/cp/dir-rm-dest: Likewise.
945         * tests/cp/dir-slash: Likewise.
946         * tests/cp/dir-vs-file: Likewise.
947         * tests/cp/fail-perm: Likewise.
948         * tests/cp/into-self: Likewise.
949         * tests/cp/link: Likewise.
950         * tests/cp/link-no-deref: Likewise.
951         * tests/cp/link-preserve: Likewise.
952         * tests/cp/no-deref-link1: Likewise.
953         * tests/cp/no-deref-link2: Likewise.
954         * tests/cp/no-deref-link3: Likewise.
955         * tests/cp/perm: Likewise.
956         * tests/cp/preserve-2: Likewise.
957         * tests/cp/r-vs-symlink: Likewise.
958         * tests/cp/same-file: Likewise.
959         * tests/cp/slink-2-slink: Likewise.
960         * tests/cp/special-bits: Likewise.
961         * tests/cp/symlink-slash: Likewise.
962         * tests/cut/Makefile.am: Likewise.
963         * tests/cut/Test.pm: Likewise.
964         * tests/dd/misc: Likewise.
965         * tests/dd/not-rewound: Likewise.
966         * tests/dd/skip-seek: Likewise.
967         * tests/dd/skip-seek2: Likewise.
968         * tests/dd/unblock-sync: Likewise.
969         * tests/dircolors/simple: Likewise.
970         * tests/du/2g: Likewise.
971         * tests/du/8gb: Likewise.
972         * tests/du/Makefile.am: Likewise.
973         * tests/du/basic: Likewise.
974         * tests/du/deref: Likewise.
975         * tests/du/deref-args: Likewise.
976         * tests/du/exclude: Likewise.
977         * tests/du/fd-leak: Likewise.
978         * tests/du/files0-from: Likewise.
979         * tests/du/hard-link: Likewise.
980         * tests/du/inaccessible-cwd: Likewise.
981         * tests/du/long-from-unreadable: Likewise.
982         * tests/du/long-sloop: Likewise.
983         * tests/du/no-deref: Likewise.
984         * tests/du/no-x: Likewise.
985         * tests/du/restore-wd: Likewise.
986         * tests/du/slash: Likewise.
987         * tests/du/slink: Likewise.
988         * tests/du/trailing-slash: Likewise.
989         * tests/du/two-args: Likewise.
990         * tests/expr/basic: Likewise.
991         * tests/factor/basic: Likewise.
992         * tests/fmt/basic: Likewise.
993         * tests/fmt/long-line: Likewise.
994         * tests/general/Makefile.am: Likewise.
995         * tests/general/atgeneral.m4: Likewise.
996         * tests/general/dd.at: Likewise.
997         * tests/head/Makefile.am: Likewise.
998         * tests/head/Test.pm: Likewise.
999         * tests/install/basic-1: Likewise.
1000         * tests/install/create-leading: Likewise.
1001         * tests/install/d-slashdot: Likewise.
1002         * tests/install/trap: Likewise.
1003         * tests/join/Makefile.am: Likewise.
1004         * tests/join/Test.pm: Likewise.
1005         * tests/ln/backup-1: Likewise.
1006         * tests/ln/misc: Likewise.
1007         * tests/ln/sf-1: Likewise.
1008         * tests/ln/target-1: Likewise.
1009         * tests/ls/Makefile.am: Likewise.
1010         * tests/ls/Test.pm: Likewise.
1011         * tests/ls/dangle: Likewise.
1012         * tests/ls/dired: Likewise.
1013         * tests/ls/file-type: Likewise.
1014         * tests/ls/follow-slink: Likewise.
1015         * tests/ls/infloop: Likewise.
1016         * tests/ls/inode: Likewise.
1017         * tests/ls/m-option: Likewise.
1018         * tests/ls/no-arg: Likewise.
1019         * tests/ls/recursive: Likewise.
1020         * tests/ls/rt-1: Likewise.
1021         * tests/ls/stat-dtype: Likewise.
1022         * tests/ls/stat-failed: Likewise.
1023         * tests/ls/stat-vs-dirent: Likewise.
1024         * tests/ls/symlink-slash: Likewise.
1025         * tests/ls/time-1: Likewise.
1026         * tests/ls-2/tests: Likewise.
1027         * tests/md5sum/basic-1: Likewise.
1028         * tests/md5sum/newline-1: Likewise.
1029         * tests/misc/Makefile.am: Likewise.
1030         * tests/misc/base64: Likewise.
1031         * tests/misc/basename: Likewise.
1032         * tests/misc/cat-proc: Likewise.
1033         * tests/misc/close-stdout: Likewise.
1034         * tests/misc/csplit: Likewise.
1035         * tests/misc/date: Likewise.
1036         * tests/misc/date-sec: Likewise.
1037         * tests/misc/df: Likewise.
1038         * tests/misc/dirname: Likewise.
1039         * tests/misc/expand: Likewise.
1040         * tests/misc/false-status: Likewise.
1041         * tests/misc/fold: Likewise.
1042         * tests/misc/head-c: Likewise.
1043         * tests/misc/head-elide-tail: Likewise.
1044         * tests/misc/head-pos: Likewise.
1045         * tests/misc/mknod: Likewise.
1046         * tests/misc/nice: Likewise.
1047         * tests/misc/nl: Likewise.
1048         * tests/misc/nohup: Likewise.
1049         * tests/misc/paste-no-nl: Likewise.
1050         * tests/misc/pathchk1: Likewise.
1051         * tests/misc/printf: Likewise.
1052         * tests/misc/printf-hex: Likewise.
1053         * tests/misc/pwd-long: Likewise.
1054         * tests/misc/sha224sum: Likewise.
1055         * tests/misc/sha256sum: Likewise.
1056         * tests/misc/sha384sum: Likewise.
1057         * tests/misc/sha512sum: Likewise.
1058         * tests/misc/shuf: Likewise.
1059         * tests/misc/sort-merge: Likewise.
1060         * tests/misc/sort-rand: Likewise.
1061         * tests/misc/split-a: Likewise.
1062         * tests/misc/split-fail: Likewise.
1063         * tests/misc/split-l: Likewise.
1064         * tests/misc/stat-fmt: Likewise.
1065         * tests/misc/stat-printf: Likewise.
1066         * tests/misc/tac-continue: Likewise.
1067         * tests/misc/test-diag: Likewise.
1068         * tests/misc/tty-eof: Likewise.
1069         * tests/misc/wc-files0: Likewise.
1070         * tests/misc/wc-files0-from: Likewise.
1071         * tests/mkdir/concurrent-1: Likewise.
1072         * tests/mkdir/p-1: Likewise.
1073         * tests/mkdir/p-2: Likewise.
1074         * tests/mkdir/p-3: Likewise.
1075         * tests/mkdir/p-slashdot: Likewise.
1076         * tests/mkdir/p-thru-slink: Likewise.
1077         * tests/mkdir/parents: Likewise.
1078         * tests/mkdir/perm: Likewise.
1079         * tests/mkdir/special-1: Likewise.
1080         * tests/mkdir/t-slash: Likewise.
1081         * tests/mkdir/writable-under-readonly: Likewise.
1082         * tests/mv/Makefile.am: Likewise.
1083         * tests/mv/acl: Likewise.
1084         * tests/mv/atomic: Likewise.
1085         * tests/mv/backup-is-src: Likewise.
1086         * tests/mv/childproof: Likewise.
1087         * tests/mv/diag: Likewise.
1088         * tests/mv/dir-file: Likewise.
1089         * tests/mv/dir2dir: Likewise.
1090         * tests/mv/dup-source: Likewise.
1091         * tests/mv/force: Likewise.
1092         * tests/mv/hard-2: Likewise.
1093         * tests/mv/hard-3: Likewise.
1094         * tests/mv/hard-4: Likewise.
1095         * tests/mv/hard-link-1: Likewise.
1096         * tests/mv/i-1: Likewise.
1097         * tests/mv/i-2: Likewise.
1098         * tests/mv/i-3: Likewise.
1099         * tests/mv/i-4: Likewise.
1100         * tests/mv/i-link-no: Likewise.
1101         * tests/mv/into-self: Likewise.
1102         * tests/mv/into-self-2: Likewise.
1103         * tests/mv/into-self-3: Likewise.
1104         * tests/mv/into-self-4: Likewise.
1105         * tests/mv/leak-fd: Likewise.
1106         * tests/mv/mv-special-1: Likewise.
1107         * tests/mv/no-target-dir: Likewise.
1108         * tests/mv/part-fail: Likewise.
1109         * tests/mv/part-hardlink: Likewise.
1110         * tests/mv/part-rename: Likewise.
1111         * tests/mv/part-symlink: Likewise.
1112         * tests/mv/partition-perm: Likewise.
1113         * tests/mv/perm-1: Likewise.
1114         * tests/mv/reply-no: Likewise.
1115         * tests/mv/setup: Likewise.
1116         * tests/mv/to-symlink: Likewise.
1117         * tests/mv/trailing-slash: Likewise.
1118         * tests/mv/update: Likewise.
1119         * tests/mv/vfat: Likewise.
1120         * tests/od/od-N: Likewise.
1121         * tests/od/x8: Likewise.
1122         * tests/pr/Makefile.am: Likewise.
1123         * tests/pr/Test.pm: Likewise.
1124         * tests/readlink/can-e: Likewise.
1125         * tests/readlink/can-f: Likewise.
1126         * tests/readlink/can-m: Likewise.
1127         * tests/readlink/rl-1: Likewise.
1128         * tests/rm/Makefile.am: Likewise.
1129         * tests/rm/cycle: Likewise.
1130         * tests/rm/dangling-symlink: Likewise.
1131         * tests/rm/deep-1: Likewise.
1132         * tests/rm/dir-no-w: Likewise.
1133         * tests/rm/dir-nonrecur: Likewise.
1134         * tests/rm/dot-rel: Likewise.
1135         * tests/rm/empty-inacc: Likewise.
1136         * tests/rm/empty-name: Likewise.
1137         * tests/rm/f-1: Likewise.
1138         * tests/rm/fail-2eperm: Likewise.
1139         * tests/rm/fail-eperm: Likewise.
1140         * tests/rm/hash: Likewise.
1141         * tests/rm/i-1: Likewise.
1142         * tests/rm/i-no-r: Likewise.
1143         * tests/rm/inaccessible: Likewise.
1144         * tests/rm/interactive-always: Likewise.
1145         * tests/rm/interactive-once: Likewise.
1146         * tests/rm/ir-1: Likewise.
1147         * tests/rm/isatty: Likewise.
1148         * tests/rm/no-give-up: Likewise.
1149         * tests/rm/r-1: Likewise.
1150         * tests/rm/r-2: Likewise.
1151         * tests/rm/r-3: Likewise.
1152         * tests/rm/rm1: Likewise.
1153         * tests/rm/rm2: Likewise.
1154         * tests/rm/rm3: Likewise.
1155         * tests/rm/rm4: Likewise.
1156         * tests/rm/rm5: Likewise.
1157         * tests/rm/sunos-1: Likewise.
1158         * tests/rm/unread2: Likewise.
1159         * tests/rm/unread3: Likewise.
1160         * tests/rm/unreadable: Likewise.
1161         * tests/rmdir/fail-perm: Likewise.
1162         * tests/rmdir/ignore: Likewise.
1163         * tests/rmdir/t-slash: Likewise.
1164         * tests/seq/basic: Likewise.
1165         * tests/sha1sum/basic-1: Likewise.
1166         * tests/sha1sum/sample-vec: Likewise.
1167         * tests/shred/exact: Likewise.
1168         * tests/shred/remove: Likewise.
1169         * tests/sort/Makefile.am: Likewise.
1170         * tests/sort/Test.pm: Likewise.
1171         * tests/sort-time/Makefile: Likewise.
1172         * tests/sort-time/README: Likewise.
1173         * tests/sort-time/rand-gen: Likewise.
1174         * tests/stty/basic-1: Likewise.
1175         * tests/stty/row-col-1: Likewise.
1176         * tests/sum/basic-1: Likewise.
1177         * tests/sum/sysv: Likewise.
1178         * tests/tac/Makefile.am: Likewise.
1179         * tests/tac/Test.pm: Likewise.
1180         * tests/tail/Makefile.am: Likewise.
1181         * tests/tail/Test.pm: Likewise.
1182         * tests/tail-2/Makefile.am: Likewise.
1183         * tests/tail-2/append-only: Likewise.
1184         * tests/tail-2/assert: Likewise.
1185         * tests/tail-2/assert-2: Likewise.
1186         * tests/tail-2/big-4gb: Likewise.
1187         * tests/tail-2/fflush: Likewise.
1188         * tests/tail-2/infloop-1: Likewise.
1189         * tests/tail-2/proc-ksyms: Likewise.
1190         * tests/tail-2/start-middle: Likewise.
1191         * tests/tail-2/tail-n0f: Likewise.
1192         * tests/tee/basic: Likewise.
1193         * tests/tee/dash: Likewise.
1194         * tests/test/Makefile.am: Likewise.
1195         * tests/test/Test.pm: Likewise.
1196         * tests/touch/Makefile.am: Likewise.
1197         * tests/touch/dangling-symlink: Likewise.
1198         * tests/touch/empty-file: Likewise.
1199         * tests/touch/fail-diag: Likewise.
1200         * tests/touch/fifo: Likewise.
1201         * tests/touch/no-create-missing: Likewise.
1202         * tests/touch/no-rights: Likewise.
1203         * tests/touch/not-owner: Likewise.
1204         * tests/touch/obsolescent: Likewise.
1205         * tests/touch/read-only: Likewise.
1206         * tests/touch/relative: Likewise.
1207         * tests/tr/Makefile.am: Likewise.
1208         * tests/tr/Test.pm: Likewise.
1209         * tests/tr/failures: Likewise.
1210         * tests/tsort/basic-1: Likewise.
1211         * tests/unexpand/basic-1: Likewise.
1212         * tests/uniq/Makefile.am: Likewise.
1213         * tests/uniq/Test.pm: Likewise.
1214         * tests/wc/Makefile.am: Likewise.
1215         * tests/wc/Test.pm: Likewise.
1217 2006-08-17  Jim Meyering  <jim@meyering.net>
1219         ls -CF would misalign columns in some cases.
1220         * src/ls.c (get_type_indicator): New function.  extracted from...
1221         (print_type_indicator): ...here.  Use it.
1222         (length_of_file_name_and_frills): Use it here, too, rather than
1223         assuming stat.st_mode is valid.
1224         Reported by Andreas Schwab, here:
1225         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
1226         See the test for this above. FYI, I did ls -CF /proc and visually
1227         inspected the result.
1229         * src/copy.c (copy_internal, same_file_ok): Adjust comments not
1230         to mention the now-removed cp_options.xstat member.
1232         * Makefile.maint (patch-check): Adapt to work now that the patch
1233         modifies more than one file in src/.
1235         With this patch, permit building with Solaris cc on Solaris 7.
1236         * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
1237         This integrates patches from Bruno Haible.
1239 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
1241         Fix some problems reported by Bruno Haible.
1242         * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
1243         Skip this test if "chmod g+s d" silently does nothing.
1244         * tests/ls-2/tests: Skip this test suite if we can't set up files
1245         properly for the setuid-etc test.  This simplifies some of the
1246         hacks we were using to work around porting problems.
1248 2006-08-16  Jim Meyering  <jim@meyering.net>
1250         * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
1251         * tests/cp/acl: Instead, skip the test if either setfacl
1252         or getfacl fails.
1253         Reported by Michael Stone.
1255 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
1257         * tests/lang-default (LC_ALL): Set to "C", so we get
1258         English-language diagnostics.  Unset the other variables; it
1259         should be portable to use 'unset' for this stuff nowadays.
1260         Problem reported by Bruno Haible.  Using "C" reverses the
1261         2000-10-22 change to fileutils in this area.
1263         Fix bugs when printing plurals of numbers that are not
1264         unsigned long int values.
1265         * src/system.h (select_plural): New function.
1266         * src/md5sum.c (digest_check): Use select_plural to avoid bug.
1267         * src/uptime.c (print_uptime): Likewise.
1268         * src/dd.c (print_stats): Likewise.  Also, don't use ngettext to
1269         print a floating point number, as reducing to 0 or 1 doesn't work
1270         for some languages.  Instead, just use "s" for seconds since it
1271         doesn't need a plural form.
1273 2006-08-16  Bruno Haible  <bruno@clisp.org>
1275         Old versions of gzip would write --help output to stderr, and it
1276         would be annoying to see that in the output of every "make" command.
1277         * Makefile.maint (gzip_rsyncable): Throw away stderr output of
1278         "gzip --help".
1280 2006-08-16  Andreas Schwab  <schwab@suse.de>
1282         * tests/cp/acl: Don't use non-portable == operator for test.
1284 2006-08-16  Jim Meyering  <jim@meyering.net>
1286         * tests/ls/stat-dtype: Use stat to test file system type, rather
1287         than df -T, in case /etc/mtab lies.  Reported by Michael Stone.
1289 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
1291         * NEWS: Mention that df exits with nonzero status if it generates
1292         no output.  This change was in 6.0 but inadvertently unmentioned.
1293         * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
1294         a boolean.
1295         (show_dev): Don't set it until we actually output something.
1296         Print the header if this is the first output.
1297         (main): Don't print a header, as that is now show_dev's job.
1298         * tests/misc/Makefile.am (TESTS): Add df.
1299         * tests/misc/df: New file.
1301 2006-08-15  Eric Blake  <ebb9@byu.net>
1303         * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
1304         statvfs.f_type not present.  See
1305         <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
1307 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
1309         * src/dd.c (print_stats): Don't substitute "1" for number, as this
1310         causes confusion for the Hungarian translators.  Problem reported
1311         by Egmont Koblinger here:
1312         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
1314 2006-08-15  Jim Meyering  <jim@meyering.net>
1316         * .x-sc_require_config_h: Add lib/at-func.c.
1318         * NEWS: Add a line for 6.1-cvs.
1319         * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
1321 2006-08-15  Jim Meyering  <jim@meyering.net>
1323         * Version 6.0.
1324         * NEWS: Record the 6.0 release date.
1325         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1327         * TODO: Add an item (convert to use gnulib-tool), add to the plan
1328         for id-vs-getgrouplist, and remove a few completed items.
1330         * Makefile.maint (alpha beta major): Fix syntax error.
1332 2006-08-13  Jim Meyering  <jim@meyering.net>
1334         * src/shred.c (usage): Don't indent the second line of an item.
1335         Otherwise, help2man would misformat the output.
1336         Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
1338 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
1340         * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
1341         Suggested by Eric Blake to avoid problems like
1342         <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
1344 2006-08-11  Jim Meyering  <jim@meyering.net>
1346         * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
1347         failure that this test checks for (stat/dirent inode mismatch at
1348         a mount point), so continue to give a diagnostic about the failure,
1349         but don't actually count it as a failure.
1351 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
1353         * ABOUT-NLS: Update from gettext 0.15.
1354         * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
1356         * src/csplit.c (struct control): Remove fastmap member.
1357         (extract_regexp): Allocate fastmap separately, since otherwise
1358         it might move due to a realloc.  This fixes a bug that led
1359         to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
1361 2006-08-10  Jim Meyering  <jim@meyering.net>
1363         * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
1364         reports "Linux".  This avoids a failure on Solaris 10's tmpfs.
1365         Redirect both stdout and stderr of df invocations.
1367         * src/dircolors.hin: Add a TERM directive for each of the following:
1368         ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
1369         rxvt-cygwin-native, screen.linux, xterm-256color.
1370         Sort the TERM directives.
1371         From Mike Frysinger.
1373 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
1375         * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
1376         See Debian bug 373736.
1378         * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
1379         bug 317503.
1381         * src/.cvsignore: Add shuf.
1383         * Makefile.maint: Remove the po-update procedure; it doesn't
1384         work with the new repository on http://www.iro.umontreal.ca/.
1385         For now I guess we'll have to fix things by hand.
1386         (do-po-update, po-update): Remove.  All references removed.
1388         * src/shuf.c (next_line): New function.
1389         (read_input): Use it, to avoid relying on GCC-specific behavior
1390         with void * arithmetic.  Problem reported by Bob Proulx.
1391         * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
1392         to detect this sort of problem automatically in the future.
1394 2006-08-09  Jim Meyering  <jim@meyering.net>
1396         * src/ls.c: Add a compile-time check to ensure that filetype
1397         and filetype_letter have the same number of elements.
1399         * tests/misc/sort-rand: Remove use of --seed=S.
1401 2006-08-08  Paul Eggert  <eggert@cs.ucla.edu>
1403         Add a command 'shuf', and modify shred and sort to use the new
1404         random number generator library of 'shuf'.
1406         * AUTHORS: Add shuf.
1407         * README: Likewise.
1408         * NEWS: Likewise.  Mention new --random-source option for shred
1409         and sort.  Move "sort +1 -2" notice to the appropriate section,
1410         and clarify its role with respect to POSIXLY_CORRECT.
1411         * man/.cvsignore: Add shuf.1.
1412         * man/Makefile.am (dist_man_MANS): Add shuf.1.
1413         (shuf.1): New dependency.
1414         * man/shuf.x: New file.
1415         * src/Makefile.am (bin_PROGRAMS): Add shuf.
1416         (EXTRA_DIST): Remove rand-isaac.c.
1417         (shuf_LDADD): New macro.
1418         * src/rand-isaac.c: Remove, moving most of its contents to
1419         lib/rand-isaac.c.
1420         * src/shuf.c: New file.
1421         * src/shred.c: Use new random-number interface rather than rand-isaac.c.
1422         Don't include rand-isaac.c; include randint.h and randread.h instead.
1423         (RANDOM_SOURCE_OPTION): New enum.
1424         (long_opts, usage, main): New option --random-source.
1425         * src/sort.c: Likewise.
1426         * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
1427         All callers changed to use randint interface.
1428         (fillrand): Remove.  All callers changed to use randread interface.
1429         (dopass): Remove dependency on ISAAC buffer size.
1430         (genpattern): Don't wipe the random state here.
1431         (randint_source): New static var.
1432         (clear_random_data): New function.
1433         (main): Allocate random source, and arrange to wipe it on exit.
1434         * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
1435         (longopts, usage, main): Remove undocumented --seed option;
1436         it's now replaced by --random-source.
1437         (rand_state, get_hash): Remove.
1438         (randread_source): New static var.
1439         (random_state, cmp_hashes, compare_random): New functions; they guarantee
1440         no collisions in the random hash function.
1441         (keycompare): Use compare_random for -R; don't fall back on comparing
1442         via memcoll, since compare_random does the right thing.
1443         * tests/misc/Makefile.am (TESTS): Add shuf.
1444         * tests/misc/shuf: New file.
1446 2006-07-29  Paul Eggert  <eggert@cs.ucla.edu>
1448         * src/copy.c (set_author): Preserve the st_author field via the
1449         file descriptor dest_desc.
1451 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
1453         * NEWS: chmod now preserves setuid and setgid bits on directories
1454         if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
1456         Fix test case problems if working directory is setgid,
1457         reported by Bob Proulx.
1458         * tests/cp/fail-perm: Use symbolic mode so that we clear
1459         setgid bit more reliably on directories.
1460         * tests/mkdir/special-1 (set_mode_string): Likewise.
1462 2006-07-27  Jim Meyering  <jim@meyering.net>
1464         * src/chgrp.c (usage): Use correct grammar in description of the
1465         --reference option
1466         * src/chown.c (usage): Likewise.
1468 2006-07-26  Thomas Schwinge  <tschwinge@gnu.org>  (tiny change)
1470         * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
1471         Correctly access SRC_SB's element ST_AUTHOR.
1473 2006-07-26  Jim Meyering  <jim@meyering.net>
1475         * tests/ls/stat-failed: Adapt to match new expected output.
1476         From Paul Eggert.
1478         * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
1479         than having the code test for all of the other types first.
1480         Hoist the set-uid/gid-testing code "up" into this new block.
1481         Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
1482         C_ORPHAN, not as C_FILE.
1484 2006-07-26  Jim Meyering  <jim@meyering.net>
1486         Checking in a change from Paul.
1488         2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
1490         * src/ls.c (DT_INIT): Remove.  All uses removed.
1491         (enum filetype): Use an ordinary enum rather than trying to keep
1492         the values in sync with DT_FIFO etc.  That way, we don't have
1493         to make special assumptions about them.  All uses changed.
1494         (whiteout): New constant member of enum filetype.
1495         (filetype_letter): New constant, for use with enum filetype.
1496         (FILETYPE_INDICATORS): New initializer list.
1497         (print_dir): Add case for DT_WHT.
1498         (gobble_file): If stat fails, don't discard information from
1499         readdir; instead, preserve it so it can be printed.
1500         (print_long_format): Fall back on readdir result if stat info
1501         is not available.  Use "?" to denote each unknown mode char,
1502         instead of an overall "?", since we now know some of the mode
1503         typically.
1504         (print_type_indicator): Now that MODE isn't necessarily
1505         useful, guard all uses.
1506         Now that two blocks in the type-checking tree can set "type = C_FILE",
1507         move the suffix-handling code out and down.
1509 2006-07-26  Jim Meyering  <jim@meyering.net>
1511         Prepare for the above change.
1512         * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
1513         and adjust uses.  From a patch by Paul Eggert.
1515 2006-07-26  Jim Meyering  <jim@meyering.net>
1517         * src/ls.c: Correct indentation/formatting in a few places.
1519 2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
1521         * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
1522         Problem report and fix from Bob Proulx.
1523         * NEWS: Clarify the "chmod 0500" news, and correct the vague
1524         statements about compatibility with BSD.
1526 2006-07-25  Jim Meyering  <jim@meyering.net>
1528         * src/ls.c (gobble_file): When handling a stat-failed entry,
1529         print the entry name not the absolute_name -- to be consistent
1530         with the usual case.
1531         * tests/ls/stat-failed: Update accordingly.
1533         * src/ls.c: Add parens around the new uses of ?: ternary operator.
1535         * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
1536         symlinks.
1538         Get --dired offsets right when handling stat-failed entries.
1539         * src/ls.c (print_long_format): Be careful to increment P by the
1540         appropriate amount, even when inode_number_width and nlink_width
1541         are zero.
1542         * tests/ls/stat-failed: Test for the above.
1544         * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
1545         have_acl member.  That would happen for a directory with both a
1546         non-stat'able entry and one with an ACL.
1548         * src/ls.c (gobble_file): Make it so failure to stat a
1549         non-command-line file provokes an exit status of 1, not 0.
1550         Say "cannot access" rather than "cannot stat".
1551         * tests/ls/stat-failed: New file/test, for the above.
1552         * tests/ls/Makefile.am (TESTS): Add stat-failed.
1553         * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
1554         of "cannot access " to diagnostic.
1556         * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
1558         * src/ls.c [enum filetype] (command_line): Remove member.  Not needed.
1559         Replace all occurrences of "type == command_line" with the
1560         equivalent, "command_line_arg".
1562         * src/ls.c: Apply the stat-failed parts of Red Hat's
1563         coreutils-selinux.patch.  From Ulrich Drepper.
1564         This makes it so files not mentioned on the command line (e.g.,
1565         names read from a directory that *is* mentioned on the command
1566         line) for which stat fails are still listed.  With --color,
1567         such files are colored just like ORPHANs (aka dangling symlinks).
1569         * src/df.c (n_valid_args): Declare global to be static.
1571 2006-07-24  Jim Meyering  <jim@meyering.net>
1573         * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
1574         system lacks d_type support.
1576 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
1578         * man/chmod.x: Update to reflect recent changes to coreutils.texi.
1580 2006-07-21  Jim Meyering  <jim@meyering.net>
1582         * src/su.c (usage): Correct typo in --help output: s/commmand/command/
1583         Reported by Tim Waugh.
1584         Also remove the comment duplicating much of --help output.
1586         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
1587         name so the list remains alphabetized.
1589         Fix another bug: ls --indicator-style=file-type would call
1590         stat for a symlink, even though it wasn't always needed.
1591         In some cases, that unnecessary stat would cause ls to fail.
1592         * src/ls.c (gobble_file): Don't treat symlinks specially (in
1593         requiring a stat syscall).  Remove the offending exclusion.
1595         * NEWS: Mention the fix.
1597         * tests/ls/stat-dtype: New file/test, for the above fix.
1598         Also exercises the new df feature, below.
1600         * src/df.c (main): Fail and don't print the headers if no
1601         file system is processed.  This makes it easy to test whether
1602         a specified directory is on a file system of a given type or types.
1603         Otherwise, applications would have had to parse df's output.
1604         E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
1606         Fix a bug: ls --file-type worked like --indicator-style=slash,
1607         rather than like --indicator-style=file-type.
1608         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
1609         (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
1610         not to 'p'.
1611         (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
1612         * NEWS: Mention the fix.
1613         * tests/ls-2/tests (file-type): New test, for the above fix.
1615 2006-07-19  Jim Meyering  <jim@meyering.net>
1617         * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
1619         * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
1621 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
1623         * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
1624         of directories alone unless you specify them explicitly.
1625         install and mkdir now implement X correctly.
1626         install now creates parent directories with mode 755, without
1627         changing their owner or group.
1628         * src/chmod.c (process_file): Adjust to mode_adjust API change.
1629         * src/install.c: Include mkancesdirs.h.
1630         (announce_mkdir, make_ancestor): New functions.
1631         (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
1632         (mode): Use it.
1633         (dir_mode, dir_mode_bits): New vars.
1634         (main): Set dir modes separately from nondir, so that the X
1635         op of -m works correctly.
1636         (main): Remove cwd_errno cruft, since make_dir_parents no longer
1637         affects cwd.  Adjust to new make_dir_parents API.
1638         (install_file_in_file_parents): 2nd arg is now char *, not char
1639         const *.  Use mkancesdirs instead of rolling our own code.
1640         (change_attributes): Don't worry about AFS, since that kludge
1641         should not be needed any more.
1642         * src/mkdir.c (struct mkdir_options): New struct.
1643         (announce_mkdir, make_ancestor): New functions.
1644         (main): Use them.  Adjust to mode_adjust API change.  Stick with
1645         umask 0.  Use make_dir_parents for all the work.
1646         * src/mkfifo.c (main): Adjust to new mode_adjust API.
1647         * src/mknod.c (main): Likewise.
1648         * tests/chmod/setgid: Do the setgid test instead of bailing.
1649         * tests/mkdir/p-3: Remove re_protect case that no longer applies.
1650         GNU chmod now behaves like other versions of chmod.
1651         * tests/mkdir/perm: Add a test for the X bug.
1653 2006-07-14  Paul Eggert  <eggert@cs.ucla.edu>
1655         * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
1656         This doesn't fix any bugs, since OUT always equals stdout, but it
1657         makes the code easier to understand.
1659 2006-07-14  Jim Meyering  <jim@meyering.net>
1661         * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
1662         rather than open-coding it.  Now supports mercurial, too.
1663         * .hgignore: New file.
1664         * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
1665         all generated files, including ones like configure and po/*.po
1666         that are currently version-controlled in cvs.
1668         * Makefile.am (EXTRA_DIST): Add a few more .??* files.
1669         They've been in CVS, just haven't been distributed before this.
1670         Distribute ChangeLog-2005, too.
1671         (MAINTAINERCLEANFILES): Add THANKS-to-translators.
1673 2006-07-11  Paul Eggert  <eggert@cs.ucla.edu>
1675         * src/system.h: Assume <dirent.h> exists, since gnulib assumes
1676         this now as well.
1678 2006-07-09  Jim Meyering  <jim@meyering.net>
1680         * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
1681         That happens with Linux/tmpfs.
1682         * tests/mv/Makefile.am (TESTS): Add dir2dir.
1684 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
1686         Adjust to recent updates from gnulib.
1687         * src/dd.c (apply_translations): Use toupper rather than
1688         islower followed by toupper; it's simpler and typically
1689         faster now that we assume at least C89 semantics.  Similarly
1690         for tolower.
1691         * src/sort.c (inittables): Likewise.
1692         * src/expand.c (expand): Don't assume that isprint etc. return
1693         booleans (needed for pre-C99 hosts).
1694         * src/fmt.c (check_punctuation): Likewise.
1695         * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
1696         * src/tr.c (is_char_class_member): Likewise.
1697         * src/unexpand.c (unexpand): Likewise.
1698         * src/join.c (is_blank): Remove; no longer needed.  All uses
1699         replaced by isblank (to_uchar (...)).
1700         * src/pinky.c (create_fullname): Don't assume char is unsigned.
1701         * src/printf.c (print_esc): Likewise.
1702         * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
1703         (copy_unescaped_string): Likewise.
1704         * src/stat.c (print_it): Likewise.
1705         * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
1706         convenience on GNU systems.  All uses changed.  Don't bother
1707         looking for any dirent.h substitute other than ndir.h.
1708         (D_INO): Remove unnecessary parentheses.
1709         (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
1710         (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
1711         (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove.  All uses changed
1712         to ctype.h equivalents.
1713         (isblank): Renamed from ISBLANK.  Check for HAVE_DECL_ISBLANK too.
1714         All uses changed.
1716 2006-07-08  Jim Meyering  <jim@meyering.net>
1718         * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
1720         * Makefile.maint (sc_the_the): New rule.
1722         * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
1723         * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
1724         in a comment.
1726 2006-07-07  Jim Meyering  <jim@meyering.net>
1728         * NEWS: Mention that mv can now remove an empty destination directory,
1729         and give an example.  Prompted by a report from Florent Bayle.
1731 2006-07-05  Jim Meyering  <jim@meyering.net>
1733         * src/ls.c (usage): Correct the description of -G: it is useful
1734         only in a long listing.  Reported by Martin Pool in
1735         <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
1737         * man/chmod.x: Correct the description of the sticky bit.  Reported
1738         by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
1740         * src/copy.c (copy_internal): Don't work around old NFS clients like
1741         SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
1742         ENOTEMPTY upon failed rename.  Otherwise, we risk misinterpreting
1743         a banal failure as a recursive move-into-self failure.
1744         Reported by Florent Bayle in <http://bugs.debian.org/376749>.
1746         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
1748 2006-07-03  Jim Meyering  <jim@meyering.net>
1750         Plug another unusual leak.
1751         (AD_mark_helper): Free malloc'd filename if hash_insert says
1752         that string is already in the hash table.
1754         The dev/inode of the topmost directory in each hierarchy were not
1755         being recorded.
1756         * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
1757         (AD_push): Call it from here instead.
1759         Fix two small leaks.
1760         * src/remove.c (AD_stack_clear): New function.
1761         (rm_1): Use it.
1762         (AD_pop_and_chdir): Free *prev_dir just before longjmp.
1764         * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
1765         Add $VG_PATH_PREFIX as a prefix to $PATH
1767         * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
1768         * tests/Makefile.am (evar-check): Remove rule.
1769         (EXTRA_DIST): Remove .env-warn.
1770         * tests/.env-warn: Remove file.  No longer used.
1771         Suggestion from Eric Blake.
1773 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
1775         * src/system.h: Include <stdint.h> unconditionally, since we
1776         now assume the stdint module.
1778 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
1780         * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
1781         only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
1782         * src/tail.c (main): Implement this.
1783         * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
1784         (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
1786 2006-07-01  Jim Meyering  <jim@meyering.net>
1788         * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
1790         * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
1791         passes once again.
1793 2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
1795         * NEWS: seq now uses long double internally rather than double.
1796         It now defaults to a minimal fixed point format if possible.
1797         It lets you use %a, %A, %E, %F, %G.
1798         * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
1799         * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
1800         (isfinite) [!defined isfinite]: New macro.
1801         (separator, terminator): Now points to const.
1802         (first, step, last): Remove.
1803         (usage): Update to match new behavior.
1804         (struct operand, operand): New type.
1805         (scan_arg): Renamed from scan_double_arg, since we no longer use double.
1806         All uses changed.
1807         Compute and return a value of type operand, not double.
1808         (long_double_format): Renamed from valid_format, and now returns a
1809         new format with an "L" added if needed, if the original format was
1810         valid.  Allow %a, %A, %E, %F, and %G formats.
1811         (print_numbers): Take numeric values as args rather than from globals.
1812         Print long double, not double.
1813         (get_width_format): Remove.
1814         (get_default_format): New function.
1815         (main): Implement new way of calculating default format.
1816         Don't worry about locale's representation of the decimal point, since
1817         the arguments are always processed in the C locale.
1818         * tests/seq/basic (neg-2): Adjust to new default format.
1819         (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
1820         implementation should do the right thing.
1822 2006-06-30  Jim Meyering  <jim@meyering.net>
1824         * tests/stty/basic-1: Work around an intermittent test failure
1825         on HP-UX 11.11.  Report and analysis from Bob Proulx.
1826         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
1828 2006-06-28  Paul Eggert  <eggert@cs.ucla.edu>
1830         * NEWS: Support obsolete usages like "sort +1 -2" even when
1831         conforming to POSIX 1003.1-2001, since this is a pure extension to
1832         POSIX.  Problem reported by Christian in:
1833         http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
1834         * src/sort.c (main): Implement this.
1836         * src/system.h (CLOSEDIR): Remove.  All uses changed to closedir.
1837         Autoconf 2.60 says this stuff was obsolete.
1839 2006-06-28  Jim Meyering  <jim@meyering.net>
1841         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
1843 2006-06-28  Bob Proulx  <bob@proulx.com>  (tiny change)
1845         * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
1846         (set -x when VERBOSE=yes) when stderr is redirected before stdout
1847         causing shell tracing of the stdout redirection to be written to
1848         the stderr file.  Avoid problem and test failure on HP-UX by
1849         redirecting stderr last.
1850         * tests/dd/unblock-sync: Order shell file redirections for
1851         stderr and stdout in the common style.
1852         tests/acl: Likewise.
1854 2006-06-27  Jim Meyering  <jim@meyering.net>
1856         * tests/misc/cat-proc: Try to avoid any spurious numeric
1857         differences in frequently-changing /proc/cpuinfo.
1858         Reported by Nelson Beebe.
1860 2006-06-26  Jim Meyering  <jim@meyering.net>
1862         Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
1863         fd_to_subdirp failure, not just when errno == EACCES.
1864         * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
1865         rmdir, here, even though rmdir may happen to be adequate.
1867         * NEWS: rm no longer fails to remove an empty, unreadable directory
1868         * src/remove.c (remove_cwd_entries): If we can't open a directory,
1869         and the failure is not being ignored, try to remove the directory
1870         with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
1871         Problem report and test case from Paul Eggert in
1872         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
1874         * tests/rm/empty-inacc: New test, for the above.
1876         Avoid a segfault for wc --files0=- < /dev/null.
1877         * src/wc.c (compute_number_width): Return right away if nfiles == 0.
1879 2006-06-25  Jim Meyering  <jim@meyering.net>
1881         * NEWS: wc accepts a new option --files0-from=FILE, where FILE
1882         contains a list of NUL-separated file names.
1884         * src/wc.c: Include "readtokens.h".
1885         (usage): Describe the new option, and adjust the `Usage':
1886         with this option, no FILE may be specified on the command line.
1887         (main): Handle the new option.
1888         * tests/misc/wc-files0: New tests, for the above.
1889         * tests/misc/wc-files0-from: Likewise.
1890         * tests/misc/Makefile.am (TESTS): Add wc-files0.
1892 2006-06-24  Jim Meyering  <jim@meyering.net>
1894         * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
1896 2006-06-22  Jim Meyering  <jim@meyering.net>
1898         * src/tee.c (tee_files): Rename from tee, to avoid conflict with
1899         the function in glibc's <fcntl.h>.  Reported by Andreas Schwab.
1901 2006-06-19  Jim Meyering  <jim@meyering.net>
1903         * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1904         so this check is not run as part of "make distcheck".
1906 2006-06-18  Bob Proulx  <bob@proulx.com>  (tiny change)
1908         * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
1910 2006-06-18  Jim Meyering  <jim@meyering.net>
1912         * tests/misc/pwd-long: Make error output a little clearer.
1914 2006-06-17  Jim Meyering  <jim@meyering.net>
1916         * tests/rm/inaccessible: Skip this test on systems without openat
1917         support.  Reported by Bob Proulx.
1919 2006-06-15  Bob Proulx  <bob@proulx.com>  (tiny change)
1921         * tests/misc/mknod: Improve permission checks to handle
1922         running mkdir test in set-gid directories.
1924 2006-06-14  Jim Meyering  <jim@meyering.net>
1926         * tests/du/basic: Revamp not to hard-code file system block sizes.
1928 2006-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1930         * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
1931         files0-from test.
1933 2006-06-11  Jim Meyering  <jim@meyering.net>
1935         * .gitignore: New file.
1936         * Makefile.am (EXTRA_DIST): Add .gitignore.
1938         Setting TIME_STYLE=long-iso in the environment would make the
1939         cp/same-file test fail.
1940         * tests/envvar-check (vars): Add TIME_STYLE to the list.
1941         * tests/cp/same-file: Revert last change.
1942         Source the envvar-check script, to ensure that TIME_STYLE
1943         settings don't affect these tests.
1945 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
1947         * tests/cp/same-file: Execute 'ls' in the C locale, so that it
1948         uses POSIX time stamp formats.  Problem reported by John Nixon in
1949         <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
1951 2006-06-10  Jim Meyering  <jim@meyering.net>
1953         * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
1955         Require a "Version N.M" line at the top of the ChangeLog
1956         file only when making the actual release, not when running
1957         "make distcheck".
1958         * Makefile.maint (maintainer-distcheck): Don't depend on
1959         changelog-check.
1960         (alpha beta major): Depend on it here, instead.
1962 2006-06-08  Jim Meyering  <jim@meyering.net>
1964         Ensure that cat works with any of the options, -A -v -e -E -T,
1965         when applied to files in /proc and /sys, even when the FIONREAD
1966         ioctl produces nonsensical results.  Before this change, cat would
1967         produce no output (or truncated output), for some linux kernels.
1969         * src/cat.c (write_pending): New function, factored out of cat.
1970         (cat): Also interpret a negative ioctl/FIONREAD count as indicating
1971         that there are bytes to read.  Some versions of linux-2.6.16 do that.
1972         Write any pending output before returning.
1973         Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
1974         * NEWS: Mention this bug fix.
1975         * tests/misc/cat-proc: New file.  Test for the above.
1976         * tests/misc/Makefile.am (TESTS): Add cat-proc.
1978 2006-06-07  Paul Eggert  <eggert@cs.ucla.edu>
1980         * src/expr.c (eval4): Detect overflow properly when multiplying
1981         INTMAX_MIN * -1.
1983 2006-06-06  Paul Eggert  <eggert@cs.ucla.edu>
1985         * NEWS: The 'expr' command now detects and reports integer overflow.
1986         (It would be better to use extended precision instead, but that
1987         would be more work.)
1988         * src/expr.c (integer_overflow): New function.
1989         (eval4, eval3): Check for integer overflow.
1991 2006-06-05  Paul Eggert  <eggert@cs.ucla.edu>
1993         Fix problems when building with Solaris/SVR4/etc. make, which uses a
1994         different and somewhat bogus implementation of VPATH.  In the
1995         directory tests/misc, rename tests whose names might appear in the
1996         Automake-generated rules.  For example, we can't use a test named
1997         'test', since Automake generates a rule that contains the text
1998         "if test -f ./$$tst; ...", and this might expand to something like
1999         "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
2000         which executes the 'test' script rather than the 'test' command.
2001         * tests/misc/false-status: Renamed from tests/misc/false.
2002         * tests/misc/pwd-long: Renamed from tests/misc/pwd.
2003         * tests/misc/sort-merge: Renamed from tests/misc/sort.
2004         ($prog): Set to 'sort' rather than to $PROG.
2005         * tests/misc/test-diag: Renamed from tests/misc/test.
2006         * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
2007         in case Solaris make has prepended the directory.
2008         (TESTS): Adjust to above renamings.
2009         * tests/misc/expand: Don't assign to PROG; no longer needed
2010         now that Makefile.am sets PROG to the basename.
2011         * tests/misc/fold: Likewise.
2013 2006-06-03  Jim Meyering  <jim@meyering.net>
2015         Make `cp --link --no-dereference' work also on systems where the
2016         link system call cannot create a hard link to a symbolic link.
2017         * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
2018         the link syscall on a symlink when it would do the wrong thing.
2019         Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
2020         * tests/cp/link-no-deref: New file/test for the above.
2021         * tests/cp/Makefile.am (TESTS): Add link-no-deref.
2022         * NEWS: Mention the change (doesn't affect Linux).
2024 2006-06-01  Paul Eggert  <eggert@cs.ucla.edu>
2026         Fix some porting problems in the test cases reported by
2027         Ralf Wildenhues for HP-UX 11.23 in:
2028         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
2029         * tests/help-version: Don't assume that \< \> works in sed.
2030         * tests/misc/close-stdout: Don't assume that >&- works.
2031         Add a /dev/full test.
2032         * tests/touch/no-create-missing: Don't assume that >&- works.
2034 2006-05-30  Jim Meyering  <jim@meyering.net>
2036         * src/ls.c (usage): Add `v' to the list of sorting-related options.
2037         From Justin Pryzby.
2039 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2041         * tests/cp/fail-perm: source lang-default.
2042         * tests/rm/inaccessible: Likewise.
2044 2006-05-28  Jim Meyering  <jim@meyering.net>
2046         * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
2047         Recognize it, too.  Reported by Ralf Wildenhues, in
2048         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
2050 2006-05-27  Jim Meyering  <jim@meyering.net>
2052         * src/chgrp.c: Support new options: --preserve-root and
2053         --no-preserve-root.  Somehow this program was skipped when those
2054         options were added to chown, chmod, and rm.  Reported by
2055         vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
2056         * NEWS: Mention this.
2058 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
2060         * NEWS: Remove mention of --seed.  We'll replace it with something
2061         better, and don't want to indicate that it is supported.
2062         * src/sort.c (usage): Likewise.
2064 2006-05-20  Jim Meyering  <jim@meyering.net>
2066         * src/chmod.c (main): Use FTS_PHYSICAL here, too.
2068         * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
2069         and arrange for -D to set fts' FTS_PHYSICAL bit as well as
2070         FTS_COMFOLLOW.  Spotted by Justin Pryzby.
2072         * gnupload: Merge changes from automake, retaining the ""--to...
2073         kludge to placate overzealous `make distcheck' check.
2075 2006-05-19  Jim Meyering  <jim@meyering.net>
2077         * src/du.c (main): Don't let -D, -L, or -P turn off the internal
2078         FTS_TIGHT_CYCLE_CHECK directory traversal option.
2079         Reported by Justin Pryzby in http://bugs.debian.org/367691
2081 2006-05-15  Jim Meyering  <jim@meyering.net>
2083         * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
2084         From Tomas Pospisek.
2086 2006-05-13  Jim Meyering  <jim@meyering.net>
2088         * tests/mv/no-target-dir: Test two more cases.
2090 2006-05-11  Jim Meyering  <jim@meyering.net>
2092         mv -T DIR EMPTY_DIR no longer fails unconditionally
2093         * src/copy.c (copy_internal): Don't manually prohibit a move where
2094         the destination is an existing directory.  Sometimes doing that is
2095         valid.  Let the rename system call enforce the rules.  That is
2096         allowed only when the source is a directory and the destination
2097         directory (to be replaced) is empty.  Reported by Eric Blake.
2098         * tests/mv/no-target-dir: New file/test for this.
2099         * tests/mv/Makefile.am (TESTS): Add no-target-dir.
2100         * NEWS: Mention this.
2102         * tests/mv/atomic: New file/test for yesterday's fix.
2103         * tests/mv/Makefile.am (TESTS): Add atomic.
2105         * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
2107 2006-05-10  Jim Meyering  <jim@meyering.net>
2109         * src/copy.c (copy_internal): Don't explicitly unlink the destination
2110         when moving a symlink into the place of an existing non-directory.
2111         Reported by Joshua Hudson.
2112         * NEWS: mention this.
2114 2006-05-07  Jim Meyering  <jim@meyering.net>
2116         * Makefile.maint (patch-check): Fail if patch generates any output,
2117         even merely for changed offsets.
2119         * src/c99-to-c89.diff: Adjust to reflect new offsets.
2121         * NEWS: Mention changes affecting df, pwd, shred.
2123 2006-05-06  Jim Meyering  <jim@meyering.net>
2125         * tests/ls/stat-vs-dirent: New test, to detect the bogus file
2126         system condition where dirent.d_ino != stat.st_ino.
2127         * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
2129 2006-05-06  Eric Blake  <ebb9@byu.net>
2131         * tests/ls/inode: Expand to test inode from readdir case.
2132         * tests/ls/follow-slink: Expand to test broken links encountered
2133         implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
2135 2006-05-06  Eric Blake  <ebb9@byu.net>
2137         * tests/mv/leak-fd: Work even on case-insensitive file system.
2139 2006-05-04  Jim Meyering  <jim@meyering.net>
2141         * NEWS: Mention the 2006-03-19 pwd-related change that makes
2142         lib/getcwd.c work around inconsistent file system dirent.d_ino data.
2144 2006-05-03  Jim Meyering  <jim@meyering.net>
2146         * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
2147         Use better macro parameter names: s/basename/key_name/,
2148         s/basefunc/key_cmp_func.  Fix typo in comment.
2150 2006-04-29  Eric Blake  <ebb9@byu.net>
2152         * src/ls.c (main): On systems with d_type, directories_first only
2153         implies format_needs_type, not format_needs_stat.
2155 2006-05-03  Jim Meyering  <jim@meyering.net>
2157         * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
2158         after comma in arg list, from Eric Blake.
2160 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
2162         * tests/misc/date (relative-3): New test, derived from a bug
2163         report by John Thomas McDole.
2165 2006-04-23  Francesco Montorsi  <fr_m@hotmail.com>
2167         New option for ls: --group-directories-first.
2168         It makes ls list directories before files.
2169         * NEWS [New features]: Mention it.
2170         * src/ls.c (sort_type): Rearrange to use as an array index when
2171         choosing sort function; added new sort_numtypes member for
2172         compile-time check.
2173         (time_type): Add new time_numtypes member for compile-time check.
2174         (directories_first): New global variable.
2175         (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
2176         (long_options): Add --directories-first.
2177         (main): Support new option.
2178         (is_directory): New function.
2179         (extract_dirs_from_files): Use it.
2180         (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
2181         (LIST_SORTFUNCTION_VARIANTS): New macros.
2182         (sort_functions): New global variable.
2183         (sort_files): Use it.
2184         (usage): Document new option.
2186 2006-04-18  Paul Eggert  <eggert@cs.ucla.edu>
2188         * src/shred.c (fillrand): The assertion was way too weak, due to
2189         what must be a typo.  Strengthen it to its intended value.
2190         (dopass): Don't use alloca; it's not worth the aggravation here,
2191         since it's used only to get a page-aligned buffer, and page
2192         alignment doesn't buy us much here.  I'm suspicious that alloca
2193         causes problems on some hosts, due to a recent bug report by Adam
2194         Waltman: http://bugs.gentoo.org/130246.
2196 2006-04-18  Jim Meyering  <jim@meyering.net>
2198         * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
2199         sha384sum, sha512sum.
2201 2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
2203         * src/chmod.c (describe_change): Adjust to filemode changes.
2204         * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
2205         (print_long_format): Use (new) filemodestring rather than
2206         (old) mode_string, so that we get more file types right, at least
2207         in theory.  Adjust to filemode changes.
2208         * src/stat.c (human_access): Likewise.
2210 2006-04-18  Jim Meyering  <jim@meyering.net>
2212         * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
2213         ignore file.  This has never been enabled.  Reported by Eric Blake.
2215 2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
2217         * src/ln.c (linkfunc): Remove.  This method ran into a compiler/linker
2218         bug in Interix.  Just call symlink or link directly.  All uses changed.
2219         * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
2220         * src/stat.c (USE_STATVFS): New macro.
2221         Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
2222         (NAMEMAX_FORMAT): define a bit more clearly, now that the
2223         statvfs-using code is a bit more regular.
2224         * src/system.h (sync) [!HAVE_SYNC]: New macro.
2226 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
2228         * NEWS: csplit, nl, expr now conform to POSIX better, and are
2229         more-compatible with traditional Unix, with respect to regular
2230         expressions.
2231         * src/csplit.c (extract_regexp): Set re_syntax_options to a
2232         value that is compatible with what POSIX requires.
2233         * src/nl.c (build_type_arg): Likewise.
2234         * src/expr.c (docolon): Likewise.  Also, don't let anchors match
2235         newline; this fixes an incompatibility with tradition and with POSIX.
2236         Don't warn about leading ^.  POSIX says it is unspecified whether
2237         ^ is a special character, which means that implementations can
2238         either treat it as special or not, but either way a warning is not
2239         allowed (unless the regexp is otherwise invalid).  Instead, anchor
2240         the expression but treat ^ as an anchor; this is the traditional
2241         behavior (e.g., Solaris 10).
2242         (eval4, eval3, eval2): Treat non-numeric args, division by zero,
2243         and the like as invalid expressions (exit status 2), not as
2244         failure of 'expr' (exit status 3).  This is more consistent with
2245         how Solaris behaves.
2246         * tests/expr/basic (fail-a): Adjust exit status to match new expr
2247         behavior, for status 2 versus 3.
2248         (anchor): New test.
2249         (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
2250         (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
2251         (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
2252         (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
2253         (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
2254         (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
2255         (bre61, bre62): New tests.
2256         * tests/misc/csplit: Use \{...\} in test RE, to test that we're
2257         conforming to POSIX.
2259         Port to Solaris 8.
2260         * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
2261         "if !".  Do not assume that 'sed' can handle long, newline-free input.
2262         * tests/du/long-sloop: Likewise.  Evaluate expr once, not $n times.
2264 2006-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2266         Adjust to new regex.h API (with new fastmap type), and clean
2267         up the regex storage allocation a bit.
2269         * src/csplit.c (struct control): Put re_compiled member at the
2270         end, since it's large.  Change regexpr member from char * to bool;
2271         all uses changed.  Add new member fastmap.
2272         (extract_regexp): regexp arg is now char const *, not char *.
2273         Don't bother duplicating the regular expression; it's not needed.
2274         Set fastmap from new fastmap member.  Don't bother allocating
2275         a buffer, as the regexp code does a better job than we do.
2276         * src/expr.c (docolon): Allocate and use a fastmap.
2277         Don't bother allocating a buffer.
2278         * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
2279         New vars.
2280         (build_type_arg): New fastmap arg.  All uses changed.
2281         Don't bother allocating a buffer, but set a fastmap.
2282         * src/ptx.c (context_regex_string, word_regex_string): Remove.
2283         (context_regex, word_regex): New vars, replacing the above.
2284         All uses changed.
2285         (struct regex_data): New type.
2286         (compile_regex): Renamed from alloc_and_compile_regex, since
2287         we no longer allocate storage.  Arg is now a struct regex_data *,
2288         not a const char *.  All uses changed.  Don't allocate the fastmap;
2289         instead, take it from the caller.  Don't convert size_t to int,
2290         to avoid arithmetic overflow problems.  Don't bother freeing
2291         storage afterwards; it's not worth the aggravation.
2292         * src/tac.c (compiled_separator_fastmap): New ver.
2293         (main): Use it.  Don't bother allocating a buffer.
2295 2006-03-30  Jim Meyering  <jim@meyering.net>
2297         * src/dd.c (iwrite): Remove assignment without effect.
2298         Reported by Felix Rauch Valenti.
2300 2006-03-22  Eric Blake  <ebb9@byu.net>
2302         * src/ptx.c (usage): Remove mention of --copyright/-C.
2303         (main): Alias --copyright to --version plus a deprecation warning.
2304         * NEWS: Mention this.
2306 2006-03-27  Jim Meyering  <jim@meyering.net>
2308         * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
2309         use of strtod.  Tiny patch from Nickolai Zeldovich.
2311 2006-03-11  Eric Blake  <ebb9@byu.net>
2313         * tests/misc/dirname: New file.
2314         * tests/basename/Makefile.am: Delete.
2315         * tests/basename/basic: Move to...
2316         * tests/misc/basename: ... this new file.  Add some tests,
2317         including fixed behavior for //.
2318         * tests/misc/Makefile.am (TESTS): Sort.  Add basename, dirname.
2319         * tests/Makefile.am (SUBDIRS): Remove basename.
2320         * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
2322         Improvements to dirname/basename handling on platforms like
2323         cygwin with distinct // and with drive letters.
2324         * NEWS: Document new behavior.
2325         * src/basename.c (main): Don't strip suffix from file system
2326         roots.
2327         * src/cp.c (target_directory_operand): Use new last_component.
2328         (ASSIGN_BASENAME_STRDUPA): Likewise.  Reduce time spent
2329         traversing the string.
2330         * src/dircolors.c (guess_shell_syntax): Use new last_component.
2331         * src/install.c (target_directory_operand, install_file_in_dir):
2332         Likewise.
2333         * src/ln.c (target_directory_operand, main): Likewise.
2334         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2335         * src/mv.c (target_directory_operand, movefile): Likewise.
2336         * src/remove.c (rm_1): Likewise.
2337         * src/shred.c (wipename): Likewise.
2338         * src/split.c (next_file_name): Likewise.
2339         * src/su.c (log_su, run_shell): Likewise.
2341 2006-03-23  Paul Eggert  <eggert@cs.ucla.edu>
2343         * NEWS: nohup diagnostics are now more precise, and nohup now
2344         redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2345         * src/nohup.c (main): Implement this.
2346         * tests/misc/nohup: Test the new behavior.
2348 2006-03-12  Jim Meyering  <jim@meyering.net>
2350         * src/copy.c (set_author): Rename function, from preserve_author.
2352         * src/remove.c (AD_pop_and_chdir): Use new macro,
2353         CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
2355         * src/system.h (SAME_INODE): Remove definition.
2356         Include "same-inode.h", instead.
2358 2006-03-11  Eric Blake  <ebb9@byu.net>
2360         * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
2362 2006-03-10  Jim Meyering  <jim@meyering.net>
2364         Fix a bug whereby a user with write access to a directory being removed
2365         could cause the removal of that directory to fail with an erroneous
2366         diagnostic about a directory cycle.  Reported by Vineet Chadha.
2368         * NEWS: Mention this.
2369         * src/remove.c (AD_pop_and_chdir): If the directory we're about to
2370         leave (and try to rmdir) is the one whose dev_ino is being used to
2371         detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
2373 2006-03-08  Paul Eggert  <eggert@cs.ucla.edu>
2375         * NEWS: Document dd's new 'directory' and 'nolinks' flags.
2376         * src/dd.c (set_fd_flags): Handle file-creation flags on file
2377         descriptors, rather than ignoring them.
2378         * tests/dd/misc: Add test cases for append, nofollow, directory,
2379         and nolinks flags.  Simplify redirection to /dev/null in some cases.
2381         * tests/dd/misc: iflags->iflag.  This fixes a typo that meant the
2382         noatime test never tested anything.
2384 2006-03-05  Paul Eggert  <eggert@cs.ucla.edu>
2386         * src/dd.c (flags, usage): New flags directory, nolinks.
2387         * src/system.h (O_NOLINKS): Define to 0 if not already defined.
2389         * src/ls.c (usage): Mention that -f disables --color.
2390         Problem reported by Niels Möller.
2392 2006-03-03  Justin Pryzby  <pryzbyj@justinpryzby.com>
2394         * man/*.x: Add references to syscalls from utilities of the same name.
2396 2006-03-05  Jim Meyering  <jim@meyering.net>
2398         * tests/help-version: Set SHELL, if not already set, in order to
2399         avoid failure when `make check' is run through debuild;  dircolors
2400         would fail due to lack of $SHELL.  Reported by Sven Joachim.
2402         Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
2403         * src/base64.c (wrap_write, do_encode, main): Change type of
2404         parameters and locals, wrap_column, form size_t to uintmax_t.
2405         (main): Adjust to use xstrtoumax, accordingly.
2407 2006-03-03  Jim Meyering  <jim@meyering.net>
2409         Don't fail when run from an environment with SHELL not a Bourne
2410         shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
2411         * tests/dircolors/simple: Invoke each non-failing test with -b.
2412         Reported by Michael Stone.
2414 2006-02-27  Jim Meyering  <jim@meyering.net>
2416         * tests/misc/base64: Derive --decode-using tests from the
2417         encode-based ones.
2419         * tests/misc/base64: Factor out a long constant string.
2420         Split lines to stay within 80 columns.
2422         * tests/misc/Makefile.am (TESTS): Add base64.
2423         * tests/misc/base64: Test base64.  From Simon Josefsson.
2425         * src/base64.c (do_decode): Use correct type for parameter,
2426         ignore_garbage: s/size_t/bool/.
2428         * src/base64.c: Don't include .h files already included by system.h:
2429         <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
2430         Include "system.h" before the other lib/*.h header files.
2431         Include <sys/types.h> before "system.h".
2432         (wrap_write): Remove declaration of unused local, initial_column.
2433         (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
2435         * README: Add base64 to the list.
2437 2006-02-17  Simon Josefsson  <jas@extundo.com>
2439         New program: base64.
2440         * AUTHORS: Mention base64.
2441         * NEWS: Likewise.
2442         * man/Makefile.am: Build base64.1.
2443         * man/base64.x: New file.
2444         * src/Makefile.am (bin_PROGRAMS): Add base64.
2445         * src/base64.c: New file.
2447 2006-02-25  Eric Blake  <ebb9@byu.net>
2449         In ls, avoid calling stat for --inode (-i), when possible.
2450         * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
2451         * src/system.h: ... here, for use in ...
2452         * src/ls.c (main): ... here.  Prefer dirent.d_ino to stat when
2453         possible.
2454         (gobble_file): Add inode argument.
2455         (print_dir): Pass inode if available.
2456         (usage): Remove inaccuracy.
2458 2006-02-23  Jim Meyering  <jim@meyering.net>
2460         * TODO: Update/correct some obsolete entries.
2462 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
2464         * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
2465         * src/join.c (usage): Likewise.
2466         Documentation problem reported by Philip Kensche.
2468 2006-02-20  Eric Blake  <ebb9@byu.net>
2470         * man/rm.x: Update documentation to match previous patch.
2472 2006-02-18  Eric Blake  <ebb9@byu.net>
2474         New option for rm: --interactive=once (-I).
2475         * NEWS: Document it, along with change to rm --interactive.
2476         * TODO: Remove entry for implementing rm -I
2477         * src/rm.c (INTERACTIVE_OPTION): New enum value.
2478         (interactive_type): New enum.
2479         (long_opts): Let interactive take an optional argument.
2480         (interactive_args, interactive_types): New option arguments.
2481         (usage): Document -I, --interactive=WHEN.  Use program_name
2482         instead of a basename.
2483         (main): New -I option, new behavior to --interactive.
2484         * tests/rm/interactive-once: New tests.
2485         * tests/rm/interactive-always: Ditto.
2486         * tests/rm/Makefile.am (TESTS): Run them.
2488 2006-02-18  Jim Meyering  <jim@meyering.net>
2490         * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
2491         expression match more of the target lines, e.g., those that start with
2492         `-S,' (short option followed by a comma) or that include `=[...]'.
2493         Patch by Nicolas François.
2494         Fix the four offenders thus exposed:
2495         * src/join.c (usage): Use two spaces (not one) to separate the
2496         --first-only option string from its description, so help2man formats
2497         the derived man page properly.
2498         * src/pr.c (usage): Likewise.
2499         * src/uniq.c (usage): Likewise.
2500         * src/install.c (usage): Likewise.
2502 2006-02-15  Jim Meyering  <jim@meyering.net>
2504         * Makefile.maint (alpha beta major): For `make major', ensure that the
2505         version string is of the form N.N[.N]*, where N is one or more digits.
2507 2006-02-14  Jim Meyering  <jim@meyering.net>
2509         * INSTALL: Update from gnulib.
2511 2006-02-13  Jim Meyering  <jim@meyering.net>
2513         * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
2515 2006-02-12  Jim Meyering  <jim@meyering.net>
2517         * Makefile.maint (patch-check): New target.
2518         (local-checks-available): Add to the list.
2520 2006-02-11  Jim Meyering  <jim@meyering.net>
2522         * src/c99-to-c89.diff: New file.
2523         * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
2525         * .x-po-check: New file, with exclusions so that `make distcheck'
2526         passes once again.
2527         * Makefile.am (EXTRA_DIST): Add .x-po-check.
2529         rm -r must remove an empty directory, even if it is inaccessible.
2530         * src/remove.c (close_preserve_errno): New function.
2531         (fd_to_subdirp): Don't print a diagnostic in this function.
2532         Do it from the callers instead, unless rmdir succeeds.
2533         (remove_cwd_entries, remove_dir): Adjust callers.
2534         * tests/rm/empty-inacc: New test for the above.
2535         * tests/rm/Makefile.am (TESTS): Add empty-inacc.
2536         * NEWS: Mention this bug fix.
2537         * tests/rm/rm2: Adjust two expected diagnostics, now that they're
2538         a tiny bit less precise: cannot remove `a/1': ... instead of
2539         cannot open directory `a/1': ...
2541         * Makefile.maint (syntax-check-rules): Automatically derive this
2542         list of sc_-prefixed rule names.
2544 2006-02-10  Paul Eggert  <eggert@cs.ucla.edu>
2546         * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
2547         (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
2548         Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
2549         (syntax-check-rules): Bring back sc_changelong.  (Hmm, why did it
2550         go away? was that an accident?)
2551         (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2552         (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
2553         (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
2554         (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
2555         (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
2556         (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
2557         (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
2558         (author_mark_check, makefile_path_separator_check):
2559         Output line numbers, to simplify navigation of Emacs *compilation*
2560         buffers.
2561         (sc_prohibit_atoi_atof, sc_file_system):
2562         Rework slightly so that Makefile.maint doesn't get reported as a
2563         violation of its own syntax rules.
2564         (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
2565         it at run-time (which didn't work with Bison).  Fix a makefile typo,
2566         caught by Makefile.maint itself: spaces where a tab should be.
2567         (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
2568         which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
2569         Ignore djgpp and man subdirectories, to avoid false matches with
2570         Bison and coreutils, respectively.  Use sort -u to remove the
2571         resulting duplicates.
2572         * gnupload: Rework slightly to avoid bogus warning from
2573         sc_two_space_separator_in_usage.
2575 2006-02-10  Jim Meyering  <jim@meyering.net>
2577         Use gzip's --rsyncable option only if it's available.
2578         * Makefile.maint (gzip_rsyncable): New variable.
2579         (GZIP_ENV): Use it.
2581 2006-02-08  Jim Meyering  <jim@meyering.net>
2583         * Makefile.maint (local-checks-available): Define in terms of
2584         the expansion, $(syntax-check-rules), rather than the single,
2585         top-level target `syntax-check', so that it's easier to exclude
2586         individual rules (via $(local-checks-to-skip)).
2587         (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
2589 2006-02-07  Jim Meyering  <jim@meyering.net>
2591         * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
2592         is on Tru64), define O_DIRECT to that.  Patch From James Lemley.
2594         * tests/help-version (expected_failure_status_vdir):
2595         Redirect an expected disk-full diagnostic to /dev/null.
2597 2006-02-06  Jim Meyering  <jim@meyering.net>
2599         * src/unexpand.c (usage): Use two spaces (not one) to separate the
2600         --first-only option string from its description, so help2man formats
2601         the derived man page properly.
2602         * src/rm.c (usage): Likewise for --no-preserve-root.
2603         * src/chown.c (usage): Likewise.
2604         * src/chgrp.c (usage): Likewise.
2606         Add a rule to ensure that the above doesn't happen again.
2607         * Makefile.maint (sc_two_space_separator_in_usage): New rule.
2608         (syntax-check-rules): Add it.
2609         * .x-sc_two_space_separator_in_usage: New empty file.
2610         * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
2612 2006-02-06  Jim Meyering  <jim@meyering.net>
2614         * src/cp.c (usage): Use two spaces (not one) to separate each
2615         option string from its description, so help2man formats the
2616         derived man page properly.
2617         * src/mv.c (usage): Likewise.
2618         Patch from Nicolas François in http://bugs.debian.org/351601.
2620 2006-02-04  Jim Meyering  <jim@meyering.net>
2622         * src/copy.c (copy_internal): cp -RL would fail when encountering
2623         the same directory more than once in the hierarchy beneath a single
2624         command-line argument.  That is legitimate, e.g. when there are
2625         two or more symbolic links, each pointing to some directory that
2626         would not otherwise be copied.  Reported by Christophe LYON.
2627         * tests/cp/cp-deref: New file.  Test for today's fix.
2628         * tests/cp/Makefile.am (TESTS): Add cp-deref.
2629         * NEWS: Document this.
2631 2006-02-03  Jim Meyering  <jim@meyering.net>
2633         * configure.ac: Require automake-1.9.6, not 1.8.3.
2635 2006-02-01  Paul Eggert  <eggert@cs.ucla.edu>
2637         * src/od.c (usage): Mention that -t a ignores high order bit.
2638         Documentation problem reported by Ed Avis.
2640 2006-02-01  Jim Meyering  <jim@meyering.net>
2642         * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
2644 2006-01-30  Paul Eggert  <eggert@cs.ucla.edu>
2646         * src/head.c (main): Use a better diagnostic when someone uses a
2647         trailing numeric option in an invalid way.  Problem reported by
2648         Karl Berry.
2649         * src/tail.c (parse_options): Likewise.
2651 2006-01-30  Jim Meyering  <jim@meyering.net>
2653         * man/wc.x: Include `count' keyword in man page synopsis,
2654         per suggestion from http://bugs.debian.org/181585.
2656 2006-01-24  Paul Eggert  <eggert@cs.ucla.edu>
2658         * src/df.c (show_dev): If the file system claims to have
2659         more available than total blocks, report the number of used
2660         blocks as being total - available (a negative number) rather
2661         than as garbage.  Problem reported by Toralf Foerster.
2663 2006-01-24  Jim Meyering  <jim@meyering.net>
2665         * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
2666         to put a regular file in O_NONBLOCK mode fails with EPERM.
2667         That happens on Linux (up to 2.6.15) when using tail -f on a file with
2668         the append-only attribute.  Reported by Dean Gaudet.  For details,
2669         see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
2670         * NEWS: Mention this fix.
2671         * tests/tail-2/append-only: New file.  Test for the above.
2672         * tests/tail-2/Makefile.am (TESTS): Add append-only.
2673         * tests/Makefile.am (check-root): Add tail-2/append-only
2675 2006-01-21  Jim Meyering  <jim@meyering.net>
2677         * NEWS: Mention fts-related improvements and bug fixes.
2679 2006-01-19  Jim Meyering  <jim@meyering.net>
2681         * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
2682         reported as http://bugs.debian.org/147577.  Forwarded by Thomas Hood.
2684 2006-01-18  Jim Meyering  <jim@meyering.net>
2686         * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
2688 2006-01-17  Jim Meyering  <jim@meyering.net>
2690         Now that fts no longer changes the current working directory, adjust
2691         its clients accordingly -- note that du.c uses fts but doesn't need
2692         any adjustment, since it doesn't operate on the actual files,
2693         but rather just uses the stat buffers provided by fts.
2695         * src/chown-core.c: Include "openat.h".
2696         Don't include "lchown.h".
2697         (restricted_chown): Accept a new parameter, CWD_FD, and use it in
2698         calling openat, lchownat, chownat, rather than open, lchown, chown.
2699         Update caller.
2700         * src/chmod.c: Include "openat.h".
2701         (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
2703         * tests/du/long-from-unreadable: New test, to exercise one small
2704         corner of fts.c.
2706 2006-01-13  Jim Meyering  <jim@meyering.net>
2708         * tests/Makefile.am (SUBDIRS): Add comments discouraging the
2709         addition of new directories under tests/.
2711         * tests/acl: Redirect stdin to /dev/null.  Otherwise, FreeBSD 5.0's
2712         getfacl would hang.
2714 2006-01-12  Jim Meyering  <jim@meyering.net>
2716         * tests/du/long-sloop: Adjust not to hard-code the expected
2717         diagnostic corresponding to ELOOP.  Solaris' diagnostic differs
2718         from that of GNU libc.  Reported by Paul Eggert.
2720         * tests/du/long-sloop: Create file at end of symlink chain.
2722         * tests/misc/test: New file, with a test for one of the
2723         bugs fixed by yesterday's test.c changes.
2724         * tests/misc/Makefile.am (TESTS): Add test.
2726 2006-01-11  Jim Meyering  <jim@meyering.net>
2728         * tests/du/long-sloop: New file.  Test for today's fts.c bug fix.
2729         That bug could make du -L, chgrp -L, or chown -L fail to diagnose
2730         a very long sequence of symbolic links (not necessarily a loop).
2731         * tests/du/Makefile.am (TESTS): Add long-sloop.
2733 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
2735         * src/test.c (test_syntax_error): Append a newline.  All callers
2736         changed, except for the ones that didn't already append a newline.
2737         Bug reported by Eric Blake.
2739 2006-01-11  Jim Meyering  <jim@meyering.net>
2741         * src/system.h (X2NREALLOC): Now that verify_true is no longer
2742         void, cast its result to void, to avoid gcc's warning that
2743         ``left-hand operand of comma expression has no effect''.
2744         (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
2746 2006-01-10  Jim Meyering  <jim@meyering.net>
2748         * tests/chmod/no-x: Add a test for today's fts.c fix.
2750 2006-01-10  Jim Meyering  <jim@meyering.net>  (tiny change)
2752         * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
2753         This is necessary for Dragonfly.  Patch by Joerg Sonnenberger.
2755 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2757         * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
2758         Use verify_true instead of verify_expr, to sync with gnulib.
2760 2006-01-08  Jim Meyering  <jim@meyering.net>
2762         * src/date.c (usage): Adjust the formatting of the entries for
2763         %::z and %:::z (separate with two spaces, not one) so that help2man
2764         formats them properly.  Reported by Philip Rowlands.
2766 2006-01-06  Paul Eggert  <eggert@cs.ucla.edu>
2768         * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
2770 2006-01-06  Jim Meyering  <jim@meyering.net>
2772         * Makefile.maint (copyright-check): Use date +%Y in place of
2773         hard-coded 2005.
2775         * src/remove.c (rm_1): Remove `static' attribute on local `status'.
2776         First off, the attribute should have been `volatile' (not static)
2777         to avoid longjmp-related risk of clobber.  Secondly, now there is
2778         no longer any risk of a local variable being clobbered, so there's
2779         no need for any attribute at all.
2781 2006-01-05  Jim Meyering  <jim@meyering.net>
2783         * src/remove.c: Give a few functions the inline attribute.
2784         (AD_pop_and_chdir): Use gotos to avoid some duplication.
2785         (AD_push): Rewrite an assertion so that the entire computation
2786         goes away when assertions are turned off.
2788         * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
2789         It's already defined in "system.h".
2790         * Makefile.maint: Add a FIXME comment.
2792 2006-01-04  Jim Meyering  <jim@meyering.net>
2794         * ChangeLog: Remove entries from 2005-10-22 and earlier.
2795         * ChangeLog-2005: New file, for entries up to version 5.92.
2797 2006-01-03  Jim Meyering  <jim@meyering.net>
2799         * tests/du/no-x: Also allow a slightly different diagnostic -- the
2800         one you get when using openat-enabled fts.c and du (coming soon).
2801         * tests/chmod/no-x: Likewise.
2802         * tests/chgrp/no-x: Likewise.
2804         * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
2806 2006-01-02  Paul Eggert  <eggert@cs.ucla.edu>
2808         * src/chown-core.c (RC_do_ordinary_chown): New enum value.
2809         (restricted_chown): Return it, if the file cannot be accessed due
2810         to EPERM, or if no uid or gid are required, or if the file is
2811         neither a directory nor a regular file.  Rewrite to avoid gotos.
2812         (change_file_owner): Handle RC_do_ordinary_chown case.
2813         Rewrite to avoid gotos.
2814         * tests/chgrp/basic: Make sure we can change the group of
2815         inaccessible files.
2817         * src/date.c (usage): Explain %g, %G, and %V a bit better.
2819 2006-01-02  Jim Meyering  <jim@meyering.net>
2821         * src/copy.c (set_owner): Correct a comment.
2823         * src/tail.c (parse_options): Change warning to say that --retry
2824         is useful `mainly' (not `only') when following by name.
2825         Reported here: http://bugs.debian.org/273781
2827 2006-01-01  Paul Eggert  <eggert@cs.ucla.edu>
2829         * NEWS: Document that mkfifo and mknod -m no longer set special bits.
2830         * src/copy.c: Include lchmod.h.
2831         (copy_internal): Use lchmod rather than chmod.
2832         * src/cp.c: Include lchmod.h.
2833         (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
2834         * src/mkdir.c: Include lchmod.h.
2835         (usage): Clarify -m's operation.
2836         (main): Use lchmod rather than chmod.  Don't use lchmod unless the
2837         new mode contains bits outside the 777 range.
2838         * src/mkfifo.c (usage): Clarify -m's operation.
2839         (main): If -m is given, don't invoke chmod; use umask 0 instead.
2840         Report an error if -m asks for bits outside the 777 range.
2841         * src/mknod.c (usage, main): Likewise.
2843         * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
2845 2005-12-27  Jim Meyering  <jim@meyering.net>
2847         * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
2848         (sc_prohibit_assert_without_use): New rule.
2849         (syntax-check-rules): Add it to the list.
2850         * .x-sc_prohibit_assert_without_use: New empty file.
2851         * Makefile.am (EXTRA_DIST): Add it.
2853         * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
2855         * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
2856         Don't include <assert.h>; it wasn't used.
2858 2005-12-26  Paul Eggert  <eggert@cs.ucla.edu>
2860         * src/chown-core.c (restricted_chown):
2861         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
2862         * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
2863         | O_NOFOLLOW too, for consistency with other dir-openers.
2864         Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
2865         (is_empty_dir): Likewise.
2866         * src/shred.c (wipename): Likewise.  Don't bother trying to open
2867         dir for writing, since POSIX prohibits it.
2869 2005-12-22  Jim Meyering  <jim@meyering.net>
2871         * tests/help-version: Redirect stderr to /dev/full, to suppress
2872         write error diagnostic.
2874 2005-12-19  Jim Meyering  <jim@meyering.net>
2876         * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
2877         Avoid a minor race condition when `-m MODE' is specified, by using
2878         open, fchown, and close rather than just chown.  To do that reliably --
2879         even with an overly restrictive umask -- ensure that each mkdir,
2880         mknod and mkfifo call uses a mode including at least owner-read access.
2881         * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
2882         the subsequent chown (or equivalent open,fchown,close) fails.
2883         * tests/misc/mknod: New tests.
2884         * tests/misc/Makefile.am (TESTS): Add mknod.
2886 2005-12-17  Jim Meyering  <jim@meyering.net>
2888         * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
2889         e.g., on a named pipe.
2890         (OPEN_NO_FOLLOW_SYMLINK): Remove definition.  Use O_NOFOLLOW in
2891         place of all uses, since it is guaranteed (system.h) to be defined.
2893 2005-12-05  Andreas Gruenbacher  <agruen@suse.de>
2895         Add POSIX ACL support
2896         * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
2897         is no requirement for ACL support; particularly, it does not exist
2898         on systems that have POSIX ACLs.
2899         * src/copy.h (cp_option_init) [umask_kill]: Remove member.
2900         * src/cp.c (umask_kill): With default acls, the umask is not to be
2901         applied.  Remove umask_kill, don't change the process umask, and let
2902         the kernel apply the umask where appropriate.
2903         * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
2904         * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
2905         umask_kill.
2906         (copy_reg, copy_internal): Use copy_acl and set_acl
2907         instead of fchown/chown. Fix the logic for POSIX ACLs.
2908         (chown_succeded): Remove; we now always copy acls and
2909         preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
2910         did a chown before or not.
2911         * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
2912         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
2913         mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
2914         to link with it via $(LIB_ACL), for the utilities that need it.
2916 2005-12-16  Paul Eggert  <eggert@cs.ucla.edu>
2918         * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
2919         (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
2920         (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
2921         value is now signified by whether cwd_errno is null.
2922         (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
2923         pointer-to-bool to pointer-to-errno-value.  All callers changed.
2924         (rm_1): Don't bother setting a local cwd failure flag and then
2925         ORing it into the caller's.  Just set the caller's.
2926         (rm): Use cwd failure errno value to print a slightly-better
2927         diagnostic.
2929 2005-12-15  Jim Meyering  <jim@meyering.net>
2931         * src/stat.c (print_it): Properly handle a backslash at the
2932         end of a --printf format string.  Reported by Paul Eggert.
2933         * tests/misc/stat-printf (end-bs): Add a test for the above.
2935 2005-12-15  Paul Eggert  <eggert@cs.ucla.edu>
2937         * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
2938         Don't assume /etc/passwd contains user names; use 'id' instead.
2940 2005-12-15  Jim Meyering  <jim@meyering.net>
2942         stat: revert behavior of --format=FMT (-c)
2943         stat: add new option: --printf=FMT
2944         * NEWS: Mention this.
2945         * src/stat.c (isodigit, octtobin, hextobin): Define.
2946         (PRINTF_OPTION): Define.
2947         (interpret_backslash_escapes, trailing_delim): New globals.
2948         (usage): Document them.  Alphabetize on long option names.
2949         (print_esc_char): New function.
2950         (print_it): Rewrite, in order to handle backslash escapes.
2951         (main): Handle new option.  Set globals for --format, too.
2953         * tests/misc/stat-printf: Test --printf and --format.
2954         * tests/misc/Makefile.am (TESTS): Add stat-printf.
2956 2005-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2958         * NEWS: sort now reports incompatible options.
2959         * src/sort.c (incompatible_options, check_ordering_compatibility):
2960         New functions.
2961         (main): Use them.  Don't bother with a usage message for
2962         "sort -c a b", for consistency with other error diagnostics.
2963         * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
2964         New tests.
2966         * src/cat.c (main): Undo previous change.  close_stdout already
2967         does the check, so the previous change wasn't necessary.
2969 2005-12-13  Paul Eggert  <eggert@cs.ucla.edu>
2971         * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
2973 2005-12-12  Paul Eggert  <eggert@cs.ucla.edu>
2975         Install a more-conservative approach for sort -R.  It's the
2976         same basic idea as the existing code, except it uses the full ISAAC
2977         approach (called the "more kosher" approach in the existing comments).
2978         This makes "sort -R" quite a bit slower (about a factor of 2 on my
2979         little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
2980         better to be conservative here at first, and review any performance
2981         improvements carefully.
2982         * .x-sc_require_config_h: Add src/rand-isaac.c.
2983         * src/rand-isaac.h: Remove.  All uses now simply include rand-isaac.c.
2984         * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
2985         (shred_SOURCES, sort_SOURCES): Remove.
2986         (EXTRA_DIST): Add rand-isaac.c.
2987         * src/rand-isaac.c: Revert to what used to be in shred.c, without
2988         changing it to allow for varying numbers of words in the state.
2989         Alter so that we include rand-isaac.c directly rather than
2990         compiling it and linking to it.  Don't include config.h or
2991         system.h; that's the includer's responsibility.
2992         Omit functions that are specific to shred.
2993         (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
2994         (isaac_step, struct irand_state):
2995         Resurrect these, with the same defns that used to be in shred.c.
2996         (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
2997         (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
2998         static again.
2999         (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
3000         (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
3001         (irand_init, irand32, irand_mod):
3002         Number of words is constant again.
3003         (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
3004         * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
3005         * src/sort.c: Likewise.
3006         * src/shred.c (fillrand, dopass, main): Undo previous change.
3007         (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
3008         from rand-isaac.c.
3009         * src/sort.c: Don't include md5.h; it wasn't needed.
3010         (struct keyfield): Rename random_hash to random, for consistency
3011         with the other member names.  All uses changed.
3012         (usage): Tweak wording to mention STRING for --seed option.
3013         (short_options): Rorder for consistency with other programs.
3014         (rand_state): Now a struct, not a pointer to one.  All uses changed.
3015         (HASH_WORDS, HASH_SIZE): Remove.
3016         (get_hash): Remove comments around resbuf size, since we can assume C89.
3017         Use a "more-kosher" (but slower) approach of invoking isaac_refill.
3018         (keycompare): Adjust to the new get_hash.
3019         Add a FIXME.
3020         (badfieldspec): Omit recently-introduced comment; it isn't needed.
3021         (main): Don't set need_random simply because gkey has it set; that
3022         doesn't necessarily mean we'll need random numbers.
3023         Redo seeding to match new get_hash approach.
3025 2005-12-10  Jim Meyering  <jim@meyering.net>
3027         * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
3029         Avoid shred segfault on 64-bit systems.
3030         * src/rand-isaac.c (isaac_refill): Don't try to negate a
3031         local of type uint32_t.  Make the local an `int' instead.
3033         * NEWS: Mention sort's new options.
3035         * src/rand-isaac.c (isaac_mix): Declare to be static.
3036         Mark all other functions as `extern' so the tight-scope
3037         part of `make distcheck' passes once again.
3038         * src/rand-isaac.h (isaac_mix): Remove declaration.
3040         * src/sort.c (get_hash): Change position of `*' in parameter
3041         type to conform with convention.
3042         (main): Split a long line so it fits in 80 columns.
3043         (keycompare): Remove stray SPACE before TAB that was
3044         causing `make distcheck' to fail.
3046         * src/shred.c: Don't include gethrxtime.h.  No longer needed.
3048         * tests/misc/sort-rand: New file: basic tests for the new options.
3049         * tests/misc/Makefile.am (TESTS): Add sort-rand.
3051 2005-12-10  Frederik Eaton  <frederik@ofb.net>
3053         * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
3054         (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
3055         * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
3056         Make state size runtime-configurable.
3057         (isaac_new, isaac_copy): New functions.
3058         * src/rand-isaac.h: New file.
3059         * src/shred.c: Include rand-isaac.h.  Move ISAAC code to rand-isaac.c.
3060         (fillrand, main): Adjust to the fact that the state size is now
3061         runtime-configurable.
3062         * src/sort.c (short_options, long_options, WORDS, keycompare, main):
3063         (usage): Add options --random-sort and --seed to implement a random
3064         shuffle.
3065         Include md5.h and rand-isaac.h.
3066         (get_hash): New function.
3067         (rand_state): New var.
3068         (HASH_WORDS, HASH_SIZE): New macros.
3070 2005-12-09  Paul Eggert  <eggert@cs.ucla.edu>
3072         * tests/dd/misc: Add test for dd iflags=noatime.
3074 2005-12-09  Jim Meyering  <jim@meyering.net>
3076         * src/sort.c (usage): Mention white space vs -b and -t options.
3077         From The Wanderer.
3079 2005-12-09  Eric Blake  <ebb9@byu.net>
3081         * src/test.c (main): Fix misleading comment.
3083 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
3085         * NEWS: Mention dd's new noatime flag.
3086         * src/system.h (O_NOATIME): Define to 0 if not already defined.
3087         * src/dd.c (flags, usage): Add support for noatime flag.
3089 2005-12-07  Jim Meyering  <jim@meyering.net>
3091         Distribute the cvsu script, used only by `make syntax-check'.
3092         * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
3093         * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
3094         distribute a copy of this script.
3095         * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
3097         * tests/mv/acl: exit-77 before the trap, not after, if we fail
3098         to create a temporary directory on another partition.
3099         From Andreas Gruenbacher.
3101 2005-12-06  Tomas Pospisek  <tpo@sourcepole.ch>  (tiny change)
3103         * man/basename.x: Cross-reference to dirname and readlink.
3104         * man/dirname.x: Cross-reference to basename and readlink.
3106 2005-12-05  Andreas Gruenbacher
3108         * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
3109         (set_owner, preserve_author): New functions, factored out of copy_reg.
3110         (copy_reg): Use them.
3111         (copy_internal): Use them here, too.
3113 2005-12-04  Jim Meyering  <jim@meyering.net>
3115         * src/sleep.c (usage): Say what happens with two or more arguments.
3116         Suggested by Justin Pryzby.
3118         * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
3119         where it's used.
3121 2005-12-03  Jim Meyering  <jim@meyering.net>
3123         * src/rm.c (long_opts): Change the name of each undocumented, for-
3124         testing-only option to start with `-', so that it cannot render
3125         ambiguous any prefix it happens to share with some other option name.
3126         Problem reported by Eric Blake.
3127         * src/head.c (long_options): Likewise.
3128         * src/tail.c (long_options): Likewise.
3130         * tests/misc/head-elide-tail: Update uses of undocumented, for-
3131         testing-only --presume* options to start with `---'.
3132         * tests/rm/dangling-symlink: Likewise.
3133         * tests/rm/dir-no-w: Likewise.
3134         * tests/rm/isatty: Likewise.
3136 2005-11-30  Jim Meyering  <jim@meyering.net>
3138         * Makefile.maint: Add a comment about cvsu.
3140 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
3142         * NEWS: df updates for "none", "proc", inaccessible file systems.
3143         * src/df.c (show_point): Ignore inaccessible file systems.
3144         (usage): -a includes dummy file systems, not size-0 file systems.
3146         * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
3147         to avoid collision with POSIX name space.  All uses changed.
3149 2005-11-24  Jim Meyering  <jim@meyering.net>
3151         * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
3152         * tests/acl: Add `$0: ' prefix to diagnostics.
3154         * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
3156 2005-11-23  Paul Eggert  <eggert@cs.ucla.edu>
3158         * src/copy.c: Improve performance a bit by optimizing away
3159         unnecessary system calls and going to a block size of at least
3160         8192 (on normal hosts, anyway).  This improved performance 5% on my
3161         Debian stable host (2.4.27 kernel, x86, copying from root
3162         ext3 file system to itself).
3163         Include "buffer-lcm.h".
3164         (copy_reg): Omit last argument.  All callers changed.
3165         Use xmalloc to allocate rather than trusting alloca
3166         (which is unwise with large block sizes).
3167         Declare locals more locally, if possible.
3168         Use uintptr_t words instead of int words, for a bit more speed
3169         when looking for null blocks on 64-bit hosts.
3170         Optimize away reads of zero bytes on regular files.
3171         In the typical case, insist on 8 KiB buffers, at least.
3172         Avoid unnecessary extra call to fstat when checking for sparse files.
3173         Avoid now-unnecessary cast to off_t, and "0L".
3174         Avoid unnecessary test of *new_dst when checking for same owner
3175         and group.
3177 2005-11-22  Paul Eggert  <eggert@cs.ucla.edu>
3179         * src/remove.c (rm): Don't assume C99 for-loop syntax.
3181 2005-11-22  Jim Meyering  <jim@meyering.net>
3183         * src/remove.c (AD_push): Remove debugging cruft.
3185         * tests/rm/unread2 (rm): Change expected diagnostic,
3186         `cannot open directory' to `cannot remove', to align with
3187         new version of rm.
3188         * tests/rm/rm2: Ensure that rm now continues removing entries
3189         even after certain types of failure.
3191         * src/remove.c: Rewrite.  Now, this module is reentrant on systems
3192         that provide openat (Solaris), and on systems like Linux+procfs
3193         where our openat emulation code is reentrant.  This also fixes a
3194         few low-probability leaks and eliminates some code that could,
3195         in very unusual circumstances, cause rm() (via a callee) to exit.
3196         * NEWS: Mention this.
3198         * configure.ac: Put copyright dates all on one line so the
3199         emacs function that updates them works properly.
3201 2005-11-18  Paul Eggert  <eggert@cs.ucla.edu>
3203         * configure.ac (AM_PROG_CC_C_O): Add.  Needed for CVS Automake.
3204         Problem reported by Eric Blake.
3205         (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
3206         we get a standard-conforming compiler.  This relies on the new
3207         m4/c.m4 file.  Note that it's a bit tricky, since c.m4 doesn't
3208         define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
3209         m4/c.m4 can go away with Autoconf 2.60 comes out.
3211 2005-11-17  Jim Meyering  <jim@meyering.net>
3213         * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
3214         (AD_mark_current_as_unremovable): Likewise, but for a local.
3215         (rm_1): Likewise.
3217         * tests/mv/acl: Let traps handle removing temporary directories.
3219         Expect acl-related tests to fail, until the corresponding
3220         patches are committed.
3221         * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
3222         * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
3224         ACL tests, from Andreas Gruenbacher.
3225         * tests/acl, tests/mv/acl, tests/cp/acl: New files.
3226         * tests/mv/Makefile.am (TESTS): Add acl.
3227         * tests/cp/Makefile.am (TESTS): Add acl.
3229         * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
3231 2005-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3233         * NEWS: Improve quality of ln's diagnostics.
3234         * src/ln.c (do_link, usage): Likewise.
3235         (do_link): Don't use alloca on a buffer of unbounded size.
3237 2005-11-16  Jim Meyering  <jim@meyering.net>
3239         * tests/cp/fail-perm: Accommodate HPUX.  It appears to fail
3240         with EACCES rather than EPERM.  Reported by Peter O'Gorman here:
3241         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
3242         This also affects AIX 4.3.3, according to Ralf Wildenhues, in
3243         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3245 2005-11-14  Jim Meyering  <jim@meyering.net>
3247         * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
3249 2005-11-13  Jim Meyering  <jim@meyering.net>
3251         * announce-gen: Accept new option, --gpg-key-id=ID and
3252         emit a blurb telling how to use the .sig files.
3253         * Makefile.cfg (gpg_key_ID): Define.
3254         * Makefile.maint (announcement): Use new option and key.
3256         Require that most .c files include <config.h>.
3257         * Makefile.maint (sc_require_config_h): New rule.
3258         (syntax-check-rules): Add it.
3259         * .x-sc_require_config_h: New file listing exceptions to the
3260         above rule.  Some are legit, others are simply grandfathered in.
3261         * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
3263 2005-11-12  Jim Meyering  <jim@meyering.net>
3265         * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
3267 2005-11-11  Jim Meyering  <jim@meyering.net>
3269         * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
3270         Mention new readlink options in 5.3.0's `New features' section.
3271         Spotted by Thomas Hood.
3273 2005-11-08  Jim Meyering  <jim@meyering.net>
3275         * NEWS: Merge in changes from b5_9x branch.
3277 2005-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3279         * NEWS: ls now defaults to --time-style='locale', which in turn acts
3280         like --time-style='posix-long-iso' if the locale settings are messed up.
3281         * src/ls.c (decode_switches): Implement this.
3283 2005-11-08  Jim Meyering  <jim@meyering.net>
3285         * tests/du/2g: s/expensive/very expensive/ in a comment.
3286         From Paul Townsend.
3288 2005-10-17  Eric Blake  <ebb9@byu.net>
3290         * src/ls.c (usage): Fix descriptions of --sort, --time.
3291         Reported by Vitaly A. Ostanin.
3293 2005-11-04  Paul Eggert  <eggert@cs.ucla.edu>
3295         * src/ln.c: Include filenamecat.c.
3296         (FILE_BASENAME_CONCAT): Remove.
3297         (do_link): Remove last arg DEST_IS_DIR.  All callers changed.
3298         (main): Use file_name_concat, base_name, and strip_trailing_slashes
3299         instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
3300         the use of alloca.
3302 2005-11-04  Jim Meyering  <jim@meyering.net>
3304         * src/du.c (process_file): Don't overflow for files of size >= 2^31
3305         on systems with stat.st_blocks of a signed 32-bit type.
3306         This bug causes trouble on some AIX 5.1 systems.
3307         Report and trivial patch from Paul Townsend:
3308         <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
3309         * NEWS: Mention this.
3311         * tests/du/2g: New (very-expensive) test for the above-fixed bug.
3312         * tests/du/Makefile.am (TESTS): Add it here.
3313         * tests/very-expensive: New file.
3314         * tests/Makefile.am (EXTRA_DIST): Add it here.
3315         * tests/cp/perm: Mark this test as `very-expensive', too.
3317 2005-11-02  Paul Eggert  <eggert@cs.ucla.edu>
3319         * NEWS: Mention that rm -d and maybe ln -d are scheduled for
3320         removal in 2006.
3321         * src/remove.h (struct rm_options): Remove unlink_dirs.  All uses
3322         removed.
3323         * src/rm.c (usage): Don't mention rm -d.
3325 2005-11-02  Jim Meyering  <jim@meyering.net>
3327         * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
3328         From Andreas Schwab.
3330         * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
3331         `M+N records in/out' lines don't pollute `make check' output.
3333         * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
3334         fixed on 2005-10-31.  This test uses the new, IN_PIPE specifier.
3335         * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
3336         to indicate that the input file should be piped into the command
3337         under test (via `cat FILE | $prog ...').
3339         * src/remove.c (remove_entry): Emit a better diagnostic when rm
3340         (without -r) fails to remove a directory on a non-Linux system.
3341         This change affects only newer Solaris systems (with priv_*
3342         functions like priv_allocset).  Reported by Keith Thompson.
3344         * tests/rm/dir-nonrecur: New file/test for the above fix.
3345         * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
3347 2005-11-01  Paul Eggert  <eggert@cs.ucla.edu>
3349         * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
3350         POSIX 1002.1-2001 requires.
3351         * src/tail.c (parse_obsolete_option): Implement this.
3352         Problem reported by Vincent Lefevre.
3353         * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
3354         * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
3355         (test_vector): Add special cases for _POSIX2_VERSION, and
3356         regularize the old ones a bit.
3357         * tests/touch/obsolescent: Add y2000 test.
3359 2005-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3361         * src/dd.c (skip): Fix off-by-one error reported by
3362         Theodoros V. Kalamatianos.
3364 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
3366         * tests/mkdir/p-3: Require that the test be run as non-root.
3367         Problem and trivial fix reported by Theodoros V. Kalamatianos.
3369 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
3371         * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
3372         boundary between DEST and SOURCE in the result.
3374 2005-10-26  Dmitry V. Levin  <ldv@altlinux.org>
3376         * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
3377         back to text, to sync with documentation and for backwards
3378         compatibility.
3380 2005-10-25  Jim Meyering  <jim@meyering.net>
3382         * tests/dircolors/simple (other-wr): Add an explicit test for
3383         the dircolors bug (NULL-dereference) fixed yesterday.
3385 2005-10-24  Jim Meyering  <jim@meyering.net>
3387         * src/tac.c (tac_file): When determining whether a file is seekable,
3388         also test whether it is a tty.  Using only the lseek-based test would
3389         give a false positive on Solaris.  Reported by Peter Fales.
3391 2005-10-24  Dmitry V. Levin  <ldv@altlinux.org>
3393         * tests/install/d-slashdot: New test, for "install -d" failure.
3394         * tests/install/Makefile.am (TESTS): Add d-slashdot.
3395         * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
3396         * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
3398 2005-10-24  Jim Meyering  <jim@meyering.net>
3400         * src/dircolors.c (ls_codes): Add missing comma.
3401         Anonymous report and patch from
3402         http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
3404         * src/dircolors.c: Add compile-time assertion that the slack_codes
3405         and ls_codes arrays have the same number of elements.  This would
3406         have prevented the above-fixed bug.
3408         * src/expand.c (parse_tab_stops): Add a comment to make this function
3409         identical to the one in unexpand.c.
3410         * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
3411         identical to the one in expand.c.
3413         * src/expand.c (next_file): Don't assume fopen cannot return stdin.
3415 2005-10-23  Jim Meyering  <jim@meyering.net>
3417         * src/md5sum.c (digest_check, main): Use ptr_align rather than
3418         a dangerous pointer-value-to-`unsigned' cast.
3419         * NEWS: mention the new sha* programs.
3420         * AUTHORS: Add new sha* programs.
3422 2005-08-28  David Madore  <david.madore@ens.fr>
3424         Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
3425         * README: Add their names to the list.
3426         * src/md5sum.c: Provide framework for computing sha-2 hashes.
3427         * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
3428         Rules for compiling sha-2 utilities
3429         (noinst_HEADERS): Remove checksum.h.
3430         * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
3431         New files.
3432         * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
3433         (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
3434         * tests/misc/sha224sum, tests/misc/sha256sum: New files.
3435         * tests/misc/sha384sum, tests/misc/sha512sum: New files.
3436         * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
3437         sha384sum, sha512sum test scripts here rather that each in its
3438         own directory.
3440 2005-08-28  David Madore  <david.madore@ens.fr>
3442         * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
3443         of the FIPS test vectors).
3445 2005-10-23  Jim Meyering  <jim@meyering.net>
3447         * configure.ac: Use 6.0-cvs as the version string.
3448         * NEWS: Adjust accordingly.
3451         -----
3453         Copyright (C) 2005, 2006 Free Software Foundation, Inc.
3455         Copying and distribution of this file, with or without
3456         modification, are permitted provided the copyright notice
3457         and this notice are preserved.