* Makefile.maint (headers_with_interesting_macro_defs): Define.
[coreutils/ericb.git] / ChangeLog
blobf38ba512456fa2587e4755c8b57d52987f288443
1 2006-10-14  Jim Meyering  <jim@meyering.net>
3         * Makefile.maint (headers_with_interesting_macro_defs): Define.
4         (.re-defmac, sc_always_defined_macros): New rules.
6         * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
7         Instead, include "exit.h".  This hereby retires the work-around for
8         "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
10         * src/cksum.c (uint_fast32_t): Don't define.
11         Instead, include <stdint.h>.
13         * src/pinky.c (S_IWGRP): Don't define.
14         It's already defined by "stat-macros.h" (included via system.h).
16         * Makefile.cfg: Remove cruft that's now handled via bootstrap.
17         * Makefile.maint: Likewise, remove these targets/rules/variables:
18         (local_updates, update, cvs-update, wget_files, get-targets): Remove.
19         (cvs_files, wget-update, automake_repo): Likewise.
20         Move the comment about cvsu to build-aux/vc-list-files,
21         where cvsu is actually used.
23         * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
25         Work also when the working directory (with e.g. coreutils sources)
26         is version controlled with git, rather than CVS.
27         * bootstrap (CVS_only_file): Test for the existence of README-cvs,
28         rather than CVS.
29         In messages and comments, say e.g., "checked-out sources",
30         rather than "CVS sources".
31         (version_controlled_file): New function.  Work for git as well as
32         for CVS.  Don't use grep's -q option.
33         (slurp): Call it here, in place of CVS-specific code.
35         * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
36         to dir1/dir2~.
37         * src/copy.c (copy_internal): Although we do create a backup of each
38         destination directory when in move mode, don't do that when copying.
39         Reported by Peter Breitenlohner, in
40         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
41         * tests/cp/backup-dir: New file.  Test for the above.
42         * tests/cp/Makefile.am (TESTS): Add backup-dir.
44 2006-10-13  Jim Meyering  <jim@meyering.net>
46         More chown/chgrp dereferencing-related fixes.
47         * src/chown-core.c (change_file_owner): Don't use fts_statp if
48         we're dereferencing symlinks.
49         Reverse conjuncts, so that we use dereference file_stats
50         (aka ent->fts_statp) only *after* we've confirmed that
51         chopt->affect_symlink_referent is true.  Otherwise, we might
52         use ent->fts_statp uninitialized.
53         Don't turn on FTS_NOSTAT when dereferencing symlinks.
54         * tests/chown/deref: Update the expected diagnostic, now that
55         this test case (trying to use "chown --dereference ..." on a
56         dangling symlink) takes a different code path.
58 2006-10-13  Paul Eggert  <eggert@cs.ucla.edu>
60         Sync from Bison, as follows:
62         2006-10-01  Paul Eggert  <eggert@cs.ucla.edu>
64         Fix problems with translating English-language diagnostics.
65         * bootstrap: Fix bug introduced in recent bootstrap changes, with
66         respect to bison-runtime pot generation.  The YY_ stuff
67         wasn't being captured.
69 2006-10-13  Jim Meyering  <jim@meyering.net>
71         * src/chown-core.c (change_file_owner): Use fstatat, not stat,
72         now that we're using fts_open with FTS_CWDFD.
73         * tests/chgrp/posix-H: Add --preserve-root to an invocation of
74         chgrp, to exercise the above fix.
75         * NEWS: Mention the above.
77         * src/du-tests: Clean up a little, though it's still not portable.
79         * .vg-suppressions: Add 3 more for debian unstable.
81         * tests/ls/Test.pm: Remove long-unused file.
82         * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
83         Suggestions from Bruno Haible.
85 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
87         * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
88         (MAINTAINERCLEANFILES): Add .kludge-stamp.
89         * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
90         instead of $(man_MANS).
92 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
94         * configure.ac: Avoid compiler warnings about default return
95         type in function definitions and unused variables in tests.
96         * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
97         if this is #defined.
99 2006-10-12  Jim Meyering  <jim@meyering.net>
101         * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
102         Call gl_INIT directly, rather than through the above.
104 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
106         * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
107         variable was sometimes used without being initialized.  This
108         messed up the installation of the INSTALL file in some cases.
110 2006-10-11  Jim Meyering  <jim@meyering.net>
112         * src/ls.c (usage): Correct description of -s, --size.
113         It works even without -l.  Suggestion from Karl Berry.
115 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
117         * src/ls.c (quote_name): Use initializer rather than memset to
118         initialize an object to zero.  This is easier to read and is less
119         likely to introduce a runtime error due to a mixup.  It causes
120         gcc -W to issue a warning, but you can work around this by
121         appending -Wno-missing-field-initializers.
122         * src/pathchk.c (portable_chars_only): Likewise.
123         * src/shred.c (main): Likewise.
124         * src/stty.c (main): Likewise.
125         * src/tr.c (card_of_complement): Likewise.
126         * src/wc.c (wc): Likewise.
128 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
130         * src/sort.c (usage): Mention again that sort fields are origin 1.
132         * NEWS: Fix typo: iso-8602 -> iso-8601.  Problem reported by
133         Bob Proulx.
135         * bootstrap (usage, main program, symlink_to_gnulib): Add option
136         --copy.  Inspired by a suggestion from Bruno Haible.
138 2006-10-09  Jim Meyering  <jim@meyering.net>
140         Avoid a compiler warning.
141         * src/pathchk.c (portable_chars_only): Initialize variable of type
142         mbstate_t via memset, rather than via '{0}'.  Patch from Bruno Haible.
144 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
146         Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
147         wrong file name in some cases.  Lars Wendler reported a bug in
148         my original fix.
149         * src/install.c (make_ancestor): New arg COMPONENT.
150         * src/mkdir.c (make_ancestor): Likewise.
151         * tests/install/basic-1: Check for install -Dv bug.
152         * tests/mkdir/Makefile.am (TESTS): Add p-v.
153         * tests/mkdir/p-v: New file, to test this bug.
155 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
157         * src/chgrp.c: Don't include lchown.h; no longer needed.
158         * src/chown.c: Likewise.
160         * tests/ls/stat-dtype: Use a dynamic test to decide whether the
161         current file system has useful d_type info.
163         * src/dd.c (flags): noatime and nofollow now depend on
164         HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
165         (usage): Output info about noatime and nofollow only if
166         they are known to work.
167         * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
168         than O_NOFOLLOW, when testing whether it's possible to avoid a
169         race condition reliably.
171 2006-10-05  Jim Meyering  <jim@meyering.net>
173         * src/c99-to-c89.diff: Update to reflect new offsets.
175         * tests/install/basic-1: Skip the latter part of this test if the
176         just-built dd binary is not readable.  Otherwise, this test would fail
177         when binaries were created as root.  Reported by Bauke Jan Douma in
178         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
180 2006-10-03  Paul Eggert  <eggert@cs.ucla.edu>
182         * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
183         MiB, since XFS hosts can legitimately have large values of
184         st_blksize.  Problem reported by Tony Ernst in
185         <http://savannah.gnu.org/bugs/?17903>.
187 2006-10-04  Jim Meyering  <jim@meyering.net>
189         * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
190         Paul Eggert pointed out that the specified file may exist,
191         in spite of such an errno value.
192         * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
193         * tests/rm/ignore-name-too-long: Remove file.
194         * NEWS: Update here, too.
196 2006-10-03  Jim Meyering  <jim@meyering.net>
198         * tests/rm/fail-eperm: Report failure also if rm is terminated by
199         a signal.
201         * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
202         and one in shred.c -- that were added before coreutils-6.3.
203         Reported by Michael Deutschmann.
205         * src/c99-to-c89.diff: Update to reflect new offsets.
207         * src/remove.c (remove_entry): With -f, exit successfully in spite
208         of a missing file under some very unusual conditions (with errno
209         being any of ENOENT, ENOTDIR, ENAMETOOLONG).
211         With --force (-f), rm no longer fails for ENOTDIR.
212         * src/remove.c (ignorable_missing): New function.
213         Use it everywhere, rather than open-coding the test.
214         Andreas Schwab reported the ENOTDIR problem.
215         (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
217         * NEWS: Mention the bug fix.
218         * tests/rm/ignorable: New file.  Test for the ENOTDIR case.
219         * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
220         * tests/rm/Makefile.am (TESTS): Add the new file names.
222         * bootstrap: Undo last change to this file, since now gnulib-tool
223         sticks with the automake default in generating dependencies.
225         * NEWS: Add a line for 6.4-cvs.
226         * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
228 2006-09-30  Jim Meyering  <jim@meyering.net>
230         Version 6.3.
231         * NEWS: Record the 6.3 release date.
232         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
234         * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
236         * src/c99-to-c89.diff: Update offsets.
238 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
240         * tests/rm/readdir-bug: Don't use $(...) in a shell script,
241         as it doesn't work with Solaris /bin/sh.
243 2006-09-29  Jim Meyering  <jim@meyering.net>
245         * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
246         the pinky segfault.
248         * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
249         use .1 as the increment.  Actual output varies too much.
250         [eq-wid-3]: New, commented out test.
252         * src/shuf.c (read_input): Fix an off-by-one error that
253         would cause an infloop for piped input of 8KB or more.
254         * NEWS: Mention the fix.
255         * tests/misc/shuf: Test for the above fix.
257         Since any system may be affected by the Darwin readdir bug,
258         perform the extra rewinddir unconditionally.  The performance
259         impact of rewinding a directory is negligible.
260         * src/remove.c (NEED_REWIND): Define to use
261         CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
263         * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
264         increment translates to a slightly larger value.
265         This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
266         The final expected value wasn't being printed.
268         Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
269         and NFS, whereby rm would not remove all files in a directory.
270         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
271         (NEED_REWIND): New macro, so that we incur the cost of the work-around
272         rewinddir only on afflicted systems.
273         * NEWS: Clarify and correct.
274         * tests/rm/readdir-bug: New file.  Test for the above fix.
275         * tests/rm/Makefile.am (TESTS): Add it.
276         Prompted by testing and analysis from Bruno Haible:
277         http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
279 2006-09-28  Paul Eggert  <eggert@cs.ucla.edu>
281         * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
282         suggested for Debian stable, which uses Perl 5.8.4.
284 2006-09-28  Jim Meyering  <jim@meyering.net>
286         Automatically generated dependencies are important even
287         when all of the sources in a directory come from gnulib.
288         * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
289         option that gnulib-tool adds to what becomes our lib/gnulib.mk.
291         * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
292         Ensure that IFS is set properly and unset PATH.
293         Sanitize inputs.
294         Work properly even when the name of the selected file starts with "-".
295         Invoke rm via "../../src/rm", and adjust expected output.
296         Prompted by a patch from Tim Waugh.
298         * README-cvs: Add Bison to the list of required packages.
300 2006-09-26  Jim Meyering  <jim@meyering.net>
302         * src/c99-to-c89.diff: Update offsets.
304         * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
305         it from removing a directory containing 188 or more entries.
306         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
307         20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
308         Reported by Matthew Woehlke.
310 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
312         * NEWS: "groups user" no longer outputs "user :"; you need at least
313         two users.  "groups" now processes options like --help more compatibly.
314         * src/groups.sh: Implement the option-processing change.
315         Handle user and group names with special characters more robustly.
316         Report write errors instead of exiting silently with status 1.
318 2006-09-26  Jim Meyering  <jim@meyering.net>
320         * README: Warn not to run autoreconf manually.  Use bootstrap instead.
322         * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
323         Rewrite to avoid using temporary, $status.
325         * NEWS: Mention the bug fix.
326         * src/groups.sh: Don't hide a write failure.
327         Reported by Iain Calder <ic56@rogers.com>.
329 2006-09-25  Jim Meyering  <jim@meyering.net>
331         * src/chown.c (usage): Clarify --dereference description.
332         * src/chgrp.c (usage): Likewise.  Suggestion from Jamie McClelland.
334 2006-09-24  Jim Meyering  <jim@meyering.net>
336         * NEWS: Mention these fixes.
337         * src/copy.c (copy_reg): With --verbose (-v), print
338         "removed `file_name'" just after unlinking a file.
339         (copy_internal): Likewise, in three more places.
340         Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
341         * tests/mv/hard-verbose: New file.  Test for the above fix.
342         * tests/mv/Makefile.am (TESTS): Add hard-verbose.
344         * tests/help-version (sync_args): Don't call sync, since it spins up
345         disks that I've deliberately caused to spin down (but not unmounted).
347         * NEWS: Mention the improvement to sort.
349         * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
350         as well as existing.
352         * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
353         since that predated addition of d_type support.
355 2006-09-23  Jim Meyering  <jim@meyering.net>
357         * gl/modules/getloadavg.diff: New file.  Work around the way the latest
358         version of the getloadavg module interacts with our bootstrap script.
359         * bootstrap (gnulib_tool_options): Add "--local-dir gl".
360         * Makefile.am (EXTRA_DIST): Sort file names.
361         Add bootstrap and gl/modules/getloadavg.diff
363 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
365         * bootstrap: Add support for --force.
366         (usage): New function.  Describe usage less tersely.
367         (CVS_only_file): New var.
369         * NEWS: Document fix for cp -i and mv -i.
370         * src/copy.c (copy_internal): With -i, prompt even if the source
371         is a directory and the destination is not.  This is required by
372         POSIX and gives the user a chance to bail out before failing.
373         * tests/cp/Makefile.am (TESTS): Add cp-i.
374         * tests/cp/cp-i: New file.
375         * tests/mv/Makefile.am (TESTS): Add i-5.
376         * tests/mv/i-5: New file.
378 2006-09-20  Jim Meyering  <jim@meyering.net>
380         * NEWS: Mention the chmod bug fix.
382         * tests/chmod/inaccessible: New test, specifically for this bug.
383         Based on a test case from Paul Eggert.
384         * tests/chmod/Makefile.am (TESTS): Add inaccessible.
386         Fix the 2006-09-18 bug differently.
387         * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
388         tell fts_read to stat the file again, in case it has become
389         accessible since the initial fts_open call.
390         * src/chown-core.c (change_file_owner): Likewise.
392         * src/chmod.c: Revert last change.  There is a better way.
393         * src/chown-core.c: Likewise.
395 2006-09-19  Paul Eggert  <eggert@cs.ucla.edu>
397         * src/ln.c (target_directory_operand): Rewrite to avoid porting
398         problem on Tandem reported by Matthew Woehlke in
399         <https://savannah.gnu.org/bugs/?17172>.
401 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
403         Fix bug where chmod, chown, and chgrp did not process operands
404         left-to-right in some cases.
405         * src/chmod.c (wd_errno): New var.
406         (chmod_file): New function, with most of the contents of the
407         old prcess_file function.
408         (process_files): Use it.  This gives file names to fts one
409         at a time, so that they are processed left-to-right as POSIX
410         requires.
411         * src/chown-core.c (wd_errno, chown_files): Likewise.
412         (chown_file): New function.
413         * tests/install/basic-1: Redo test so as to not workaround
414         the chmod bug, thereby testing for it.
416         * src/shuf.c (main): Quote the entire range when reporting an
417         invalid one, rather than just the part that contained the error.
419         * tests/stty/row-col-1: Rewrite to avoid temporary file that is
420         sometimes left behind if the test is skipped or interrupted.
422         * bootstrap (symlink_to_gnulib): New function.
423         (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
424         to copies-of-gnulib.
425         (cp_mark_as_generated, slurp, gnulib_files):
426         Avoid making a copy if it's the same as the old version.
427         (gnulib_files): Add support for this variable (used by Bison).
429         * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
430         indicating flaw in kernel.  Reword to say that the flaw isn't
431         serious for coreutils, since the flaw does affect ls -i.
433         * tests/chgrp/basic: Fix bug in test case exposed by building on
434         Solaris 8 in a setgid directory.  The test case incorrectly
435         assumed that 'symlink' would be in group $g1.
437 2006-09-18  Jim Meyering  <jim@meyering.net>
439         * NEWS: Add a line for 6.3-cvs.
440         * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
442         Version 6.2.
443         * NEWS: Record the 6.2 release date.
444         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
446 2006-09-17  Jim Meyering  <jim@meyering.net>
448         * tests/chgrp/basic: On an OpenBSD system, rather than failing
449         due to a known problem, merely warn about it.
450         Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
451         Instead, use stat to test file system for desired results, directly.
452         * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
454         * tests/envvar-check: Add more variable names to the list of those
455         that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
456         QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
458 2006-09-16  Paul Eggert  <eggert@cs.ucla.edu>
460         * NEWS: Document that mkdir -p and install -d now fork on occasion.
461         * bootstrap.conf (gnulib_modules): Add savewd.
462         * src/install.c: Include savewd.h.
463         (process_dir): New function.
464         (main, install_file_in_file_parents): Use it, along with the new
465         savewd module, to avoid some race conditions.
466         * src/mkdir.c: Include savewd.h.
467         (struct mkdir_options): New members make_ancestor_function, mode,
468         mode_bits.
469         (make_ancestor): Return 1 if the resulting directory is not readable.
470         (process_dir): New function.
471         (main): Use it, along with new savewd module, to avoid some
472         race conditions.  Fill in new slots of struct mkdir_options, so
473         that callees get the values.
474         * tests/install/basic-1: Test for coreutils 5.97 bug that was
475         fixed in coreutils 6.0, and which should still be fixed with
476         this change.
477         * tests/mkdir/p-3: Likewise.
479 2006-09-15  Jim Meyering  <jim@meyering.net>
481         * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
482         The 2006-09-08 changes made it so "mv dir new-name/" would
483         fail on NetBSD 1.6.  This makes it work once again.
485 2006-09-14  Jim Meyering  <jim@meyering.net>
487         * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
488         Instead, since it's a little fragile, assert the condition.
489         (target_directory_operand): Update comment to reflect latest change.
491 2006-09-12  Paul Eggert  <eggert@cs.ucla.edu>
493         * src/who.c (print_user): Rewrite to avoid warning from
494         GCC 4.1.1 with -Wall.
496 2006-09-12  Jim Meyering  <jim@meyering.net>
498         * tests/mv/atomic: Check for specific strace output, rather than
499         simply nonempty.  RHEL AS 4 would fail this test due to strace
500         generating "[ Process PID=14434 runs in 32 bit mode. ]".
501         Reported by Nelson Beebe.
503 2006-09-11  Jim Meyering  <jim@meyering.net>
505         * src/remove.c (remove_dir): Move new cache_stat_init call onto
506         it's own line.
507         (rm_1): Move declaration of "st" and new cache_stat_init call
508         "down" to nearer where they're used.
509         * src/c99-to-c89.diff: Add another set of curly braces.
511 2006-09-10  Paul Eggert  <eggert@cs.ucla.edu>
513         * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
514         substr's last operand is very large.  Performance problem reported
515         by Sebastian Kreft.
517 2006-09-09  Jim Meyering  <jim@meyering.net>
519         * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
520         are no .m4 files.
521         (sc_require_config_h): Skip this test if there are no version-
522         controlled .c files.
523         (sc_prohibit_assert_without_use): Likewise.
525 2006-09-08  Jim Meyering  <jim@meyering.net>
527         * bootstrap: Export CVS_RSH separate from its assignment, to work
528         even with Solaris 10's /bin/sh.  Suggestion from Mark D. Baushke.
530 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
532         * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
533         no file operand is given, and standard input is any FIFO.
534         This is in response to Open Group XCU ERN 114.
535         * src/tail.c (main): Likewise.
537 2006-09-08  Jim Meyering  <jim@meyering.net>
539         mv and "cp -r" no longer fail when invoked with two arguments
540         where the first one names a directory and the second name ends in
541         a slash and doesn't exist.  E.g., "mv dir B/", for nonexistent B,
542         now succeeds, once more. This reverts part of the 2004-06-27
543         change for 5.3.0.
544         * NEWS: Say the above.
545         * src/mv.c (target_directory_operand): Don't require (here)
546         that the target operand "look like" a directory.  This change
547         pushes the test down to the rename syscall level, where a
548         "mv dir existing-non-dir/" will mistakenly succeed on older systems
549         that ignore trailing slashes in the rename destination argument.
550         * src/cp.c (target_directory_operand): Likewise, but for cp.
551         * tests/mv/trailing-slash: Exercise the above fixes.
552         * tests/cp/trailing-slash: New file.
553         * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
555         * bootstrap: Use the previously unused variable, $src,
556         to avoid repeating "$GNULIB_SRCDIR/$file".
558         * bootstrap (cp_mark_as_generated): Don't use "local", to
559         accommodate ancient "/bin/sh".  Suggested by Ralf Wildenhues.
560         Rename now-global "$src" and "$dst" to have cp_ prefix.
561         Safer, and avoids confusion.
563         * bootstrap (cp_mark_as_generated): New function.
564         (slurp): Use it to prepend editor hints and a warning that
565         the file we're copying is generated.
566         Suggestion from Bruce Korb.
567         (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
568         Fix last-minute typo.
570 2006-09-07  Jim Meyering  <jim@meyering.net>
572         * bootstrap: Revert last change.  There are less disruptive ways
573         to mark these generated files as read-only.
575         * src/c99-to-c89.diff: Update to have proper offsets.
577 2006-09-06  Jim Meyering  <jim@meyering.net>
579         Ensure that some gnulib-tool-generated files are read-only.
580         * bootstrap (slurp): Put the body of this function in a sub-shell,
581         with "umask a-w" so that all new files are read-only.  Remove each
582         file before we write to it, in case it's read-only.
583         Make po/Makevars and runtime-po/Makevars read-only, too.
585 2006-09-05  Jim Meyering  <jim@meyering.net>
587         * tests/cp/acl: Skip this test when cp lacks ACL support.
588         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
590         * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
591         context from change of 2006-09-02.
593 2006-09-04  Jim Meyering  <jim@meyering.net>
595         * README-cvs: Fix typo in update command.
597 2006-09-03  Jim Meyering  <jim@meyering.net>
599         * NEWS: Tweak the wording in the new change description so that
600         no one can think this change causes e.g., `rm -fr foo../' to fail.
602         * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
603         Use $CONFIG_HEADER, rather than hard-coding it.
604         * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
606 2006-09-02  Paul Eggert  <eggert@cs.ucla.edu>
608         * NEWS: rm now rejects attempts to remove /, ./, and ../.
609         * src/basename.c: Don't include dirname.h, since system.h does it now.
610         * src/chmod.c: Likewise.
611         * src/copy.c: Likewise.
612         * src/cp.c: Likewise.
613         * src/df.c: Likewise.
614         * src/dircolors.c: Likewise.
615         * src/dirname.c: Likewise.
616         * src/du.c: Likewise.
617         * src/install.c: Likewise.
618         * src/ln.c: Likewise.
619         * src/ls.c: Likewise.
620         * src/mkdir.c: Likewise.
621         * src/mv.c: Likewise.
622         * src/remove.c: Likewise.
623         * src/rm.c: Likewise.
624         * src/rmdir.c: Likewise.
625         * src/shred.c: Likewise.
626         * src/split.c: Likewise.
627         * src/su.c: Likewise.
628         * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
629         now.
630         (dot_or_dotdot): Succeed even if "." or ".." is followed by a
631         slash.
632         * src/rm.c (usage, main): --preserve-root is now the default.
633         * src/remove.h: Fix comment.
634         * src/remove.c (cache_fstatat, cache_stat_init): New functions.
635         (cache_statted, cache_stat_ok): New functions.
636         (write_protected_non_symlink): Remove struct stat ** buf_p arg,
637         which is no longer needed with the new functions.  All callers
638         changed.
639         (prompt, is_dir_lstat, remove_entry, remove_dir):
640         New struct stat * arg.  All callers changed.
641         (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
642         (remove_cwd_entries, remove_dir, rm_1):
643         Use and maintain the file status cache.
644         (prompt, remove_entry): Omit the first "directory" in the diagnostic
645         "Cannot remove directory `foo': is a directory".  This causes "rm"
646         to pass a test case that it would otherwise fail now that it
647         "knows" more about its argument.  I think the diagnostic is better
648         without the first "directory" anyway.
649         (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
650         (rm_1): Reject attempts to remove /, ./, or ../.
651         * tests/rm/Makefile.am (TESTS): Add r-4.
652         * tests/rm/r-4: New file.
654 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
656         * src/stat.c: Include <stddef.h>
657         (alignof): New macro.
658         (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
659         Remove.
660         (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
661         (FSID_VAL): Remove.
662         (print_statfs): If f_fsid isn't an integer, grab its words one
663         at a time in little-endian order.  This is a bit easier to configure
664         and should avoid a compilation failure on MacOS reported by Bruno
665         Haible.
667 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
669         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
670         work around a Mac OS X porting problem reported by Bruno Haible in
671         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
672         (print_statfs): Use them.
674         * bootstrap.conf (gnulib_modules): Add isapipe.
675         * src/tail.c: Include isapipe.h.
676         (IS_PIPE_LIKE_FILE_TYPE): Remove.
677         (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
678         tailable, since this seems to be portable.
679         (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
680         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
682         * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
683         it for us.
685 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
687         * src/copy.c (copy_internal): Don't test whether macros like
688         S_ISLNK are defined, since they're always defined now.
689         * src/cp.c (main): Likewise.
690         * src/ln.c (main): Likewise.
691         * src/ls.c (get_link_name, make_link_name): Likewise.
692         * src/mknod.c (main): Likewise.
693         * src/mkfifo.c (usage): Likewise.
694         * src/who.c (S_IWGRP): Likewise.
696         Adjust to recent gnulib changes for the gnulib module.
697         * bootstrap.conf (gnulib_modules): Add fcntl.
698         * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove.  Other code
699         is already assuming these macros are defined.
700         (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
701         (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
702         Remove; the fcntl module now handles these.
704         Adjust to recent gnulib changes for the inttypes module.
705         * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
706         (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
708         * src/system.h: Don't bother to include <stdint.h>, since we can
709         now assume inttypes.h does the equivalent of including stdint.h.
711 2006-08-27  Jim Meyering  <jim@meyering.net>
713         * src/copy.c (copy_internal): Don't make a backup if the last
714         component of the source name is "." or "..".
715         Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
716         * NEWS: Mention this.
717         * tests/cp/src-base-dot: New file.  Test for the above fix.
718         * tests/cp/Makefile.am (TESTS): Add src-base-dot.
720         * src/system.h (DOT_OR_DOTDOT): Remove macro.  Rewrite as a...
721         (dot_or_dotdot): ...new static inline function.
722         * src/remove.c (rm_1): Reflect this renaming.
723         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
725         * src/copy.c (copy_internal): Add comments.
727 2006-08-26  Paul Eggert  <eggert@cs.ucla.edu>
729         * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
730         since Automake supplies them for us.  It always did -I$(srcdir),
731         and with the recent change to AC_CONFIG_HEADERS in configure.ac it
732         is now also doing -I../lib.
734         * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
735         Fail if the first "echo" fails.  Suppress diagnostics from "ls po/*.po"
736         since there might not be any .po files.
737         (WGET_COMMAND): Set to empty if wget doesn't
738         seem to be available.
740 2006-08-26  Jim Meyering  <jim@meyering.net>
742         This test was failing in some environments.
743         * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
744         to set LS_COLORS in the environment.
745         * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
746         Reported by Bob Proulx.
748         * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
750         * Makefile.am (EXTRA_DIST): Remove these files here, too:
751         .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
752         .x-sc_two_space_separator_in_usage.
754         Fix "mv --verbose --backup" so its output includes the
755         " (backup: foo.~1~)" suffix also when backing up a directory.
756         * NEWS: Report this bug fix.
757         * src/copy.c (emit_verbose): New function, factored out of...
758         (copy_internal): ...here.  Use the new function.
759         * tests/mv/backup-dir: Test for the above fix.
760         * tests/mv/Makefile.am (TESTS): Add backup-dir.
762 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
764         * .x-sc_no_if_have_config_h: Remove; no longer needed.
765         * .x-sc_prohibit_assert_without_use: Remove; it was empty.
766         * .x-sc_two_space_separator_in_usage: Likewise.
767         * Makefile.maint (sc_no_have_config_h): Renamed from
768         sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
769         is absent everywhere.
770         * bootstrap.conf (gnulib_modules): Add config-h.
771         * src/shred.c: Include <config.h> unconditionally, since
772         we now assume config.h exists.
773         * src/dircolors.c: Likewise.
775 2006-08-26  Jim Meyering  <jim@meyering.net>
777         "ls --color" would highlight other-writable and sticky directories
778         no differently than regular directories on a file system with
779         dirent.d_type support.
780         * NEWS: Say the above.
781         * src/ls.c (gobble_file): With --color, also stat the file when
782         we know it is a directory.
783         Derived from an anonymous one-line fix and bug report:
784         <http://savannah.gnu.org/bugs/?15043>.
785         * tests/ls/color-dtype-dir: New file.  Test for the above fix.
786         * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
788 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
790         * .cvsignore: Remove stamp-h1.  Add coreutils-*, to ignore
791         tarballs.
792         * bootstrap.conf: Add configmake, verify.
793         * src/.cvsignore: Remove localedir.h.
794         * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
795         subsumed by configmake.
796         * src/system.h: Include configmake.h rather than localedir.h
797         (LOCALEDIR): New macro.
799         Rewrite to avoid some unnecessary casts, macros, literals.
800         * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
801         not macros.
802         (SECTOR_SIZE, SECTOR_MASK): New constants.
803         (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
804         and use the SECTOR_* constants when applicable.  Check for size <
805         0 rather than size == -1, since negative-size files are a sign of
806         trouble anyway.
808 2006-08-25  Bruno Haible  <bruno@clisp.org>
810         * src/shred.c (dopass): Assume a continuable error if EIO even
811         if the current position is not a multiple of 512.
813 2006-08-24  Jim Meyering  <jim@meyering.net>
815         * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
817 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
819         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define.  This
820         macro was being used without being defined.
821         (SB_F_NAMEMAX): Remove cast.
822         (f_fsid) [BeOS]: Likewise.
823         (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
824         All uses changed.
825         (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
826         functions.
827         (xstrcat): Remove.  All uses changed to use the above functions.
828         (print_statfs, print_stat): 2nd arg is now the prefix len, not the
829         buffer len.  All uses changed.  Output '?', not '*', for unknown
830         data or errors.  Do not assume signed values can be interchanged
831         with unsigned when printing.
832         (print_statfs): For %i, print the fsid as a single int, not as a
833         pair.
834         (print_it): Quote invalid format better.
836         * NEWS: printf supports the I flag.
837         * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
839 2006-08-23  Bruno Haible  <bruno@clisp.org>
841         * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
842         (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
843         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
845         * src/ls.c (SA_RESTART): Fallback define.
847 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
849         * src/system.h (EDQUOT): Define if not already defined.
850         Problem reported by Bruno Haible for BeOS.
852         * .cvsignore: Remove config.h, config.hin, as they are now
853         in lib.
854         * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
855         to lib.
856         * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
858         * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
859         to accommodate today's gnulib change.
861 2006-08-23  Jim Meyering  <jim@meyering.net>
863         * NEWS: Mention the sweeping infrastructure changes.
865 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
867         * bootstrap.conf (gnulib_modules): Add gnupload.
868         * Makefile.maint (emit_upload_commands): gnupload is now
869         in build-aux.
870         * gnupload: Remove from CVS, since it's now a gnulib module.
872         * bootstrap (bootstrap_conf_cleanup): Remove.
873         (excluded_files): New var.
874         * bootstrap.conf: Likewise.
875         * bootstrap (slurp): Exclude files early if they're in the
876         excluded_files list.  That way, their names don't get put into
877         .cvsignore.
879         * aclocal.m4, config.hin, configure:
880         Remove from CVS, since ./bootstrap generates them automatically.
881         * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
882         configure, *.cache, *.lineno, *.log.
883         Remove more-specific entries.  This catches files like configure.lineno.
884         * man/.cvsignore: Add Makefile.in.
885         * src/.cvsignore: Add Makefile.in.
886         Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
888         * tests/.cvsignore:
889         * tests/chgrp/.cvsignore:
890         * tests/chmod/.cvsignore:
891         * tests/chown/.cvsignore:
892         * tests/cp/.cvsignore:
893         * tests/cut/.cvsignore:
894         * tests/dd/.cvsignore:
895         * tests/dircolors/.cvsignore:
896         * tests/du/.cvsignore:
897         * tests/expr/.cvsignore:
898         * tests/factor/.cvsignore:
899         * tests/fmt/.cvsignore:
900         * tests/head/.cvsignore:
901         * tests/install/.cvsignore:
902         * tests/join/.cvsignore:
903         * tests/ln/.cvsignore:
904         * tests/ls/.cvsignore:
905         * tests/ls-2/.cvsignore:
906         * tests/md5sum/.cvsignore:
907         * tests/misc/.cvsignore:
908         * tests/mkdir/.cvsignore:
909         * tests/mv/.cvsignore:
910         * tests/od/.cvsignore:
911         * tests/pr/.cvsignore:
912         * tests/readlink/.cvsignore:
913         * tests/rm/.cvsignore:
914         * tests/rmdir/.cvsignore:
915         * tests/seq/.cvsignore:
916         * tests/sha1sum/.cvsignore:
917         * tests/shred/.cvsignore:
918         * tests/sort/.cvsignore:
919         * tests/stty/.cvsignore:
920         * tests/sum/.cvsignore:
921         * tests/tac/.cvsignore:
922         * tests/tail/.cvsignore:
923         * tests/tail-2/.cvsignore:
924         * tests/tee/.cvsignore:
925         * tests/test/.cvsignore:
926         * tests/touch/.cvsignore:
927         * tests/tr/.cvsignore:
928         * tests/tsort/.cvsignore:
929         * tests/unexpand/.cvsignore:
930         * tests/uniq/.cvsignore:
931         * tests/wc/.cvsignore:
932         Add Makefile.in.  Sort entries if necessary.  Remove *.I, *.E,
933         *.X, *.O, *-tests, build-script, mk-script if they're never
934         created in this directory.
936 2006-08-22  Bruno Haible  <bruno@clisp.org>
938         BeOS portability.
939         * src/uptime.c: Include OS.h if it exists.
940         (print_uptime): On BeOS, use the get_system_info function (actually a
941         macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
942         (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
944 2006-08-22  Jim Meyering  <jim@meyering.net>
946         * .cvsignore: Add ABOUT-NLS.
948         Move the check-AUTHORS rule to be run as part of "make distcheck",
949         rather than "make check".
950         * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
951         cause "make check" to fail on systems unable to build all binaries.
952         * Makefile.maint (check-AUTHORS): New rule.
953         (local-checks-available): Add it here.
954         Reported by Bruno Haible.  Needed for BeOS.
956 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
958         * src/df.c (print_header, show_dev): Use a column width that
959         depends on the block size of -P is specified and not autoscaling.
960         Problem reported by Gustavo G. Rondina in:
961         http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
963 2006-08-21  Jim Meyering  <jim@meyering.net>
965         * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
966         when the shell variable, SHELL, is not set.
967         Trigger the failure with "(unset SHELL; make check TESTS=simple)".
968         Reported by Sven Joachim in <http://bugs.debian.org/355368>.
970         * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
971         in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
972         Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
973         od: invalid type string `u8';
974         this system doesn't provide a 8-byte integral type
975         FIXME: add a test for this, but skip it when sizeof uintmax < 8.
977 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
979         Add a bootstrap procedure, so that the CVS version contains fewer
980         files and we bootstrap the rest from gnulib, gettext, etc.
981         * README-cvs: New file.
982         * bootstrap: New file.
983         * bootstrap.conf: New file.
984         * .x-sc_trailing_blank: Remove config-log, .gdb-history.  Add .po.
985         * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
986         of gnulib-tool.
987         (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
988         (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
989         (gl_EARLY): Add.
990         (gl_MACROS): Call just after gl_EARLY, just for clarity.
991         * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
992         * src/kill.c (strtoimax): Remove decl.
993         * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
994         * src/wc.c: Likewise.
995         * src/ls.c (sort_files): Rewrite to avoid need for C99-style
996         declaration, so that we don't need to patch this file.
997         * src/printf.c (strtoimax, strtoumax): Remove decls.
998         * src/su.c: Include getpass.h.
999         (getpass): remove.
1000         * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
1001         Include inttypes.h unconditionally.
1002         (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
1003         (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
1004         (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
1005         (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
1006         (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
1008         * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
1009         * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
1010         * tests/chmod/Makefile.in, tests/chown/Makefile.in:
1011         * tests/cp/Makefile.in, tests/cut/Makefile.in:
1012         * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
1013         * tests/du/Makefile.in, tests/expr/Makefile.in:
1014         * tests/factor/Makefile.in, tests/fmt/Makefile.in:
1015         * tests/general/Makefile.in, tests/head/Makefile.in:
1016         * tests/install/Makefile.in, tests/join/Makefile.in:
1017         * tests/ln/Makefile.in, tests/ls/Makefile.in:
1018         * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
1019         * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
1020         * tests/mv/Makefile.in, tests/od/Makefile.in:
1021         * tests/pr/Makefile.in, tests/readlink/Makefile.in:
1022         * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
1023         * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
1024         * tests/shred/Makefile.in, tests/sort/Makefile.in:
1025         * tests/stty/Makefile.in, tests/sum/Makefile.in:
1026         * tests/tac/Makefile.in, tests/tail/Makefile.in:
1027         * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
1028         * tests/test/Makefile.in, tests/touch/Makefile.in:
1029         * tests/tr/Makefile.in, tests/tsort/Makefile.in:
1030         * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
1031         * tests/wc/Makefile.in:
1032         Remove from CVS, since ./bootstrap generates them automatically.
1034 2006-08-20  Eric Blake  <ebb9@byu.net>
1036         * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
1037         the patch from 2006-08-18 broke on cygwin.
1039 2006-08-20  Jim Meyering  <jim@meyering.net>
1041         * NEWS: Add a line for 6.2-cvs.
1042         * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
1044 2006-08-19  Jim Meyering  <jim@meyering.net>
1046         * Version 6.1.
1047         * NEWS: Record the 6.1 release date.
1048         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1050         * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
1052         Avoid test failure when `make check' is run through debuild.
1053         * tests/help-version: Ensure that $SHELL is set to some value
1054         and exported.  Patch from Sven Joachim.  For details, see
1055         <http://bugs.debian.org/355368>.
1057         * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
1059         * README: Describe potential "pre-C99 build failure", and work-around.
1061         Some of my 2006-07-03 changes to tests/*/Makefile.am were being
1062         backed out due to updates provoked by the copyright changes.
1063         * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
1064         it propagates to the derived Makefile.am files.
1065         ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
1066         so we don't mistakenly edit them again.
1067         * tests/cut/Makefile.am: Regenerate.
1068         * tests/head/Makefile.am: Likewise.
1069         * tests/join/Makefile.am: Likewise.
1070         * tests/pr/Makefile.am: Likewise.
1071         * tests/sort/Makefile.am: Likewise.
1072         * tests/tac/Makefile.am: Likewise.
1073         * tests/tail/Makefile.am: Likewise.
1074         * tests/test/Makefile.am: Likewise.
1075         * tests/tr/Makefile.am: Likewise.
1076         * tests/uniq/Makefile.am: Likewise.
1077         * tests/wc/Makefile.am: Likewise.
1079         * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
1080         when the file's apparent size is not a multiple of its block size.
1081         * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
1082         For some file sizes, writing that single byte would unnecessarily
1083         waste a few file blocks.  That write may have been necessary in the
1084         early days of Linux, but now, removing it should be safe.
1085         Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
1086         * tests/cp/sparse: New test for the above.
1087         * tests/cp/Makefile.am (TESTS): Add sparse.
1089         * tests/sparse-file: New file, essence factored out of...
1090         * tests/du/8gb: ... here.  Use the new script.
1092 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
1094         * src/system.h (select_plural): Reduce by 1000000, not 1000, since
1095         the CVS gettext manual now suggests 1000000.
1097 2006-08-18  Bruno Haible  <bruno@clisp.org>
1099         Add support for NetBSD 3.0.
1100         * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
1101         f_fstypename.
1102         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
1103         has a field f_fstypename.
1104         This undoes the 2006-08-15 to src/stat.c.
1106 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
1108         Copyright notice fixes.
1110         * COPYING: Upgrade to latest version from FSF.
1112         * src/uname.c: Use (C) in copyright notice.
1114         * .vg-suppressions: Add copyright notice.
1115         * ChangeLog: Likewise.
1116         * ChangeLog-2005: Likewise.
1117         * Makefile.am: Likewise.
1118         * NEWS: Likewise.
1119         * README: Likewise.
1120         * README-valgrind: Likewise.
1121         * TODO: Likewise.
1122         * announce-gen: Likewise.
1123         * man/Makefile.am: Likewise.
1124         * man/chmod.x: Likewise.
1125         * man/chown.x: Likewise.
1126         * man/df.x: Likewise.
1127         * man/du.x: Likewise.
1128         * man/rm.x: Likewise.
1129         * src/dircolors.hin: Likewise.
1130         * src/du-tests: Likewise.
1131         * src/extract-magic: Likewise.
1132         * src/tac-pipe.c: Likewise.
1133         * src/wheel-gen.pl: Likewise.
1134         * tests/Coreutils.pm: Likewise.
1135         * tests/Makefile.am.in: Likewise.
1136         * tests/acl: Likewise.
1137         * tests/envvar-check: Likewise.
1138         * tests/expensive: Likewise.
1139         * tests/group-names: Likewise.
1140         * tests/help-version: Likewise.
1141         * tests/mk-script: Likewise.
1142         * tests/priv-check: Likewise.
1143         * tests/rwx-to-mode: Likewise.
1144         * tests/sample-test: Likewise.
1145         * tests/setgid-check: Likewise.
1146         * tests/chgrp/basic: Likewise.
1147         * tests/chgrp/deref: Likewise.
1148         * tests/chgrp/no-x: Likewise.
1149         * tests/chgrp/posix-H: Likewise.
1150         * tests/chgrp/recurse: Likewise.
1151         * tests/chmod/c-option: Likewise.
1152         * tests/chmod/equal-x: Likewise.
1153         * tests/chmod/equals: Likewise.
1154         * tests/chmod/no-x: Likewise.
1155         * tests/chmod/octal: Likewise.
1156         * tests/chmod/setgid: Likewise.
1157         * tests/chmod/umask-x: Likewise.
1158         * tests/chmod/usage: Likewise.
1159         * tests/chown/basic: Likewise.
1160         * tests/chown/deref: Likewise.
1161         * tests/chown/separator: Likewise.
1162         * tests/cp/Makefile.am: Likewise.
1163         * tests/cp/acl: Likewise.
1164         * tests/cp/backup-1: Likewise.
1165         * tests/cp/backup-is-src: Likewise.
1166         * tests/cp/cp-HL: Likewise.
1167         * tests/cp/cp-deref: Likewise.
1168         * tests/cp/cp-mv-backup: Likewise.
1169         * tests/cp/cp-parents: Likewise.
1170         * tests/cp/deref-slink: Likewise.
1171         * tests/cp/dir-rm-dest: Likewise.
1172         * tests/cp/dir-slash: Likewise.
1173         * tests/cp/dir-vs-file: Likewise.
1174         * tests/cp/fail-perm: Likewise.
1175         * tests/cp/into-self: Likewise.
1176         * tests/cp/link: Likewise.
1177         * tests/cp/link-no-deref: Likewise.
1178         * tests/cp/link-preserve: Likewise.
1179         * tests/cp/no-deref-link1: Likewise.
1180         * tests/cp/no-deref-link2: Likewise.
1181         * tests/cp/no-deref-link3: Likewise.
1182         * tests/cp/perm: Likewise.
1183         * tests/cp/preserve-2: Likewise.
1184         * tests/cp/r-vs-symlink: Likewise.
1185         * tests/cp/same-file: Likewise.
1186         * tests/cp/slink-2-slink: Likewise.
1187         * tests/cp/special-bits: Likewise.
1188         * tests/cp/symlink-slash: Likewise.
1189         * tests/cut/Makefile.am: Likewise.
1190         * tests/cut/Test.pm: Likewise.
1191         * tests/dd/misc: Likewise.
1192         * tests/dd/not-rewound: Likewise.
1193         * tests/dd/skip-seek: Likewise.
1194         * tests/dd/skip-seek2: Likewise.
1195         * tests/dd/unblock-sync: Likewise.
1196         * tests/dircolors/simple: Likewise.
1197         * tests/du/2g: Likewise.
1198         * tests/du/8gb: Likewise.
1199         * tests/du/Makefile.am: Likewise.
1200         * tests/du/basic: Likewise.
1201         * tests/du/deref: Likewise.
1202         * tests/du/deref-args: Likewise.
1203         * tests/du/exclude: Likewise.
1204         * tests/du/fd-leak: Likewise.
1205         * tests/du/files0-from: Likewise.
1206         * tests/du/hard-link: Likewise.
1207         * tests/du/inaccessible-cwd: Likewise.
1208         * tests/du/long-from-unreadable: Likewise.
1209         * tests/du/long-sloop: Likewise.
1210         * tests/du/no-deref: Likewise.
1211         * tests/du/no-x: Likewise.
1212         * tests/du/restore-wd: Likewise.
1213         * tests/du/slash: Likewise.
1214         * tests/du/slink: Likewise.
1215         * tests/du/trailing-slash: Likewise.
1216         * tests/du/two-args: Likewise.
1217         * tests/expr/basic: Likewise.
1218         * tests/factor/basic: Likewise.
1219         * tests/fmt/basic: Likewise.
1220         * tests/fmt/long-line: Likewise.
1221         * tests/general/Makefile.am: Likewise.
1222         * tests/general/atgeneral.m4: Likewise.
1223         * tests/general/dd.at: Likewise.
1224         * tests/head/Makefile.am: Likewise.
1225         * tests/head/Test.pm: Likewise.
1226         * tests/install/basic-1: Likewise.
1227         * tests/install/create-leading: Likewise.
1228         * tests/install/d-slashdot: Likewise.
1229         * tests/install/trap: Likewise.
1230         * tests/join/Makefile.am: Likewise.
1231         * tests/join/Test.pm: Likewise.
1232         * tests/ln/backup-1: Likewise.
1233         * tests/ln/misc: Likewise.
1234         * tests/ln/sf-1: Likewise.
1235         * tests/ln/target-1: Likewise.
1236         * tests/ls/Makefile.am: Likewise.
1237         * tests/ls/Test.pm: Likewise.
1238         * tests/ls/dangle: Likewise.
1239         * tests/ls/dired: Likewise.
1240         * tests/ls/file-type: Likewise.
1241         * tests/ls/follow-slink: Likewise.
1242         * tests/ls/infloop: Likewise.
1243         * tests/ls/inode: Likewise.
1244         * tests/ls/m-option: Likewise.
1245         * tests/ls/no-arg: Likewise.
1246         * tests/ls/recursive: Likewise.
1247         * tests/ls/rt-1: Likewise.
1248         * tests/ls/stat-dtype: Likewise.
1249         * tests/ls/stat-failed: Likewise.
1250         * tests/ls/stat-vs-dirent: Likewise.
1251         * tests/ls/symlink-slash: Likewise.
1252         * tests/ls/time-1: Likewise.
1253         * tests/ls-2/tests: Likewise.
1254         * tests/md5sum/basic-1: Likewise.
1255         * tests/md5sum/newline-1: Likewise.
1256         * tests/misc/Makefile.am: Likewise.
1257         * tests/misc/base64: Likewise.
1258         * tests/misc/basename: Likewise.
1259         * tests/misc/cat-proc: Likewise.
1260         * tests/misc/close-stdout: Likewise.
1261         * tests/misc/csplit: Likewise.
1262         * tests/misc/date: Likewise.
1263         * tests/misc/date-sec: Likewise.
1264         * tests/misc/df: Likewise.
1265         * tests/misc/dirname: Likewise.
1266         * tests/misc/expand: Likewise.
1267         * tests/misc/false-status: Likewise.
1268         * tests/misc/fold: Likewise.
1269         * tests/misc/head-c: Likewise.
1270         * tests/misc/head-elide-tail: Likewise.
1271         * tests/misc/head-pos: Likewise.
1272         * tests/misc/mknod: Likewise.
1273         * tests/misc/nice: Likewise.
1274         * tests/misc/nl: Likewise.
1275         * tests/misc/nohup: Likewise.
1276         * tests/misc/paste-no-nl: Likewise.
1277         * tests/misc/pathchk1: Likewise.
1278         * tests/misc/printf: Likewise.
1279         * tests/misc/printf-hex: Likewise.
1280         * tests/misc/pwd-long: Likewise.
1281         * tests/misc/sha224sum: Likewise.
1282         * tests/misc/sha256sum: Likewise.
1283         * tests/misc/sha384sum: Likewise.
1284         * tests/misc/sha512sum: Likewise.
1285         * tests/misc/shuf: Likewise.
1286         * tests/misc/sort-merge: Likewise.
1287         * tests/misc/sort-rand: Likewise.
1288         * tests/misc/split-a: Likewise.
1289         * tests/misc/split-fail: Likewise.
1290         * tests/misc/split-l: Likewise.
1291         * tests/misc/stat-fmt: Likewise.
1292         * tests/misc/stat-printf: Likewise.
1293         * tests/misc/tac-continue: Likewise.
1294         * tests/misc/test-diag: Likewise.
1295         * tests/misc/tty-eof: Likewise.
1296         * tests/misc/wc-files0: Likewise.
1297         * tests/misc/wc-files0-from: Likewise.
1298         * tests/mkdir/concurrent-1: Likewise.
1299         * tests/mkdir/p-1: Likewise.
1300         * tests/mkdir/p-2: Likewise.
1301         * tests/mkdir/p-3: Likewise.
1302         * tests/mkdir/p-slashdot: Likewise.
1303         * tests/mkdir/p-thru-slink: Likewise.
1304         * tests/mkdir/parents: Likewise.
1305         * tests/mkdir/perm: Likewise.
1306         * tests/mkdir/special-1: Likewise.
1307         * tests/mkdir/t-slash: Likewise.
1308         * tests/mkdir/writable-under-readonly: Likewise.
1309         * tests/mv/Makefile.am: Likewise.
1310         * tests/mv/acl: Likewise.
1311         * tests/mv/atomic: Likewise.
1312         * tests/mv/backup-is-src: Likewise.
1313         * tests/mv/childproof: Likewise.
1314         * tests/mv/diag: Likewise.
1315         * tests/mv/dir-file: Likewise.
1316         * tests/mv/dir2dir: Likewise.
1317         * tests/mv/dup-source: Likewise.
1318         * tests/mv/force: Likewise.
1319         * tests/mv/hard-2: Likewise.
1320         * tests/mv/hard-3: Likewise.
1321         * tests/mv/hard-4: Likewise.
1322         * tests/mv/hard-link-1: Likewise.
1323         * tests/mv/i-1: Likewise.
1324         * tests/mv/i-2: Likewise.
1325         * tests/mv/i-3: Likewise.
1326         * tests/mv/i-4: Likewise.
1327         * tests/mv/i-link-no: Likewise.
1328         * tests/mv/into-self: Likewise.
1329         * tests/mv/into-self-2: Likewise.
1330         * tests/mv/into-self-3: Likewise.
1331         * tests/mv/into-self-4: Likewise.
1332         * tests/mv/leak-fd: Likewise.
1333         * tests/mv/mv-special-1: Likewise.
1334         * tests/mv/no-target-dir: Likewise.
1335         * tests/mv/part-fail: Likewise.
1336         * tests/mv/part-hardlink: Likewise.
1337         * tests/mv/part-rename: Likewise.
1338         * tests/mv/part-symlink: Likewise.
1339         * tests/mv/partition-perm: Likewise.
1340         * tests/mv/perm-1: Likewise.
1341         * tests/mv/reply-no: Likewise.
1342         * tests/mv/setup: Likewise.
1343         * tests/mv/to-symlink: Likewise.
1344         * tests/mv/trailing-slash: Likewise.
1345         * tests/mv/update: Likewise.
1346         * tests/mv/vfat: Likewise.
1347         * tests/od/od-N: Likewise.
1348         * tests/od/x8: Likewise.
1349         * tests/pr/Makefile.am: Likewise.
1350         * tests/pr/Test.pm: Likewise.
1351         * tests/readlink/can-e: Likewise.
1352         * tests/readlink/can-f: Likewise.
1353         * tests/readlink/can-m: Likewise.
1354         * tests/readlink/rl-1: Likewise.
1355         * tests/rm/Makefile.am: Likewise.
1356         * tests/rm/cycle: Likewise.
1357         * tests/rm/dangling-symlink: Likewise.
1358         * tests/rm/deep-1: Likewise.
1359         * tests/rm/dir-no-w: Likewise.
1360         * tests/rm/dir-nonrecur: Likewise.
1361         * tests/rm/dot-rel: Likewise.
1362         * tests/rm/empty-inacc: Likewise.
1363         * tests/rm/empty-name: Likewise.
1364         * tests/rm/f-1: Likewise.
1365         * tests/rm/fail-2eperm: Likewise.
1366         * tests/rm/fail-eperm: Likewise.
1367         * tests/rm/hash: Likewise.
1368         * tests/rm/i-1: Likewise.
1369         * tests/rm/i-no-r: Likewise.
1370         * tests/rm/inaccessible: Likewise.
1371         * tests/rm/interactive-always: Likewise.
1372         * tests/rm/interactive-once: Likewise.
1373         * tests/rm/ir-1: Likewise.
1374         * tests/rm/isatty: Likewise.
1375         * tests/rm/no-give-up: Likewise.
1376         * tests/rm/r-1: Likewise.
1377         * tests/rm/r-2: Likewise.
1378         * tests/rm/r-3: Likewise.
1379         * tests/rm/rm1: Likewise.
1380         * tests/rm/rm2: Likewise.
1381         * tests/rm/rm3: Likewise.
1382         * tests/rm/rm4: Likewise.
1383         * tests/rm/rm5: Likewise.
1384         * tests/rm/sunos-1: Likewise.
1385         * tests/rm/unread2: Likewise.
1386         * tests/rm/unread3: Likewise.
1387         * tests/rm/unreadable: Likewise.
1388         * tests/rmdir/fail-perm: Likewise.
1389         * tests/rmdir/ignore: Likewise.
1390         * tests/rmdir/t-slash: Likewise.
1391         * tests/seq/basic: Likewise.
1392         * tests/sha1sum/basic-1: Likewise.
1393         * tests/sha1sum/sample-vec: Likewise.
1394         * tests/shred/exact: Likewise.
1395         * tests/shred/remove: Likewise.
1396         * tests/sort/Makefile.am: Likewise.
1397         * tests/sort/Test.pm: Likewise.
1398         * tests/sort-time/Makefile: Likewise.
1399         * tests/sort-time/README: Likewise.
1400         * tests/sort-time/rand-gen: Likewise.
1401         * tests/stty/basic-1: Likewise.
1402         * tests/stty/row-col-1: Likewise.
1403         * tests/sum/basic-1: Likewise.
1404         * tests/sum/sysv: Likewise.
1405         * tests/tac/Makefile.am: Likewise.
1406         * tests/tac/Test.pm: Likewise.
1407         * tests/tail/Makefile.am: Likewise.
1408         * tests/tail/Test.pm: Likewise.
1409         * tests/tail-2/Makefile.am: Likewise.
1410         * tests/tail-2/append-only: Likewise.
1411         * tests/tail-2/assert: Likewise.
1412         * tests/tail-2/assert-2: Likewise.
1413         * tests/tail-2/big-4gb: Likewise.
1414         * tests/tail-2/fflush: Likewise.
1415         * tests/tail-2/infloop-1: Likewise.
1416         * tests/tail-2/proc-ksyms: Likewise.
1417         * tests/tail-2/start-middle: Likewise.
1418         * tests/tail-2/tail-n0f: Likewise.
1419         * tests/tee/basic: Likewise.
1420         * tests/tee/dash: Likewise.
1421         * tests/test/Makefile.am: Likewise.
1422         * tests/test/Test.pm: Likewise.
1423         * tests/touch/Makefile.am: Likewise.
1424         * tests/touch/dangling-symlink: Likewise.
1425         * tests/touch/empty-file: Likewise.
1426         * tests/touch/fail-diag: Likewise.
1427         * tests/touch/fifo: Likewise.
1428         * tests/touch/no-create-missing: Likewise.
1429         * tests/touch/no-rights: Likewise.
1430         * tests/touch/not-owner: Likewise.
1431         * tests/touch/obsolescent: Likewise.
1432         * tests/touch/read-only: Likewise.
1433         * tests/touch/relative: Likewise.
1434         * tests/tr/Makefile.am: Likewise.
1435         * tests/tr/Test.pm: Likewise.
1436         * tests/tr/failures: Likewise.
1437         * tests/tsort/basic-1: Likewise.
1438         * tests/unexpand/basic-1: Likewise.
1439         * tests/uniq/Makefile.am: Likewise.
1440         * tests/uniq/Test.pm: Likewise.
1441         * tests/wc/Makefile.am: Likewise.
1442         * tests/wc/Test.pm: Likewise.
1444 2006-08-17  Jim Meyering  <jim@meyering.net>
1446         ls -CF would misalign columns in some cases.
1447         * src/ls.c (get_type_indicator): New function.  extracted from...
1448         (print_type_indicator): ...here.  Use it.
1449         (length_of_file_name_and_frills): Use it here, too, rather than
1450         assuming stat.st_mode is valid.
1451         Reported by Andreas Schwab, here:
1452         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
1453         See the test for this above. FYI, I did ls -CF /proc and visually
1454         inspected the result.
1456         * src/copy.c (copy_internal, same_file_ok): Adjust comments not
1457         to mention the now-removed cp_options.xstat member.
1459         * Makefile.maint (patch-check): Adapt to work now that the patch
1460         modifies more than one file in src/.
1462         With this patch, permit building with Solaris cc on Solaris 7.
1463         * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
1464         This integrates patches from Bruno Haible.
1466 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
1468         Fix some problems reported by Bruno Haible.
1469         * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
1470         Skip this test if "chmod g+s d" silently does nothing.
1471         * tests/ls-2/tests: Skip this test suite if we can't set up files
1472         properly for the setuid-etc test.  This simplifies some of the
1473         hacks we were using to work around porting problems.
1475 2006-08-16  Jim Meyering  <jim@meyering.net>
1477         * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
1478         * tests/cp/acl: Instead, skip the test if either setfacl
1479         or getfacl fails.
1480         Reported by Michael Stone.
1482 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
1484         * tests/lang-default (LC_ALL): Set to "C", so we get
1485         English-language diagnostics.  Unset the other variables; it
1486         should be portable to use 'unset' for this stuff nowadays.
1487         Problem reported by Bruno Haible.  Using "C" reverses the
1488         2000-10-22 change to fileutils in this area.
1490         Fix bugs when printing plurals of numbers that are not
1491         unsigned long int values.
1492         * src/system.h (select_plural): New function.
1493         * src/md5sum.c (digest_check): Use select_plural to avoid bug.
1494         * src/uptime.c (print_uptime): Likewise.
1495         * src/dd.c (print_stats): Likewise.  Also, don't use ngettext to
1496         print a floating point number, as reducing to 0 or 1 doesn't work
1497         for some languages.  Instead, just use "s" for seconds since it
1498         doesn't need a plural form.
1500 2006-08-16  Bruno Haible  <bruno@clisp.org>
1502         Old versions of gzip would write --help output to stderr, and it
1503         would be annoying to see that in the output of every "make" command.
1504         * Makefile.maint (gzip_rsyncable): Throw away stderr output of
1505         "gzip --help".
1507 2006-08-16  Andreas Schwab  <schwab@suse.de>
1509         * tests/cp/acl: Don't use non-portable == operator for test.
1511 2006-08-16  Jim Meyering  <jim@meyering.net>
1513         * tests/ls/stat-dtype: Use stat to test file system type, rather
1514         than df -T, in case /etc/mtab lies.  Reported by Michael Stone.
1516 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
1518         * NEWS: Mention that df exits with nonzero status if it generates
1519         no output.  This change was in 6.0 but inadvertently unmentioned.
1520         * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
1521         a boolean.
1522         (show_dev): Don't set it until we actually output something.
1523         Print the header if this is the first output.
1524         (main): Don't print a header, as that is now show_dev's job.
1525         * tests/misc/Makefile.am (TESTS): Add df.
1526         * tests/misc/df: New file.
1528 2006-08-15  Eric Blake  <ebb9@byu.net>
1530         * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
1531         statvfs.f_type not present.  See
1532         <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
1534 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
1536         * src/dd.c (print_stats): Don't substitute "1" for number, as this
1537         causes confusion for the Hungarian translators.  Problem reported
1538         by Egmont Koblinger here:
1539         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
1541 2006-08-15  Jim Meyering  <jim@meyering.net>
1543         * .x-sc_require_config_h: Add lib/at-func.c.
1545         * NEWS: Add a line for 6.1-cvs.
1546         * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
1548 2006-08-15  Jim Meyering  <jim@meyering.net>
1550         * Version 6.0.
1551         * NEWS: Record the 6.0 release date.
1552         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1554         * TODO: Add an item (convert to use gnulib-tool), add to the plan
1555         for id-vs-getgrouplist, and remove a few completed items.
1557         * Makefile.maint (alpha beta major): Fix syntax error.
1559 2006-08-13  Jim Meyering  <jim@meyering.net>
1561         * src/shred.c (usage): Don't indent the second line of an item.
1562         Otherwise, help2man would misformat the output.
1563         Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
1565 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
1567         * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
1568         Suggested by Eric Blake to avoid problems like
1569         <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
1571 2006-08-11  Jim Meyering  <jim@meyering.net>
1573         * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
1574         failure that this test checks for (stat/dirent inode mismatch at
1575         a mount point), so continue to give a diagnostic about the failure,
1576         but don't actually count it as a failure.
1578 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
1580         * ABOUT-NLS: Update from gettext 0.15.
1581         * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
1583         * src/csplit.c (struct control): Remove fastmap member.
1584         (extract_regexp): Allocate fastmap separately, since otherwise
1585         it might move due to a realloc.  This fixes a bug that led
1586         to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
1588 2006-08-10  Jim Meyering  <jim@meyering.net>
1590         * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
1591         reports "Linux".  This avoids a failure on Solaris 10's tmpfs.
1592         Redirect both stdout and stderr of df invocations.
1594         * src/dircolors.hin: Add a TERM directive for each of the following:
1595         ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
1596         rxvt-cygwin-native, screen.linux, xterm-256color.
1597         Sort the TERM directives.
1598         From Mike Frysinger.
1600 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
1602         * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
1603         See Debian bug 373736.
1605         * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
1606         bug 317503.
1608         * src/.cvsignore: Add shuf.
1610         * Makefile.maint: Remove the po-update procedure; it doesn't
1611         work with the new repository on http://www.iro.umontreal.ca/.
1612         For now I guess we'll have to fix things by hand.
1613         (do-po-update, po-update): Remove.  All references removed.
1615         * src/shuf.c (next_line): New function.
1616         (read_input): Use it, to avoid relying on GCC-specific behavior
1617         with void * arithmetic.  Problem reported by Bob Proulx.
1618         * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
1619         to detect this sort of problem automatically in the future.
1621 2006-08-09  Jim Meyering  <jim@meyering.net>
1623         * src/ls.c: Add a compile-time check to ensure that filetype
1624         and filetype_letter have the same number of elements.
1626         * tests/misc/sort-rand: Remove use of --seed=S.
1628 2006-08-08  Paul Eggert  <eggert@cs.ucla.edu>
1630         Add a command 'shuf', and modify shred and sort to use the new
1631         random number generator library of 'shuf'.
1633         * AUTHORS: Add shuf.
1634         * README: Likewise.
1635         * NEWS: Likewise.  Mention new --random-source option for shred
1636         and sort.  Move "sort +1 -2" notice to the appropriate section,
1637         and clarify its role with respect to POSIXLY_CORRECT.
1638         * man/.cvsignore: Add shuf.1.
1639         * man/Makefile.am (dist_man_MANS): Add shuf.1.
1640         (shuf.1): New dependency.
1641         * man/shuf.x: New file.
1642         * src/Makefile.am (bin_PROGRAMS): Add shuf.
1643         (EXTRA_DIST): Remove rand-isaac.c.
1644         (shuf_LDADD): New macro.
1645         * src/rand-isaac.c: Remove, moving most of its contents to
1646         lib/rand-isaac.c.
1647         * src/shuf.c: New file.
1648         * src/shred.c: Use new random-number interface rather than rand-isaac.c.
1649         Don't include rand-isaac.c; include randint.h and randread.h instead.
1650         (RANDOM_SOURCE_OPTION): New enum.
1651         (long_opts, usage, main): New option --random-source.
1652         * src/sort.c: Likewise.
1653         * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
1654         All callers changed to use randint interface.
1655         (fillrand): Remove.  All callers changed to use randread interface.
1656         (dopass): Remove dependency on ISAAC buffer size.
1657         (genpattern): Don't wipe the random state here.
1658         (randint_source): New static var.
1659         (clear_random_data): New function.
1660         (main): Allocate random source, and arrange to wipe it on exit.
1661         * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
1662         (longopts, usage, main): Remove undocumented --seed option;
1663         it's now replaced by --random-source.
1664         (rand_state, get_hash): Remove.
1665         (randread_source): New static var.
1666         (random_state, cmp_hashes, compare_random): New functions; they guarantee
1667         no collisions in the random hash function.
1668         (keycompare): Use compare_random for -R; don't fall back on comparing
1669         via memcoll, since compare_random does the right thing.
1670         * tests/misc/Makefile.am (TESTS): Add shuf.
1671         * tests/misc/shuf: New file.
1673 2006-07-29  Paul Eggert  <eggert@cs.ucla.edu>
1675         * src/copy.c (set_author): Preserve the st_author field via the
1676         file descriptor dest_desc.
1678 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
1680         * NEWS: chmod now preserves setuid and setgid bits on directories
1681         if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
1683         Fix test case problems if working directory is setgid,
1684         reported by Bob Proulx.
1685         * tests/cp/fail-perm: Use symbolic mode so that we clear
1686         setgid bit more reliably on directories.
1687         * tests/mkdir/special-1 (set_mode_string): Likewise.
1689 2006-07-27  Jim Meyering  <jim@meyering.net>
1691         * src/chgrp.c (usage): Use correct grammar in description of the
1692         --reference option
1693         * src/chown.c (usage): Likewise.
1695 2006-07-26  Thomas Schwinge  <tschwinge@gnu.org>  (tiny change)
1697         * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
1698         Correctly access SRC_SB's element ST_AUTHOR.
1700 2006-07-26  Jim Meyering  <jim@meyering.net>
1702         * tests/ls/stat-failed: Adapt to match new expected output.
1703         From Paul Eggert.
1705         * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
1706         than having the code test for all of the other types first.
1707         Hoist the set-uid/gid-testing code "up" into this new block.
1708         Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
1709         C_ORPHAN, not as C_FILE.
1711 2006-07-26  Jim Meyering  <jim@meyering.net>
1713         Checking in a change from Paul.
1715         2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
1717         * src/ls.c (DT_INIT): Remove.  All uses removed.
1718         (enum filetype): Use an ordinary enum rather than trying to keep
1719         the values in sync with DT_FIFO etc.  That way, we don't have
1720         to make special assumptions about them.  All uses changed.
1721         (whiteout): New constant member of enum filetype.
1722         (filetype_letter): New constant, for use with enum filetype.
1723         (FILETYPE_INDICATORS): New initializer list.
1724         (print_dir): Add case for DT_WHT.
1725         (gobble_file): If stat fails, don't discard information from
1726         readdir; instead, preserve it so it can be printed.
1727         (print_long_format): Fall back on readdir result if stat info
1728         is not available.  Use "?" to denote each unknown mode char,
1729         instead of an overall "?", since we now know some of the mode
1730         typically.
1731         (print_type_indicator): Now that MODE isn't necessarily
1732         useful, guard all uses.
1733         Now that two blocks in the type-checking tree can set "type = C_FILE",
1734         move the suffix-handling code out and down.
1736 2006-07-26  Jim Meyering  <jim@meyering.net>
1738         Prepare for the above change.
1739         * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
1740         and adjust uses.  From a patch by Paul Eggert.
1742 2006-07-26  Jim Meyering  <jim@meyering.net>
1744         * src/ls.c: Correct indentation/formatting in a few places.
1746 2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
1748         * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
1749         Problem report and fix from Bob Proulx.
1750         * NEWS: Clarify the "chmod 0500" news, and correct the vague
1751         statements about compatibility with BSD.
1753 2006-07-25  Jim Meyering  <jim@meyering.net>
1755         * src/ls.c (gobble_file): When handling a stat-failed entry,
1756         print the entry name not the absolute_name -- to be consistent
1757         with the usual case.
1758         * tests/ls/stat-failed: Update accordingly.
1760         * src/ls.c: Add parens around the new uses of ?: ternary operator.
1762         * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
1763         symlinks.
1765         Get --dired offsets right when handling stat-failed entries.
1766         * src/ls.c (print_long_format): Be careful to increment P by the
1767         appropriate amount, even when inode_number_width and nlink_width
1768         are zero.
1769         * tests/ls/stat-failed: Test for the above.
1771         * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
1772         have_acl member.  That would happen for a directory with both a
1773         non-stat'able entry and one with an ACL.
1775         * src/ls.c (gobble_file): Make it so failure to stat a
1776         non-command-line file provokes an exit status of 1, not 0.
1777         Say "cannot access" rather than "cannot stat".
1778         * tests/ls/stat-failed: New file/test, for the above.
1779         * tests/ls/Makefile.am (TESTS): Add stat-failed.
1780         * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
1781         of "cannot access " to diagnostic.
1783         * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
1785         * src/ls.c [enum filetype] (command_line): Remove member.  Not needed.
1786         Replace all occurrences of "type == command_line" with the
1787         equivalent, "command_line_arg".
1789         * src/ls.c: Apply the stat-failed parts of Red Hat's
1790         coreutils-selinux.patch.  From Ulrich Drepper.
1791         This makes it so files not mentioned on the command line (e.g.,
1792         names read from a directory that *is* mentioned on the command
1793         line) for which stat fails are still listed.  With --color,
1794         such files are colored just like ORPHANs (aka dangling symlinks).
1796         * src/df.c (n_valid_args): Declare global to be static.
1798 2006-07-24  Jim Meyering  <jim@meyering.net>
1800         * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
1801         system lacks d_type support.
1803 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
1805         * man/chmod.x: Update to reflect recent changes to coreutils.texi.
1807 2006-07-21  Jim Meyering  <jim@meyering.net>
1809         * src/su.c (usage): Correct typo in --help output: s/commmand/command/
1810         Reported by Tim Waugh.
1811         Also remove the comment duplicating much of --help output.
1813         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
1814         name so the list remains alphabetized.
1816         Fix another bug: ls --indicator-style=file-type would call
1817         stat for a symlink, even though it wasn't always needed.
1818         In some cases, that unnecessary stat would cause ls to fail.
1819         * src/ls.c (gobble_file): Don't treat symlinks specially (in
1820         requiring a stat syscall).  Remove the offending exclusion.
1822         * NEWS: Mention the fix.
1824         * tests/ls/stat-dtype: New file/test, for the above fix.
1825         Also exercises the new df feature, below.
1827         * src/df.c (main): Fail and don't print the headers if no
1828         file system is processed.  This makes it easy to test whether
1829         a specified directory is on a file system of a given type or types.
1830         Otherwise, applications would have had to parse df's output.
1831         E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
1833         Fix a bug: ls --file-type worked like --indicator-style=slash,
1834         rather than like --indicator-style=file-type.
1835         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
1836         (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
1837         not to 'p'.
1838         (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
1839         * NEWS: Mention the fix.
1840         * tests/ls-2/tests (file-type): New test, for the above fix.
1842 2006-07-19  Jim Meyering  <jim@meyering.net>
1844         * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
1846         * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
1848 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
1850         * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
1851         of directories alone unless you specify them explicitly.
1852         install and mkdir now implement X correctly.
1853         install now creates parent directories with mode 755, without
1854         changing their owner or group.
1855         * src/chmod.c (process_file): Adjust to mode_adjust API change.
1856         * src/install.c: Include mkancesdirs.h.
1857         (announce_mkdir, make_ancestor): New functions.
1858         (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
1859         (mode): Use it.
1860         (dir_mode, dir_mode_bits): New vars.
1861         (main): Set dir modes separately from nondir, so that the X
1862         op of -m works correctly.
1863         (main): Remove cwd_errno cruft, since make_dir_parents no longer
1864         affects cwd.  Adjust to new make_dir_parents API.
1865         (install_file_in_file_parents): 2nd arg is now char *, not char
1866         const *.  Use mkancesdirs instead of rolling our own code.
1867         (change_attributes): Don't worry about AFS, since that kludge
1868         should not be needed any more.
1869         * src/mkdir.c (struct mkdir_options): New struct.
1870         (announce_mkdir, make_ancestor): New functions.
1871         (main): Use them.  Adjust to mode_adjust API change.  Stick with
1872         umask 0.  Use make_dir_parents for all the work.
1873         * src/mkfifo.c (main): Adjust to new mode_adjust API.
1874         * src/mknod.c (main): Likewise.
1875         * tests/chmod/setgid: Do the setgid test instead of bailing.
1876         * tests/mkdir/p-3: Remove re_protect case that no longer applies.
1877         GNU chmod now behaves like other versions of chmod.
1878         * tests/mkdir/perm: Add a test for the X bug.
1880 2006-07-14  Paul Eggert  <eggert@cs.ucla.edu>
1882         * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
1883         This doesn't fix any bugs, since OUT always equals stdout, but it
1884         makes the code easier to understand.
1886 2006-07-14  Jim Meyering  <jim@meyering.net>
1888         * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
1889         rather than open-coding it.  Now supports mercurial, too.
1890         * .hgignore: New file.
1891         * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
1892         all generated files, including ones like configure and po/*.po
1893         that are currently version-controlled in cvs.
1895         * Makefile.am (EXTRA_DIST): Add a few more .??* files.
1896         They've been in CVS, just haven't been distributed before this.
1897         Distribute ChangeLog-2005, too.
1898         (MAINTAINERCLEANFILES): Add THANKS-to-translators.
1900 2006-07-11  Paul Eggert  <eggert@cs.ucla.edu>
1902         * src/system.h: Assume <dirent.h> exists, since gnulib assumes
1903         this now as well.
1905 2006-07-09  Jim Meyering  <jim@meyering.net>
1907         * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
1908         That happens with Linux/tmpfs.
1909         * tests/mv/Makefile.am (TESTS): Add dir2dir.
1911 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
1913         Adjust to recent updates from gnulib.
1914         * src/dd.c (apply_translations): Use toupper rather than
1915         islower followed by toupper; it's simpler and typically
1916         faster now that we assume at least C89 semantics.  Similarly
1917         for tolower.
1918         * src/sort.c (inittables): Likewise.
1919         * src/expand.c (expand): Don't assume that isprint etc. return
1920         booleans (needed for pre-C99 hosts).
1921         * src/fmt.c (check_punctuation): Likewise.
1922         * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
1923         * src/tr.c (is_char_class_member): Likewise.
1924         * src/unexpand.c (unexpand): Likewise.
1925         * src/join.c (is_blank): Remove; no longer needed.  All uses
1926         replaced by isblank (to_uchar (...)).
1927         * src/pinky.c (create_fullname): Don't assume char is unsigned.
1928         * src/printf.c (print_esc): Likewise.
1929         * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
1930         (copy_unescaped_string): Likewise.
1931         * src/stat.c (print_it): Likewise.
1932         * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
1933         convenience on GNU systems.  All uses changed.  Don't bother
1934         looking for any dirent.h substitute other than ndir.h.
1935         (D_INO): Remove unnecessary parentheses.
1936         (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
1937         (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
1938         (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove.  All uses changed
1939         to ctype.h equivalents.
1940         (isblank): Renamed from ISBLANK.  Check for HAVE_DECL_ISBLANK too.
1941         All uses changed.
1943 2006-07-08  Jim Meyering  <jim@meyering.net>
1945         * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
1947         * Makefile.maint (sc_the_the): New rule.
1949         * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
1950         * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
1951         in a comment.
1953 2006-07-07  Jim Meyering  <jim@meyering.net>
1955         * NEWS: Mention that mv can now remove an empty destination directory,
1956         and give an example.  Prompted by a report from Florent Bayle.
1958 2006-07-05  Jim Meyering  <jim@meyering.net>
1960         * src/ls.c (usage): Correct the description of -G: it is useful
1961         only in a long listing.  Reported by Martin Pool in
1962         <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
1964         * man/chmod.x: Correct the description of the sticky bit.  Reported
1965         by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
1967         * src/copy.c (copy_internal): Don't work around old NFS clients like
1968         SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
1969         ENOTEMPTY upon failed rename.  Otherwise, we risk misinterpreting
1970         a banal failure as a recursive move-into-self failure.
1971         Reported by Florent Bayle in <http://bugs.debian.org/376749>.
1973         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
1975 2006-07-03  Jim Meyering  <jim@meyering.net>
1977         Plug another unusual leak.
1978         (AD_mark_helper): Free malloc'd filename if hash_insert says
1979         that string is already in the hash table.
1981         The dev/inode of the topmost directory in each hierarchy were not
1982         being recorded.
1983         * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
1984         (AD_push): Call it from here instead.
1986         Fix two small leaks.
1987         * src/remove.c (AD_stack_clear): New function.
1988         (rm_1): Use it.
1989         (AD_pop_and_chdir): Free *prev_dir just before longjmp.
1991         * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
1992         Add $VG_PATH_PREFIX as a prefix to $PATH
1994         * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
1995         * tests/Makefile.am (evar-check): Remove rule.
1996         (EXTRA_DIST): Remove .env-warn.
1997         * tests/.env-warn: Remove file.  No longer used.
1998         Suggestion from Eric Blake.
2000 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
2002         * src/system.h: Include <stdint.h> unconditionally, since we
2003         now assume the stdint module.
2005 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
2007         * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
2008         only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
2009         * src/tail.c (main): Implement this.
2010         * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
2011         (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
2013 2006-07-01  Jim Meyering  <jim@meyering.net>
2015         * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
2017         * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
2018         passes once again.
2020 2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
2022         * NEWS: seq now uses long double internally rather than double.
2023         It now defaults to a minimal fixed point format if possible.
2024         It lets you use %a, %A, %E, %F, %G.
2025         * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
2026         * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
2027         (isfinite) [!defined isfinite]: New macro.
2028         (separator, terminator): Now points to const.
2029         (first, step, last): Remove.
2030         (usage): Update to match new behavior.
2031         (struct operand, operand): New type.
2032         (scan_arg): Renamed from scan_double_arg, since we no longer use double.
2033         All uses changed.
2034         Compute and return a value of type operand, not double.
2035         (long_double_format): Renamed from valid_format, and now returns a
2036         new format with an "L" added if needed, if the original format was
2037         valid.  Allow %a, %A, %E, %F, and %G formats.
2038         (print_numbers): Take numeric values as args rather than from globals.
2039         Print long double, not double.
2040         (get_width_format): Remove.
2041         (get_default_format): New function.
2042         (main): Implement new way of calculating default format.
2043         Don't worry about locale's representation of the decimal point, since
2044         the arguments are always processed in the C locale.
2045         * tests/seq/basic (neg-2): Adjust to new default format.
2046         (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
2047         implementation should do the right thing.
2049 2006-06-30  Jim Meyering  <jim@meyering.net>
2051         * tests/stty/basic-1: Work around an intermittent test failure
2052         on HP-UX 11.11.  Report and analysis from Bob Proulx.
2053         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
2055 2006-06-28  Paul Eggert  <eggert@cs.ucla.edu>
2057         * NEWS: Support obsolete usages like "sort +1 -2" even when
2058         conforming to POSIX 1003.1-2001, since this is a pure extension to
2059         POSIX.  Problem reported by Christian in:
2060         http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
2061         * src/sort.c (main): Implement this.
2063         * src/system.h (CLOSEDIR): Remove.  All uses changed to closedir.
2064         Autoconf 2.60 says this stuff was obsolete.
2066 2006-06-28  Jim Meyering  <jim@meyering.net>
2068         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
2070 2006-06-28  Bob Proulx  <bob@proulx.com>  (tiny change)
2072         * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
2073         (set -x when VERBOSE=yes) when stderr is redirected before stdout
2074         causing shell tracing of the stdout redirection to be written to
2075         the stderr file.  Avoid problem and test failure on HP-UX by
2076         redirecting stderr last.
2077         * tests/dd/unblock-sync: Order shell file redirections for
2078         stderr and stdout in the common style.
2079         tests/acl: Likewise.
2081 2006-06-27  Jim Meyering  <jim@meyering.net>
2083         * tests/misc/cat-proc: Try to avoid any spurious numeric
2084         differences in frequently-changing /proc/cpuinfo.
2085         Reported by Nelson Beebe.
2087 2006-06-26  Jim Meyering  <jim@meyering.net>
2089         Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
2090         fd_to_subdirp failure, not just when errno == EACCES.
2091         * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
2092         rmdir, here, even though rmdir may happen to be adequate.
2094         * NEWS: rm no longer fails to remove an empty, unreadable directory
2095         * src/remove.c (remove_cwd_entries): If we can't open a directory,
2096         and the failure is not being ignored, try to remove the directory
2097         with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
2098         Problem report and test case from Paul Eggert in
2099         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
2101         * tests/rm/empty-inacc: New test, for the above.
2103         Avoid a segfault for wc --files0=- < /dev/null.
2104         * src/wc.c (compute_number_width): Return right away if nfiles == 0.
2106 2006-06-25  Jim Meyering  <jim@meyering.net>
2108         * NEWS: wc accepts a new option --files0-from=FILE, where FILE
2109         contains a list of NUL-separated file names.
2111         * src/wc.c: Include "readtokens.h".
2112         (usage): Describe the new option, and adjust the `Usage':
2113         with this option, no FILE may be specified on the command line.
2114         (main): Handle the new option.
2115         * tests/misc/wc-files0: New tests, for the above.
2116         * tests/misc/wc-files0-from: Likewise.
2117         * tests/misc/Makefile.am (TESTS): Add wc-files0.
2119 2006-06-24  Jim Meyering  <jim@meyering.net>
2121         * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
2123 2006-06-22  Jim Meyering  <jim@meyering.net>
2125         * src/tee.c (tee_files): Rename from tee, to avoid conflict with
2126         the function in glibc's <fcntl.h>.  Reported by Andreas Schwab.
2128 2006-06-19  Jim Meyering  <jim@meyering.net>
2130         * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2131         so this check is not run as part of "make distcheck".
2133 2006-06-18  Bob Proulx  <bob@proulx.com>  (tiny change)
2135         * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
2137 2006-06-18  Jim Meyering  <jim@meyering.net>
2139         * tests/misc/pwd-long: Make error output a little clearer.
2141 2006-06-17  Jim Meyering  <jim@meyering.net>
2143         * tests/rm/inaccessible: Skip this test on systems without openat
2144         support.  Reported by Bob Proulx.
2146 2006-06-15  Bob Proulx  <bob@proulx.com>  (tiny change)
2148         * tests/misc/mknod: Improve permission checks to handle
2149         running mkdir test in set-gid directories.
2151 2006-06-14  Jim Meyering  <jim@meyering.net>
2153         * tests/du/basic: Revamp not to hard-code file system block sizes.
2155 2006-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2157         * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
2158         files0-from test.
2160 2006-06-11  Jim Meyering  <jim@meyering.net>
2162         * .gitignore: New file.
2163         * Makefile.am (EXTRA_DIST): Add .gitignore.
2165         Setting TIME_STYLE=long-iso in the environment would make the
2166         cp/same-file test fail.
2167         * tests/envvar-check (vars): Add TIME_STYLE to the list.
2168         * tests/cp/same-file: Revert last change.
2169         Source the envvar-check script, to ensure that TIME_STYLE
2170         settings don't affect these tests.
2172 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
2174         * tests/cp/same-file: Execute 'ls' in the C locale, so that it
2175         uses POSIX time stamp formats.  Problem reported by John Nixon in
2176         <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
2178 2006-06-10  Jim Meyering  <jim@meyering.net>
2180         * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
2182         Require a "Version N.M" line at the top of the ChangeLog
2183         file only when making the actual release, not when running
2184         "make distcheck".
2185         * Makefile.maint (maintainer-distcheck): Don't depend on
2186         changelog-check.
2187         (alpha beta major): Depend on it here, instead.
2189 2006-06-08  Jim Meyering  <jim@meyering.net>
2191         Ensure that cat works with any of the options, -A -v -e -E -T,
2192         when applied to files in /proc and /sys, even when the FIONREAD
2193         ioctl produces nonsensical results.  Before this change, cat would
2194         produce no output (or truncated output), for some linux kernels.
2196         * src/cat.c (write_pending): New function, factored out of cat.
2197         (cat): Also interpret a negative ioctl/FIONREAD count as indicating
2198         that there are bytes to read.  Some versions of linux-2.6.16 do that.
2199         Write any pending output before returning.
2200         Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
2201         * NEWS: Mention this bug fix.
2202         * tests/misc/cat-proc: New file.  Test for the above.
2203         * tests/misc/Makefile.am (TESTS): Add cat-proc.
2205 2006-06-07  Paul Eggert  <eggert@cs.ucla.edu>
2207         * src/expr.c (eval4): Detect overflow properly when multiplying
2208         INTMAX_MIN * -1.
2210 2006-06-06  Paul Eggert  <eggert@cs.ucla.edu>
2212         * NEWS: The 'expr' command now detects and reports integer overflow.
2213         (It would be better to use extended precision instead, but that
2214         would be more work.)
2215         * src/expr.c (integer_overflow): New function.
2216         (eval4, eval3): Check for integer overflow.
2218 2006-06-05  Paul Eggert  <eggert@cs.ucla.edu>
2220         Fix problems when building with Solaris/SVR4/etc. make, which uses a
2221         different and somewhat bogus implementation of VPATH.  In the
2222         directory tests/misc, rename tests whose names might appear in the
2223         Automake-generated rules.  For example, we can't use a test named
2224         'test', since Automake generates a rule that contains the text
2225         "if test -f ./$$tst; ...", and this might expand to something like
2226         "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
2227         which executes the 'test' script rather than the 'test' command.
2228         * tests/misc/false-status: Renamed from tests/misc/false.
2229         * tests/misc/pwd-long: Renamed from tests/misc/pwd.
2230         * tests/misc/sort-merge: Renamed from tests/misc/sort.
2231         ($prog): Set to 'sort' rather than to $PROG.
2232         * tests/misc/test-diag: Renamed from tests/misc/test.
2233         * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
2234         in case Solaris make has prepended the directory.
2235         (TESTS): Adjust to above renamings.
2236         * tests/misc/expand: Don't assign to PROG; no longer needed
2237         now that Makefile.am sets PROG to the basename.
2238         * tests/misc/fold: Likewise.
2240 2006-06-03  Jim Meyering  <jim@meyering.net>
2242         Make `cp --link --no-dereference' work also on systems where the
2243         link system call cannot create a hard link to a symbolic link.
2244         * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
2245         the link syscall on a symlink when it would do the wrong thing.
2246         Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
2247         * tests/cp/link-no-deref: New file/test for the above.
2248         * tests/cp/Makefile.am (TESTS): Add link-no-deref.
2249         * NEWS: Mention the change (doesn't affect Linux).
2251 2006-06-01  Paul Eggert  <eggert@cs.ucla.edu>
2253         Fix some porting problems in the test cases reported by
2254         Ralf Wildenhues for HP-UX 11.23 in:
2255         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
2256         * tests/help-version: Don't assume that \< \> works in sed.
2257         * tests/misc/close-stdout: Don't assume that >&- works.
2258         Add a /dev/full test.
2259         * tests/touch/no-create-missing: Don't assume that >&- works.
2261 2006-05-30  Jim Meyering  <jim@meyering.net>
2263         * src/ls.c (usage): Add `v' to the list of sorting-related options.
2264         From Justin Pryzby.
2266 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2268         * tests/cp/fail-perm: source lang-default.
2269         * tests/rm/inaccessible: Likewise.
2271 2006-05-28  Jim Meyering  <jim@meyering.net>
2273         * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
2274         Recognize it, too.  Reported by Ralf Wildenhues, in
2275         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
2277 2006-05-27  Jim Meyering  <jim@meyering.net>
2279         * src/chgrp.c: Support new options: --preserve-root and
2280         --no-preserve-root.  Somehow this program was skipped when those
2281         options were added to chown, chmod, and rm.  Reported by
2282         vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
2283         * NEWS: Mention this.
2285 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
2287         * NEWS: Remove mention of --seed.  We'll replace it with something
2288         better, and don't want to indicate that it is supported.
2289         * src/sort.c (usage): Likewise.
2291 2006-05-20  Jim Meyering  <jim@meyering.net>
2293         * src/chmod.c (main): Use FTS_PHYSICAL here, too.
2295         * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
2296         and arrange for -D to set fts' FTS_PHYSICAL bit as well as
2297         FTS_COMFOLLOW.  Spotted by Justin Pryzby.
2299         * gnupload: Merge changes from automake, retaining the ""--to...
2300         kludge to placate overzealous `make distcheck' check.
2302 2006-05-19  Jim Meyering  <jim@meyering.net>
2304         * src/du.c (main): Don't let -D, -L, or -P turn off the internal
2305         FTS_TIGHT_CYCLE_CHECK directory traversal option.
2306         Reported by Justin Pryzby in http://bugs.debian.org/367691
2308 2006-05-15  Jim Meyering  <jim@meyering.net>
2310         * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
2311         From Tomas Pospisek.
2313 2006-05-13  Jim Meyering  <jim@meyering.net>
2315         * tests/mv/no-target-dir: Test two more cases.
2317 2006-05-11  Jim Meyering  <jim@meyering.net>
2319         mv -T DIR EMPTY_DIR no longer fails unconditionally
2320         * src/copy.c (copy_internal): Don't manually prohibit a move where
2321         the destination is an existing directory.  Sometimes doing that is
2322         valid.  Let the rename system call enforce the rules.  That is
2323         allowed only when the source is a directory and the destination
2324         directory (to be replaced) is empty.  Reported by Eric Blake.
2325         * tests/mv/no-target-dir: New file/test for this.
2326         * tests/mv/Makefile.am (TESTS): Add no-target-dir.
2327         * NEWS: Mention this.
2329         * tests/mv/atomic: New file/test for yesterday's fix.
2330         * tests/mv/Makefile.am (TESTS): Add atomic.
2332         * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
2334 2006-05-10  Jim Meyering  <jim@meyering.net>
2336         * src/copy.c (copy_internal): Don't explicitly unlink the destination
2337         when moving a symlink into the place of an existing non-directory.
2338         Reported by Joshua Hudson.
2339         * NEWS: mention this.
2341 2006-05-07  Jim Meyering  <jim@meyering.net>
2343         * Makefile.maint (patch-check): Fail if patch generates any output,
2344         even merely for changed offsets.
2346         * src/c99-to-c89.diff: Adjust to reflect new offsets.
2348         * NEWS: Mention changes affecting df, pwd, shred.
2350 2006-05-06  Jim Meyering  <jim@meyering.net>
2352         * tests/ls/stat-vs-dirent: New test, to detect the bogus file
2353         system condition where dirent.d_ino != stat.st_ino.
2354         * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
2356 2006-05-06  Eric Blake  <ebb9@byu.net>
2358         * tests/ls/inode: Expand to test inode from readdir case.
2359         * tests/ls/follow-slink: Expand to test broken links encountered
2360         implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
2362 2006-05-06  Eric Blake  <ebb9@byu.net>
2364         * tests/mv/leak-fd: Work even on case-insensitive file system.
2366 2006-05-04  Jim Meyering  <jim@meyering.net>
2368         * NEWS: Mention the 2006-03-19 pwd-related change that makes
2369         lib/getcwd.c work around inconsistent file system dirent.d_ino data.
2371 2006-05-03  Jim Meyering  <jim@meyering.net>
2373         * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
2374         Use better macro parameter names: s/basename/key_name/,
2375         s/basefunc/key_cmp_func.  Fix typo in comment.
2377 2006-04-29  Eric Blake  <ebb9@byu.net>
2379         * src/ls.c (main): On systems with d_type, directories_first only
2380         implies format_needs_type, not format_needs_stat.
2382 2006-05-03  Jim Meyering  <jim@meyering.net>
2384         * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
2385         after comma in arg list, from Eric Blake.
2387 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
2389         * tests/misc/date (relative-3): New test, derived from a bug
2390         report by John Thomas McDole.
2392 2006-04-23  Francesco Montorsi  <fr_m@hotmail.com>
2394         New option for ls: --group-directories-first.
2395         It makes ls list directories before files.
2396         * NEWS [New features]: Mention it.
2397         * src/ls.c (sort_type): Rearrange to use as an array index when
2398         choosing sort function; added new sort_numtypes member for
2399         compile-time check.
2400         (time_type): Add new time_numtypes member for compile-time check.
2401         (directories_first): New global variable.
2402         (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
2403         (long_options): Add --directories-first.
2404         (main): Support new option.
2405         (is_directory): New function.
2406         (extract_dirs_from_files): Use it.
2407         (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
2408         (LIST_SORTFUNCTION_VARIANTS): New macros.
2409         (sort_functions): New global variable.
2410         (sort_files): Use it.
2411         (usage): Document new option.
2413 2006-04-18  Paul Eggert  <eggert@cs.ucla.edu>
2415         * src/shred.c (fillrand): The assertion was way too weak, due to
2416         what must be a typo.  Strengthen it to its intended value.
2417         (dopass): Don't use alloca; it's not worth the aggravation here,
2418         since it's used only to get a page-aligned buffer, and page
2419         alignment doesn't buy us much here.  I'm suspicious that alloca
2420         causes problems on some hosts, due to a recent bug report by Adam
2421         Waltman: http://bugs.gentoo.org/130246.
2423 2006-04-18  Jim Meyering  <jim@meyering.net>
2425         * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
2426         sha384sum, sha512sum.
2428 2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
2430         * src/chmod.c (describe_change): Adjust to filemode changes.
2431         * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
2432         (print_long_format): Use (new) filemodestring rather than
2433         (old) mode_string, so that we get more file types right, at least
2434         in theory.  Adjust to filemode changes.
2435         * src/stat.c (human_access): Likewise.
2437 2006-04-18  Jim Meyering  <jim@meyering.net>
2439         * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
2440         ignore file.  This has never been enabled.  Reported by Eric Blake.
2442 2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
2444         * src/ln.c (linkfunc): Remove.  This method ran into a compiler/linker
2445         bug in Interix.  Just call symlink or link directly.  All uses changed.
2446         * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
2447         * src/stat.c (USE_STATVFS): New macro.
2448         Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
2449         (NAMEMAX_FORMAT): define a bit more clearly, now that the
2450         statvfs-using code is a bit more regular.
2451         * src/system.h (sync) [!HAVE_SYNC]: New macro.
2453 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
2455         * NEWS: csplit, nl, expr now conform to POSIX better, and are
2456         more-compatible with traditional Unix, with respect to regular
2457         expressions.
2458         * src/csplit.c (extract_regexp): Set re_syntax_options to a
2459         value that is compatible with what POSIX requires.
2460         * src/nl.c (build_type_arg): Likewise.
2461         * src/expr.c (docolon): Likewise.  Also, don't let anchors match
2462         newline; this fixes an incompatibility with tradition and with POSIX.
2463         Don't warn about leading ^.  POSIX says it is unspecified whether
2464         ^ is a special character, which means that implementations can
2465         either treat it as special or not, but either way a warning is not
2466         allowed (unless the regexp is otherwise invalid).  Instead, anchor
2467         the expression but treat ^ as an anchor; this is the traditional
2468         behavior (e.g., Solaris 10).
2469         (eval4, eval3, eval2): Treat non-numeric args, division by zero,
2470         and the like as invalid expressions (exit status 2), not as
2471         failure of 'expr' (exit status 3).  This is more consistent with
2472         how Solaris behaves.
2473         * tests/expr/basic (fail-a): Adjust exit status to match new expr
2474         behavior, for status 2 versus 3.
2475         (anchor): New test.
2476         (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
2477         (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
2478         (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
2479         (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
2480         (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
2481         (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
2482         (bre61, bre62): New tests.
2483         * tests/misc/csplit: Use \{...\} in test RE, to test that we're
2484         conforming to POSIX.
2486         Port to Solaris 8.
2487         * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
2488         "if !".  Do not assume that 'sed' can handle long, newline-free input.
2489         * tests/du/long-sloop: Likewise.  Evaluate expr once, not $n times.
2491 2006-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2493         Adjust to new regex.h API (with new fastmap type), and clean
2494         up the regex storage allocation a bit.
2496         * src/csplit.c (struct control): Put re_compiled member at the
2497         end, since it's large.  Change regexpr member from char * to bool;
2498         all uses changed.  Add new member fastmap.
2499         (extract_regexp): regexp arg is now char const *, not char *.
2500         Don't bother duplicating the regular expression; it's not needed.
2501         Set fastmap from new fastmap member.  Don't bother allocating
2502         a buffer, as the regexp code does a better job than we do.
2503         * src/expr.c (docolon): Allocate and use a fastmap.
2504         Don't bother allocating a buffer.
2505         * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
2506         New vars.
2507         (build_type_arg): New fastmap arg.  All uses changed.
2508         Don't bother allocating a buffer, but set a fastmap.
2509         * src/ptx.c (context_regex_string, word_regex_string): Remove.
2510         (context_regex, word_regex): New vars, replacing the above.
2511         All uses changed.
2512         (struct regex_data): New type.
2513         (compile_regex): Renamed from alloc_and_compile_regex, since
2514         we no longer allocate storage.  Arg is now a struct regex_data *,
2515         not a const char *.  All uses changed.  Don't allocate the fastmap;
2516         instead, take it from the caller.  Don't convert size_t to int,
2517         to avoid arithmetic overflow problems.  Don't bother freeing
2518         storage afterwards; it's not worth the aggravation.
2519         * src/tac.c (compiled_separator_fastmap): New ver.
2520         (main): Use it.  Don't bother allocating a buffer.
2522 2006-03-30  Jim Meyering  <jim@meyering.net>
2524         * src/dd.c (iwrite): Remove assignment without effect.
2525         Reported by Felix Rauch Valenti.
2527 2006-03-22  Eric Blake  <ebb9@byu.net>
2529         * src/ptx.c (usage): Remove mention of --copyright/-C.
2530         (main): Alias --copyright to --version plus a deprecation warning.
2531         * NEWS: Mention this.
2533 2006-03-27  Jim Meyering  <jim@meyering.net>
2535         * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
2536         use of strtod.  Tiny patch from Nickolai Zeldovich.
2538 2006-03-11  Eric Blake  <ebb9@byu.net>
2540         * tests/misc/dirname: New file.
2541         * tests/basename/Makefile.am: Delete.
2542         * tests/basename/basic: Move to...
2543         * tests/misc/basename: ... this new file.  Add some tests,
2544         including fixed behavior for //.
2545         * tests/misc/Makefile.am (TESTS): Sort.  Add basename, dirname.
2546         * tests/Makefile.am (SUBDIRS): Remove basename.
2547         * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
2549         Improvements to dirname/basename handling on platforms like
2550         cygwin with distinct // and with drive letters.
2551         * NEWS: Document new behavior.
2552         * src/basename.c (main): Don't strip suffix from file system
2553         roots.
2554         * src/cp.c (target_directory_operand): Use new last_component.
2555         (ASSIGN_BASENAME_STRDUPA): Likewise.  Reduce time spent
2556         traversing the string.
2557         * src/dircolors.c (guess_shell_syntax): Use new last_component.
2558         * src/install.c (target_directory_operand, install_file_in_dir):
2559         Likewise.
2560         * src/ln.c (target_directory_operand, main): Likewise.
2561         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2562         * src/mv.c (target_directory_operand, movefile): Likewise.
2563         * src/remove.c (rm_1): Likewise.
2564         * src/shred.c (wipename): Likewise.
2565         * src/split.c (next_file_name): Likewise.
2566         * src/su.c (log_su, run_shell): Likewise.
2568 2006-03-23  Paul Eggert  <eggert@cs.ucla.edu>
2570         * NEWS: nohup diagnostics are now more precise, and nohup now
2571         redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2572         * src/nohup.c (main): Implement this.
2573         * tests/misc/nohup: Test the new behavior.
2575 2006-03-12  Jim Meyering  <jim@meyering.net>
2577         * src/copy.c (set_author): Rename function, from preserve_author.
2579         * src/remove.c (AD_pop_and_chdir): Use new macro,
2580         CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
2582         * src/system.h (SAME_INODE): Remove definition.
2583         Include "same-inode.h", instead.
2585 2006-03-11  Eric Blake  <ebb9@byu.net>
2587         * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
2589 2006-03-10  Jim Meyering  <jim@meyering.net>
2591         Fix a bug whereby a user with write access to a directory being removed
2592         could cause the removal of that directory to fail with an erroneous
2593         diagnostic about a directory cycle.  Reported by Vineet Chadha.
2595         * NEWS: Mention this.
2596         * src/remove.c (AD_pop_and_chdir): If the directory we're about to
2597         leave (and try to rmdir) is the one whose dev_ino is being used to
2598         detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
2600 2006-03-08  Paul Eggert  <eggert@cs.ucla.edu>
2602         * NEWS: Document dd's new 'directory' and 'nolinks' flags.
2603         * src/dd.c (set_fd_flags): Handle file-creation flags on file
2604         descriptors, rather than ignoring them.
2605         * tests/dd/misc: Add test cases for append, nofollow, directory,
2606         and nolinks flags.  Simplify redirection to /dev/null in some cases.
2608         * tests/dd/misc: iflags->iflag.  This fixes a typo that meant the
2609         noatime test never tested anything.
2611 2006-03-05  Paul Eggert  <eggert@cs.ucla.edu>
2613         * src/dd.c (flags, usage): New flags directory, nolinks.
2614         * src/system.h (O_NOLINKS): Define to 0 if not already defined.
2616         * src/ls.c (usage): Mention that -f disables --color.
2617         Problem reported by Niels Möller.
2619 2006-03-03  Justin Pryzby  <pryzbyj@justinpryzby.com>
2621         * man/*.x: Add references to syscalls from utilities of the same name.
2623 2006-03-05  Jim Meyering  <jim@meyering.net>
2625         * tests/help-version: Set SHELL, if not already set, in order to
2626         avoid failure when `make check' is run through debuild;  dircolors
2627         would fail due to lack of $SHELL.  Reported by Sven Joachim.
2629         Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
2630         * src/base64.c (wrap_write, do_encode, main): Change type of
2631         parameters and locals, wrap_column, form size_t to uintmax_t.
2632         (main): Adjust to use xstrtoumax, accordingly.
2634 2006-03-03  Jim Meyering  <jim@meyering.net>
2636         Don't fail when run from an environment with SHELL not a Bourne
2637         shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
2638         * tests/dircolors/simple: Invoke each non-failing test with -b.
2639         Reported by Michael Stone.
2641 2006-02-27  Jim Meyering  <jim@meyering.net>
2643         * tests/misc/base64: Derive --decode-using tests from the
2644         encode-based ones.
2646         * tests/misc/base64: Factor out a long constant string.
2647         Split lines to stay within 80 columns.
2649         * tests/misc/Makefile.am (TESTS): Add base64.
2650         * tests/misc/base64: Test base64.  From Simon Josefsson.
2652         * src/base64.c (do_decode): Use correct type for parameter,
2653         ignore_garbage: s/size_t/bool/.
2655         * src/base64.c: Don't include .h files already included by system.h:
2656         <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
2657         Include "system.h" before the other lib/*.h header files.
2658         Include <sys/types.h> before "system.h".
2659         (wrap_write): Remove declaration of unused local, initial_column.
2660         (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
2662         * README: Add base64 to the list.
2664 2006-02-17  Simon Josefsson  <jas@extundo.com>
2666         New program: base64.
2667         * AUTHORS: Mention base64.
2668         * NEWS: Likewise.
2669         * man/Makefile.am: Build base64.1.
2670         * man/base64.x: New file.
2671         * src/Makefile.am (bin_PROGRAMS): Add base64.
2672         * src/base64.c: New file.
2674 2006-02-25  Eric Blake  <ebb9@byu.net>
2676         In ls, avoid calling stat for --inode (-i), when possible.
2677         * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
2678         * src/system.h: ... here, for use in ...
2679         * src/ls.c (main): ... here.  Prefer dirent.d_ino to stat when
2680         possible.
2681         (gobble_file): Add inode argument.
2682         (print_dir): Pass inode if available.
2683         (usage): Remove inaccuracy.
2685 2006-02-23  Jim Meyering  <jim@meyering.net>
2687         * TODO: Update/correct some obsolete entries.
2689 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
2691         * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
2692         * src/join.c (usage): Likewise.
2693         Documentation problem reported by Philip Kensche.
2695 2006-02-20  Eric Blake  <ebb9@byu.net>
2697         * man/rm.x: Update documentation to match previous patch.
2699 2006-02-18  Eric Blake  <ebb9@byu.net>
2701         New option for rm: --interactive=once (-I).
2702         * NEWS: Document it, along with change to rm --interactive.
2703         * TODO: Remove entry for implementing rm -I
2704         * src/rm.c (INTERACTIVE_OPTION): New enum value.
2705         (interactive_type): New enum.
2706         (long_opts): Let interactive take an optional argument.
2707         (interactive_args, interactive_types): New option arguments.
2708         (usage): Document -I, --interactive=WHEN.  Use program_name
2709         instead of a basename.
2710         (main): New -I option, new behavior to --interactive.
2711         * tests/rm/interactive-once: New tests.
2712         * tests/rm/interactive-always: Ditto.
2713         * tests/rm/Makefile.am (TESTS): Run them.
2715 2006-02-18  Jim Meyering  <jim@meyering.net>
2717         * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
2718         expression match more of the target lines, e.g., those that start with
2719         `-S,' (short option followed by a comma) or that include `=[...]'.
2720         Patch by Nicolas François.
2721         Fix the four offenders thus exposed:
2722         * src/join.c (usage): Use two spaces (not one) to separate the
2723         --first-only option string from its description, so help2man formats
2724         the derived man page properly.
2725         * src/pr.c (usage): Likewise.
2726         * src/uniq.c (usage): Likewise.
2727         * src/install.c (usage): Likewise.
2729 2006-02-15  Jim Meyering  <jim@meyering.net>
2731         * Makefile.maint (alpha beta major): For `make major', ensure that the
2732         version string is of the form N.N[.N]*, where N is one or more digits.
2734 2006-02-14  Jim Meyering  <jim@meyering.net>
2736         * INSTALL: Update from gnulib.
2738 2006-02-13  Jim Meyering  <jim@meyering.net>
2740         * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
2742 2006-02-12  Jim Meyering  <jim@meyering.net>
2744         * Makefile.maint (patch-check): New target.
2745         (local-checks-available): Add to the list.
2747 2006-02-11  Jim Meyering  <jim@meyering.net>
2749         * src/c99-to-c89.diff: New file.
2750         * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
2752         * .x-po-check: New file, with exclusions so that `make distcheck'
2753         passes once again.
2754         * Makefile.am (EXTRA_DIST): Add .x-po-check.
2756         rm -r must remove an empty directory, even if it is inaccessible.
2757         * src/remove.c (close_preserve_errno): New function.
2758         (fd_to_subdirp): Don't print a diagnostic in this function.
2759         Do it from the callers instead, unless rmdir succeeds.
2760         (remove_cwd_entries, remove_dir): Adjust callers.
2761         * tests/rm/empty-inacc: New test for the above.
2762         * tests/rm/Makefile.am (TESTS): Add empty-inacc.
2763         * NEWS: Mention this bug fix.
2764         * tests/rm/rm2: Adjust two expected diagnostics, now that they're
2765         a tiny bit less precise: cannot remove `a/1': ... instead of
2766         cannot open directory `a/1': ...
2768         * Makefile.maint (syntax-check-rules): Automatically derive this
2769         list of sc_-prefixed rule names.
2771 2006-02-10  Paul Eggert  <eggert@cs.ucla.edu>
2773         * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
2774         (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
2775         Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
2776         (syntax-check-rules): Bring back sc_changelong.  (Hmm, why did it
2777         go away? was that an accident?)
2778         (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2779         (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
2780         (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
2781         (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
2782         (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
2783         (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
2784         (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
2785         (author_mark_check, makefile_path_separator_check):
2786         Output line numbers, to simplify navigation of Emacs *compilation*
2787         buffers.
2788         (sc_prohibit_atoi_atof, sc_file_system):
2789         Rework slightly so that Makefile.maint doesn't get reported as a
2790         violation of its own syntax rules.
2791         (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
2792         it at run-time (which didn't work with Bison).  Fix a makefile typo,
2793         caught by Makefile.maint itself: spaces where a tab should be.
2794         (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
2795         which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
2796         Ignore djgpp and man subdirectories, to avoid false matches with
2797         Bison and coreutils, respectively.  Use sort -u to remove the
2798         resulting duplicates.
2799         * gnupload: Rework slightly to avoid bogus warning from
2800         sc_two_space_separator_in_usage.
2802 2006-02-10  Jim Meyering  <jim@meyering.net>
2804         Use gzip's --rsyncable option only if it's available.
2805         * Makefile.maint (gzip_rsyncable): New variable.
2806         (GZIP_ENV): Use it.
2808 2006-02-08  Jim Meyering  <jim@meyering.net>
2810         * Makefile.maint (local-checks-available): Define in terms of
2811         the expansion, $(syntax-check-rules), rather than the single,
2812         top-level target `syntax-check', so that it's easier to exclude
2813         individual rules (via $(local-checks-to-skip)).
2814         (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
2816 2006-02-07  Jim Meyering  <jim@meyering.net>
2818         * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
2819         is on Tru64), define O_DIRECT to that.  Patch From James Lemley.
2821         * tests/help-version (expected_failure_status_vdir):
2822         Redirect an expected disk-full diagnostic to /dev/null.
2824 2006-02-06  Jim Meyering  <jim@meyering.net>
2826         * src/unexpand.c (usage): Use two spaces (not one) to separate the
2827         --first-only option string from its description, so help2man formats
2828         the derived man page properly.
2829         * src/rm.c (usage): Likewise for --no-preserve-root.
2830         * src/chown.c (usage): Likewise.
2831         * src/chgrp.c (usage): Likewise.
2833         Add a rule to ensure that the above doesn't happen again.
2834         * Makefile.maint (sc_two_space_separator_in_usage): New rule.
2835         (syntax-check-rules): Add it.
2836         * .x-sc_two_space_separator_in_usage: New empty file.
2837         * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
2839 2006-02-06  Jim Meyering  <jim@meyering.net>
2841         * src/cp.c (usage): Use two spaces (not one) to separate each
2842         option string from its description, so help2man formats the
2843         derived man page properly.
2844         * src/mv.c (usage): Likewise.
2845         Patch from Nicolas François in http://bugs.debian.org/351601.
2847 2006-02-04  Jim Meyering  <jim@meyering.net>
2849         * src/copy.c (copy_internal): cp -RL would fail when encountering
2850         the same directory more than once in the hierarchy beneath a single
2851         command-line argument.  That is legitimate, e.g. when there are
2852         two or more symbolic links, each pointing to some directory that
2853         would not otherwise be copied.  Reported by Christophe LYON.
2854         * tests/cp/cp-deref: New file.  Test for today's fix.
2855         * tests/cp/Makefile.am (TESTS): Add cp-deref.
2856         * NEWS: Document this.
2858 2006-02-03  Jim Meyering  <jim@meyering.net>
2860         * configure.ac: Require automake-1.9.6, not 1.8.3.
2862 2006-02-01  Paul Eggert  <eggert@cs.ucla.edu>
2864         * src/od.c (usage): Mention that -t a ignores high order bit.
2865         Documentation problem reported by Ed Avis.
2867 2006-02-01  Jim Meyering  <jim@meyering.net>
2869         * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
2871 2006-01-30  Paul Eggert  <eggert@cs.ucla.edu>
2873         * src/head.c (main): Use a better diagnostic when someone uses a
2874         trailing numeric option in an invalid way.  Problem reported by
2875         Karl Berry.
2876         * src/tail.c (parse_options): Likewise.
2878 2006-01-30  Jim Meyering  <jim@meyering.net>
2880         * man/wc.x: Include `count' keyword in man page synopsis,
2881         per suggestion from http://bugs.debian.org/181585.
2883 2006-01-24  Paul Eggert  <eggert@cs.ucla.edu>
2885         * src/df.c (show_dev): If the file system claims to have
2886         more available than total blocks, report the number of used
2887         blocks as being total - available (a negative number) rather
2888         than as garbage.  Problem reported by Toralf Foerster.
2890 2006-01-24  Jim Meyering  <jim@meyering.net>
2892         * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
2893         to put a regular file in O_NONBLOCK mode fails with EPERM.
2894         That happens on Linux (up to 2.6.15) when using tail -f on a file with
2895         the append-only attribute.  Reported by Dean Gaudet.  For details,
2896         see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
2897         * NEWS: Mention this fix.
2898         * tests/tail-2/append-only: New file.  Test for the above.
2899         * tests/tail-2/Makefile.am (TESTS): Add append-only.
2900         * tests/Makefile.am (check-root): Add tail-2/append-only
2902 2006-01-21  Jim Meyering  <jim@meyering.net>
2904         * NEWS: Mention fts-related improvements and bug fixes.
2906 2006-01-19  Jim Meyering  <jim@meyering.net>
2908         * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
2909         reported as http://bugs.debian.org/147577.  Forwarded by Thomas Hood.
2911 2006-01-18  Jim Meyering  <jim@meyering.net>
2913         * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
2915 2006-01-17  Jim Meyering  <jim@meyering.net>
2917         Now that fts no longer changes the current working directory, adjust
2918         its clients accordingly -- note that du.c uses fts but doesn't need
2919         any adjustment, since it doesn't operate on the actual files,
2920         but rather just uses the stat buffers provided by fts.
2922         * src/chown-core.c: Include "openat.h".
2923         Don't include "lchown.h".
2924         (restricted_chown): Accept a new parameter, CWD_FD, and use it in
2925         calling openat, lchownat, chownat, rather than open, lchown, chown.
2926         Update caller.
2927         * src/chmod.c: Include "openat.h".
2928         (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
2930         * tests/du/long-from-unreadable: New test, to exercise one small
2931         corner of fts.c.
2933 2006-01-13  Jim Meyering  <jim@meyering.net>
2935         * tests/Makefile.am (SUBDIRS): Add comments discouraging the
2936         addition of new directories under tests/.
2938         * tests/acl: Redirect stdin to /dev/null.  Otherwise, FreeBSD 5.0's
2939         getfacl would hang.
2941 2006-01-12  Jim Meyering  <jim@meyering.net>
2943         * tests/du/long-sloop: Adjust not to hard-code the expected
2944         diagnostic corresponding to ELOOP.  Solaris' diagnostic differs
2945         from that of GNU libc.  Reported by Paul Eggert.
2947         * tests/du/long-sloop: Create file at end of symlink chain.
2949         * tests/misc/test: New file, with a test for one of the
2950         bugs fixed by yesterday's test.c changes.
2951         * tests/misc/Makefile.am (TESTS): Add test.
2953 2006-01-11  Jim Meyering  <jim@meyering.net>
2955         * tests/du/long-sloop: New file.  Test for today's fts.c bug fix.
2956         That bug could make du -L, chgrp -L, or chown -L fail to diagnose
2957         a very long sequence of symbolic links (not necessarily a loop).
2958         * tests/du/Makefile.am (TESTS): Add long-sloop.
2960 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
2962         * src/test.c (test_syntax_error): Append a newline.  All callers
2963         changed, except for the ones that didn't already append a newline.
2964         Bug reported by Eric Blake.
2966 2006-01-11  Jim Meyering  <jim@meyering.net>
2968         * src/system.h (X2NREALLOC): Now that verify_true is no longer
2969         void, cast its result to void, to avoid gcc's warning that
2970         ``left-hand operand of comma expression has no effect''.
2971         (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
2973 2006-01-10  Jim Meyering  <jim@meyering.net>
2975         * tests/chmod/no-x: Add a test for today's fts.c fix.
2977 2006-01-10  Jim Meyering  <jim@meyering.net>  (tiny change)
2979         * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
2980         This is necessary for Dragonfly.  Patch by Joerg Sonnenberger.
2982 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2984         * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
2985         Use verify_true instead of verify_expr, to sync with gnulib.
2987 2006-01-08  Jim Meyering  <jim@meyering.net>
2989         * src/date.c (usage): Adjust the formatting of the entries for
2990         %::z and %:::z (separate with two spaces, not one) so that help2man
2991         formats them properly.  Reported by Philip Rowlands.
2993 2006-01-06  Paul Eggert  <eggert@cs.ucla.edu>
2995         * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
2997 2006-01-06  Jim Meyering  <jim@meyering.net>
2999         * Makefile.maint (copyright-check): Use date +%Y in place of
3000         hard-coded 2005.
3002         * src/remove.c (rm_1): Remove `static' attribute on local `status'.
3003         First off, the attribute should have been `volatile' (not static)
3004         to avoid longjmp-related risk of clobber.  Secondly, now there is
3005         no longer any risk of a local variable being clobbered, so there's
3006         no need for any attribute at all.
3008 2006-01-05  Jim Meyering  <jim@meyering.net>
3010         * src/remove.c: Give a few functions the inline attribute.
3011         (AD_pop_and_chdir): Use gotos to avoid some duplication.
3012         (AD_push): Rewrite an assertion so that the entire computation
3013         goes away when assertions are turned off.
3015         * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
3016         It's already defined in "system.h".
3017         * Makefile.maint: Add a FIXME comment.
3019 2006-01-04  Jim Meyering  <jim@meyering.net>
3021         * ChangeLog: Remove entries from 2005-10-22 and earlier.
3022         * ChangeLog-2005: New file, for entries up to version 5.92.
3024 2006-01-03  Jim Meyering  <jim@meyering.net>
3026         * tests/du/no-x: Also allow a slightly different diagnostic -- the
3027         one you get when using openat-enabled fts.c and du (coming soon).
3028         * tests/chmod/no-x: Likewise.
3029         * tests/chgrp/no-x: Likewise.
3031         * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
3033 2006-01-02  Paul Eggert  <eggert@cs.ucla.edu>
3035         * src/chown-core.c (RC_do_ordinary_chown): New enum value.
3036         (restricted_chown): Return it, if the file cannot be accessed due
3037         to EPERM, or if no uid or gid are required, or if the file is
3038         neither a directory nor a regular file.  Rewrite to avoid gotos.
3039         (change_file_owner): Handle RC_do_ordinary_chown case.
3040         Rewrite to avoid gotos.
3041         * tests/chgrp/basic: Make sure we can change the group of
3042         inaccessible files.
3044         * src/date.c (usage): Explain %g, %G, and %V a bit better.
3046 2006-01-02  Jim Meyering  <jim@meyering.net>
3048         * src/copy.c (set_owner): Correct a comment.
3050         * src/tail.c (parse_options): Change warning to say that --retry
3051         is useful `mainly' (not `only') when following by name.
3052         Reported here: http://bugs.debian.org/273781
3054 2006-01-01  Paul Eggert  <eggert@cs.ucla.edu>
3056         * NEWS: Document that mkfifo and mknod -m no longer set special bits.
3057         * src/copy.c: Include lchmod.h.
3058         (copy_internal): Use lchmod rather than chmod.
3059         * src/cp.c: Include lchmod.h.
3060         (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
3061         * src/mkdir.c: Include lchmod.h.
3062         (usage): Clarify -m's operation.
3063         (main): Use lchmod rather than chmod.  Don't use lchmod unless the
3064         new mode contains bits outside the 777 range.
3065         * src/mkfifo.c (usage): Clarify -m's operation.
3066         (main): If -m is given, don't invoke chmod; use umask 0 instead.
3067         Report an error if -m asks for bits outside the 777 range.
3068         * src/mknod.c (usage, main): Likewise.
3070         * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
3072 2005-12-27  Jim Meyering  <jim@meyering.net>
3074         * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
3075         (sc_prohibit_assert_without_use): New rule.
3076         (syntax-check-rules): Add it to the list.
3077         * .x-sc_prohibit_assert_without_use: New empty file.
3078         * Makefile.am (EXTRA_DIST): Add it.
3080         * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
3082         * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
3083         Don't include <assert.h>; it wasn't used.
3085 2005-12-26  Paul Eggert  <eggert@cs.ucla.edu>
3087         * src/chown-core.c (restricted_chown):
3088         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
3089         * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
3090         | O_NOFOLLOW too, for consistency with other dir-openers.
3091         Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
3092         (is_empty_dir): Likewise.
3093         * src/shred.c (wipename): Likewise.  Don't bother trying to open
3094         dir for writing, since POSIX prohibits it.
3096 2005-12-22  Jim Meyering  <jim@meyering.net>
3098         * tests/help-version: Redirect stderr to /dev/full, to suppress
3099         write error diagnostic.
3101 2005-12-19  Jim Meyering  <jim@meyering.net>
3103         * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
3104         Avoid a minor race condition when `-m MODE' is specified, by using
3105         open, fchown, and close rather than just chown.  To do that reliably --
3106         even with an overly restrictive umask -- ensure that each mkdir,
3107         mknod and mkfifo call uses a mode including at least owner-read access.
3108         * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
3109         the subsequent chown (or equivalent open,fchown,close) fails.
3110         * tests/misc/mknod: New tests.
3111         * tests/misc/Makefile.am (TESTS): Add mknod.
3113 2005-12-17  Jim Meyering  <jim@meyering.net>
3115         * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
3116         e.g., on a named pipe.
3117         (OPEN_NO_FOLLOW_SYMLINK): Remove definition.  Use O_NOFOLLOW in
3118         place of all uses, since it is guaranteed (system.h) to be defined.
3120 2005-12-05  Andreas Gruenbacher  <agruen@suse.de>
3122         Add POSIX ACL support
3123         * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
3124         is no requirement for ACL support; particularly, it does not exist
3125         on systems that have POSIX ACLs.
3126         * src/copy.h (cp_option_init) [umask_kill]: Remove member.
3127         * src/cp.c (umask_kill): With default acls, the umask is not to be
3128         applied.  Remove umask_kill, don't change the process umask, and let
3129         the kernel apply the umask where appropriate.
3130         * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
3131         * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
3132         umask_kill.
3133         (copy_reg, copy_internal): Use copy_acl and set_acl
3134         instead of fchown/chown. Fix the logic for POSIX ACLs.
3135         (chown_succeded): Remove; we now always copy acls and
3136         preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
3137         did a chown before or not.
3138         * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
3139         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
3140         mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
3141         to link with it via $(LIB_ACL), for the utilities that need it.
3143 2005-12-16  Paul Eggert  <eggert@cs.ucla.edu>
3145         * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
3146         (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
3147         (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
3148         value is now signified by whether cwd_errno is null.
3149         (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
3150         pointer-to-bool to pointer-to-errno-value.  All callers changed.
3151         (rm_1): Don't bother setting a local cwd failure flag and then
3152         ORing it into the caller's.  Just set the caller's.
3153         (rm): Use cwd failure errno value to print a slightly-better
3154         diagnostic.
3156 2005-12-15  Jim Meyering  <jim@meyering.net>
3158         * src/stat.c (print_it): Properly handle a backslash at the
3159         end of a --printf format string.  Reported by Paul Eggert.
3160         * tests/misc/stat-printf (end-bs): Add a test for the above.
3162 2005-12-15  Paul Eggert  <eggert@cs.ucla.edu>
3164         * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
3165         Don't assume /etc/passwd contains user names; use 'id' instead.
3167 2005-12-15  Jim Meyering  <jim@meyering.net>
3169         stat: revert behavior of --format=FMT (-c)
3170         stat: add new option: --printf=FMT
3171         * NEWS: Mention this.
3172         * src/stat.c (isodigit, octtobin, hextobin): Define.
3173         (PRINTF_OPTION): Define.
3174         (interpret_backslash_escapes, trailing_delim): New globals.
3175         (usage): Document them.  Alphabetize on long option names.
3176         (print_esc_char): New function.
3177         (print_it): Rewrite, in order to handle backslash escapes.
3178         (main): Handle new option.  Set globals for --format, too.
3180         * tests/misc/stat-printf: Test --printf and --format.
3181         * tests/misc/Makefile.am (TESTS): Add stat-printf.
3183 2005-12-14  Paul Eggert  <eggert@cs.ucla.edu>
3185         * NEWS: sort now reports incompatible options.
3186         * src/sort.c (incompatible_options, check_ordering_compatibility):
3187         New functions.
3188         (main): Use them.  Don't bother with a usage message for
3189         "sort -c a b", for consistency with other error diagnostics.
3190         * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
3191         New tests.
3193         * src/cat.c (main): Undo previous change.  close_stdout already
3194         does the check, so the previous change wasn't necessary.
3196 2005-12-13  Paul Eggert  <eggert@cs.ucla.edu>
3198         * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
3200 2005-12-12  Paul Eggert  <eggert@cs.ucla.edu>
3202         Install a more-conservative approach for sort -R.  It's the
3203         same basic idea as the existing code, except it uses the full ISAAC
3204         approach (called the "more kosher" approach in the existing comments).
3205         This makes "sort -R" quite a bit slower (about a factor of 2 on my
3206         little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
3207         better to be conservative here at first, and review any performance
3208         improvements carefully.
3209         * .x-sc_require_config_h: Add src/rand-isaac.c.
3210         * src/rand-isaac.h: Remove.  All uses now simply include rand-isaac.c.
3211         * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
3212         (shred_SOURCES, sort_SOURCES): Remove.
3213         (EXTRA_DIST): Add rand-isaac.c.
3214         * src/rand-isaac.c: Revert to what used to be in shred.c, without
3215         changing it to allow for varying numbers of words in the state.
3216         Alter so that we include rand-isaac.c directly rather than
3217         compiling it and linking to it.  Don't include config.h or
3218         system.h; that's the includer's responsibility.
3219         Omit functions that are specific to shred.
3220         (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
3221         (isaac_step, struct irand_state):
3222         Resurrect these, with the same defns that used to be in shred.c.
3223         (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
3224         (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
3225         static again.
3226         (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
3227         (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
3228         (irand_init, irand32, irand_mod):
3229         Number of words is constant again.
3230         (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
3231         * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
3232         * src/sort.c: Likewise.
3233         * src/shred.c (fillrand, dopass, main): Undo previous change.
3234         (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
3235         from rand-isaac.c.
3236         * src/sort.c: Don't include md5.h; it wasn't needed.
3237         (struct keyfield): Rename random_hash to random, for consistency
3238         with the other member names.  All uses changed.
3239         (usage): Tweak wording to mention STRING for --seed option.
3240         (short_options): Rorder for consistency with other programs.
3241         (rand_state): Now a struct, not a pointer to one.  All uses changed.
3242         (HASH_WORDS, HASH_SIZE): Remove.
3243         (get_hash): Remove comments around resbuf size, since we can assume C89.
3244         Use a "more-kosher" (but slower) approach of invoking isaac_refill.
3245         (keycompare): Adjust to the new get_hash.
3246         Add a FIXME.
3247         (badfieldspec): Omit recently-introduced comment; it isn't needed.
3248         (main): Don't set need_random simply because gkey has it set; that
3249         doesn't necessarily mean we'll need random numbers.
3250         Redo seeding to match new get_hash approach.
3252 2005-12-10  Jim Meyering  <jim@meyering.net>
3254         * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
3256         Avoid shred segfault on 64-bit systems.
3257         * src/rand-isaac.c (isaac_refill): Don't try to negate a
3258         local of type uint32_t.  Make the local an `int' instead.
3260         * NEWS: Mention sort's new options.
3262         * src/rand-isaac.c (isaac_mix): Declare to be static.
3263         Mark all other functions as `extern' so the tight-scope
3264         part of `make distcheck' passes once again.
3265         * src/rand-isaac.h (isaac_mix): Remove declaration.
3267         * src/sort.c (get_hash): Change position of `*' in parameter
3268         type to conform with convention.
3269         (main): Split a long line so it fits in 80 columns.
3270         (keycompare): Remove stray SPACE before TAB that was
3271         causing `make distcheck' to fail.
3273         * src/shred.c: Don't include gethrxtime.h.  No longer needed.
3275         * tests/misc/sort-rand: New file: basic tests for the new options.
3276         * tests/misc/Makefile.am (TESTS): Add sort-rand.
3278 2005-12-10  Frederik Eaton  <frederik@ofb.net>
3280         * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
3281         (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
3282         * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
3283         Make state size runtime-configurable.
3284         (isaac_new, isaac_copy): New functions.
3285         * src/rand-isaac.h: New file.
3286         * src/shred.c: Include rand-isaac.h.  Move ISAAC code to rand-isaac.c.
3287         (fillrand, main): Adjust to the fact that the state size is now
3288         runtime-configurable.
3289         * src/sort.c (short_options, long_options, WORDS, keycompare, main):
3290         (usage): Add options --random-sort and --seed to implement a random
3291         shuffle.
3292         Include md5.h and rand-isaac.h.
3293         (get_hash): New function.
3294         (rand_state): New var.
3295         (HASH_WORDS, HASH_SIZE): New macros.
3297 2005-12-09  Paul Eggert  <eggert@cs.ucla.edu>
3299         * tests/dd/misc: Add test for dd iflags=noatime.
3301 2005-12-09  Jim Meyering  <jim@meyering.net>
3303         * src/sort.c (usage): Mention white space vs -b and -t options.
3304         From The Wanderer.
3306 2005-12-09  Eric Blake  <ebb9@byu.net>
3308         * src/test.c (main): Fix misleading comment.
3310 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
3312         * NEWS: Mention dd's new noatime flag.
3313         * src/system.h (O_NOATIME): Define to 0 if not already defined.
3314         * src/dd.c (flags, usage): Add support for noatime flag.
3316 2005-12-07  Jim Meyering  <jim@meyering.net>
3318         Distribute the cvsu script, used only by `make syntax-check'.
3319         * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
3320         * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
3321         distribute a copy of this script.
3322         * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
3324         * tests/mv/acl: exit-77 before the trap, not after, if we fail
3325         to create a temporary directory on another partition.
3326         From Andreas Gruenbacher.
3328 2005-12-06  Tomas Pospisek  <tpo@sourcepole.ch>  (tiny change)
3330         * man/basename.x: Cross-reference to dirname and readlink.
3331         * man/dirname.x: Cross-reference to basename and readlink.
3333 2005-12-05  Andreas Gruenbacher
3335         * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
3336         (set_owner, preserve_author): New functions, factored out of copy_reg.
3337         (copy_reg): Use them.
3338         (copy_internal): Use them here, too.
3340 2005-12-04  Jim Meyering  <jim@meyering.net>
3342         * src/sleep.c (usage): Say what happens with two or more arguments.
3343         Suggested by Justin Pryzby.
3345         * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
3346         where it's used.
3348 2005-12-03  Jim Meyering  <jim@meyering.net>
3350         * src/rm.c (long_opts): Change the name of each undocumented, for-
3351         testing-only option to start with `-', so that it cannot render
3352         ambiguous any prefix it happens to share with some other option name.
3353         Problem reported by Eric Blake.
3354         * src/head.c (long_options): Likewise.
3355         * src/tail.c (long_options): Likewise.
3357         * tests/misc/head-elide-tail: Update uses of undocumented, for-
3358         testing-only --presume* options to start with `---'.
3359         * tests/rm/dangling-symlink: Likewise.
3360         * tests/rm/dir-no-w: Likewise.
3361         * tests/rm/isatty: Likewise.
3363 2005-11-30  Jim Meyering  <jim@meyering.net>
3365         * Makefile.maint: Add a comment about cvsu.
3367 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
3369         * NEWS: df updates for "none", "proc", inaccessible file systems.
3370         * src/df.c (show_point): Ignore inaccessible file systems.
3371         (usage): -a includes dummy file systems, not size-0 file systems.
3373         * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
3374         to avoid collision with POSIX name space.  All uses changed.
3376 2005-11-24  Jim Meyering  <jim@meyering.net>
3378         * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
3379         * tests/acl: Add `$0: ' prefix to diagnostics.
3381         * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
3383 2005-11-23  Paul Eggert  <eggert@cs.ucla.edu>
3385         * src/copy.c: Improve performance a bit by optimizing away
3386         unnecessary system calls and going to a block size of at least
3387         8192 (on normal hosts, anyway).  This improved performance 5% on my
3388         Debian stable host (2.4.27 kernel, x86, copying from root
3389         ext3 file system to itself).
3390         Include "buffer-lcm.h".
3391         (copy_reg): Omit last argument.  All callers changed.
3392         Use xmalloc to allocate rather than trusting alloca
3393         (which is unwise with large block sizes).
3394         Declare locals more locally, if possible.
3395         Use uintptr_t words instead of int words, for a bit more speed
3396         when looking for null blocks on 64-bit hosts.
3397         Optimize away reads of zero bytes on regular files.
3398         In the typical case, insist on 8 KiB buffers, at least.
3399         Avoid unnecessary extra call to fstat when checking for sparse files.
3400         Avoid now-unnecessary cast to off_t, and "0L".
3401         Avoid unnecessary test of *new_dst when checking for same owner
3402         and group.
3404 2005-11-22  Paul Eggert  <eggert@cs.ucla.edu>
3406         * src/remove.c (rm): Don't assume C99 for-loop syntax.
3408 2005-11-22  Jim Meyering  <jim@meyering.net>
3410         * src/remove.c (AD_push): Remove debugging cruft.
3412         * tests/rm/unread2 (rm): Change expected diagnostic,
3413         `cannot open directory' to `cannot remove', to align with
3414         new version of rm.
3415         * tests/rm/rm2: Ensure that rm now continues removing entries
3416         even after certain types of failure.
3418         * src/remove.c: Rewrite.  Now, this module is reentrant on systems
3419         that provide openat (Solaris), and on systems like Linux+procfs
3420         where our openat emulation code is reentrant.  This also fixes a
3421         few low-probability leaks and eliminates some code that could,
3422         in very unusual circumstances, cause rm() (via a callee) to exit.
3423         * NEWS: Mention this.
3425         * configure.ac: Put copyright dates all on one line so the
3426         emacs function that updates them works properly.
3428 2005-11-18  Paul Eggert  <eggert@cs.ucla.edu>
3430         * configure.ac (AM_PROG_CC_C_O): Add.  Needed for CVS Automake.
3431         Problem reported by Eric Blake.
3432         (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
3433         we get a standard-conforming compiler.  This relies on the new
3434         m4/c.m4 file.  Note that it's a bit tricky, since c.m4 doesn't
3435         define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
3436         m4/c.m4 can go away with Autoconf 2.60 comes out.
3438 2005-11-17  Jim Meyering  <jim@meyering.net>
3440         * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
3441         (AD_mark_current_as_unremovable): Likewise, but for a local.
3442         (rm_1): Likewise.
3444         * tests/mv/acl: Let traps handle removing temporary directories.
3446         Expect acl-related tests to fail, until the corresponding
3447         patches are committed.
3448         * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
3449         * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
3451         ACL tests, from Andreas Gruenbacher.
3452         * tests/acl, tests/mv/acl, tests/cp/acl: New files.
3453         * tests/mv/Makefile.am (TESTS): Add acl.
3454         * tests/cp/Makefile.am (TESTS): Add acl.
3456         * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
3458 2005-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3460         * NEWS: Improve quality of ln's diagnostics.
3461         * src/ln.c (do_link, usage): Likewise.
3462         (do_link): Don't use alloca on a buffer of unbounded size.
3464 2005-11-16  Jim Meyering  <jim@meyering.net>
3466         * tests/cp/fail-perm: Accommodate HPUX.  It appears to fail
3467         with EACCES rather than EPERM.  Reported by Peter O'Gorman here:
3468         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
3469         This also affects AIX 4.3.3, according to Ralf Wildenhues, in
3470         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3472 2005-11-14  Jim Meyering  <jim@meyering.net>
3474         * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
3476 2005-11-13  Jim Meyering  <jim@meyering.net>
3478         * announce-gen: Accept new option, --gpg-key-id=ID and
3479         emit a blurb telling how to use the .sig files.
3480         * Makefile.cfg (gpg_key_ID): Define.
3481         * Makefile.maint (announcement): Use new option and key.
3483         Require that most .c files include <config.h>.
3484         * Makefile.maint (sc_require_config_h): New rule.
3485         (syntax-check-rules): Add it.
3486         * .x-sc_require_config_h: New file listing exceptions to the
3487         above rule.  Some are legit, others are simply grandfathered in.
3488         * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
3490 2005-11-12  Jim Meyering  <jim@meyering.net>
3492         * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
3494 2005-11-11  Jim Meyering  <jim@meyering.net>
3496         * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
3497         Mention new readlink options in 5.3.0's `New features' section.
3498         Spotted by Thomas Hood.
3500 2005-11-08  Jim Meyering  <jim@meyering.net>
3502         * NEWS: Merge in changes from b5_9x branch.
3504 2005-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3506         * NEWS: ls now defaults to --time-style='locale', which in turn acts
3507         like --time-style='posix-long-iso' if the locale settings are messed up.
3508         * src/ls.c (decode_switches): Implement this.
3510 2005-11-08  Jim Meyering  <jim@meyering.net>
3512         * tests/du/2g: s/expensive/very expensive/ in a comment.
3513         From Paul Townsend.
3515 2005-10-17  Eric Blake  <ebb9@byu.net>
3517         * src/ls.c (usage): Fix descriptions of --sort, --time.
3518         Reported by Vitaly A. Ostanin.
3520 2005-11-04  Paul Eggert  <eggert@cs.ucla.edu>
3522         * src/ln.c: Include filenamecat.c.
3523         (FILE_BASENAME_CONCAT): Remove.
3524         (do_link): Remove last arg DEST_IS_DIR.  All callers changed.
3525         (main): Use file_name_concat, base_name, and strip_trailing_slashes
3526         instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
3527         the use of alloca.
3529 2005-11-04  Jim Meyering  <jim@meyering.net>
3531         * src/du.c (process_file): Don't overflow for files of size >= 2^31
3532         on systems with stat.st_blocks of a signed 32-bit type.
3533         This bug causes trouble on some AIX 5.1 systems.
3534         Report and trivial patch from Paul Townsend:
3535         <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
3536         * NEWS: Mention this.
3538         * tests/du/2g: New (very-expensive) test for the above-fixed bug.
3539         * tests/du/Makefile.am (TESTS): Add it here.
3540         * tests/very-expensive: New file.
3541         * tests/Makefile.am (EXTRA_DIST): Add it here.
3542         * tests/cp/perm: Mark this test as `very-expensive', too.
3544 2005-11-02  Paul Eggert  <eggert@cs.ucla.edu>
3546         * NEWS: Mention that rm -d and maybe ln -d are scheduled for
3547         removal in 2006.
3548         * src/remove.h (struct rm_options): Remove unlink_dirs.  All uses
3549         removed.
3550         * src/rm.c (usage): Don't mention rm -d.
3552 2005-11-02  Jim Meyering  <jim@meyering.net>
3554         * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
3555         From Andreas Schwab.
3557         * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
3558         `M+N records in/out' lines don't pollute `make check' output.
3560         * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
3561         fixed on 2005-10-31.  This test uses the new, IN_PIPE specifier.
3562         * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
3563         to indicate that the input file should be piped into the command
3564         under test (via `cat FILE | $prog ...').
3566         * src/remove.c (remove_entry): Emit a better diagnostic when rm
3567         (without -r) fails to remove a directory on a non-Linux system.
3568         This change affects only newer Solaris systems (with priv_*
3569         functions like priv_allocset).  Reported by Keith Thompson.
3571         * tests/rm/dir-nonrecur: New file/test for the above fix.
3572         * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
3574 2005-11-01  Paul Eggert  <eggert@cs.ucla.edu>
3576         * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
3577         POSIX 1002.1-2001 requires.
3578         * src/tail.c (parse_obsolete_option): Implement this.
3579         Problem reported by Vincent Lefevre.
3580         * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
3581         * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
3582         (test_vector): Add special cases for _POSIX2_VERSION, and
3583         regularize the old ones a bit.
3584         * tests/touch/obsolescent: Add y2000 test.
3586 2005-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3588         * src/dd.c (skip): Fix off-by-one error reported by
3589         Theodoros V. Kalamatianos.
3591 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
3593         * tests/mkdir/p-3: Require that the test be run as non-root.
3594         Problem and trivial fix reported by Theodoros V. Kalamatianos.
3596 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
3598         * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
3599         boundary between DEST and SOURCE in the result.
3601 2005-10-26  Dmitry V. Levin  <ldv@altlinux.org>
3603         * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
3604         back to text, to sync with documentation and for backwards
3605         compatibility.
3607 2005-10-25  Jim Meyering  <jim@meyering.net>
3609         * tests/dircolors/simple (other-wr): Add an explicit test for
3610         the dircolors bug (NULL-dereference) fixed yesterday.
3612 2005-10-24  Jim Meyering  <jim@meyering.net>
3614         * src/tac.c (tac_file): When determining whether a file is seekable,
3615         also test whether it is a tty.  Using only the lseek-based test would
3616         give a false positive on Solaris.  Reported by Peter Fales.
3618 2005-10-24  Dmitry V. Levin  <ldv@altlinux.org>
3620         * tests/install/d-slashdot: New test, for "install -d" failure.
3621         * tests/install/Makefile.am (TESTS): Add d-slashdot.
3622         * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
3623         * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
3625 2005-10-24  Jim Meyering  <jim@meyering.net>
3627         * src/dircolors.c (ls_codes): Add missing comma.
3628         Anonymous report and patch from
3629         http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
3631         * src/dircolors.c: Add compile-time assertion that the slack_codes
3632         and ls_codes arrays have the same number of elements.  This would
3633         have prevented the above-fixed bug.
3635         * src/expand.c (parse_tab_stops): Add a comment to make this function
3636         identical to the one in unexpand.c.
3637         * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
3638         identical to the one in expand.c.
3640         * src/expand.c (next_file): Don't assume fopen cannot return stdin.
3642 2005-10-23  Jim Meyering  <jim@meyering.net>
3644         * src/md5sum.c (digest_check, main): Use ptr_align rather than
3645         a dangerous pointer-value-to-`unsigned' cast.
3646         * NEWS: mention the new sha* programs.
3647         * AUTHORS: Add new sha* programs.
3649 2005-08-28  David Madore  <david.madore@ens.fr>
3651         Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
3652         * README: Add their names to the list.
3653         * src/md5sum.c: Provide framework for computing sha-2 hashes.
3654         * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
3655         Rules for compiling sha-2 utilities
3656         (noinst_HEADERS): Remove checksum.h.
3657         * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
3658         New files.
3659         * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
3660         (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
3661         * tests/misc/sha224sum, tests/misc/sha256sum: New files.
3662         * tests/misc/sha384sum, tests/misc/sha512sum: New files.
3663         * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
3664         sha384sum, sha512sum test scripts here rather that each in its
3665         own directory.
3667 2005-08-28  David Madore  <david.madore@ens.fr>
3669         * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
3670         of the FIPS test vectors).
3672 2005-10-23  Jim Meyering  <jim@meyering.net>
3674         * configure.ac: Use 6.0-cvs as the version string.
3675         * NEWS: Adjust accordingly.
3678         -----
3680         Copyright (C) 2005, 2006 Free Software Foundation, Inc.
3682         Copying and distribution of this file, with or without
3683         modification, are permitted provided the copyright notice
3684         and this notice are preserved.