* TODO: Remove some now-completed or no longer relevant items.
[coreutils/ericb.git] / ChangeLog
blobdc2870b15485e43ae6966dd6016d6dda3f8ecf4a
1 2007-05-20  Jim Meyering  <jim@meyering.net>
3         * TODO: Remove some now-completed or no longer relevant items.
5 2007-05-19  Jim Meyering  <jim@meyering.net>
7         Rename uses of futimens -> gl_futimens; glibc now declares the former.
8         * src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens.
9         * src/touch.c (touch): Likewise.
11 2007-05-18  Jim Meyering  <jim@meyering.net>
13         * Makefile.maint (my-distcheck): Remove -pedantic from $(CFLAGS)
14         for now, to avoid c89-check failure due to use of #include_next.
16 2007-05-15  Jim Meyering  <jim@meyering.net>
18         Generate a dozen test-related Makefile.am files at bootstrap-time.
19         * README-hacking: Build-from-checkout now require Perl, too.
20         * bootstrap: Now that these generated Makefile.am files are no longer
21         under version control, they must be created at bootstrap time.
23 2007-05-14  Paul Eggert  <eggert@cs.ucla.edu>
25         * man/chmod.x: Document chmod's behavior with setuid and setgid bits.
26         Remove misleading implication about leading zero.  Problem
27         reported by Jan Engelhardt in
28         <http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00134.html>.
30 2007-05-13  Jim Meyering  <jim@meyering.net>
32         Remove the generated tests/*/Makefile.am files from version control.
33         * tests/cut/Makefile.am: git-remove this generated file.
34         * tests/head/Makefile.am: Likewise.
35         * tests/join/Makefile.am: Likewise.
36         * tests/pr/Makefile.am: Likewise.
37         * tests/sort/Makefile.am: Likewise.
38         * tests/tac/Makefile.am: Likewise.
39         * tests/tail/Makefile.am: Likewise.
40         * tests/test/Makefile.am: Likewise.
41         * tests/tr/Makefile.am: Likewise.
42         * tests/uniq/Makefile.am: Likewise.
43         * tests/wc/Makefile.am: Likewise.
44         * .cvsignore, .gitignore: Ignore these generated files.
46         * src/.cvsignore, src/.gitignore: Add chcon here, ...
47         * .cvsignore, .gitignore: ... not here.
49         Test uniq's new --zero-terminated (-z) option.
50         * tests/uniq/Test.pm: When possible, create a "-z"-testing variant
51         of each existing test.
52         (2z, 3z, 4z, 5z, 20z, 122, 123): New tests from James Youngman.
54 2007-05-12  James Youngman  <jay@gnu.org>
56         Add -z option to uniq.  Originally proposed by Egmont Koblinger.
57         * NEWS: Mention uniq's new option: --zero-terminated (-z).
58         * src/uniq.c: Add new option, --zero-terminated (-z), to make
59         uniq use the NUL byte as separator/delimiter rather than newline.
60         (check_file): Add a parameter: delimiter.  Update caller.
61         Use readlinebuffer_delim in place of readlinebuffer everywhere.
62         (main): Handle the new option.
63         (usage): Describe new option the same way sort does.
64         * doc/coreutils.texi (uniq invocation): Describe the new option.
66 2007-05-07  Jim Meyering  <jim@meyering.net>
68         * NEWS: Mention that last week's tr bug dates back to 1992.
70 2007-05-04  Jim Meyering  <jim@meyering.net>
72         Avoid test failure when run with an unusual umask.
73         * tests/ls/color-dtype-dir: Set umask to 022.
74         Suggestion from AIDA Shinra.
76         Avoid failure of root-only test when run with a restrictive umask.
77         * tests/rm/no-give-up: Ensure that non-root can access "d/" through
78         root-owned ".".  Reported by AIDA Shinra.
80         tr -c: don't abort when translating with S2 larger than complement of S1
81         * src/tr.c (main): Remove invalid assertion triggered by e.g.,
82         tr -c a '[b*256]'.  There's nothing wrong with having Set2 larger
83         than Set1.  Reported by Guntram Blohm.
84         * tests/tr/Test.pm (no-abort-1): Test for the above.
85         * NEWS: Mention this bug fix.
86         * THANKS: Add Guntram Blohm.
88 2007-05-03  Jim Meyering  <jim@meyering.net>
90         Avoid test failure when run with a permissive umask.
91         * tests/rm/no-give-up: Set permissions of test directory properly,
92         i.e., not depending on umask prohibiting go=w.
93         Reported by AIDA Shinra.
95 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
97         The following commands and options now support the standard size
98         suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
99         head -c, head -n, od -j, od -N, od -S, split -b, split -C,
100         tail -c, tail -n.
101         * doc/coreutils.texi (od invocation, head invocation, tail invocation):
102         Document support for new size suffixes.
103         (head invocation, tail invocation):
104         Document that -n uses the same suffixes as -c.
105         (tail invocation): More-clearly document what leading "+" does.
106         * src/head.c (usage, string_to_integer): Support new suffixes.
107         * src/od.c (usage, main): Likewise.
108         * src/split.c (usage, main): Likewise.
109         * src/tail.c (usage, parse_options): Likewise.
110         Prompted by a patch from Evan Hunt.
112 2007-05-02  Jim Meyering  <jim@meyering.net>
114         * src/du.c (usage): Tweak description of --dereference-args (-D) again.
115         Prompted by another request for clarification from Justin Pryzby.
117         Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
118         * tests/rm/fail-2eperm: Patch from AIDA Shinra.
119         Reported by Peter Dyballa.
120         * THANKS: Add AIDA Shinra and Peter Dyballa.
122 2007-04-28  Paul Eggert  <eggert@cs.ucla.edu>
124         * src/nohup.c (usage): Describe how standard input and output
125         are redirected.
127 2007-04-25  Jim Meyering  <jim@meyering.net>
129         * src/du.c (usage): Clarify description of --dereference-args (-D).
130         Prompted by a report from Justin Pryzby.
132         * bootstrap.conf (gnulib_modules): Add fseeko and ftello.
133         (gnulib_modules): Add autobuild.
135 2007-04-24  Jim Meyering  <jim@meyering.net>
137         * THANKS: Add Andreas Frische.
138         * NEWS: Mention today's ls --color fix.
139         * tests/ls-2/tests (sl-dangle): Add a test for today's fix.
141 2007-04-24  Eric Blake  <ebb9@byu.net>
143         ls --color once again colors dangling symlinks correctly
144         * src/ls.c (gobble_file): Much like the 2007-04-07 fix,
145         add a term to the expression that decides whether we need
146         stat and/or lstat calls.  Reported by Andreas Frische.
148 2007-04-16  Jim Meyering  <jim@meyering.net>
150         * src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
151         Reported by Rudolf Kastl.
152         * THANKS: Add Rudolf Kastl.
154 2007-04-11  Paul Eggert  <eggert@cs.ucla.edu>
156         split --line-bytes=N (-C N): don't create an empty file.
157         * src/split.c (line_bytes_split): Don't create an empty line
158         afterwards if the last buffer happens to be exactly full.
159         * tests/misc/split-fail: Add a test case for this.
160         * NEWS: mention this.
162 2007-04-10  Jim Meyering  <jim@meyering.net>
164         ls: don't form or compute the length of strings that won't be used.
165         * src/ls.c (gobble_file): Form and compute length of strings for
166         block size, owner, group, author, major+minor numbers and file size
167         only if they'll actually be used.  I.e., don't form most of them
168         when not producing long format output.
170 2007-04-07  Jim Meyering  <jim@meyering.net>
172         Add a test for, and document, today's fix.
173         * NEWS: Mention today's ls --color fix.
174         * tests/ls-2/tests (sl-target): Add a test for today's fix.
175         * THANKS: Add Kirk Kelsey.
177 2007-04-07  Eric Blake  <ebb9@byu.net>
179         Fix a bug in how the LS_COLORS ln=target attribute is handled.
180         * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
181         ln=target attribute applies.  Reported by Kirk Kelsey.
183 2007-04-02  Jim Meyering  <jim@meyering.net>
185         * src/copy.c (copy_reg): Initialize local "con", before calling
186         getfscreatecon, in case that function (or its inline stub) does
187         not set it.
189 2007-04-01  Paul Eggert  <eggert@cs.ucla.edu>
191         * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
192         ls -x DIR would sometimes output the wrong string in place of the
193         first entry.
194         * NEWS: Mention the bug fix.
195         * tests/ls/x-option: New file.
196         * tests/ls/Makefile.am (TESTS): Add x-option.
198         gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
199         * bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
200         md5 to crypt/md5 and sha1 to crypt/sha1.
202 2007-03-30  Jim Meyering  <jim@meyering.net>
204         * NEWS: Mention these SELinux changes.
206         * ChangeLog-selinux: Remove file.
207         Move its contents into this file, removing old dates.
209         * src/runcon.c (main): Don't reorder arguments.  Reported by
210         Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
211         * tests/misc/runcon-no-reorder: New file.  Test for the above.
212         * tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
214         * src/runcon.c (main): Remove "." at end of a diagnostic.
216         * src/runcon.c: New program.
217         * src/Makefile.am (bin_PROGRAMS): Add runcon.
218         (runcon_LDADD): Define.
219         * README: Add runcon to the list of programs.
220         * AUTHORS: Add this: runcon: Russell Coker
221         * tests/help-version: Add runcon as an exception.
222         * man/Makefile.am (dist_man_MANS): Add runcon.1.
223         (runcon.1): New dependency.
225         mkfifo, mknod: Accept new "-Z, --context=C" option.
226         * src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
227         (main): Honor it.
228         * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
230         mkdir: Accept new "-Z, --context=C" option.
231         * src/mkdir.c: Include <selinux/selinux.h>.
232         (main): Honor it.
233         * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
235         * tests/cp/cp-a-selinux: New file.  Test for the bug reported in
236         <http://bugzilla.redhat.com/219900>.
237         * tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
239         * tests/selinux: New file.
240         * tests/Makefile.am (EXTRA_DIST): Add selinux.
241         * tests/misc/selinux: Source the new script, rather than open coding it.
243         Change how "cp -a" and "cp --preserve=context" work with SELinux.
244         Now, cp -a attempts to preserve context, but failure to do so does
245         not change cp's exit status.  However "cp --preserve=context" is
246         similar, but failure *does* cause cp to exit with nonzero status.
247         * src/copy.h (struct cp_options) [require_preserve_context]: New member.
248         * src/copy.c (copy_reg, copy_internal): Implement the above.
249         * src/mv.c (cp_option_init): Initialize the new member.
250         * src/install.c (cp_option_init): Likewise.
251         * src/cp.c (cp_option_init): Likewise.
252         (decode_preserve_arg): Set it or reset it.
254         cp, mv, install: add SELinux support, but unlike with the Red Hat
255         patch, mv and cp do not provide the "-Z context" option.
256         * src/copy.c: Include <selinux/selinux.h>.
257         (restore_default_fscreatecon): New function.
258         (copy_reg): Make cp --preserve=context work for existing destination.
259         (copy_internal): Likewise for new destinations.
260         * src/copy.h (cp_options) [preserve_security_context]: New member.
261         * src/cp.c: Include <selinux/selinux.h>.
262         (selinux_enabled): New global.
263         (usage): Mention new --preserve=context option.
264         (PRESERVE_CONTEXT): Define/use.
265         (decode_preserve_arg): Handle PRESERVE_CONTEXT.
266         (main): Remove an obsolete comment.
267         If --preserve=context is specified on a system without SELinux
268         enabled, give a diagnostic and fail.
269         * src/mv.c: Include <selinux/selinux.h>.
270         Set x->preserve_security_context if SELinux is enabled.
271         * src/install.c: Accept new "-Z, --context=C" option.
272         Accept --preserve-context option (but not -P option).
273         Accept alternate spelling: --preserve_context, for now.
274         Include <selinux/selinux.h> and "quotearg.h".
275         (selinux_enabled, use_default_selinux_context): New globals.
276         (PRESERVE_CONTEXT_OPTION): Define.
277         (cp_option_init): Default: do not preserve security context.
278         (setdefaultfilecon): New function.
279         (main): Honor new options.
280         * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
281         Add $(LIB_SELINUX).
282         * src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
284         * tests/misc/selinux [VERBOSE]: Print version info for each
285         of the tested tools, not just ls.
287         * src/c99-to-c89.diff: Remove the ls.c patch, now that I've
288         temporarily removed the offending c99'ism.
290         * src/chcon.c (usage): Split a string literal that was longer than 509.
292         * src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
293         Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
295         * src/c99-to-c89.diff: Adjust offsets.
297         * AUTHORS: Add chcon.
299         * src/c99-to-c89.diff: Remove trailing blanks.
301         * src/chcon.c: Don't include "dirname.h".  system.h already includes it.
303         * gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
305         * src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
307         * src/id.c (main): Tweak id -Z diagnostic.
309         id: Add SELinux support: -Z option.
310         * src/id.c (main): Apply patches from Fedora, with these changes:
311         Remove #ifdef WITH_SELINUX.
312         Use error (EXIT_FAILURE, not fprintf+exit(1).
313         * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
315         stat: Add support for SELinux in the form of a %C format directive.
316         * src/stat.c (follow_links): Make this variable file-global.
317         (out_file_context): New function.
318         (print_statfs): Honor %C.
319         (print_stat): Honor %C.
320         (do_stat): Remove follow_links parameter.
321         (usage): Document the two %C directives.
322         (main): Accept -Z (though it's a no-op).
323         * src/Makefile.am (stat_LDADD): Define.
325         ls: Add support for SELinux and a slightly modified -Z option.
326         I started with the patches from Red Hat.
327         The entries below tell how the code evolved.
329         * src/ls.c (print_long_format, print_file_name_and_frills): When
330         there is no security context (due to getfilecon/lgetfilecon failing
331         with e.g. ENOTSUP), print it as "?", not "".
332         * src/ls.c (print_file_name_and_frills): Make -Z work without -l.
333         (length_of_file_name_and_frills): Likewise.
335         * src/ls.c: Remove the --lcontext and --scontext options.
336         Change the way -Z, --context work so that it no longer implies -l.
337         Thus, -Z -l will work like -lcontext and -Z without -l will work
338         like --scontext.
340         Adjust tests to reflect new 'ls -l' syntax -- affects only
341         systems with SELinux when operating on a file with no ACL.
342         These tests assumed that everything before the first space on
343         each line is the 10-byte mode string.  But there may also be a "+"
344         in the 11th column, just before the space.  However, note that this
345         is not new.  The same thing would have happened even without the
346         change below, when listing a file with an ACL.
347         * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
348         * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
349         * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
351         Don't make compilation depend on USE_ACL.  An SELinux security
352         context counts as an "alternate access control method", so ls
353         must output a "+" for each file with a security context.
354         * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
355         (FILE_HAS_ACL): Remove macro definition.  Use f->have_acl directly.
356         (gobble_file): Record whether a file has a security context, and
357         update the condition used to determine whether to print the "+".
358         (gobble_file): Call getfilecon/lgetfilecon also when
359         format == long_format, so that we get the "+".
361         * src/ls.c (gobble_file): Add a comment explaining why (with a
362         security context option) ls doesn't exit nonzero due to e.g.,
363         getfilecon failing with errno == ENOTSUP.
365         * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
366         to ENOTSUP.
368         * src/ls.c (gobble_file): Factor out three small blocks using
369         getfilecon and lgetfilecon.
370         Don't ignore return value from getfilecon and lgetfilecon.
372         * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
373         ternary operator).
374         (print_scontext_format): Likewise.
375         (print_scontext): Declare to be "bool", not int.  Adjust uses.
377         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
379         * tests/misc/chcon: New file.
380         * tests/misc/chcon-fail: New file.
381         * tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
382         * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
384         * tests/misc/Makefile.am (TESTS): Add selinux.
385         * tests/misc/selinux: New file.
386         * tests/help-version: Skip chcon.
387         * man/chcon.x: New file.
388         * man/Makefile.am: Build chcon.1.
390         New program: chcon
391         * gl/modules/selinux-at: New module.  Check for libselinux and set
392         LIB_SELINUX here, unconditionally, rather than depending on
393         the configure-time --enable-selinux option.
394         * gl/modules/selinux-h: New module.
395         * bootstrap.conf (gnulib_modules): Add selinux-at.
396         * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
397         * gl/lib/se-selinux_.h: New file.
398         * gl/lib/se-context_.h: New file.
399         * gl/m4/selinux-selinux-h.m4: New file.
400         * gl/m4/selinux-context-h.m4: New file.
401         * src/Makefile.am (bin_PROGRAMS): Add chcon.
402         (chcon_LDADD): Define.
403         * README: Add chcon to the list of programs.
404         * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
406 2007-03-29  Jim Meyering  <jim@meyering.net>
408         * .vg-suppressions: Add libc-getpwuid-leak.
410 2007-03-28  Jim Meyering  <jim@meyering.net>
412         Help translators include translation team's web or email address.
413         * src/system.h (emit_bug_reporting_address): New function.
414         * src/base64.c: Use it rather than a literal printf.
415         * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
416         * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
417         * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
418         * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
419         * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
420         * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
421         * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
422         * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
423         * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
424         * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
425         * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
426         * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
427         * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
428         * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
429         * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
430         * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
431         * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
432         * src/who.c, src/whoami.c, src/yes.c: Likewise.
434         * src/stty.c: Don't include "vasprintf.h", now that its
435         declarations are guaranteed to be in gnulib's stdio.h.
436         * src/who.c: Likewise.
438 2007-03-27  Jim Meyering  <jim@meyering.net>
440         * README: Use "install", not "ginstall" in the list of program names.
441         * src/Makefile.am (check-README): Substitute s/ginstall/install/.
443 2007-03-25  Jim Meyering  <jim@meyering.net>
445         * src/c99-to-c89.diff: Regenerate.
447 2007-03-25  Paul Eggert  <eggert@cs.ucla.edu>
449         Avoid the need for euidaccess and/or lstat on every directory entry
450         with 'rm -r dir' (without -f), if we are root, or if we are removing
451         a directory tree that is full of symbolic links.
452         * bootstrap.conf (gnulib_modules): Add write-any-file.
453         * src/copy.c: Include write-any-file.h.
454         (UNWRITABLE): Remove macro, replacing with....
455         (writable_destination): New function, which uses can_write_any_file
456         to avoid the need for euidaccess when we are privileged.
457         (overwrite_prompt, abandon_move): Use it.
458         * src/remove.c: Include write-any-file.h.
459         (D_TYPE): New macro.
460         (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
461         (write_protected_non_symlink): Don't bother to stat if we can write
462         any file.
463         (prompt): New arg PDIRENT_TYPE.  All callers changed.
464         Use readdir dirent type to avoid the need for 'lstat' on each directory
465         entry in cases like 'rm -r dir', if we are root, or if the tree is
466         full of symbolic links.
467         (DT_IS_KNOWN, DT_MUST_BE): Remove.
468         (remove_entry): New arg DIRENT_TYPE_ARG.  All callers changed.
470 2007-03-24  Jim Meyering  <jim@meyering.net>
472         If strace malfunctions, skip the test rather than failing it.
473         * tests/mv/atomic: Required on a mips-unknown-linux-gnu system
474         running the aging linux-2.4.27-mipscvs-20040814.
476 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
478         * src/pathchk.c: Don't include euidaccess.h, as we don't call
479         euidaccess.
481 2007-03-23  Jim Meyering  <jim@meyering.net>
483         * README-package-renamed-to-coreutils: Add a URL for the FAQ,
484         and a couple more archive links.
486 2007-03-22  Jim Meyering  <jim@meyering.net>
488         Post-release version change.
489         * NEWS: Add a line for 6.9+.
490         * configure.ac (AC_INIT): Set new version string.
492         Version 6.9.
493         * NEWS: Record release date and new version number.
494         * configure.ac (AC_INIT): New version number.
496         * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
498 2007-03-22  Paul Eggert  <eggert@cs.ucla.edu>
500         Improve a test script.
501         * tests/mv/hard-3: Check for 'ls' failure, too.
502         Generate more-useful debugging output when 'ls' fails.
504 2007-03-21  Jim Meyering  <jim@meyering.net>
506         Fix a test script not to claim an ext2 file system is of type xfs.
507         * tests/du/slink: When using df --local and df --type=TYPE,
508         test only the exit code.  Don't bother with stdout.
509         Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
511         * gl/lib/savewd.c: Remove this file, since the savewd_save change
512         is now in gnulib.  The other wasn't useful.
514 2007-03-20  Jim Meyering  <jim@meyering.net>
516         * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
518         Skip part of this test when "." is not a local file system.
519         * tests/install/basic-1: Otherwise, it would fail on some NFS
520         file systems.
521         * tests/mkdir/p-3: Likewise.
523 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
525         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
526         Add $(LIB_ACL_TRIVIAL).
528 2007-03-18  Jim Meyering  <jim@meyering.net>
530         Fix a generic NFS-related test failure.
531         * tests/mkdir/p-3: When setting up an unreadable "." in an
532         inaccessible parent, make the parent inaccessible *after* making "."
533         unreadable.  Otherwise, running "chmod a-r ." in an already-
534         inaccessible parent would fail on NFS with "Stale NFS file handle".
536         Fix a bug in how pr -m -s works.
537         * NEWS: Describe how the fix affects pr.
538         * src/pr.c (init_parameters): The --merge (-m) option does
539         not imply --expand-tabs (-e), so don't set "untabify_input".
540         Reported by Wis Macomson.
541         * tests/misc/pr: New file.  Test for the above fix.
542         * tests/misc/Makefile.am (TESTS): Add pr.
543         * THANKS: Update.
545 2007-03-17  Jim Meyering  <jim@meyering.net>
547         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
548         * bootstrap: Put ""s around use of $build_aux, in case
549         someone uses a name containing shell meta-characters.
550         Reported by Alfred M. Szmidt.
551         * tests/misc/tty-eof: Add shuf to the list of tested commands.
553         Avoid test failure on NFS-mounted Solaris ZFS file system.
554         * tests/du/basic: Skip a test if "." is on a non-local file system.
556         Avoid an obscure build failure, prefer waitpid over wait.
557         * src/install.c (strip): Use waitpid, not wait.  It's equivalent,
558         but feels less obsolescent.
560         * bootstrap: Don't use \> in grep regexp.  For HP-UX.
562 2007-03-16  Jim Meyering  <jim@meyering.net>
564         Begin adding support for Solaris ZFS (4 entries per trivial ACL)
565         * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
566         (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
567         (is_trivial_acl): New function.  Incomplete, for now.
568         (file_has_acl, copy_acl): Use the new function, rather than
569         counting the number of entries in an ACL.
571         * bootstrap: Update from gnulib.
573         * .x-sc_prohibit_atoi_atof: Add TODO here, too.
575 2007-03-16  Paul Eggert  <eggert@cs.ucla.edu>
577         * src/copy.c: Include filemode.h.
578         (overwrite_prompt): Say "try to overwrite", not "overwrite", to
579         make it clearer that the attempt may fail.  Problem reported by
580         Dan Jacobson in:
581         http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
582         Output symbolic mode as well as numeric.
583         * tests/mv/i-2 (fail): Adjust to new prompt format.
585 2007-03-15  Jim Meyering  <jim@meyering.net>
587         Enforce policy: don't use *scanf functions.
588         * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
589         * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
590         * TODO: note that stty.c needs this small clean-up.
592 2007-03-13  Jim Meyering  <jim@meyering.net>
594         Prepare to work on ACL-related failure when using Solaris ZFS.
595         * gl/lib/acl.c: New file, copied from gnulib.
597         Work around a failing test due to an NFS-based race condition.
598         * tests/cp/sparse: Accept a report that the copy is *smaller*.
600 2007-03-12  Jim Meyering  <jim@meyering.net>
602         Make bootstrap.conf a tiny bit more generic.
603         * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
604         files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
606 2007-03-10  Jim Meyering  <jim@meyering.net>
608         Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
609         * gl/lib/savewd.c: Copy this file from gnulib, then change
610         "errno != EACCES" to (errno != EACCES && errno != ESTALE).
611         The symptom was this failure in tests/install/basic-1:
612         ginstall: cannot create directory `rel/a': Stale NFS file handle
614         The preceding change solved part of the problem.  Now ginstall fails.
615         * tests/install/basic-1: Temporarily, don't redirect ginstall's
616         stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
617         is failing.
619         * tests/install/basic-1: When setting up an unreadable "." in an
620         inaccessible parent, make the parent inaccessible *after* making "."
621         unreadable.  Otherwise, running "chmod a-r ." in an already-
622         inaccessible parent would fail on NFS with "Stale NFS file handle".
623         Reported by Bob Proulx.
625         * Makefile.maint (po-check): Exclude c99-to-c89.diff.
627 2007-03-09  Jim Meyering  <jim@meyering.net>
629         Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
630         * tests/chgrp/basic: Don't let failure by chgrp to set the
631         group of a symlink make this test fail.  Do give a diagnostic.
632         In the chgrp-no-change-ctime test, add darwin7.9.0 as another
633         known-failing system.
634         When failing on some other system, print $host_triplet, too.
635         Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
636         Reported by Peter Fales.
638 2007-03-08  Jim Meyering  <jim@meyering.net>
640         * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
642 2007-03-08  Paul Eggert  <eggert@cs.ucla.edu>
644         rm without -f: give a better diagnostic when euidaccess fails.
645         * src/remove.c (write_protected_non_symlink): Return int, not bool,
646         so that we can indicate failure too (as a postive error number).
647         (prompt): If write_protected_non_symlink fails, report that error
648         number and fail rather than charging ahead and removing the dubious
649         entry.  Redo the logic of printing a diagnostic so that we need to
650         invoke quote (full_filename (...)) only once.  More details at:
651         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
653 2007-03-08  Jim Meyering  <jim@meyering.net>
655         Generalize a few more cvs-isms.
656         * bootstrap (checkout_only_file): Rename from CVS_only_file.
657         Change comments and diagnostics not to say "CVS".
659         * bootstrap: Run libtool, if necessary.
661         Make bootstrap a little more general.
662         * bootstrap (build_aux): Factor out/use this definition.
663         Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
664         (insert_sorted_if_absent): Move function definition "up", to
665         precede new first use.
666         If $build_aux/ doesn't exist initially, create it, and
667         mark it as ignored.
669 2007-03-03  Andrew Church  <achurch@achurch.org>  (tiny change)
670             Paul Eggert  <eggert@cs.ucla.edu>
672         Fix a bug: cp -x would fail to set mount point permissions.
673         * NEWS: mention cp -x bug fix
674         * src/copy.c (copy_internal): Don't return immediately after
675         copying a mount point that we do not intend to recurse under.
676         Based on a patch by Andrew Church.
678 2007-03-03  Jim Meyering  <jim@meyering.net>
680         pwd-unreadable-parent: Skip test on ia64/Linux, too.
681         * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
682         Reported by Bob Proulx.
684 2007-03-02  Jim Meyering  <jim@meyering.net>
686         pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
687         * tests/misc/pwd-unreadable-parent: Rather than trying to decide
688         whether this test has a chance of succeeding, run it only when
689         $(host_os) is linux-gnu.  It was failing on powerpc-apple-darwin8.8.0
690         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
692         * tests/misc/pwd-long: Also allow "+" in $PWD.
694         Remove another coreutils-ism.  Formatting cleanup.
695         * Makefile.maint (my-distcheck): Update an outdated comment.
696         (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
697         (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
699 2007-03-01  Jim Meyering  <jim@meyering.net>
701         * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
702         (my-distcheck): Use the new variable, instead of too-long literal.
704         Make "make syntax-check" rules less coreutils-specific.
705         * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
706         (sc_cast_of_alloca_return_value): Likewise.
707         (sc_root_tests): Do nothing if there is no check-root target
708         in tests/Makefile.am.
710         Run the writable-files check only for release-building targets.
711         * Makefile.maint (local-checks-available): Remove writable-files.
712         (alpha beta major): Put it here, instead.
714         "make syntax-check" now runs only Makefile.cfg-selected tests
715         * Makefile.maint (syntax-check-rules): Hoist this definition so that
716         it precedes the indirect use in the definition of $(local-check).
717         (local-check): Use :=, not just "=".
718         (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
720 2007-02-28  Bruno Haible  <bruno@clisp.org>
722         * bootstrap.conf (gnulib_modules): Replace xreadlink with
723         xreadlink-with-size. Add xreadlink.
724         * src/copy.c (copy_internal): Update.
725         * src/ls.c (is_directory): Update.
726         * src/stat.c (print_stat): Update.
727         * src/readlink.c (main): Use the one-argument xreadlink function.
729 2007-02-28  Paul Eggert  <eggert@cs.ucla.edu>
731         * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
732         Problem reported by Philip Rowlands in
733         <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
735 2007-02-28  Jim Meyering  <jim@meyering.net>
737         * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
738         list of exceptions, for the "make distcheck" sc_file_system rule.
740         * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
742 2007-02-27  Paul Eggert  <eggert@cs.ucla.edu>
744         Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
745         * NEWS: With -P, the default block size and output format is not
746         affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
747         * src/df.c (main): Implement this.
749 2007-02-27  Jim Meyering  <jim@meyering.net>
751         Add a test for the above.
752         * tests/misc/df-P: New file.
753         * tests/misc/Makefile.am (TESTS): Add df-P.
755 2007-02-25  Jim Meyering  <jim@meyering.net>
757         * Makefile.maint (announcement): Adjust so that it works with
758         announce-gen's --gnulib-snapshot-time-stamp option.
759         Indent one of the command lines using TAB, not 8 spaces.
761         Post-release version change.
762         * NEWS: Add a line for 6.8+.
763         * configure.ac (AC_INIT): Set new version string.
765 2007-02-24  Jim Meyering  <jim@meyering.net>
767         Version 6.8.
768         * NEWS: Record release date and new version number.
769         * configure.ac (AC_INIT): New version number.
771         Don't skip this test on new-enough Linux/GNU systems.
772         * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
773         rather than for __GETCWD_PREFIX in config.h (the latter is no
774         longer defined, ever, due to gnulib changes).
775         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
777         Remove the "gnits" option; it prohibits my using "+" as a version
778         string suffix, and all it does (beyond the default "gnu" option)
779         is to _require_ the THANKS file.
780         * configure.ac (AM_INIT_AUTOMAKE): Remove it.
782         Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
783         * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
784         * tests/chown/Makefile.am, tests/cp/Makefile.am:
785         * tests/du/Makefile.am, tests/expr/Makefile.am:
786         * tests/factor/Makefile.am, tests/general/Makefile.am:
787         * tests/install/Makefile.am, tests/ln/Makefile.am:
788         * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
789         * tests/mv/Makefile.am, tests/readlink/Makefile.am:
790         * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
791         * tests/seq/Makefile.am, tests/stty/Makefile.am:
792         * tests/tee/Makefile.am, tests/touch/Makefile.am:
794         * README: Document the OSF/1 4.0d build failure and work-around.
795         Reported by Bruno Haible.
797         * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
798         Nicer connotations.
799         * configure.ac: Use 6.7+, not 6.7-dirty.
801 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
803         * NEWS: sort no longer compresses temporaries by default.
804         * bootstrap.conf: Remove findprog.
805         * doc/coreutils.texi (sort invocation): The default is to not
806         compress.  Don't treat "" specially.
807         * src/sort.c: Don't include findprog.h.
808         (create_temp): Compress only if the user specified --compress-program.
809         * tests/misc/sort-compress: Adjusts tests to match new behavior.
811 2007-02-24  Jim Meyering  <jim@meyering.net>
813         Avoid a shell syntax error, when building with an inadequate Perl.
814         * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
815         it can expand to "/.../missing perl".
817         * man/Makefile.am (.x.1): Warn when unable to update a man page.
818         Suggestion from Bruno Haible.
820 2007-02-23  Bruno Haible  <bruno@clisp.org>
822         Handle better the combination of old Perl and a pre-c99 compiler.
823         * man/Makefile.am (.x.1): If the autoconf test has determined that
824         perl is missing or not a sufficient version, do nothing.
826         * tests/readlink/can-e: Put the closing double-quote at the end of a
827         backquoted word, not in the middle. Works around a bug in sh on
828         OSF/1 4.0d.
829         * tests/readlink/can-f: Likewise.
830         * tests/readlink/can-m: Likewise.
832         * tests/du/slink: Skip the test if executing on an nfsv3 file system.
833         This avoids a test failure at least on OSF/1 4.0d.
835 2007-02-23  Jim Meyering  <jim@meyering.net>
837         * src/date.c (usage): Split a diagnostic that had grown to be
838         longer than the C89 maximum of 509 bytes.
840 2007-02-23  Ed Santiago <ed@edsantiago.com>
842         * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
843         for a separator.  Include sample RFC 2822 and 3339 output.
845 2007-02-23  Jim Meyering  <jim@meyering.net>
847         With -Dlint, make shuf free all heap-allocated storage.
848         * src/shuf.c (main): Move declaration of input_lines to
849         function scope, and initialize to NULL, so we can free it.
850         [lint]: Free all malloc'd memory.
851         * tests/misc/shuf: Also test shuf's -e and -i options.
853 2007-02-22  Jim Meyering  <jim@meyering.net>
855         Merge in a change from some other incarnation of this file (gzip?)
856         * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
858         Adjust preceding change not to perform an unaligned access.
859         * src/copy.c (copy_reg): Undo previous change.  Instead, make
860         it clearer that we're using a single-byte sentinel, and
861         [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
862         Reported by Andreas Schwab.
864         Placate valgrind, wrt ./cp --sparse=always
865         * src/copy.c (copy_reg): Place the sentinel by setting a
866         full word's worth of bits, not just a single byte's worth.
867         This avoids a harmless (but distracting) case of memory being
868         used-uninitialized.
870 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
872         Honor dd's noatime flag if possible, even if not supported on build fs
873         * doc/coreutils.texi (dd invocation): Warn that noatime might not be
874         reliable.
875         * src/dd.c (flags, usage): Look at O_NOATIME, not
876         HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
877         flag, so that dd attempts O_NOATIME even if the build file system
878         does not support it.  Problem reported by Jim Meyering today in
879         bug-coreutils.
880         * tests/dd/misc: Generate a warning, not a failure, if noatime
881         exists but fails.
883 2007-02-21  Jim Meyering  <jim@meyering.net>
885         * tests/misc/date: Remove vestigial use of Data::Dumper.
887 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
889         * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
890         about out-of-range initializer with Sun C 5.8.
892 2007-02-20  Jim Meyering  <jim@meyering.net>
894         * bootstrap (CVS_only_file): Use README-hacking.
896         Now that we use GIT, not cvs, rename README-cvs.
897         * README-hacking: Renamed from...
898         Update to reflect that we now use git.
900         * README-cvs: ...this.
902         * src/env.c (main): When invoked with no arguments (i.e. when printing
903         the environment), use a local variable to iterate through the global
904         "environ" array, rather than "environ" itself.  This is solely to
905         avoid changing the environment for an LD_PRELOAD-substituted "puts"
906         or "exit" function.  Tiny patch by Harvey Eneman.  See
907         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
908         * THANKS: Update.
910         * bootstrap: Move definitions of temporary directory names and the
911         new bt_regex "up" to precede all uses, so it's clearer what their
912         scope is.  Also, use [.], rather than \\., since the former works
913         even if eval'd.
915         * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
916         Based on the bison 2007-02-19 change by Joel E. Denny.
918 2007-02-19  Paul Eggert  <eggert@cs.ucla.edu>
920         * NEWS: sort now uses a --compress-program option rather than
921         an environment variable.
922         * doc/coreutils.texi (sort invocation): Document this.
923         * src/sort.c (usage): Likewise.
924         (COMPRESS_PROGRAM_OPTION): New const.
925         (long_options, create_temp, main): Support new option.
926         * tests/misc/sort-compress: Test it.
928 2007-02-19  Jim Meyering  <jim@meyering.net>
930         * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
932 2007-02-18  Jim Meyering  <jim@meyering.net>
934         * src/system.h: Don't include exit.h, now that it's subsumed
935         by the gnulib-generated stdlib.h.
937         * tests/rm/fail-eacces: Skip this test when running as root.
938         Reported by Matthew Woehlke.
940         * bootstrap: Use "._bootmp" as the temporary directory name,
941         not ".#bootmp".  The latter's "#" caused trouble with the new,
942         gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
944 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
946         * bootstrap.conf (gnulib_modules): Add c-strcase.  Remove strcase.
947         * src/dircolors.c: Include c-strcase.h.
948         (dc_parse_stream): Use c_strcasecmp rather than
949         strcasecmp to avoid unreliable results in locales like Turkish
950         where strcasecmp is incompatible with the C locale.
952 2007-02-13  Jim Meyering  <jim@meyering.net>
954         Also check for and print stderr output, in case a program fails.
955         * tests/misc/tty-eof: Occasionally (not reproducible), this
956         test would fail, with one or more programs exiting nonzero, e.g.,
957         tty-eof: sha224sum exited with status 1 (expected 0)
958         Now, maybe we'll get a clue, the next time that happens.
960 2007-02-12  Jim Meyering  <jim@meyering.net>
962         * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
964         * tests/misc/pwd-unreadable-parent: Skip the test if we're
965         definitely using the replacement.
966         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
968 2007-02-10  Jim Meyering  <jim@meyering.net>
970         Remove excess leading spaces that would make help2man misbehave.
971         * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
972         * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
973         * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
974         * src/date.c (usage): Use two spaces after each optional flag, not one.
975         Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
977         * Makefile.maint (longopt_re): Relax the regexp, making square
978         brackets optional, so it matches the newly reported violations, too.
980         * src/csplit.c (usage): Use two spaces (not one) to separate
981         each option string from its description, so help2man formats
982         the derived man page properly.  Reported by Thomas Huriaux in
983         <http://bugs.debian.org/410407>.
984         * src/df.c (usage): Likewise.
985         * src/du.c (usage): Likewise.
986         * src/install.c (usage): Likewise.
987         * src/ls.c (usage): Likewise.
989 2007-02-03  Jim Meyering  <jim@meyering.net>
991         Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
992         * NEWS: Mention the bug fix.
993         * tests/misc/pwd-unreadable-parent: New file.
994         * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
996 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
998         * NEWS: Document fix for cp --preserve=mode.
999         * src/copy.c (copy_internal): Omit the group- or other-writeable
1000         permissions when creating a directory, to avoid a race condition
1001         if the special mode bits aren't right just after the directory is
1002         created.
1003         * src/cp.c (make_dir_parents_private): Likewise.
1004         * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
1005         race fix in copy.c.
1007         * NEWS: Document fix for cp --parents.
1008         * src/cp.c (make_dir_parents_private): Report the error sooner with
1009         "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
1010         creating the directory, DEST/DIR.
1011         * tests/cp/cp-parents: Test for the non-race-condition bug fixed
1012         by the above change.
1014 2007-02-02  Jim Meyering  <jim@meyering.net>
1016         * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
1018         * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
1019         consistent, so this can be applied with patch -p0.
1020         Reported by Matthew Woehlke.
1022         Arrange for "make check-root" to run the new root-only test.
1023         * tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
1024         (all_t): Add t9.
1026         * Makefile.maint (patch-check): Use patch with its -p2 option,
1027         since that makes this check slightly more strict.
1029         Use a directory on a loopback device mounted with -o context=...
1030         * tests/cp/cp-a-selinux: Since this test now runs mount and umount,
1031         it is a root-only one.
1033 2007-01-29  Jim Meyering  <jim@meyering.net>
1035         Plug a leak in ls.
1036         * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
1037         determine dev/inode or upon detecting a symlink loop.
1039         * src/ls.c: Rename three global variables.
1040         (cwd_file): Rename from 'files'.
1041         (cwd_n_alloc): Rename from 'nfiles'.
1042         (cwd_n_used): Rename from 'files_index'.
1044         Shave 8 bytes off the size of "struct fileinfo".
1045         * src/ls.c (fileinfo): Put all members of type "bool" together.
1047 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1049         Modify "ls" to sort its data faster, using the new gnulib mpsort
1050         module rather than qsort.  This is particularly a win in
1051         environments where strcoll is slow, since mpsort typically calls
1052         strcoll less often than qsort does.
1053         * bootstrap.conf (gnulib_modules): Add mpsort.
1054         * src/ls.c: Include mpsort.h.
1055         (sorted_file, sorted_file_alloc): New vars, for a new vector of
1056         pointers to the file info, for speed.
1057         (clear_files, extract_dirs_from_files, sort_files, print_current_files):
1058         (print_many_per_line, print_horizontal, print_with_commas):
1059         (calculate_columns): Set and use new vector.
1060         (initialize_ordering_vector): New function.
1062 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1064         Adjust to today's change to gnulib, which added a module for
1065         string.h to replace the little include files like strcase.h.
1066         * src/dircolors.c: Don't include strcase.h.
1067         * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
1069 2007-01-26  Jim Meyering  <jim@meyering.net>
1071         * src/dd.c (advance_input_after_read_error): Change diagnostic to
1072         say "invalid file offset" rather than "screwy file offset".
1074         * .x-sc_cast_of_argument_to_free: Remove this file.
1075         * Makefile.am (EXTRA_DIST): Likewise.
1077 2007-01-25  Dan Hipschman  <dsh@linux.ucla.edu>
1079         * src/sort.c (create_temp): Remove superfluous access-X_OK
1080         check.  find_in_path does this for us.
1082 2007-01-24  Jim Meyering  <jim@meyering.net>
1084         Remove usually-skipped test.
1085         * tests/cp/open-perm-race: Remove this file.  It is subsumed
1086         by parent-perm-race.
1087         * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
1088         * tests/sort/Makefile.am: Regenerate.
1090         Pass "make distcheck" again.
1091         * src/sort.c (usage): Split a diagnostic that had grown to be
1092         longer than the C89 maximum of 509 bytes.
1093         * .x-sc_cast_of_argument_to_free: New file.  Allow a cast in sort.c.
1094         FIXME: this is just temporary, while we wait to remove the offending
1095         access-calling code.
1096         * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
1097         * Makefile.maint (sc_cast_of_argument_to_free): Use the
1098         canonical, $$($(CVS_LIST_EXCEPT)).
1099         * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
1101 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1103         * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
1104         like it will be approved.  Also add --check=quiet, --check=silent
1105         as long aliases, and --check=diagnose-first as an alias for -c.
1106         * doc/coreutils.texi (sort invocation): Document this.
1107         Also, mention that sort -c can take at most one file.
1108         * src/sort.c: Implement this.
1109         Include argmatch.h.
1110         (usage): Document the change.
1111         (CHECK_OPTION): New constant.
1112         (long_options): --check now takes an optional argument, and is now
1113         treated differently from 'c'.
1114         (check_args, check_types): New constant arrays.
1115         (check): New arg CHECKONLY, which suppresses diagnostic if -C.
1116         (main): Parse the new options.
1117         * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
1118         New tests for -C.
1120 2007-01-24  Jim Meyering  <jim@meyering.net>
1122         Fix a typo.
1123         * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
1124         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
1126         Don't depend on "which".
1127         * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
1128         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
1130 2007-01-24  Dan Hipschman  <dsh@linux.ucla.edu>
1132         Test sort compression.
1133         * tests/misc/Makefile.am: Add the test.
1134         * tests/misc/sort-compress: New file containing the tests.
1136 2007-01-24  Jim Meyering  <jim@meyering.net>
1138         * NEWS: sort temp file compression: tweak wording.
1139         * src/sort.c (struct sortfile) [name]: Declare member to be const.
1141 2007-01-21  Jim Meyering  <jim@meyering.net>
1143         * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
1144         In pipe_fork callers, use these named constants, not "2" and "8".
1145         (proctab, nprocs): Declare to be "static".
1146         (pipe_fork) [lint]: Initialize local, pid,
1147         to avoid unwarranted may-be-used-uninitialized warning.
1148         (create_temp): Use the active voice.  Describe parameters, too.
1150 2007-01-21  James Youngman  <jay@gnu.org>
1152         Centralize all the uses of sigprocmask().  Don't restore an invalid
1153         saved mask.
1154         * src/sort.c (enter_cs, leave_cs): New functions for protecting
1155         code sequences against signal delivery.
1156         * (exit_cleanup): Use enter_cs and leave_cs instead of
1157         calling sigprocmask directly.
1158         (create_temp_file, pipe_fork, zaptemp): Likewise
1160 2007-01-21  Dan Hipschman  <dsh@linux.ucla.edu>
1162         Add compression of temp files to sort.
1163         * NEWS: Mention this.
1164         * bootstrap.conf: Import findprog.
1165         * configure.ac: Add AC_FUNC_FORK.
1166         * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
1167         variable.
1168         * src/sort.c (compress_program): New global, holds the name of the
1169         external compression program.
1170         (struct sortfile): New type used by mergepfs and friends instead
1171         of filenames to hold PIDs of compressor processes.
1172         (proctab): New global, holds compressor PIDs on which to wait.
1173         (enum procstate, struct procnode): New types used by proctab.
1174         (proctab_hasher, proctab_comparator): New functions for proctab.
1175         (nprocs): New global, number of forked but unreaped children.
1176         (reap, reap_some): New function, wait for/cleanup forked processes.
1177         (register_proc, update_proc, wait_proc): New functions for adding,
1178         modifying and removing proctab entries.
1179         (create_temp_file): Change parameter type to pointer to file
1180         descriptor, and return type to pointer to struct tempnode.
1181         (dup2_or_die): New function used in create_temp and open_temp.
1182         (pipe_fork): New function, creates a pipe and child process.
1183         (create_temp): Creates a temp file and possibly a compression
1184         program to which we filter output.
1185         (open_temp): Opens a compressed temp file and creates a
1186         decompression process through which to filter the input.
1187         (mergefps): Change FILES parameter type to struct sortfile array
1188         and update access accordingly.  Use open_temp and reap_some.
1189         (avoid_trashing_input, merge): Change FILES parameter like
1190         mergefps and call create_temp instead of create_temp_file.
1191         (sort): Call create_temp instead of create_temp_file.
1192         Use reap_some.
1193         (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
1195         The idea of compressing sorts temporary files was first
1196         suggested/implemented by Jay Soffian in 1998, and again
1197         by Charles Randall in 2001.
1199 2007-01-20  Jim Meyering  <jim@meyering.net>
1201         * tests/misc/pwd-long: Work properly even when run from the
1202         wrong one of two or more bind-mounted sibling directories.
1203         Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
1205 2007-01-20  Paul Eggert  <eggert@cs.ucla.edu>
1207         Standardize on list of signals when an app catches signals.
1208         * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
1209         SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
1210         * src/ls.c (main): Likewise (except SIGPIPE was already caught).
1211         Note that ls.c is special, as it also catches SIGTSTP.
1212         * src/sort.c (main): Likewise.  Also catch SIGQUIT.  More details in
1213         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
1215 2007-01-19  Dan Hipschman  <dsh@linux.ucla.edu>
1216         and Paul Eggert  <eggert@cs.ucla.edu>
1218         * src/sort.c (cleanup): Clear temphead at the end.
1219         (exit_cleanup): New function.
1220         (main): Don't invoke atexit until we're ready.
1221         Invoke it with exit_cleanup, not with cleanup and close_stdout,
1222         to avoid a race condition with cleanup and signal handling.  More
1223         details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
1225 2007-01-18  Jim Meyering  <jim@meyering.net>
1227         * src/c99-to-c89.diff: Adjust remove.c offsets.
1229 2007-01-17  Jim Meyering  <jim@meyering.net>
1231         Make "rm --interactive=never ..." never prompt.
1232         * NEWS: Mention this.
1233         * src/remove.h (enum rm_interactive): New ternary type.
1234         (struct rm_options) [interactive]: Use it, here -- rather than bool.
1235         * src/remove.c (prompt): Reflect type change.
1236         * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
1237         * src/rm.c (main): Add a FIXME comment for '-d' option.
1238         Adapt to type change of rm_options.interactive.
1240         * tests/rm/i-never: New file.  Test for the above fix.
1241         * tests/rm/Makefile.am (TESTS): Add i-never.
1243 2007-01-15  Jim Meyering  <jim@meyering.net>
1245         * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
1246         emit foo.h, for each foo_.h.  This yields one false-positive, fts.h,
1247         but that's ok, since fts_.h will eventually be renamed.
1249         * src/remove.c (remove_dir): Don't use errno in diagnostic.
1250         Root-only test failure reported by Alex van Hout and Jon Grosshart in
1251         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
1253         * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
1254         s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
1256 2007-01-14  Bruno Haible  <bruno@clisp.org>
1258         Enable use of gnulib's new fchdir module.
1259         * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
1260         since we use canonicalize.
1261         (gnulib_modules): Add fchdir.
1262         * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
1264 2007-01-13  Jim Meyering  <jim@meyering.net>
1266         * tests/cp/open-perm-race: Remove gdb-based test.
1267         It would run only when compiled with -g, and besides is now
1268         subsumed by file-perm-race.
1269         * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
1271         * Transform all Makefile.am files so that when running "make check",
1272         CU_TEST_NAME is set to the name of the test.  This is so that when I
1273         run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
1274         on the entire package it is more convenient to map a leak or error
1275         found in a valgrind log file back to the offending test.
1276         Use this command:
1277         (echo tests/Makefile.am.in; find tests -name Makefile.am) \
1278          |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
1279            -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
1281 2007-01-11  Jim Meyering  <jim@meyering.net>
1283         Avoid a leak in expr's implementation of the ":" (match) operator.
1284         * src/expr.c (docolon): Free the regexp buffer using regfree, rather
1285         than doing it manually, being careful to set fastmap to NULL first.
1286         Free any re_regs.start and .end members, if necessary.
1288         * tests/misc/test-diag: Work also when libc's error function
1289         reports the entire program name ("../../src/test"), rather than
1290         just the final component.
1292 2007-01-10  Jim Meyering  <jim@meyering.net>
1294         Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
1295         * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
1296         (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
1297         directory.  Non-directory entries lack fts_statp data when using
1298         the FTS_NOSTAT option.
1300 2007-01-07  Jim Meyering  <jim@meyering.net>
1302         * tests/sample-test: Update copyright date to 2007.
1303         * Makefile.maint (copyright-check): Also check the copyright date
1304         in tests/sample-test.
1306 2007-01-06  Jim Meyering  <jim@meyering.net>
1308         * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
1309         based on examples from G.P. Halkes in
1310         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
1312 2007-01-06  G.P. Halkes  <buscom@ghalkes.nl>
1314         * src/fmt.c (copy_rest): Correct prefix handling.
1315         Don't elide a line with the prefix followed by only white space.
1316         (get_line): Move EOF-check to loop-termination condition.
1317         * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
1318         (pfx-2): Remove test; its premise was contrary to the documentation.
1320 2007-01-05  Jim Meyering  <jim@meyering.net>
1322         Avoid a used-uninitialized bug for invalid input, i.e., when the size
1323         of the input, not counting newlines, is 1 % 4.
1324         * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
1325         It may be smaller when flushing.
1327 2007-01-05  Mike Frysinger  <vapier@gentoo.org>
1329         * src/dircolors.hin: Add a TERM directive for cons25.
1331 2007-01-04  Jim Meyering  <jim@meyering.net>
1333         * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
1334         case you don't have convenient access to glibc info documentation.
1336         Use the release year, not the current year.
1337         * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
1338         * src/Makefile.am (RELEASE_YEAR): Define it.
1339         (.sh): Use it.
1340         Thanks to a prod from Eric Blake.
1342         Ensure that "group --version" always prints the current year.
1343         * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
1344         * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
1345         Suggestion from Eric Blake.
1347         When decoding, always allow newlines in input, with almost no
1348         performance impact.
1349         * src/base64.c (do_decode): Initialize decode context.
1350         Call base64_decode one more time, after all input is processed.
1351         (usage): When decoding, newlines are always accepted.
1353         * tests/misc/base64: Add a bunch of tests, for the above.
1354         * gl/lib/base64.c: Include <string.h>.
1355         (base64_decode_ctx_init, get_4, decode_4): New functions.
1356         (base64_decode): Efficiently handle interspersed newlines.
1357         (base64_decode_alloc): Update signature.
1358         * gl/lib/base64.h (struct base64_decode_context): Define.
1359         (base64_decode_ctx_init): Add prototype.
1360         (base64_decode, base64_decode_alloc): Update prototypes.
1362         * gl/lib/base64.c: Copied from gnulib.
1363         * gl/lib/base64.h: Likewise.
1365 2007-01-03  Jim Meyering  <jim@meyering.net>
1367         * THANKS: Add Evan Hunt.
1369 2007-01-03  Bruno Haible  <bruno@clisp.org>
1371         Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
1372         * tests/chown/deref: Apply lang-default.
1373         * tests/misc/split-a: Likewise.
1374         * tests/mv/reply-no: Likewise.
1376         * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
1377         Needed on MacOS X.
1379 2007-01-02  Paul Eggert  <eggert@cs.ucla.edu>
1381         Now, "ls -FRL" always follows symbolic links on Linux.
1382         * NEWS: Mention this bug fix.
1383         * src/ls.c (gobble_file): Fix bug reported by
1384         Nobuyuki Tsuchimura in
1385         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
1386         where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
1387         * tests/ls/follow-slink: Add a test for this case.
1389 2007-01-01  Jim Meyering  <jim@meyering.net>
1391         * tests/rm/fail-eperm: Revert last change.  The PATH=... setting
1392         is not honored at least on HP-UX 11.23 systems.
1393         Instead, simply transform the actual output diagnostic.
1394         Test failure reported by Bob Proulx.
1396 2006-12-30  Jim Meyering  <jim@meyering.net>
1398         * bootstrap (gnulib_extra_files): Remove announce-gen.
1399         * bootstrap.conf (gnulib_modules): Add it here instead, now that
1400         it's a module.
1402         * tests/misc/base64: Factor a long, repetitive string.
1404         * src/c99-to-c89.diff: Adjust remove.c offsets.
1406         Clean up after the change of 2006-12-28.
1407         * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
1408         now that this function never modifies the pointer.  Adjust comments
1409         and code accordingly.
1410         (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
1411         now that AD_pop_and_chdir no longer does that.
1413         * tests/rm/fail-eperm: Avoid spurious differences (the error function
1414         from latest glibc no longer prints the full program_name): so don't
1415         invoke rm via ../../src/rm.  Instead, invoke it via "PATH=../../src rm".
1417         * tests/mv/acl (skip): Skip this test also if the destination
1418         directory, which is on a different file system, lacks ACL support.
1420         * src/copy.c (copy_reg): Rewrite a comment that was rendered
1421         inaccurate by the 2006-10-18 change.
1423 2006-12-28  Jim Meyering  <jim@meyering.net>
1425         When moving "up" the hierarchy, be careful to remove a just-emptied
1426         directory before opening ".", to avoid trouble with file system
1427         implementations that cache readdir results at opendir-time.
1428         * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
1429         Don't update **DIRP.  Don't call fdopendir here.
1430         (remove_dir): Call fdopendir here instead.
1431         Report and patch from Mikulas Patocka:
1432         <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
1434 2006-12-27  Jim Meyering  <jim@meyering.net>
1436         * src/tail.c (usage): Mention +N for --bytes and --lines.
1437         Suggestion from Evan Hunt.
1439 2006-12-26  Jim Meyering  <jim@meyering.net>
1441         * configure.ac: Require autoconf-2.61 and automake-1.10.
1442         Without the former (even with autoconf-2.60), "make distcheck"
1443         would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
1444         due to an inttypes.h generated with CFLAGS including -pedantic.
1445         With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
1447         * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
1448         tag, using the release version number as the message.
1449         (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
1451 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1453         * NEWS: dd bs= operands now silently override later ibs= and obs=,
1454         as POSIX requires.
1455         * src/dd.c (scanargs): Implement it.
1456         * tests/dd/misc (outbytes): Test it.
1457         * doc/coreutils.texi (dd invocation): Specify that bs=N
1458         overrides later ibs and obs, undoing part of the
1459         previous change.  (The behavior was wrong.)
1461 2006-12-20  Jim Meyering  <jim@meyering.net>
1463         "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
1464         * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
1465         Don't let a non-directory get by with errno == EPERM, either.
1466         Check the file type directly (using cached stat value), rather
1467         than trying to guess it from errno values.
1468         Karl Berry reported that a cross-partition "mv /etc/issue ~"
1469         failed with the um,... suboptimal diagnostic,
1470         "mv: cannot remove `/etc/issue': Not a directory".
1471         * tests/rm/Makefile.am (TESTS): Add fail-eacces.
1472         * tests/rm/fail-eacces: New file.
1473         * NEWS: Mention that both mv and rm are affected.
1475         "cut -f 2- A B" no longer triggers a double-free bug
1476         * src/cut.c (cut_fields): Set file-scoped global to NULL after
1477         freeing it.  This avoids a double-free (and core dump on some systems)
1478         for this usage: "echo 1>a; echo 2>b; cut -f2- a b".  Reported by
1479         James Hunt in <http://bugzilla.redhat.com/220312>.
1480         * NEWS: List this bug fix.
1481         * THANKS: Mention him.
1482         * tests/misc/cut: New file.
1483         * tests/misc/Makefile.am (TESTS): Add cut.
1485 2006-12-15  Jim Meyering  <jim@meyering.net>
1487         * tests/cp/open-perm-race: Correct the gdb-existence check.
1488         Don't run either subsequent gdb command in a sub-shell.
1489         Reported by Thomas Schwinge.
1490         * THANKS: bring up to date.
1492 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1494         Make sure cp -p isn't too generous with file permissions.
1495         * tests/cp/Makefile.am (TESTS): Add file-perm-race.
1496         * tests/cp/file-perm-race: New file.
1498         Ensure cp -pR --parents isn't too generous with parent permissions.
1499         * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
1500         * tests/cp/parent-perm-race: New file.
1502 2006-12-14  Jim Meyering  <jim@meyering.net>
1504         * tests/chgrp/default-no-deref: Don't assume that files are created
1505         with the primary group by default.  That's not true in a directory
1506         with the set-GID bit set.
1508         Don't hang when there's no input tty.
1509         * tests/cp/open-perm-race: Skip this test if there is no
1510         controlling input `terminal'.
1512         Test for a hard-to-detect race fix, using gdb.
1513         * tests/cp/open-perm-race: New file, to test for the
1514         cp --preserve=ownership fix of 2006-12-06.
1516         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
1517         (TESTS): Add open-perm-race.
1519         * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
1520         * src/chown.c (main): Likewise.
1521         * src/chown-core.c (change_file_owner): Add to a comment.
1522         * tests/chown/preserve-root: Add tests.
1524         * NEWS: --preserve-root now works with chgrp, chmod, and chown.
1525         * src/chmod.c (process_file): Do honor the --preserve-root option.
1526         * src/chown-core.c (change_file_owner): Likewise, but here, also
1527         handle the case in which a traversal would go "through" a symlink
1528         to root.  Reported by Matthew M. Boedicker
1529         * tests/chown/preserve-root: Test for the above.
1530         * tests/chown/Makefile.am (TESTS): Add preserve-root.
1532         * NEWS: Mention the chmod fix induced by the 2006-12-11 change
1533         to gnulib's m4/openat.m4.
1535 2006-12-13  Andreas Schwab  <schwab@suse.de>
1537         Don't fail if mv/acl test succeeds.
1538         * tests/mv/acl (skip): Check for acl support in the file system.
1539         * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
1540         (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
1542 2006-12-13  Paul Eggert  <eggert@cs.ucla.edu>
1544         Remove some arbitrary restrictions on size fields, so that
1545         commands like "sort -k 18446744073709551616" no longer fail merely
1546         because 18446744073709551616 doesn't fit in uintmax_t.  The trick
1547         is that these fields can all be treated as effectively infinity;
1548         their exact values don't matter, since no internal buffer can be
1549         that long.
1550         * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
1551         ULONG_MAX if the code assumes this.  Silently truncate too-large
1552         values to SIZE_MAX, as the remaining code will do the right thing
1553         in this case.
1554         * src/sort.c (parse_field_count): Likewise.
1555         * src/uniq.c (size_opt, main): Likewise.
1556         * tests/join/Test.pm (bigfield): New test.
1557         * tests/sort/Test.pm (bigfield): New test.
1558         * tests/uniq/Test.pm (121): New test.
1560 2006-12-13  Jim Meyering  <jim@meyering.net>
1562         * tests/chgrp/default-no-deref: New test.
1563         * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
1565 2006-12-12  Jim Meyering  <jim@meyering.net>
1567         * src/system.h (SETVBUF): Remove definition, now that the
1568         autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
1569         * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
1570         * src/od.c (open_next_file): Likewise.
1572 2006-12-09  Jim Meyering  <jim@meyering.net>
1574         * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
1575         "source".  I.e. "GNU coreutils 6.7".
1577         * NEWS: With the change from "-pre" to "-dirty" suffix, also change
1578         from NEXT_VER-pre to CUR_VER-dirty.  So, this is 6.7-dirty.
1579         * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
1581         * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
1582         whenever uniq is expected to fail.  This should catch the other case
1583         [test #112] in which uniq emits "cat: write error: Broken pipe" on
1584         some systems.
1586 2006-12-08  Jim Meyering  <jim@meyering.net>
1588         Include bootstrap tool version info in the announcement form.
1589         * Makefile.maint (gnulib_snapshot_date): Define.
1590         (announcement): Use two new announce-gen options,
1591         --bootstrap-tools and --gnulib-snapshot-date.
1592         * Makefile.cfg (gnulib_dir): Set.
1594         Post-release version change.
1595         * NEWS: Add a line for 6.8-dirty.
1596         * configure.ac (AC_INIT): Set new version string.
1598 2006-12-07  Jim Meyering  jim@meyering.net
1600         Version 6.7.
1601         * NEWS: Record release date.  Remove '-pre' suffix.
1602         * configure.ac (AC_INIT): Remove version string suffix.
1604 2006-12-07  Jim Meyering  <jim@meyering.net>
1606         Make the output of "make check" more reproducible.
1607         * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
1608         evoke diagnostics like this when COLUMNS=0 in the environment:
1609         ls: ignoring invalid width in environment variable COLUMNS: 0
1610         * tests/touch/no-rights: Likewise.
1611         * tests/help-version: Likewise.
1612         * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
1613         118, since it emits "cat: write error: Broken pipe" on some systems.
1615 2006-12-06  Paul Eggert  <eggert@cs.ucla.edu>
1617         * NEWS: Document the cp -p fix for special bits.
1618         * src/copy.c (set_owner): Now returns a three-way result, so
1619         that the caller can clear the special bits.  All callers changed.
1620         (copy_reg): Don't set the special bits if chown failed.
1621         (copy_internal): Likewise.
1622         * tests/cp/special-bits: Test this fix.
1624 2006-12-06  Paul Eggert  <eggert@cs.ucla.edu>
1626         * NEWS: Document the cp --preserve=ownership fix.
1627         * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
1628         * src/copy.c (fchmod_or_lchmod): New function.
1629         (copy_reg): New arg OMITTED_PERMISSIONS.  All uses changed.
1630         Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
1631         When creating a file, use O_EXCL, so we're more likely to detect
1632         funny business by other processes.  At the end, if permissions
1633         were omitted, chmod them back in.
1634         (copy_internal): If the ownership might change, omit some permissions
1635         at first, then restore them after chowning the file.
1636         * src/cp.c (make_dir_parents_private): Likewise.
1637         * src/copy.c (cached_umask): New function.
1638         * src/copy.h (cached_umask): New decl.
1640 2006-12-06  Jim Meyering  <jim@meyering.net>
1642         Make the output of "make check" more reproducible.
1643         * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
1645 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1647         * src/install.c (install_file_in_file): Preserve time stamps
1648         before changing owner or file mode bits, for consistency with
1649         other coreutils programs.
1651 2006-12-03  Jim Meyering  <jim@meyering.net>
1653         * tests/misc/date-sec: Output a fixed string.
1655         * NEWS: du --one-file-system (-x) would skip subdirectories of any
1656         directory listed as second or subsequent command line argument.
1657         * tests/du/one-file-system: New file.  Test for today's fts.c fix.
1658         * tests/du/Makefile.am (TESTS): Add one-file-system.
1659         Reported by Mike Frysinger.
1661 2006-12-02  Jim Meyering  <jim@meyering.net>
1663         * tests/du/basic: Generate 4KB file simply using printf, rather than
1664         seq+head.  This avoids a spurious "Broken pipe" diagnostic from seq.
1666 2006-11-28  Jim Meyering  <jim@meyering.net>
1668         * tests/mv/no-target-dir: Detect a buggy rename syscall.  If found,
1669         skip this test.  This happens at least on ia64 linux-2.4.19 w/ext3.
1670         Reported by Matthew Woehlke.
1672         * tests/mv/dir2dir: Also accept EBUSY.
1673         Reported by Matthew Woehlke.
1675 2006-11-27  Jim Meyering  <jim@meyering.net>
1677         * Makefile.maint (patch-check): Rewrite to diagnose failure.
1678         * src/c99-to-c89.diff: Adjust shred.c offsets.
1680 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1682         Improve the check for departures from C89, and fix the departures
1683         I found.
1684         * Makefile.maint (my-distcheck): Also check for C89 compatibility
1685         as best we can with GCC.
1686         * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
1687         declaration; C89 doesn't allow this.
1688         * src/dcgen: Don't generate string literals longer than
1689         what C89 requires support for.
1690         * src/cut.c (usage): Don't use string literals longer than
1691         what C89 requires support for.
1692         * src/date.c (usage): Likewise.
1693         * src/dd.c (usage): Likewise.
1694         * src/du.c (usage): Likewise.
1695         * src/ls.c (usage): Likewise.
1696         * src/od.c (usage): Likewise.
1697         * src/readlink.c (usage): Likewise.
1698         * src/seq.c (usage): Likewise.
1699         * src/shred.c (usage): Likewise.
1701 2006-11-26  Mike Frysinger  <vapier@gentoo.org>
1703         Recognize new archive, audio and image formats.
1704         Give audio files a separate color.
1705         * src/dircolors.hin: Add comments for common .sh and .csh scripts.
1706         Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
1707         suffixes.  Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
1708         .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
1709         Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes.  Change
1710         audio color to 00;36 to differentiate from image/video color.
1712 2006-11-26  Jim Meyering  <jim@meyering.net>
1714         * Makefile.maint (patch-check): Compile patched sources with
1715         CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
1716         no violations remain.
1718         * src/c99-to-c89.diff: Remove 3 bogus hunks.
1720         * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
1721         Update callers.
1723         * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
1725         * src/rm.c (main): Remove unnecessary (assuming C99) braces.
1727 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1729         Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
1730         while trying to retain the readability of C99 as much as possible.
1731         * src/remove.c (rm_1): Remove decl of local, fd_cwd.
1732         Replace each of two uses with literal AT_FDCWD.
1733         (cache_stat_init): Return its argument, for convenience.
1734         Update the caller in remove_dir.
1735         (AD_pop_and_chdir): Return prev_dir rather than storing through
1736         a pointer argument.  All uses changed.
1737         (AD_ensure_initialized): New function.
1738         (AD_mark_helper): Use it, to avoid the need for declaration
1739         after statement.
1740         (rm): Move cycle_check_init call into callee...
1741         (rm_1): ...here.
1742         Use an else clause in place of a "continue" statement.
1743         (close_preserve_errno): Remove.
1744         (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
1746 2006-11-25  Jim Meyering  <jim@meyering.net>
1748         * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
1750 2006-11-24  Theodoros V. Kalamatianos  <thkala@softlab.ece.ntua.gr> (tiny change)
1752         * tests/du/inacc-dest: Skip this test when running as root.
1754 2006-11-23  Jim Meyering  <jim@meyering.net>
1756         * announce-gen: Remove file.  It's moving to gnulib.
1757         * bootstrap: Pull it from gnulib/build-aux instead.
1758         * Makefile.maint (announcement): Reflect move to ./build-aux.
1760         * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
1761         rather than a pipeline that would sometimes evoke a diagnostic
1762         like "seq: write error: Broken pipe".
1764         * tests/help-version: Suppress dd transfer rate output.
1766         * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
1768 2006-11-22  Jim Meyering  <jim@meyering.net>
1770         * announce-gen (print_news_deltas): Fix silly, but harmless typo:
1771         change "(:?..." to "(?:..." in regexps.
1773         Post-release version change.
1774         * NEWS: Add a line for 6.7-pre.
1775         * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
1777         Version 6.6.
1778         * NEWS: Record release date.  Remove "-pre" suffix.
1779         * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
1781         * announce-gen: Remove unused --release-archive-directory option.
1782         (print_news_deltas): Accept new adjective, "Noteworthy", in addition
1783         to the old "Major".
1784         Match version numbers in NEWS using tighter regular expressions.
1785         (main): Require the --gpg-key-id=ID option.
1786         * Makefile.maint (announcement): Don't use now-removed
1787         --release-archive-directory=... option.
1789         * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
1791 2006-11-21  Jim Meyering  <jim@meyering.net>
1793         * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
1794         skip the test rather than failing.  Reported by Michael Deutschmann.
1796         * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
1797         rather than just "exit N".
1799         Arrange for "make check-root" to run the new root-only test.
1800         * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
1801         (all_t): Add t7.
1803 2006-11-20  Jim Meyering  <jim@meyering.net>
1805         Add a root-only test for today's lib/idcache.c fix.
1806         * tests/ls/nameless-uid: New file.
1807         * tests/ls/Makefile.am (TESTS): Add nameless-uid.
1808         (TESTS_ENVIRONMENT): Add PERL to the list.
1810 2006-11-19  Jim Meyering  <jim@meyering.net>
1812         * tests/tail-2/assert-2: Mark as a very-expensive test, because I
1813         find the 7-second sleep annoyingly long.  Besides, this test is
1814         probably far too specific and timing sensitive ever to trigger again.
1815         * tests/tail-2/assert: Likewise.
1817         Post-release version change.
1818         * NEWS: Add a line for 6.6-pre.
1819         * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
1821         Version 6.5.
1822         * NEWS: Record release date.  Remove "-cvs" suffix.
1823         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1825 2006-11-18  Jim Meyering  <jim@meyering.net>
1827         "ln --backup f f" produces a misleading diagnostic:
1828         ln: creating hard link `f' => `f': No such file or directory
1829         * src/ln.c (do_link): Give a better diagnostic in this unusual case.
1830         (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
1831         * tests/ln/Makefile.am (TESTS): Add hard-backup.
1832         * tests/ln/hard-backup: New test for the above.
1833         * NEWS: Mention this fix.
1835 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1837         * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
1838         directly too.
1839         * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
1840         * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
1841         * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
1842         Omit unnecessary parenthesization of args.
1843         * src/od.c (EQUAL_BLOCKS): Likewise.
1844         * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
1846 2006-11-16  Jim Meyering  <jim@meyering.net>
1848         * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
1849         automake we're skipping this test), and give a diagnostic to tell
1850         the user the same thing.  Reported by Mike Grayson.
1852 2006-11-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1854         * man/Makefile.am (dist_man_MANS): Replace all optional manpages
1855         with `$(MAN)', computed at configure time; also, list them ...
1856         (optional_mans): ... in this new variable.
1857         (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
1859 2006-11-16  Jim Meyering  <jim@meyering.net>
1861         Help valgrind see that there is no leak in dd.c.
1862         * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
1863         so we need not free them at all.  This is easier than freeing
1864         both buffers at each of the early "return"s.
1866         * src/csplit.c (load_buffer): Plug an inconsequential leak.
1868 2006-11-15  Jim Meyering  <jim@meyering.net>
1870         * .x-po-check: Exclude gl/ files.  Otherwise, po-check would
1871         complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
1873 2006-11-14  Jim Meyering  <jim@meyering.net>
1875         * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
1876         remove the now-unnecessary use of AC_LIBSOURCES.
1878         Adapt to new version of gnulib-tool.
1879         * gl/modules/root-dev-ino: New file.
1880         * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
1881         * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
1882         * m4/root-dev-ino.m4: Move this file ...
1883         * gl/m4/root-dev-ino.m4: ... to here.
1885         * bootstrap.conf (gnulib_modules): Add root-dev-ino.
1887 2006-11-13  Jim Meyering  <jim@meyering.net>
1889         * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
1890         From Paul Eggert.
1892         Plug another technically-unimportant leak in sort.
1893         * src/sort.c (main): Don't allocate memory for each new key here.
1894         (insertkey): Allocate memory for each key here, instead.
1895         (key_init): Rename from new_key.  Don't allocate.
1897         * src/sort.c (main): Plug a tiny memory leak.
1898         Move declaration of local "minus" down to be nearer point of use.
1900 2006-11-12  Jim Meyering  <jim@meyering.net>
1902         du would exit early, when encountering an inaccessible directory
1903         Reported by Mike Frysinger, in
1904         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
1905         * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
1906         * tests/chgrp/no-x: Remove the "fts_read failed: ..."
1907         diagnostic from the expected output when using native fdopendir.
1908         * tests/chmod/no-x: Likewise.
1909         * tests/du/no-x: Likewise.
1910         * NEWS: Mention this bug fix.
1911         * tests/du/Makefile.am (TESTS): Add inacc-dest.
1913         * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
1914         for xalloc.h itself.
1916         Avoid false-positive when testing via valgrind.
1917         * tests/mv/atomic: Grep strace output for a more specific pattern
1918         than just "unlink", since that got a false positive when testing
1919         under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
1920         * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
1922 2006-10-28  Jim Meyering  <jim@meyering.net>
1924         * Makefile.maint (patch-check): Make it easier to regenerate
1925         the src/c99-to-c89.diff file.  E.g., I do this:
1926         make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
1928         * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
1930 2006-10-26  Jim Meyering  <jim@meyering.net>
1932         * src/system.h (ftello): Add a compile-time check for the highly
1933         unlikely condition of off_t narrower than long int, rather than
1934         handling it at run time.  Based on a patch from Paul Eggert.
1936 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1938         * tests/chmod/c-option: When double-quoting part of a word, prefer
1939         to double-quote the whole word.  This is a bit easier to read (at
1940         least for me), and in some cases it avoids a shell bug with Tru64
1941         4.0 sh reported by Nelson H. F. Beebe.  For example, instead of
1942         "$abs_srcdir"/../setgid-check we now write
1943         "$abs_srcdir/../setgid-check".
1944         * tests/cp/cp-parents: Likewise.
1945         * tests/du/inaccessible-cwd: Likewise.
1946         * tests/du/long-from-unreadable: Likewise.
1947         * tests/install/basic-1: Likewise.
1948         * tests/install/trap: Likewise.
1949         * tests/misc/close-stdout: Likewise.
1950         * tests/mkdir/concurrent-1: Likewise.
1951         * tests/mkdir/p-1: Likewise.
1952         * tests/mkdir/p-3: Likewise.
1953         * tests/mkdir/parents: Likewise.
1954         * tests/mkdir/perm: Likewise.
1955         * tests/readlink/can-e: Likewise.
1956         * tests/readlink/can-f: Likewise.
1957         * tests/readlink/can-m: Likewise.
1958         * tests/rm/inaccessible: Likewise.
1959         * tests/rm/unread3: Likewise.
1960         * tests/touch/no-create-missing: Likewise.
1962         * lib/.cvsignore: Add uinttostr.c.
1964 2006-10-25  Jim Meyering  <jim@meyering.net>
1966         Portability to Tru64 V4.0.
1967         * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
1968         Define inline replacement function.
1969         This (along with a yesterday's fix for autoconf's
1970         _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
1971         now builds once more on Tru64 V4.0.  Reported by Nelson Beebe.
1973 2006-10-25  Bruno Haible  <bruno@clisp.org>
1975         * src/cat.c (infile): Add "const" to declaration.
1976         * src/csplit.c (prefix): Likewise.
1977         * src/printf.c (cfcc_msg): Likewise.
1978         * src/tail.c (valid_file_spec): Likewise.
1979         * src/cut.c (cut_file): Likewise, for a parameter.
1980         * src/expr.c (str_value): Likewise.
1981         * src/fold.c (fold_file): Likewise.
1982         * src/pr.c (init_header): Likewise.
1983         * src/dircolors.c (dc_parse_stream): Likewise, for a local.
1984         * src/tr.c (make_printable_str): Likewise.
1985         * src/nl.c (body_type, header_type, footer_type, current_type):
1986         (separator_str, build_type_arg, nl_file): Likewise, for many.
1987         * src/paste.c (main): Don't assign a read-only string to 'optarg'.
1988         * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
1990 2006-10-25  Jim Meyering  <jim@meyering.net>
1992         * tests/sample-test: Update copyright year list to include only
1993         the current year, since this is what I'll want in any new test.
1995 2006-10-24  Jim Meyering  <jim@meyering.net>
1997         * src/c99-to-c89.diff: Update to reflect new offsets.
1999         * NEWS: new feature: rm accepts new option: --one-file-system
2000         Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
2001         * src/remove.h (struct rm_options) [one_file_system]: New member.
2002         * src/rm.c (rm_option_init): Initialize it.
2003         (usage): Document the option.
2004         * src/mv.c (rm_option_init): Likewise.
2005         * src/remove.c (remove_dir): With --one-file-system and --recursive,
2006         for each directory command line argument, do not affect a file system
2007         different from that of the starting directory.  And give a diagnostic.
2008         * src/rm.c (ONE_FILE_SYSTEM): New enum.
2009         (main): Handle new option.
2010         * tests/rm/one-file-system: Test the above.
2011         * tests/rm/Makefile.am (TESTS): Add one-file-system.
2012         * tests/Makefile.am (check-root): Add the rm/one-file-system
2013         test to the list.
2014         (EXTRA_DIST): Add other-fs-tmpdir.
2016         * tests/mv/setup: Removed.  Renamed to...
2017         * tests/other-fs-tmpdir: ...this new file.
2018         * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
2019         * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
2020         * tests/mv/backup-is-src: Likewise.
2021         * tests/mv/hard-link-1: Likewise.
2022         * tests/mv/leak-fd: Likewise.
2023         * tests/mv/mv-special-1: Likewise.
2024         * tests/mv/part-fail: Likewise.
2025         * tests/mv/part-hardlink: Likewise.
2026         * tests/mv/part-rename: Likewise.
2027         * tests/mv/part-symlink: Likewise.
2028         * tests/mv/partition-perm: Likewise.
2029         * tests/mv/to-symlink: Likewise.
2030         * tests/mv/into-self-2: Likewise.
2032         Don't let a failure in one test stop "make -k" from running the others.
2033         * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
2034         (check-root): Depend on them, rather than executing the five
2035         commands in a single rule.  Reported by Greg Schafer.
2037 2006-10-23  Bob Proulx  <bob@proulx.com>  (tiny change)
2039         * Makefile.maint (alpha beta major): Use a better log message for
2040         the automatic commit of .prev-version.
2042 2006-10-23  Jim Meyering  <jim@meyering.net>
2044         * tests/misc/pwd-long: Undo last change, since it made Perl invoke
2045         pwd via a shell.  Instead, ensure that the absolute name of the
2046         pwd binary consists solely of reasonable characters.
2047         Whoops.  Don't exec the perl script.  Otherwise, the sh-trap-based
2048         clean-up code isn't run.
2050         * NEWS: Add a line for 6.5-cvs.
2051         * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
2053 2006-10-22  Jim Meyering  <jim@meyering.net>
2055         Version 6.4.
2057         * NEWS: Record the 6.4 release date.
2058         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2060         * Makefile.maint: Complete the adaptation to function with a working
2061         directory that is using git (rather than cvs) for version control.
2063 2006-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2065         * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
2066         * tests/cp/cp-parents: Likewise.
2067         * tests/mkdir/parents: Likewise.
2068         * tests/mkdir/perm: Likewise.
2070         * tests/sample-test: Quote variables containing absolute build
2071         tree paths.  In the cleanup trap, make sure `cd' succeeds before
2072         `chmod'ing and `rm'ing the temporary files.
2073         * tests/chgrp/basic: Likewise.
2074         * tests/chgrp/deref: Likewise.
2075         * tests/chgrp/no-x: Likewise.
2076         * tests/chgrp/posix-H: Likewise.
2077         * tests/chgrp/recurse: Likewise.
2078         * tests/chmod/c-option: Likewise.
2079         * tests/chmod/equal-x: Likewise.
2080         * tests/chmod/equals: Likewise.
2081         * tests/chmod/inaccessible: Likewise.
2082         * tests/chmod/no-x: Likewise.
2083         * tests/chmod/octal: Likewise.
2084         * tests/chmod/setgid: Likewise.
2085         * tests/chmod/umask-x: Likewise.
2086         * tests/chmod/usage: Likewise.
2087         * tests/chown/basic: Likewise.
2088         * tests/chown/deref: Likewise.
2089         * tests/chown/separator: Likewise.
2090         * tests/cp/acl: Likewise.
2091         * tests/cp/backup-1: Likewise.
2092         * tests/cp/backup-dir: Likewise.
2093         * tests/cp/backup-is-src: Likewise.
2094         * tests/cp/cp-HL: Likewise.
2095         * tests/cp/cp-deref: Likewise.
2096         * tests/cp/cp-i: Likewise.
2097         * tests/cp/cp-mv-backup: Likewise.
2098         * tests/cp/cp-parents: Likewise.
2099         * tests/cp/deref-slink: Likewise.
2100         * tests/cp/dir-rm-dest: Likewise.
2101         * tests/cp/dir-slash: Likewise.
2102         * tests/cp/dir-vs-file: Likewise.
2103         * tests/cp/fail-perm: Likewise.
2104         * tests/cp/into-self: Likewise.
2105         * tests/cp/link: Likewise.
2106         * tests/cp/link-no-deref: Likewise.
2107         * tests/cp/link-preserve: Likewise.
2108         * tests/cp/no-deref-link1: Likewise.
2109         * tests/cp/no-deref-link2: Likewise.
2110         * tests/cp/no-deref-link3: Likewise.
2111         * tests/cp/perm: Likewise.
2112         * tests/cp/preserve-2: Likewise.
2113         * tests/cp/r-vs-symlink: Likewise.
2114         * tests/cp/same-file: Likewise.
2115         * tests/cp/slink-2-slink: Likewise.
2116         * tests/cp/sparse: Likewise.
2117         * tests/cp/special-bits: Likewise.
2118         * tests/cp/src-base-dot: Likewise.
2119         * tests/cp/symlink-slash: Likewise.
2120         * tests/dd/not-rewound: Likewise.
2121         * tests/dd/skip-seek2: Likewise.
2122         * tests/dd/unblock-sync: Likewise.
2123         * tests/du/2g: Likewise.
2124         * tests/du/8gb: Likewise.
2125         * tests/du/basic: Likewise.
2126         * tests/du/deref: Likewise.
2127         * tests/du/deref-args: Likewise.
2128         * tests/du/exclude: Likewise.
2129         * tests/du/fd-leak: Likewise.
2130         * tests/du/hard-link: Likewise.
2131         * tests/du/inaccessible-cwd: Likewise.
2132         * tests/du/long-from-unreadable: Likewise.
2133         * tests/du/long-sloop: Likewise.
2134         * tests/du/no-deref: Likewise.
2135         * tests/du/no-x: Likewise.
2136         * tests/du/restore-wd: Likewise.
2137         * tests/du/slash: Likewise.
2138         * tests/du/slink: Likewise.
2139         * tests/du/trailing-slash: Likewise.
2140         * tests/du/two-args: Likewise.
2141         * tests/fmt/long-line: Likewise.
2142         * tests/install/basic-1: Likewise.
2143         * tests/install/create-leading: Likewise.
2144         * tests/install/d-slashdot: Likewise.
2145         * tests/install/trap: Likewise.
2146         * tests/ln/misc: Likewise.
2147         * tests/ln/target-1: Likewise.
2148         * tests/ls/color-dtype-dir: Likewise.
2149         * tests/ls/dangle: Likewise.
2150         * tests/ls/dired: Likewise.
2151         * tests/ls/file-type: Likewise.
2152         * tests/ls/follow-slink: Likewise.
2153         * tests/ls/infloop: Likewise.
2154         * tests/ls/inode: Likewise.
2155         * tests/ls/m-option: Likewise.
2156         * tests/ls/no-arg: Likewise.
2157         * tests/ls/recursive: Likewise.
2158         * tests/ls/rt-1: Likewise.
2159         * tests/ls/stat-dtype: Likewise.
2160         * tests/ls/stat-failed: Likewise.
2161         * tests/ls/stat-vs-dirent: Likewise.
2162         * tests/misc/cat-proc: Likewise.
2163         * tests/misc/close-stdout: Likewise.
2164         * tests/misc/csplit: Likewise.
2165         * tests/misc/date-sec: Likewise.
2166         * tests/misc/false-status: Likewise.
2167         * tests/misc/head-c: Likewise.
2168         * tests/misc/head-pos: Likewise.
2169         * tests/misc/mknod: Likewise.
2170         * tests/misc/nl: Likewise.
2171         * tests/misc/nohup: Likewise.
2172         * tests/misc/pathchk1: Likewise.
2173         * tests/misc/printf: Likewise.
2174         * tests/misc/printf-hex: Likewise.
2175         * tests/misc/pwd-long: Likewise.
2176         * tests/misc/shuf: Likewise.
2177         * tests/misc/sort-rand: Likewise.
2178         * tests/misc/split-a: Likewise.
2179         * tests/misc/split-fail: Likewise.
2180         * tests/misc/split-l: Likewise.
2181         * tests/misc/stat-fmt: Likewise.
2182         * tests/misc/tac-continue: Likewise.
2183         * tests/misc/wc-files0: Likewise.
2184         * tests/mkdir/concurrent-1: Likewise.
2185         * tests/mkdir/p-1: Likewise.
2186         * tests/mkdir/p-2: Likewise.
2187         * tests/mkdir/p-3: Likewise.
2188         * tests/mkdir/p-slashdot: Likewise.
2189         * tests/mkdir/p-thru-slink: Likewise.
2190         * tests/mkdir/p-v: Likewise.
2191         * tests/mkdir/parents: Likewise.
2192         * tests/mkdir/perm: Likewise.
2193         * tests/mkdir/t-slash: Likewise.
2194         * tests/mv/acl: Likewise.
2195         * tests/mv/atomic: Likewise.
2196         * tests/mv/backup-dir: Likewise.
2197         * tests/mv/childproof: Likewise.
2198         * tests/mv/diag: Likewise.
2199         * tests/mv/dir-file: Likewise.
2200         * tests/mv/dir2dir: Likewise.
2201         * tests/mv/dup-source: Likewise.
2202         * tests/mv/hard-2: Likewise.
2203         * tests/mv/hard-3: Likewise.
2204         * tests/mv/hard-4: Likewise.
2205         * tests/mv/hard-link-1: Likewise.
2206         * tests/mv/hard-verbose: Likewise.
2207         * tests/mv/i-2: Likewise.
2208         * tests/mv/i-3: Likewise.
2209         * tests/mv/i-4: Likewise.
2210         * tests/mv/i-5: Likewise.
2211         * tests/mv/i-link-no: Likewise.
2212         * tests/mv/into-self-4: Likewise.
2213         * tests/mv/leak-fd: Likewise.
2214         * tests/mv/mv-special-1: Likewise.
2215         * tests/mv/no-target-dir: Likewise.
2216         * tests/mv/part-fail: Likewise.
2217         * tests/mv/part-hardlink: Likewise.
2218         * tests/mv/part-rename: Likewise.
2219         * tests/mv/part-symlink: Likewise.
2220         * tests/mv/partition-perm: Likewise.
2221         * tests/mv/perm-1: Likewise.
2222         * tests/mv/reply-no: Likewise.
2223         * tests/mv/trailing-slash: Likewise.
2224         * tests/mv/update: Likewise.
2225         * tests/od/od-N: Likewise.
2226         * tests/od/x8: Likewise.
2227         * tests/readlink/can-e: Likewise.
2228         * tests/readlink/can-f: Likewise.
2229         * tests/readlink/can-m: Likewise.
2230         * tests/readlink/rl-1: Likewise.
2231         * tests/rm/cycle: Likewise.
2232         * tests/rm/dangling-symlink: Likewise.
2233         * tests/rm/deep-1: Likewise.
2234         * tests/rm/dir-no-w: Likewise.
2235         * tests/rm/dir-nonrecur: Likewise.
2236         * tests/rm/dot-rel: Likewise.
2237         * tests/rm/empty-inacc: Likewise.
2238         * tests/rm/f-1: Likewise.
2239         * tests/rm/fail-2eperm: Likewise.
2240         * tests/rm/hash: Likewise.
2241         * tests/rm/i-1: Likewise.
2242         * tests/rm/i-no-r: Likewise.
2243         * tests/rm/ignorable: Likewise.
2244         * tests/rm/inaccessible: Likewise.
2245         * tests/rm/interactive-always: Likewise.
2246         * tests/rm/interactive-once: Likewise.
2247         * tests/rm/ir-1: Likewise.
2248         * tests/rm/isatty: Likewise.
2249         * tests/rm/no-give-up: Likewise.
2250         * tests/rm/r-1: Likewise.
2251         * tests/rm/r-2: Likewise.
2252         * tests/rm/r-3: Likewise.
2253         * tests/rm/r-4: Likewise.
2254         * tests/rm/readdir-bug: Likewise.
2255         * tests/rm/rm1: Likewise.
2256         * tests/rm/rm2: Likewise.
2257         * tests/rm/rm3: Likewise.
2258         * tests/rm/rm4: Likewise.
2259         * tests/rm/rm5: Likewise.
2260         * tests/rm/sunos-1: Likewise.
2261         * tests/rm/unread2: Likewise.
2262         * tests/rm/unread3: Likewise.
2263         * tests/rmdir/fail-perm: Likewise.
2264         * tests/rmdir/t-slash: Likewise.
2265         * tests/shred/exact: Likewise.
2266         * tests/shred/remove: Likewise.
2267         * tests/sum/sysv: Likewise.
2268         * tests/tail-2/append-only: Likewise.
2269         * tests/tail-2/assert: Likewise.
2270         * tests/tail-2/assert-2: Likewise.
2271         * tests/tail-2/big-4gb: Likewise.
2272         * tests/tail-2/fflush: Likewise.
2273         * tests/tail-2/infloop-1: Likewise.
2274         * tests/tail-2/proc-ksyms: Likewise.
2275         * tests/tail-2/start-middle: Likewise.
2276         * tests/tail-2/tail-n0f: Likewise.
2277         * tests/tee/basic: Likewise.
2278         * tests/tee/dash: Likewise.
2279         * tests/touch/fail-diag: Likewise.
2280         * tests/touch/no-create-missing: Likewise.
2281         * tests/touch/not-owner: Likewise.
2282         * tests/touch/obsolescent: Likewise.
2283         * tests/touch/read-only: Likewise.
2284         * tests/touch/relative: Likewise.
2286 2006-10-21  Jim Meyering  <jim@meyering.net>
2288         * NEWS: (cp --backup fix): Fix a typo.
2290         * .gitignore: Remove some references to files in subdirectories.
2291         * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
2292         * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
2294         * src/copy.c (copy_internal): Add a comment saying why we prefer
2295         mknod over mkfifo.
2297         Enable an fts optimization (call lstat only for directories,
2298         on some file system types) also with the --preserve-root option
2299         of chown or chgrp.
2300         * src/chown-core.c (change_file_owner): Compare fts_statp-based
2301         dev/ino against root dev/ino only for directories.
2302         (chown_files): Don't let the root_dev_ino setting influence whether
2303         we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
2305 2006-10-20  Jim Meyering  <jim@meyering.net>
2307         * src/od.c (usage): Change description of default to use "-w16",
2308         not the now-invalid "-w 16" syntax.  From Dan Jacobson.
2310 2006-10-19  Jim Meyering  <jim@meyering.net>
2312         * bootstrap: Add names to each .gitignore file (if it exists)
2313         as well as to .cvsignore.
2315         * Makefile.maint (po-check): This rule didn't detect the new use
2316         of "gettext" (as opposed to the use of "_" everywhere else) in
2317         lib/xstrtol.h.  Adjust the grep regexp so that now it does.
2319 2006-10-18  Paul Eggert  <eggert@cs.ucla.edu>
2321         * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
2322         when opening dst_name.
2323         (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
2324         (SYSCALL) to test for failure in a system call.
2326         * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
2327         a fifo.  This preserves the special mode bits on Solaris 10, which
2328         is compatible with what Solaris 10 cp -R does.
2330         * src/copy.c (copy_internal): Remove redundant and confusing local
2331         variable src_type.
2333         * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
2334         7777.  This matches historical 'cp' behavior and avoids some
2335         (though not all) implementation-defined behavior of mkdir.
2336         * src/cp.c (make_dir_parents_private): Likewise.
2337         * src/copy.c (copy_internal): Don't pass 'open' a mode greater
2338         than 777.  This is required by POSIX.  It doesn't make any difference
2339         in actual behavior on any host that I know of.
2341 2006-10-17  Jim Meyering  <jim@meyering.net>
2343         * src/dd.c (usage): Use two spaces (not one) to separate the
2344         "fdatasync" option string from its description, so help2man formats
2345         the derived man page properly.  Reported by Samuel Thibault
2346         in <http://bugs.debian.org/393649>.
2348 2006-10-16  Jim Meyering  <jim@meyering.net>
2350         * .x-sc_trailing_blank: Remove names of files that are no longer
2351         version-controlled.
2353 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2355         * src/groups.sh (version): Reword message to match the other programs.
2356         Problem reported by Eric Blake.
2358 2006-10-14  Jim Meyering  <jim@meyering.net>
2360         * Makefile.maint (headers_with_interesting_macro_defs): Define.
2361         (.re-defmac, sc_always_defined_macros): New rules.
2363         * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
2364         Instead, include "exit.h".  This hereby retires the work-around for
2365         "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
2367         * src/cksum.c (uint_fast32_t): Don't define.
2368         Instead, include <stdint.h>.
2370         * src/pinky.c (S_IWGRP): Don't define.
2371         It's already defined by "stat-macros.h" (included via system.h).
2373         * Makefile.cfg: Remove cruft that's now handled via bootstrap.
2374         * Makefile.maint: Likewise, remove these targets/rules/variables:
2375         (local_updates, update, cvs-update, wget_files, get-targets): Remove.
2376         (cvs_files, wget-update, automake_repo): Likewise.
2377         Move the comment about cvsu to build-aux/vc-list-files,
2378         where cvsu is actually used.
2380         * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
2382         Work also when the working directory (with e.g. coreutils sources)
2383         is version controlled with git, rather than CVS.
2384         * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2385         rather than CVS.
2386         In messages and comments, say e.g., "checked-out sources",
2387         rather than "CVS sources".
2388         (version_controlled_file): New function.  Work for git as well as
2389         for CVS.  Don't use grep's -q option.
2390         (slurp): Call it here, in place of CVS-specific code.
2392         * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
2393         to dir1/dir2~.
2394         * src/copy.c (copy_internal): Although we do create a backup of each
2395         destination directory when in move mode, don't do that when copying.
2396         Reported by Peter Breitenlohner, in
2397         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
2398         * tests/cp/backup-dir: New file.  Test for the above.
2399         * tests/cp/Makefile.am (TESTS): Add backup-dir.
2401 2006-10-13  Jim Meyering  <jim@meyering.net>
2403         More chown/chgrp dereferencing-related fixes.
2404         * src/chown-core.c (change_file_owner): Don't use fts_statp if
2405         we're dereferencing symlinks.
2406         Reverse conjuncts, so that we use dereference file_stats
2407         (aka ent->fts_statp) only *after* we've confirmed that
2408         chopt->affect_symlink_referent is true.  Otherwise, we might
2409         use ent->fts_statp uninitialized.
2410         Don't turn on FTS_NOSTAT when dereferencing symlinks.
2411         * tests/chown/deref: Update the expected diagnostic, now that
2412         this test case (trying to use "chown --dereference ..." on a
2413         dangling symlink) takes a different code path.
2415 2006-10-13  Paul Eggert  <eggert@cs.ucla.edu>
2417         Sync from Bison, as follows:
2419         2006-10-01  Paul Eggert  <eggert@cs.ucla.edu>
2421         Fix problems with translating English-language diagnostics.
2422         * bootstrap: Fix bug introduced in recent bootstrap changes, with
2423         respect to bison-runtime pot generation.  The YY_ stuff
2424         wasn't being captured.
2426 2006-10-13  Jim Meyering  <jim@meyering.net>
2428         * src/chown-core.c (change_file_owner): Use fstatat, not stat,
2429         now that we're using fts_open with FTS_CWDFD.
2430         * tests/chgrp/posix-H: Add --preserve-root to an invocation of
2431         chgrp, to exercise the above fix.
2432         * NEWS: Mention the above.
2434         * src/du-tests: Clean up a little, though it's still not portable.
2436         * .vg-suppressions: Add 3 more for debian unstable.
2438         * tests/ls/Test.pm: Remove long-unused file.
2439         * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
2440         Suggestions from Bruno Haible.
2442 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2444         * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
2445         (MAINTAINERCLEANFILES): Add .kludge-stamp.
2446         * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
2447         instead of $(man_MANS).
2449 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2451         * configure.ac: Avoid compiler warnings about default return
2452         type in function definitions and unused variables in tests.
2453         * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
2454         if this is #defined.
2456 2006-10-12  Jim Meyering  <jim@meyering.net>
2458         * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
2459         Call gl_INIT directly, rather than through the above.
2461 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2463         * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
2464         variable was sometimes used without being initialized.  This
2465         messed up the installation of the INSTALL file in some cases.
2467 2006-10-11  Jim Meyering  <jim@meyering.net>
2469         * src/ls.c (usage): Correct description of -s, --size.
2470         It works even without -l.  Suggestion from Karl Berry.
2472 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
2474         * src/ls.c (quote_name): Use initializer rather than memset to
2475         initialize an object to zero.  This is easier to read and is less
2476         likely to introduce a runtime error due to a mixup.  It causes
2477         gcc -W to issue a warning, but you can work around this by
2478         appending -Wno-missing-field-initializers.
2479         * src/pathchk.c (portable_chars_only): Likewise.
2480         * src/shred.c (main): Likewise.
2481         * src/stty.c (main): Likewise.
2482         * src/tr.c (card_of_complement): Likewise.
2483         * src/wc.c (wc): Likewise.
2485 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
2487         * src/sort.c (usage): Mention again that sort fields are origin 1.
2489         * NEWS: Fix typo: iso-8602 -> iso-8601.  Problem reported by
2490         Bob Proulx.
2492         * bootstrap (usage, main program, symlink_to_gnulib): Add option
2493         --copy.  Inspired by a suggestion from Bruno Haible.
2495 2006-10-09  Jim Meyering  <jim@meyering.net>
2497         Avoid a compiler warning.
2498         * src/pathchk.c (portable_chars_only): Initialize variable of type
2499         mbstate_t via memset, rather than via '{0}'.  Patch from Bruno Haible.
2501 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
2503         Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
2504         wrong file name in some cases.  Lars Wendler reported a bug in
2505         my original fix.
2506         * src/install.c (make_ancestor): New arg COMPONENT.
2507         * src/mkdir.c (make_ancestor): Likewise.
2508         * tests/install/basic-1: Check for install -Dv bug.
2509         * tests/mkdir/Makefile.am (TESTS): Add p-v.
2510         * tests/mkdir/p-v: New file, to test this bug.
2512 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
2514         * src/chgrp.c: Don't include lchown.h; no longer needed.
2515         * src/chown.c: Likewise.
2517         * tests/ls/stat-dtype: Use a dynamic test to decide whether the
2518         current file system has useful d_type info.
2520         * src/dd.c (flags): noatime and nofollow now depend on
2521         HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
2522         (usage): Output info about noatime and nofollow only if
2523         they are known to work.
2524         * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
2525         than O_NOFOLLOW, when testing whether it's possible to avoid a
2526         race condition reliably.
2528 2006-10-05  Jim Meyering  <jim@meyering.net>
2530         * src/c99-to-c89.diff: Update to reflect new offsets.
2532         * tests/install/basic-1: Skip the latter part of this test if the
2533         just-built dd binary is not readable.  Otherwise, this test would fail
2534         when binaries were created as root.  Reported by Bauke Jan Douma in
2535         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
2537 2006-10-03  Paul Eggert  <eggert@cs.ucla.edu>
2539         * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
2540         MiB, since XFS hosts can legitimately have large values of
2541         st_blksize.  Problem reported by Tony Ernst in
2542         <http://savannah.gnu.org/bugs/?17903>.
2544 2006-10-04  Jim Meyering  <jim@meyering.net>
2546         * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
2547         Paul Eggert pointed out that the specified file may exist,
2548         in spite of such an errno value.
2549         * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
2550         * tests/rm/ignore-name-too-long: Remove file.
2551         * NEWS: Update here, too.
2553 2006-10-03  Jim Meyering  <jim@meyering.net>
2555         * tests/rm/fail-eperm: Report failure also if rm is terminated by
2556         a signal.
2558         * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
2559         and one in shred.c -- that were added before coreutils-6.3.
2560         Reported by Michael Deutschmann.
2562         * src/c99-to-c89.diff: Update to reflect new offsets.
2564         * src/remove.c (remove_entry): With -f, exit successfully in spite
2565         of a missing file under some very unusual conditions (with errno
2566         being any of ENOENT, ENOTDIR, ENAMETOOLONG).
2568         With --force (-f), rm no longer fails for ENOTDIR.
2569         * src/remove.c (ignorable_missing): New function.
2570         Use it everywhere, rather than open-coding the test.
2571         Andreas Schwab reported the ENOTDIR problem.
2572         (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
2574         * NEWS: Mention the bug fix.
2575         * tests/rm/ignorable: New file.  Test for the ENOTDIR case.
2576         * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
2577         * tests/rm/Makefile.am (TESTS): Add the new file names.
2579         * bootstrap: Undo last change to this file, since now gnulib-tool
2580         sticks with the automake default in generating dependencies.
2582         * NEWS: Add a line for 6.4-cvs.
2583         * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
2585 2006-09-30  Jim Meyering  <jim@meyering.net>
2587         Version 6.3.
2588         * NEWS: Record the 6.3 release date.
2589         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2591         * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
2593         * src/c99-to-c89.diff: Update offsets.
2595 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
2597         * tests/rm/readdir-bug: Don't use $(...) in a shell script,
2598         as it doesn't work with Solaris /bin/sh.
2600 2006-09-29  Jim Meyering  <jim@meyering.net>
2602         * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
2603         the pinky segfault.
2605         * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
2606         use .1 as the increment.  Actual output varies too much.
2607         [eq-wid-3]: New, commented out test.
2609         * src/shuf.c (read_input): Fix an off-by-one error that
2610         would cause an infloop for piped input of 8KB or more.
2611         * NEWS: Mention the fix.
2612         * tests/misc/shuf: Test for the above fix.
2614         Since any system may be affected by the Darwin readdir bug,
2615         perform the extra rewinddir unconditionally.  The performance
2616         impact of rewinding a directory is negligible.
2617         * src/remove.c (NEED_REWIND): Define to use
2618         CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
2620         * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
2621         increment translates to a slightly larger value.
2622         This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
2623         The final expected value wasn't being printed.
2625         Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
2626         and NFS, whereby rm would not remove all files in a directory.
2627         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
2628         (NEED_REWIND): New macro, so that we incur the cost of the work-around
2629         rewinddir only on afflicted systems.
2630         * NEWS: Clarify and correct.
2631         * tests/rm/readdir-bug: New file.  Test for the above fix.
2632         * tests/rm/Makefile.am (TESTS): Add it.
2633         Prompted by testing and analysis from Bruno Haible:
2634         http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
2636 2006-09-28  Paul Eggert  <eggert@cs.ucla.edu>
2638         * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
2639         suggested for Debian stable, which uses Perl 5.8.4.
2641 2006-09-28  Jim Meyering  <jim@meyering.net>
2643         Automatically generated dependencies are important even
2644         when all of the sources in a directory come from gnulib.
2645         * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
2646         option that gnulib-tool adds to what becomes our lib/gnulib.mk.
2648         * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
2649         Ensure that IFS is set properly and unset PATH.
2650         Sanitize inputs.
2651         Work properly even when the name of the selected file starts with "-".
2652         Invoke rm via "../../src/rm", and adjust expected output.
2653         Prompted by a patch from Tim Waugh.
2655         * README-cvs: Add Bison to the list of required packages.
2657 2006-09-26  Jim Meyering  <jim@meyering.net>
2659         * src/c99-to-c89.diff: Update offsets.
2661         * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
2662         it from removing a directory containing 188 or more entries.
2663         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
2664         20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
2665         Reported by Matthew Woehlke.
2667 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
2669         * NEWS: "groups user" no longer outputs "user :"; you need at least
2670         two users.  "groups" now processes options like --help more compatibly.
2671         * src/groups.sh: Implement the option-processing change.
2672         Handle user and group names with special characters more robustly.
2673         Report write errors instead of exiting silently with status 1.
2675 2006-09-26  Jim Meyering  <jim@meyering.net>
2677         * README: Warn not to run autoreconf manually.  Use bootstrap instead.
2679         * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
2680         Rewrite to avoid using temporary, $status.
2682         * NEWS: Mention the bug fix.
2683         * src/groups.sh: Don't hide a write failure.
2684         Reported by Iain Calder <ic56@rogers.com>.
2686 2006-09-25  Jim Meyering  <jim@meyering.net>
2688         * src/chown.c (usage): Clarify --dereference description.
2689         * src/chgrp.c (usage): Likewise.  Suggestion from Jamie McClelland.
2691 2006-09-24  Jim Meyering  <jim@meyering.net>
2693         * NEWS: Mention these fixes.
2694         * src/copy.c (copy_reg): With --verbose (-v), print
2695         "removed `file_name'" just after unlinking a file.
2696         (copy_internal): Likewise, in three more places.
2697         Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
2698         * tests/mv/hard-verbose: New file.  Test for the above fix.
2699         * tests/mv/Makefile.am (TESTS): Add hard-verbose.
2701         * tests/help-version (sync_args): Don't call sync, since it spins up
2702         disks that I've deliberately caused to spin down (but not unmounted).
2704         * NEWS: Mention the improvement to sort.
2706         * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
2707         as well as existing.
2709         * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
2710         since that predated addition of d_type support.
2712 2006-09-23  Jim Meyering  <jim@meyering.net>
2714         * gl/modules/getloadavg.diff: New file.  Work around the way the latest
2715         version of the getloadavg module interacts with our bootstrap script.
2716         * bootstrap (gnulib_tool_options): Add "--local-dir gl".
2717         * Makefile.am (EXTRA_DIST): Sort file names.
2718         Add bootstrap and gl/modules/getloadavg.diff
2720 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
2722         * bootstrap: Add support for --force.
2723         (usage): New function.  Describe usage less tersely.
2724         (CVS_only_file): New var.
2726         * NEWS: Document fix for cp -i and mv -i.
2727         * src/copy.c (copy_internal): With -i, prompt even if the source
2728         is a directory and the destination is not.  This is required by
2729         POSIX and gives the user a chance to bail out before failing.
2730         * tests/cp/Makefile.am (TESTS): Add cp-i.
2731         * tests/cp/cp-i: New file.
2732         * tests/mv/Makefile.am (TESTS): Add i-5.
2733         * tests/mv/i-5: New file.
2735 2006-09-20  Jim Meyering  <jim@meyering.net>
2737         * NEWS: Mention the chmod bug fix.
2739         * tests/chmod/inaccessible: New test, specifically for this bug.
2740         Based on a test case from Paul Eggert.
2741         * tests/chmod/Makefile.am (TESTS): Add inaccessible.
2743         Fix the 2006-09-18 bug differently.
2744         * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
2745         tell fts_read to stat the file again, in case it has become
2746         accessible since the initial fts_open call.
2747         * src/chown-core.c (change_file_owner): Likewise.
2749         * src/chmod.c: Revert last change.  There is a better way.
2750         * src/chown-core.c: Likewise.
2752 2006-09-19  Paul Eggert  <eggert@cs.ucla.edu>
2754         * src/ln.c (target_directory_operand): Rewrite to avoid porting
2755         problem on Tandem reported by Matthew Woehlke in
2756         <https://savannah.gnu.org/bugs/?17172>.
2758 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2760         Fix bug where chmod, chown, and chgrp did not process operands
2761         left-to-right in some cases.
2762         * src/chmod.c (wd_errno): New var.
2763         (chmod_file): New function, with most of the contents of the
2764         old prcess_file function.
2765         (process_files): Use it.  This gives file names to fts one
2766         at a time, so that they are processed left-to-right as POSIX
2767         requires.
2768         * src/chown-core.c (wd_errno, chown_files): Likewise.
2769         (chown_file): New function.
2770         * tests/install/basic-1: Redo test so as to not workaround
2771         the chmod bug, thereby testing for it.
2773         * src/shuf.c (main): Quote the entire range when reporting an
2774         invalid one, rather than just the part that contained the error.
2776         * tests/stty/row-col-1: Rewrite to avoid temporary file that is
2777         sometimes left behind if the test is skipped or interrupted.
2779         * bootstrap (symlink_to_gnulib): New function.
2780         (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
2781         to copies-of-gnulib.
2782         (cp_mark_as_generated, slurp, gnulib_files):
2783         Avoid making a copy if it's the same as the old version.
2784         (gnulib_files): Add support for this variable (used by Bison).
2786         * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
2787         indicating flaw in kernel.  Reword to say that the flaw isn't
2788         serious for coreutils, since the flaw does affect ls -i.
2790         * tests/chgrp/basic: Fix bug in test case exposed by building on
2791         Solaris 8 in a setgid directory.  The test case incorrectly
2792         assumed that 'symlink' would be in group $g1.
2794 2006-09-18  Jim Meyering  <jim@meyering.net>
2796         * NEWS: Add a line for 6.3-cvs.
2797         * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
2799         Version 6.2.
2800         * NEWS: Record the 6.2 release date.
2801         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2803 2006-09-17  Jim Meyering  <jim@meyering.net>
2805         * tests/chgrp/basic: On an OpenBSD system, rather than failing
2806         due to a known problem, merely warn about it.
2807         Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
2808         Instead, use stat to test file system for desired results, directly.
2809         * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
2811         * tests/envvar-check: Add more variable names to the list of those
2812         that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
2813         QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
2815 2006-09-16  Paul Eggert  <eggert@cs.ucla.edu>
2817         * NEWS: Document that mkdir -p and install -d now fork on occasion.
2818         * bootstrap.conf (gnulib_modules): Add savewd.
2819         * src/install.c: Include savewd.h.
2820         (process_dir): New function.
2821         (main, install_file_in_file_parents): Use it, along with the new
2822         savewd module, to avoid some race conditions.
2823         * src/mkdir.c: Include savewd.h.
2824         (struct mkdir_options): New members make_ancestor_function, mode,
2825         mode_bits.
2826         (make_ancestor): Return 1 if the resulting directory is not readable.
2827         (process_dir): New function.
2828         (main): Use it, along with new savewd module, to avoid some
2829         race conditions.  Fill in new slots of struct mkdir_options, so
2830         that callees get the values.
2831         * tests/install/basic-1: Test for coreutils 5.97 bug that was
2832         fixed in coreutils 6.0, and which should still be fixed with
2833         this change.
2834         * tests/mkdir/p-3: Likewise.
2836 2006-09-15  Jim Meyering  <jim@meyering.net>
2838         * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
2839         The 2006-09-08 changes made it so "mv dir new-name/" would
2840         fail on NetBSD 1.6.  This makes it work once again.
2842 2006-09-14  Jim Meyering  <jim@meyering.net>
2844         * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
2845         Instead, since it's a little fragile, assert the condition.
2846         (target_directory_operand): Update comment to reflect latest change.
2848 2006-09-12  Paul Eggert  <eggert@cs.ucla.edu>
2850         * src/who.c (print_user): Rewrite to avoid warning from
2851         GCC 4.1.1 with -Wall.
2853 2006-09-12  Jim Meyering  <jim@meyering.net>
2855         * tests/mv/atomic: Check for specific strace output, rather than
2856         simply nonempty.  RHEL AS 4 would fail this test due to strace
2857         generating "[ Process PID=14434 runs in 32 bit mode. ]".
2858         Reported by Nelson Beebe.
2860 2006-09-11  Jim Meyering  <jim@meyering.net>
2862         * src/remove.c (remove_dir): Move new cache_stat_init call onto
2863         it's own line.
2864         (rm_1): Move declaration of "st" and new cache_stat_init call
2865         "down" to nearer where they're used.
2866         * src/c99-to-c89.diff: Add another set of curly braces.
2868 2006-09-10  Paul Eggert  <eggert@cs.ucla.edu>
2870         * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
2871         substr's last operand is very large.  Performance problem reported
2872         by Sebastian Kreft.
2874 2006-09-09  Jim Meyering  <jim@meyering.net>
2876         * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
2877         are no .m4 files.
2878         (sc_require_config_h): Skip this test if there are no version-
2879         controlled .c files.
2880         (sc_prohibit_assert_without_use): Likewise.
2882 2006-09-08  Jim Meyering  <jim@meyering.net>
2884         * bootstrap: Export CVS_RSH separate from its assignment, to work
2885         even with Solaris 10's /bin/sh.  Suggestion from Mark D. Baushke.
2887 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2889         * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
2890         no file operand is given, and standard input is any FIFO.
2891         This is in response to Open Group XCU ERN 114.
2892         * src/tail.c (main): Likewise.
2894 2006-09-08  Jim Meyering  <jim@meyering.net>
2896         mv and "cp -r" no longer fail when invoked with two arguments
2897         where the first one names a directory and the second name ends in
2898         a slash and doesn't exist.  E.g., "mv dir B/", for nonexistent B,
2899         now succeeds, once more. This reverts part of the 2004-06-27
2900         change for 5.3.0.
2901         * NEWS: Say the above.
2902         * src/mv.c (target_directory_operand): Don't require (here)
2903         that the target operand "look like" a directory.  This change
2904         pushes the test down to the rename syscall level, where a
2905         "mv dir existing-non-dir/" will mistakenly succeed on older systems
2906         that ignore trailing slashes in the rename destination argument.
2907         * src/cp.c (target_directory_operand): Likewise, but for cp.
2908         * tests/mv/trailing-slash: Exercise the above fixes.
2909         * tests/cp/trailing-slash: New file.
2910         * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
2912         * bootstrap: Use the previously unused variable, $src,
2913         to avoid repeating "$GNULIB_SRCDIR/$file".
2915         * bootstrap (cp_mark_as_generated): Don't use "local", to
2916         accommodate ancient "/bin/sh".  Suggested by Ralf Wildenhues.
2917         Rename now-global "$src" and "$dst" to have cp_ prefix.
2918         Safer, and avoids confusion.
2920         * bootstrap (cp_mark_as_generated): New function.
2921         (slurp): Use it to prepend editor hints and a warning that
2922         the file we're copying is generated.
2923         Suggestion from Bruce Korb.
2924         (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
2925         Fix last-minute typo.
2927 2006-09-07  Jim Meyering  <jim@meyering.net>
2929         * bootstrap: Revert last change.  There are less disruptive ways
2930         to mark these generated files as read-only.
2932         * src/c99-to-c89.diff: Update to have proper offsets.
2934 2006-09-06  Jim Meyering  <jim@meyering.net>
2936         Ensure that some gnulib-tool-generated files are read-only.
2937         * bootstrap (slurp): Put the body of this function in a sub-shell,
2938         with "umask a-w" so that all new files are read-only.  Remove each
2939         file before we write to it, in case it's read-only.
2940         Make po/Makevars and runtime-po/Makevars read-only, too.
2942 2006-09-05  Jim Meyering  <jim@meyering.net>
2944         * tests/cp/acl: Skip this test when cp lacks ACL support.
2945         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
2947         * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
2948         context from change of 2006-09-02.
2950 2006-09-04  Jim Meyering  <jim@meyering.net>
2952         * README-cvs: Fix typo in update command.
2954 2006-09-03  Jim Meyering  <jim@meyering.net>
2956         * NEWS: Tweak the wording in the new change description so that
2957         no one can think this change causes e.g., `rm -fr foo../' to fail.
2959         * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
2960         Use $CONFIG_HEADER, rather than hard-coding it.
2961         * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
2963 2006-09-02  Paul Eggert  <eggert@cs.ucla.edu>
2965         * NEWS: rm now rejects attempts to remove /, ./, and ../.
2966         * src/basename.c: Don't include dirname.h, since system.h does it now.
2967         * src/chmod.c: Likewise.
2968         * src/copy.c: Likewise.
2969         * src/cp.c: Likewise.
2970         * src/df.c: Likewise.
2971         * src/dircolors.c: Likewise.
2972         * src/dirname.c: Likewise.
2973         * src/du.c: Likewise.
2974         * src/install.c: Likewise.
2975         * src/ln.c: Likewise.
2976         * src/ls.c: Likewise.
2977         * src/mkdir.c: Likewise.
2978         * src/mv.c: Likewise.
2979         * src/remove.c: Likewise.
2980         * src/rm.c: Likewise.
2981         * src/rmdir.c: Likewise.
2982         * src/shred.c: Likewise.
2983         * src/split.c: Likewise.
2984         * src/su.c: Likewise.
2985         * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
2986         now.
2987         (dot_or_dotdot): Succeed even if "." or ".." is followed by a
2988         slash.
2989         * src/rm.c (usage, main): --preserve-root is now the default.
2990         * src/remove.h: Fix comment.
2991         * src/remove.c (cache_fstatat, cache_stat_init): New functions.
2992         (cache_statted, cache_stat_ok): New functions.
2993         (write_protected_non_symlink): Remove struct stat ** buf_p arg,
2994         which is no longer needed with the new functions.  All callers
2995         changed.
2996         (prompt, is_dir_lstat, remove_entry, remove_dir):
2997         New struct stat * arg.  All callers changed.
2998         (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
2999         (remove_cwd_entries, remove_dir, rm_1):
3000         Use and maintain the file status cache.
3001         (prompt, remove_entry): Omit the first "directory" in the diagnostic
3002         "Cannot remove directory `foo': is a directory".  This causes "rm"
3003         to pass a test case that it would otherwise fail now that it
3004         "knows" more about its argument.  I think the diagnostic is better
3005         without the first "directory" anyway.
3006         (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
3007         (rm_1): Reject attempts to remove /, ./, or ../.
3008         * tests/rm/Makefile.am (TESTS): Add r-4.
3009         * tests/rm/r-4: New file.
3011 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3013         * src/stat.c: Include <stddef.h>
3014         (alignof): New macro.
3015         (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
3016         Remove.
3017         (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
3018         (FSID_VAL): Remove.
3019         (print_statfs): If f_fsid isn't an integer, grab its words one
3020         at a time in little-endian order.  This is a bit easier to configure
3021         and should avoid a compilation failure on MacOS reported by Bruno
3022         Haible.
3024 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3026         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
3027         work around a Mac OS X porting problem reported by Bruno Haible in
3028         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
3029         (print_statfs): Use them.
3031         * bootstrap.conf (gnulib_modules): Add isapipe.
3032         * src/tail.c: Include isapipe.h.
3033         (IS_PIPE_LIKE_FILE_TYPE): Remove.
3034         (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
3035         tailable, since this seems to be portable.
3036         (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
3037         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
3039         * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
3040         it for us.
3042 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3044         * src/copy.c (copy_internal): Don't test whether macros like
3045         S_ISLNK are defined, since they're always defined now.
3046         * src/cp.c (main): Likewise.
3047         * src/ln.c (main): Likewise.
3048         * src/ls.c (get_link_name, make_link_name): Likewise.
3049         * src/mknod.c (main): Likewise.
3050         * src/mkfifo.c (usage): Likewise.
3051         * src/who.c (S_IWGRP): Likewise.
3053         Adjust to recent gnulib changes for the gnulib module.
3054         * bootstrap.conf (gnulib_modules): Add fcntl.
3055         * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove.  Other code
3056         is already assuming these macros are defined.
3057         (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
3058         (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
3059         Remove; the fcntl module now handles these.
3061         Adjust to recent gnulib changes for the inttypes module.
3062         * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
3063         (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
3065         * src/system.h: Don't bother to include <stdint.h>, since we can
3066         now assume inttypes.h does the equivalent of including stdint.h.
3068 2006-08-27  Jim Meyering  <jim@meyering.net>
3070         * src/copy.c (copy_internal): Don't make a backup if the last
3071         component of the source name is "." or "..".
3072         Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
3073         * NEWS: Mention this.
3074         * tests/cp/src-base-dot: New file.  Test for the above fix.
3075         * tests/cp/Makefile.am (TESTS): Add src-base-dot.
3077         * src/system.h (DOT_OR_DOTDOT): Remove macro.  Rewrite as a...
3078         (dot_or_dotdot): ...new static inline function.
3079         * src/remove.c (rm_1): Reflect this renaming.
3080         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
3082         * src/copy.c (copy_internal): Add comments.
3084 2006-08-26  Paul Eggert  <eggert@cs.ucla.edu>
3086         * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
3087         since Automake supplies them for us.  It always did -I$(srcdir),
3088         and with the recent change to AC_CONFIG_HEADERS in configure.ac it
3089         is now also doing -I../lib.
3091         * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
3092         Fail if the first "echo" fails.  Suppress diagnostics from "ls po/*.po"
3093         since there might not be any .po files.
3094         (WGET_COMMAND): Set to empty if wget doesn't
3095         seem to be available.
3097 2006-08-26  Jim Meyering  <jim@meyering.net>
3099         This test was failing in some environments.
3100         * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
3101         to set LS_COLORS in the environment.
3102         * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
3103         Reported by Bob Proulx.
3105         * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
3107         * Makefile.am (EXTRA_DIST): Remove these files here, too:
3108         .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
3109         .x-sc_two_space_separator_in_usage.
3111         Fix "mv --verbose --backup" so its output includes the
3112         " (backup: foo.~1~)" suffix also when backing up a directory.
3113         * NEWS: Report this bug fix.
3114         * src/copy.c (emit_verbose): New function, factored out of...
3115         (copy_internal): ...here.  Use the new function.
3116         * tests/mv/backup-dir: Test for the above fix.
3117         * tests/mv/Makefile.am (TESTS): Add backup-dir.
3119 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3121         * .x-sc_no_if_have_config_h: Remove; no longer needed.
3122         * .x-sc_prohibit_assert_without_use: Remove; it was empty.
3123         * .x-sc_two_space_separator_in_usage: Likewise.
3124         * Makefile.maint (sc_no_have_config_h): Renamed from
3125         sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
3126         is absent everywhere.
3127         * bootstrap.conf (gnulib_modules): Add config-h.
3128         * src/shred.c: Include <config.h> unconditionally, since
3129         we now assume config.h exists.
3130         * src/dircolors.c: Likewise.
3132 2006-08-26  Jim Meyering  <jim@meyering.net>
3134         "ls --color" would highlight other-writable and sticky directories
3135         no differently than regular directories on a file system with
3136         dirent.d_type support.
3137         * NEWS: Say the above.
3138         * src/ls.c (gobble_file): With --color, also stat the file when
3139         we know it is a directory.
3140         Derived from an anonymous one-line fix and bug report:
3141         <http://savannah.gnu.org/bugs/?15043>.
3142         * tests/ls/color-dtype-dir: New file.  Test for the above fix.
3143         * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
3145 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3147         * .cvsignore: Remove stamp-h1.  Add coreutils-*, to ignore
3148         tarballs.
3149         * bootstrap.conf: Add configmake, verify.
3150         * src/.cvsignore: Remove localedir.h.
3151         * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
3152         subsumed by configmake.
3153         * src/system.h: Include configmake.h rather than localedir.h
3154         (LOCALEDIR): New macro.
3156         Rewrite to avoid some unnecessary casts, macros, literals.
3157         * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
3158         not macros.
3159         (SECTOR_SIZE, SECTOR_MASK): New constants.
3160         (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
3161         and use the SECTOR_* constants when applicable.  Check for size <
3162         0 rather than size == -1, since negative-size files are a sign of
3163         trouble anyway.
3165 2006-08-25  Bruno Haible  <bruno@clisp.org>
3167         * src/shred.c (dopass): Assume a continuable error if EIO even
3168         if the current position is not a multiple of 512.
3170 2006-08-24  Jim Meyering  <jim@meyering.net>
3172         * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
3174 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
3176         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define.  This
3177         macro was being used without being defined.
3178         (SB_F_NAMEMAX): Remove cast.
3179         (f_fsid) [BeOS]: Likewise.
3180         (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
3181         All uses changed.
3182         (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
3183         functions.
3184         (xstrcat): Remove.  All uses changed to use the above functions.
3185         (print_statfs, print_stat): 2nd arg is now the prefix len, not the
3186         buffer len.  All uses changed.  Output '?', not '*', for unknown
3187         data or errors.  Do not assume signed values can be interchanged
3188         with unsigned when printing.
3189         (print_statfs): For %i, print the fsid as a single int, not as a
3190         pair.
3191         (print_it): Quote invalid format better.
3193         * NEWS: printf supports the I flag.
3194         * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
3196 2006-08-23  Bruno Haible  <bruno@clisp.org>
3198         * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
3199         (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
3200         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
3202         * src/ls.c (SA_RESTART): Fallback define.
3204 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
3206         * src/system.h (EDQUOT): Define if not already defined.
3207         Problem reported by Bruno Haible for BeOS.
3209         * .cvsignore: Remove config.h, config.hin, as they are now
3210         in lib.
3211         * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
3212         to lib.
3213         * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
3215         * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
3216         to accommodate today's gnulib change.
3218 2006-08-23  Jim Meyering  <jim@meyering.net>
3220         * NEWS: Mention the sweeping infrastructure changes.
3222 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3224         * bootstrap.conf (gnulib_modules): Add gnupload.
3225         * Makefile.maint (emit_upload_commands): gnupload is now
3226         in build-aux.
3227         * gnupload: Remove from CVS, since it's now a gnulib module.
3229         * bootstrap (bootstrap_conf_cleanup): Remove.
3230         (excluded_files): New var.
3231         * bootstrap.conf: Likewise.
3232         * bootstrap (slurp): Exclude files early if they're in the
3233         excluded_files list.  That way, their names don't get put into
3234         .cvsignore.
3236         * aclocal.m4, config.hin, configure:
3237         Remove from CVS, since ./bootstrap generates them automatically.
3238         * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
3239         configure, *.cache, *.lineno, *.log.
3240         Remove more-specific entries.  This catches files like configure.lineno.
3241         * man/.cvsignore: Add Makefile.in.
3242         * src/.cvsignore: Add Makefile.in.
3243         Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
3245         * tests/.cvsignore:
3246         * tests/chgrp/.cvsignore:
3247         * tests/chmod/.cvsignore:
3248         * tests/chown/.cvsignore:
3249         * tests/cp/.cvsignore:
3250         * tests/cut/.cvsignore:
3251         * tests/dd/.cvsignore:
3252         * tests/dircolors/.cvsignore:
3253         * tests/du/.cvsignore:
3254         * tests/expr/.cvsignore:
3255         * tests/factor/.cvsignore:
3256         * tests/fmt/.cvsignore:
3257         * tests/head/.cvsignore:
3258         * tests/install/.cvsignore:
3259         * tests/join/.cvsignore:
3260         * tests/ln/.cvsignore:
3261         * tests/ls/.cvsignore:
3262         * tests/ls-2/.cvsignore:
3263         * tests/md5sum/.cvsignore:
3264         * tests/misc/.cvsignore:
3265         * tests/mkdir/.cvsignore:
3266         * tests/mv/.cvsignore:
3267         * tests/od/.cvsignore:
3268         * tests/pr/.cvsignore:
3269         * tests/readlink/.cvsignore:
3270         * tests/rm/.cvsignore:
3271         * tests/rmdir/.cvsignore:
3272         * tests/seq/.cvsignore:
3273         * tests/sha1sum/.cvsignore:
3274         * tests/shred/.cvsignore:
3275         * tests/sort/.cvsignore:
3276         * tests/stty/.cvsignore:
3277         * tests/sum/.cvsignore:
3278         * tests/tac/.cvsignore:
3279         * tests/tail/.cvsignore:
3280         * tests/tail-2/.cvsignore:
3281         * tests/tee/.cvsignore:
3282         * tests/test/.cvsignore:
3283         * tests/touch/.cvsignore:
3284         * tests/tr/.cvsignore:
3285         * tests/tsort/.cvsignore:
3286         * tests/unexpand/.cvsignore:
3287         * tests/uniq/.cvsignore:
3288         * tests/wc/.cvsignore:
3289         Add Makefile.in.  Sort entries if necessary.  Remove *.I, *.E,
3290         *.X, *.O, *-tests, build-script, mk-script if they're never
3291         created in this directory.
3293 2006-08-22  Bruno Haible  <bruno@clisp.org>
3295         BeOS portability.
3296         * src/uptime.c: Include OS.h if it exists.
3297         (print_uptime): On BeOS, use the get_system_info function (actually a
3298         macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
3299         (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
3301 2006-08-22  Jim Meyering  <jim@meyering.net>
3303         * .cvsignore: Add ABOUT-NLS.
3305         Move the check-AUTHORS rule to be run as part of "make distcheck",
3306         rather than "make check".
3307         * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
3308         cause "make check" to fail on systems unable to build all binaries.
3309         * Makefile.maint (check-AUTHORS): New rule.
3310         (local-checks-available): Add it here.
3311         Reported by Bruno Haible.  Needed for BeOS.
3313 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3315         * src/df.c (print_header, show_dev): Use a column width that
3316         depends on the block size of -P is specified and not autoscaling.
3317         Problem reported by Gustavo G. Rondina in:
3318         http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
3320 2006-08-21  Jim Meyering  <jim@meyering.net>
3322         * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
3323         when the shell variable, SHELL, is not set.
3324         Trigger the failure with "(unset SHELL; make check TESTS=simple)".
3325         Reported by Sven Joachim in <http://bugs.debian.org/355368>.
3327         * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
3328         in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
3329         Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
3330         od: invalid type string `u8';
3331         this system doesn't provide a 8-byte integral type
3332         FIXME: add a test for this, but skip it when sizeof uintmax < 8.
3334 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3336         Add a bootstrap procedure, so that the CVS version contains fewer
3337         files and we bootstrap the rest from gnulib, gettext, etc.
3338         * README-cvs: New file.
3339         * bootstrap: New file.
3340         * bootstrap.conf: New file.
3341         * .x-sc_trailing_blank: Remove config-log, .gdb-history.  Add .po.
3342         * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
3343         of gnulib-tool.
3344         (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
3345         (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
3346         (gl_EARLY): Add.
3347         (gl_MACROS): Call just after gl_EARLY, just for clarity.
3348         * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
3349         * src/kill.c (strtoimax): Remove decl.
3350         * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
3351         * src/wc.c: Likewise.
3352         * src/ls.c (sort_files): Rewrite to avoid need for C99-style
3353         declaration, so that we don't need to patch this file.
3354         * src/printf.c (strtoimax, strtoumax): Remove decls.
3355         * src/su.c: Include getpass.h.
3356         (getpass): remove.
3357         * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
3358         Include inttypes.h unconditionally.
3359         (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
3360         (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
3361         (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
3362         (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
3363         (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
3365         * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
3366         * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
3367         * tests/chmod/Makefile.in, tests/chown/Makefile.in:
3368         * tests/cp/Makefile.in, tests/cut/Makefile.in:
3369         * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
3370         * tests/du/Makefile.in, tests/expr/Makefile.in:
3371         * tests/factor/Makefile.in, tests/fmt/Makefile.in:
3372         * tests/general/Makefile.in, tests/head/Makefile.in:
3373         * tests/install/Makefile.in, tests/join/Makefile.in:
3374         * tests/ln/Makefile.in, tests/ls/Makefile.in:
3375         * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
3376         * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
3377         * tests/mv/Makefile.in, tests/od/Makefile.in:
3378         * tests/pr/Makefile.in, tests/readlink/Makefile.in:
3379         * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
3380         * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
3381         * tests/shred/Makefile.in, tests/sort/Makefile.in:
3382         * tests/stty/Makefile.in, tests/sum/Makefile.in:
3383         * tests/tac/Makefile.in, tests/tail/Makefile.in:
3384         * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
3385         * tests/test/Makefile.in, tests/touch/Makefile.in:
3386         * tests/tr/Makefile.in, tests/tsort/Makefile.in:
3387         * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
3388         * tests/wc/Makefile.in:
3389         Remove from CVS, since ./bootstrap generates them automatically.
3391 2006-08-20  Eric Blake  <ebb9@byu.net>
3393         * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
3394         the patch from 2006-08-18 broke on cygwin.
3396 2006-08-20  Jim Meyering  <jim@meyering.net>
3398         * NEWS: Add a line for 6.2-cvs.
3399         * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
3401 2006-08-19  Jim Meyering  <jim@meyering.net>
3403         * Version 6.1.
3404         * NEWS: Record the 6.1 release date.
3405         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3407         * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
3409         Avoid test failure when `make check' is run through debuild.
3410         * tests/help-version: Ensure that $SHELL is set to some value
3411         and exported.  Patch from Sven Joachim.  For details, see
3412         <http://bugs.debian.org/355368>.
3414         * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
3416         * README: Describe potential "pre-C99 build failure", and work-around.
3418         Some of my 2006-07-03 changes to tests/*/Makefile.am were being
3419         backed out due to updates provoked by the copyright changes.
3420         * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
3421         it propagates to the derived Makefile.am files.
3422         ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
3423         so we don't mistakenly edit them again.
3424         * tests/cut/Makefile.am: Regenerate.
3425         * tests/head/Makefile.am: Likewise.
3426         * tests/join/Makefile.am: Likewise.
3427         * tests/pr/Makefile.am: Likewise.
3428         * tests/sort/Makefile.am: Likewise.
3429         * tests/tac/Makefile.am: Likewise.
3430         * tests/tail/Makefile.am: Likewise.
3431         * tests/test/Makefile.am: Likewise.
3432         * tests/tr/Makefile.am: Likewise.
3433         * tests/uniq/Makefile.am: Likewise.
3434         * tests/wc/Makefile.am: Likewise.
3436         * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
3437         when the file's apparent size is not a multiple of its block size.
3438         * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
3439         For some file sizes, writing that single byte would unnecessarily
3440         waste a few file blocks.  That write may have been necessary in the
3441         early days of Linux, but now, removing it should be safe.
3442         Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
3443         * tests/cp/sparse: New test for the above.
3444         * tests/cp/Makefile.am (TESTS): Add sparse.
3446         * tests/sparse-file: New file, essence factored out of...
3447         * tests/du/8gb: ... here.  Use the new script.
3449 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
3451         * src/system.h (select_plural): Reduce by 1000000, not 1000, since
3452         the CVS gettext manual now suggests 1000000.
3454 2006-08-18  Bruno Haible  <bruno@clisp.org>
3456         Add support for NetBSD 3.0.
3457         * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
3458         f_fstypename.
3459         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
3460         has a field f_fstypename.
3461         This undoes the 2006-08-15 to src/stat.c.
3463 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
3465         Copyright notice fixes.
3467         * COPYING: Upgrade to latest version from FSF.
3469         * src/uname.c: Use (C) in copyright notice.
3471         * .vg-suppressions: Add copyright notice.
3472         * ChangeLog: Likewise.
3473         * ChangeLog-2005: Likewise.
3474         * Makefile.am: Likewise.
3475         * NEWS: Likewise.
3476         * README: Likewise.
3477         * README-valgrind: Likewise.
3478         * TODO: Likewise.
3479         * announce-gen: Likewise.
3480         * man/Makefile.am: Likewise.
3481         * man/chmod.x: Likewise.
3482         * man/chown.x: Likewise.
3483         * man/df.x: Likewise.
3484         * man/du.x: Likewise.
3485         * man/rm.x: Likewise.
3486         * src/dircolors.hin: Likewise.
3487         * src/du-tests: Likewise.
3488         * src/extract-magic: Likewise.
3489         * src/tac-pipe.c: Likewise.
3490         * src/wheel-gen.pl: Likewise.
3491         * tests/Coreutils.pm: Likewise.
3492         * tests/Makefile.am.in: Likewise.
3493         * tests/acl: Likewise.
3494         * tests/envvar-check: Likewise.
3495         * tests/expensive: Likewise.
3496         * tests/group-names: Likewise.
3497         * tests/help-version: Likewise.
3498         * tests/mk-script: Likewise.
3499         * tests/priv-check: Likewise.
3500         * tests/rwx-to-mode: Likewise.
3501         * tests/sample-test: Likewise.
3502         * tests/setgid-check: Likewise.
3503         * tests/chgrp/basic: Likewise.
3504         * tests/chgrp/deref: Likewise.
3505         * tests/chgrp/no-x: Likewise.
3506         * tests/chgrp/posix-H: Likewise.
3507         * tests/chgrp/recurse: Likewise.
3508         * tests/chmod/c-option: Likewise.
3509         * tests/chmod/equal-x: Likewise.
3510         * tests/chmod/equals: Likewise.
3511         * tests/chmod/no-x: Likewise.
3512         * tests/chmod/octal: Likewise.
3513         * tests/chmod/setgid: Likewise.
3514         * tests/chmod/umask-x: Likewise.
3515         * tests/chmod/usage: Likewise.
3516         * tests/chown/basic: Likewise.
3517         * tests/chown/deref: Likewise.
3518         * tests/chown/separator: Likewise.
3519         * tests/cp/Makefile.am: Likewise.
3520         * tests/cp/acl: Likewise.
3521         * tests/cp/backup-1: Likewise.
3522         * tests/cp/backup-is-src: Likewise.
3523         * tests/cp/cp-HL: Likewise.
3524         * tests/cp/cp-deref: Likewise.
3525         * tests/cp/cp-mv-backup: Likewise.
3526         * tests/cp/cp-parents: Likewise.
3527         * tests/cp/deref-slink: Likewise.
3528         * tests/cp/dir-rm-dest: Likewise.
3529         * tests/cp/dir-slash: Likewise.
3530         * tests/cp/dir-vs-file: Likewise.
3531         * tests/cp/fail-perm: Likewise.
3532         * tests/cp/into-self: Likewise.
3533         * tests/cp/link: Likewise.
3534         * tests/cp/link-no-deref: Likewise.
3535         * tests/cp/link-preserve: Likewise.
3536         * tests/cp/no-deref-link1: Likewise.
3537         * tests/cp/no-deref-link2: Likewise.
3538         * tests/cp/no-deref-link3: Likewise.
3539         * tests/cp/perm: Likewise.
3540         * tests/cp/preserve-2: Likewise.
3541         * tests/cp/r-vs-symlink: Likewise.
3542         * tests/cp/same-file: Likewise.
3543         * tests/cp/slink-2-slink: Likewise.
3544         * tests/cp/special-bits: Likewise.
3545         * tests/cp/symlink-slash: Likewise.
3546         * tests/cut/Makefile.am: Likewise.
3547         * tests/cut/Test.pm: Likewise.
3548         * tests/dd/misc: Likewise.
3549         * tests/dd/not-rewound: Likewise.
3550         * tests/dd/skip-seek: Likewise.
3551         * tests/dd/skip-seek2: Likewise.
3552         * tests/dd/unblock-sync: Likewise.
3553         * tests/dircolors/simple: Likewise.
3554         * tests/du/2g: Likewise.
3555         * tests/du/8gb: Likewise.
3556         * tests/du/Makefile.am: Likewise.
3557         * tests/du/basic: Likewise.
3558         * tests/du/deref: Likewise.
3559         * tests/du/deref-args: Likewise.
3560         * tests/du/exclude: Likewise.
3561         * tests/du/fd-leak: Likewise.
3562         * tests/du/files0-from: Likewise.
3563         * tests/du/hard-link: Likewise.
3564         * tests/du/inaccessible-cwd: Likewise.
3565         * tests/du/long-from-unreadable: Likewise.
3566         * tests/du/long-sloop: Likewise.
3567         * tests/du/no-deref: Likewise.
3568         * tests/du/no-x: Likewise.
3569         * tests/du/restore-wd: Likewise.
3570         * tests/du/slash: Likewise.
3571         * tests/du/slink: Likewise.
3572         * tests/du/trailing-slash: Likewise.
3573         * tests/du/two-args: Likewise.
3574         * tests/expr/basic: Likewise.
3575         * tests/factor/basic: Likewise.
3576         * tests/fmt/basic: Likewise.
3577         * tests/fmt/long-line: Likewise.
3578         * tests/general/Makefile.am: Likewise.
3579         * tests/general/atgeneral.m4: Likewise.
3580         * tests/general/dd.at: Likewise.
3581         * tests/head/Makefile.am: Likewise.
3582         * tests/head/Test.pm: Likewise.
3583         * tests/install/basic-1: Likewise.
3584         * tests/install/create-leading: Likewise.
3585         * tests/install/d-slashdot: Likewise.
3586         * tests/install/trap: Likewise.
3587         * tests/join/Makefile.am: Likewise.
3588         * tests/join/Test.pm: Likewise.
3589         * tests/ln/backup-1: Likewise.
3590         * tests/ln/misc: Likewise.
3591         * tests/ln/sf-1: Likewise.
3592         * tests/ln/target-1: Likewise.
3593         * tests/ls/Makefile.am: Likewise.
3594         * tests/ls/Test.pm: Likewise.
3595         * tests/ls/dangle: Likewise.
3596         * tests/ls/dired: Likewise.
3597         * tests/ls/file-type: Likewise.
3598         * tests/ls/follow-slink: Likewise.
3599         * tests/ls/infloop: Likewise.
3600         * tests/ls/inode: Likewise.
3601         * tests/ls/m-option: Likewise.
3602         * tests/ls/no-arg: Likewise.
3603         * tests/ls/recursive: Likewise.
3604         * tests/ls/rt-1: Likewise.
3605         * tests/ls/stat-dtype: Likewise.
3606         * tests/ls/stat-failed: Likewise.
3607         * tests/ls/stat-vs-dirent: Likewise.
3608         * tests/ls/symlink-slash: Likewise.
3609         * tests/ls/time-1: Likewise.
3610         * tests/ls-2/tests: Likewise.
3611         * tests/md5sum/basic-1: Likewise.
3612         * tests/md5sum/newline-1: Likewise.
3613         * tests/misc/Makefile.am: Likewise.
3614         * tests/misc/base64: Likewise.
3615         * tests/misc/basename: Likewise.
3616         * tests/misc/cat-proc: Likewise.
3617         * tests/misc/close-stdout: Likewise.
3618         * tests/misc/csplit: Likewise.
3619         * tests/misc/date: Likewise.
3620         * tests/misc/date-sec: Likewise.
3621         * tests/misc/df: Likewise.
3622         * tests/misc/dirname: Likewise.
3623         * tests/misc/expand: Likewise.
3624         * tests/misc/false-status: Likewise.
3625         * tests/misc/fold: Likewise.
3626         * tests/misc/head-c: Likewise.
3627         * tests/misc/head-elide-tail: Likewise.
3628         * tests/misc/head-pos: Likewise.
3629         * tests/misc/mknod: Likewise.
3630         * tests/misc/nice: Likewise.
3631         * tests/misc/nl: Likewise.
3632         * tests/misc/nohup: Likewise.
3633         * tests/misc/paste-no-nl: Likewise.
3634         * tests/misc/pathchk1: Likewise.
3635         * tests/misc/printf: Likewise.
3636         * tests/misc/printf-hex: Likewise.
3637         * tests/misc/pwd-long: Likewise.
3638         * tests/misc/sha224sum: Likewise.
3639         * tests/misc/sha256sum: Likewise.
3640         * tests/misc/sha384sum: Likewise.
3641         * tests/misc/sha512sum: Likewise.
3642         * tests/misc/shuf: Likewise.
3643         * tests/misc/sort-merge: Likewise.
3644         * tests/misc/sort-rand: Likewise.
3645         * tests/misc/split-a: Likewise.
3646         * tests/misc/split-fail: Likewise.
3647         * tests/misc/split-l: Likewise.
3648         * tests/misc/stat-fmt: Likewise.
3649         * tests/misc/stat-printf: Likewise.
3650         * tests/misc/tac-continue: Likewise.
3651         * tests/misc/test-diag: Likewise.
3652         * tests/misc/tty-eof: Likewise.
3653         * tests/misc/wc-files0: Likewise.
3654         * tests/misc/wc-files0-from: Likewise.
3655         * tests/mkdir/concurrent-1: Likewise.
3656         * tests/mkdir/p-1: Likewise.
3657         * tests/mkdir/p-2: Likewise.
3658         * tests/mkdir/p-3: Likewise.
3659         * tests/mkdir/p-slashdot: Likewise.
3660         * tests/mkdir/p-thru-slink: Likewise.
3661         * tests/mkdir/parents: Likewise.
3662         * tests/mkdir/perm: Likewise.
3663         * tests/mkdir/special-1: Likewise.
3664         * tests/mkdir/t-slash: Likewise.
3665         * tests/mkdir/writable-under-readonly: Likewise.
3666         * tests/mv/Makefile.am: Likewise.
3667         * tests/mv/acl: Likewise.
3668         * tests/mv/atomic: Likewise.
3669         * tests/mv/backup-is-src: Likewise.
3670         * tests/mv/childproof: Likewise.
3671         * tests/mv/diag: Likewise.
3672         * tests/mv/dir-file: Likewise.
3673         * tests/mv/dir2dir: Likewise.
3674         * tests/mv/dup-source: Likewise.
3675         * tests/mv/force: Likewise.
3676         * tests/mv/hard-2: Likewise.
3677         * tests/mv/hard-3: Likewise.
3678         * tests/mv/hard-4: Likewise.
3679         * tests/mv/hard-link-1: Likewise.
3680         * tests/mv/i-1: Likewise.
3681         * tests/mv/i-2: Likewise.
3682         * tests/mv/i-3: Likewise.
3683         * tests/mv/i-4: Likewise.
3684         * tests/mv/i-link-no: Likewise.
3685         * tests/mv/into-self: Likewise.
3686         * tests/mv/into-self-2: Likewise.
3687         * tests/mv/into-self-3: Likewise.
3688         * tests/mv/into-self-4: Likewise.
3689         * tests/mv/leak-fd: Likewise.
3690         * tests/mv/mv-special-1: Likewise.
3691         * tests/mv/no-target-dir: Likewise.
3692         * tests/mv/part-fail: Likewise.
3693         * tests/mv/part-hardlink: Likewise.
3694         * tests/mv/part-rename: Likewise.
3695         * tests/mv/part-symlink: Likewise.
3696         * tests/mv/partition-perm: Likewise.
3697         * tests/mv/perm-1: Likewise.
3698         * tests/mv/reply-no: Likewise.
3699         * tests/mv/setup: Likewise.
3700         * tests/mv/to-symlink: Likewise.
3701         * tests/mv/trailing-slash: Likewise.
3702         * tests/mv/update: Likewise.
3703         * tests/mv/vfat: Likewise.
3704         * tests/od/od-N: Likewise.
3705         * tests/od/x8: Likewise.
3706         * tests/pr/Makefile.am: Likewise.
3707         * tests/pr/Test.pm: Likewise.
3708         * tests/readlink/can-e: Likewise.
3709         * tests/readlink/can-f: Likewise.
3710         * tests/readlink/can-m: Likewise.
3711         * tests/readlink/rl-1: Likewise.
3712         * tests/rm/Makefile.am: Likewise.
3713         * tests/rm/cycle: Likewise.
3714         * tests/rm/dangling-symlink: Likewise.
3715         * tests/rm/deep-1: Likewise.
3716         * tests/rm/dir-no-w: Likewise.
3717         * tests/rm/dir-nonrecur: Likewise.
3718         * tests/rm/dot-rel: Likewise.
3719         * tests/rm/empty-inacc: Likewise.
3720         * tests/rm/empty-name: Likewise.
3721         * tests/rm/f-1: Likewise.
3722         * tests/rm/fail-2eperm: Likewise.
3723         * tests/rm/fail-eperm: Likewise.
3724         * tests/rm/hash: Likewise.
3725         * tests/rm/i-1: Likewise.
3726         * tests/rm/i-no-r: Likewise.
3727         * tests/rm/inaccessible: Likewise.
3728         * tests/rm/interactive-always: Likewise.
3729         * tests/rm/interactive-once: Likewise.
3730         * tests/rm/ir-1: Likewise.
3731         * tests/rm/isatty: Likewise.
3732         * tests/rm/no-give-up: Likewise.
3733         * tests/rm/r-1: Likewise.
3734         * tests/rm/r-2: Likewise.
3735         * tests/rm/r-3: Likewise.
3736         * tests/rm/rm1: Likewise.
3737         * tests/rm/rm2: Likewise.
3738         * tests/rm/rm3: Likewise.
3739         * tests/rm/rm4: Likewise.
3740         * tests/rm/rm5: Likewise.
3741         * tests/rm/sunos-1: Likewise.
3742         * tests/rm/unread2: Likewise.
3743         * tests/rm/unread3: Likewise.
3744         * tests/rm/unreadable: Likewise.
3745         * tests/rmdir/fail-perm: Likewise.
3746         * tests/rmdir/ignore: Likewise.
3747         * tests/rmdir/t-slash: Likewise.
3748         * tests/seq/basic: Likewise.
3749         * tests/sha1sum/basic-1: Likewise.
3750         * tests/sha1sum/sample-vec: Likewise.
3751         * tests/shred/exact: Likewise.
3752         * tests/shred/remove: Likewise.
3753         * tests/sort/Makefile.am: Likewise.
3754         * tests/sort/Test.pm: Likewise.
3755         * tests/sort-time/Makefile: Likewise.
3756         * tests/sort-time/README: Likewise.
3757         * tests/sort-time/rand-gen: Likewise.
3758         * tests/stty/basic-1: Likewise.
3759         * tests/stty/row-col-1: Likewise.
3760         * tests/sum/basic-1: Likewise.
3761         * tests/sum/sysv: Likewise.
3762         * tests/tac/Makefile.am: Likewise.
3763         * tests/tac/Test.pm: Likewise.
3764         * tests/tail/Makefile.am: Likewise.
3765         * tests/tail/Test.pm: Likewise.
3766         * tests/tail-2/Makefile.am: Likewise.
3767         * tests/tail-2/append-only: Likewise.
3768         * tests/tail-2/assert: Likewise.
3769         * tests/tail-2/assert-2: Likewise.
3770         * tests/tail-2/big-4gb: Likewise.
3771         * tests/tail-2/fflush: Likewise.
3772         * tests/tail-2/infloop-1: Likewise.
3773         * tests/tail-2/proc-ksyms: Likewise.
3774         * tests/tail-2/start-middle: Likewise.
3775         * tests/tail-2/tail-n0f: Likewise.
3776         * tests/tee/basic: Likewise.
3777         * tests/tee/dash: Likewise.
3778         * tests/test/Makefile.am: Likewise.
3779         * tests/test/Test.pm: Likewise.
3780         * tests/touch/Makefile.am: Likewise.
3781         * tests/touch/dangling-symlink: Likewise.
3782         * tests/touch/empty-file: Likewise.
3783         * tests/touch/fail-diag: Likewise.
3784         * tests/touch/fifo: Likewise.
3785         * tests/touch/no-create-missing: Likewise.
3786         * tests/touch/no-rights: Likewise.
3787         * tests/touch/not-owner: Likewise.
3788         * tests/touch/obsolescent: Likewise.
3789         * tests/touch/read-only: Likewise.
3790         * tests/touch/relative: Likewise.
3791         * tests/tr/Makefile.am: Likewise.
3792         * tests/tr/Test.pm: Likewise.
3793         * tests/tr/failures: Likewise.
3794         * tests/tsort/basic-1: Likewise.
3795         * tests/unexpand/basic-1: Likewise.
3796         * tests/uniq/Makefile.am: Likewise.
3797         * tests/uniq/Test.pm: Likewise.
3798         * tests/wc/Makefile.am: Likewise.
3799         * tests/wc/Test.pm: Likewise.
3801 2006-08-17  Jim Meyering  <jim@meyering.net>
3803         ls -CF would misalign columns in some cases.
3804         * src/ls.c (get_type_indicator): New function.  extracted from...
3805         (print_type_indicator): ...here.  Use it.
3806         (length_of_file_name_and_frills): Use it here, too, rather than
3807         assuming stat.st_mode is valid.
3808         Reported by Andreas Schwab, here:
3809         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
3810         See the test for this above. FYI, I did ls -CF /proc and visually
3811         inspected the result.
3813         * src/copy.c (copy_internal, same_file_ok): Adjust comments not
3814         to mention the now-removed cp_options.xstat member.
3816         * Makefile.maint (patch-check): Adapt to work now that the patch
3817         modifies more than one file in src/.
3819         With this patch, permit building with Solaris cc on Solaris 7.
3820         * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
3821         This integrates patches from Bruno Haible.
3823 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
3825         Fix some problems reported by Bruno Haible.
3826         * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
3827         Skip this test if "chmod g+s d" silently does nothing.
3828         * tests/ls-2/tests: Skip this test suite if we can't set up files
3829         properly for the setuid-etc test.  This simplifies some of the
3830         hacks we were using to work around porting problems.
3832 2006-08-16  Jim Meyering  <jim@meyering.net>
3834         * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
3835         * tests/cp/acl: Instead, skip the test if either setfacl
3836         or getfacl fails.
3837         Reported by Michael Stone.
3839 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
3841         * tests/lang-default (LC_ALL): Set to "C", so we get
3842         English-language diagnostics.  Unset the other variables; it
3843         should be portable to use 'unset' for this stuff nowadays.
3844         Problem reported by Bruno Haible.  Using "C" reverses the
3845         2000-10-22 change to fileutils in this area.
3847         Fix bugs when printing plurals of numbers that are not
3848         unsigned long int values.
3849         * src/system.h (select_plural): New function.
3850         * src/md5sum.c (digest_check): Use select_plural to avoid bug.
3851         * src/uptime.c (print_uptime): Likewise.
3852         * src/dd.c (print_stats): Likewise.  Also, don't use ngettext to
3853         print a floating point number, as reducing to 0 or 1 doesn't work
3854         for some languages.  Instead, just use "s" for seconds since it
3855         doesn't need a plural form.
3857 2006-08-16  Bruno Haible  <bruno@clisp.org>
3859         Old versions of gzip would write --help output to stderr, and it
3860         would be annoying to see that in the output of every "make" command.
3861         * Makefile.maint (gzip_rsyncable): Throw away stderr output of
3862         "gzip --help".
3864 2006-08-16  Andreas Schwab  <schwab@suse.de>
3866         * tests/cp/acl: Don't use non-portable == operator for test.
3868 2006-08-16  Jim Meyering  <jim@meyering.net>
3870         * tests/ls/stat-dtype: Use stat to test file system type, rather
3871         than df -T, in case /etc/mtab lies.  Reported by Michael Stone.
3873 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3875         * NEWS: Mention that df exits with nonzero status if it generates
3876         no output.  This change was in 6.0 but inadvertently unmentioned.
3877         * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
3878         a boolean.
3879         (show_dev): Don't set it until we actually output something.
3880         Print the header if this is the first output.
3881         (main): Don't print a header, as that is now show_dev's job.
3882         * tests/misc/Makefile.am (TESTS): Add df.
3883         * tests/misc/df: New file.
3885 2006-08-15  Eric Blake  <ebb9@byu.net>
3887         * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
3888         statvfs.f_type not present.  See
3889         <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
3891 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3893         * src/dd.c (print_stats): Don't substitute "1" for number, as this
3894         causes confusion for the Hungarian translators.  Problem reported
3895         by Egmont Koblinger here:
3896         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
3898 2006-08-15  Jim Meyering  <jim@meyering.net>
3900         * .x-sc_require_config_h: Add lib/at-func.c.
3902         * NEWS: Add a line for 6.1-cvs.
3903         * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
3905 2006-08-15  Jim Meyering  <jim@meyering.net>
3907         * Version 6.0.
3908         * NEWS: Record the 6.0 release date.
3909         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3911         * TODO: Add an item (convert to use gnulib-tool), add to the plan
3912         for id-vs-getgrouplist, and remove a few completed items.
3914         * Makefile.maint (alpha beta major): Fix syntax error.
3916 2006-08-13  Jim Meyering  <jim@meyering.net>
3918         * src/shred.c (usage): Don't indent the second line of an item.
3919         Otherwise, help2man would misformat the output.
3920         Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
3922 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
3924         * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
3925         Suggested by Eric Blake to avoid problems like
3926         <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
3928 2006-08-11  Jim Meyering  <jim@meyering.net>
3930         * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
3931         failure that this test checks for (stat/dirent inode mismatch at
3932         a mount point), so continue to give a diagnostic about the failure,
3933         but don't actually count it as a failure.
3935 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3937         * ABOUT-NLS: Update from gettext 0.15.
3938         * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
3940         * src/csplit.c (struct control): Remove fastmap member.
3941         (extract_regexp): Allocate fastmap separately, since otherwise
3942         it might move due to a realloc.  This fixes a bug that led
3943         to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
3945 2006-08-10  Jim Meyering  <jim@meyering.net>
3947         * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
3948         reports "Linux".  This avoids a failure on Solaris 10's tmpfs.
3949         Redirect both stdout and stderr of df invocations.
3951         * src/dircolors.hin: Add a TERM directive for each of the following:
3952         ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
3953         rxvt-cygwin-native, screen.linux, xterm-256color.
3954         Sort the TERM directives.
3955         From Mike Frysinger.
3957 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3959         * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
3960         See Debian bug 373736.
3962         * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
3963         bug 317503.
3965         * src/.cvsignore: Add shuf.
3967         * Makefile.maint: Remove the po-update procedure; it doesn't
3968         work with the new repository on http://www.iro.umontreal.ca/.
3969         For now I guess we'll have to fix things by hand.
3970         (do-po-update, po-update): Remove.  All references removed.
3972         * src/shuf.c (next_line): New function.
3973         (read_input): Use it, to avoid relying on GCC-specific behavior
3974         with void * arithmetic.  Problem reported by Bob Proulx.
3975         * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
3976         to detect this sort of problem automatically in the future.
3978 2006-08-09  Jim Meyering  <jim@meyering.net>
3980         * src/ls.c: Add a compile-time check to ensure that filetype
3981         and filetype_letter have the same number of elements.
3983         * tests/misc/sort-rand: Remove use of --seed=S.
3985 2006-08-08  Paul Eggert  <eggert@cs.ucla.edu>
3987         Add a command 'shuf', and modify shred and sort to use the new
3988         random number generator library of 'shuf'.
3990         * AUTHORS: Add shuf.
3991         * README: Likewise.
3992         * NEWS: Likewise.  Mention new --random-source option for shred
3993         and sort.  Move "sort +1 -2" notice to the appropriate section,
3994         and clarify its role with respect to POSIXLY_CORRECT.
3995         * man/.cvsignore: Add shuf.1.
3996         * man/Makefile.am (dist_man_MANS): Add shuf.1.
3997         (shuf.1): New dependency.
3998         * man/shuf.x: New file.
3999         * src/Makefile.am (bin_PROGRAMS): Add shuf.
4000         (EXTRA_DIST): Remove rand-isaac.c.
4001         (shuf_LDADD): New macro.
4002         * src/rand-isaac.c: Remove, moving most of its contents to
4003         lib/rand-isaac.c.
4004         * src/shuf.c: New file.
4005         * src/shred.c: Use new random-number interface rather than rand-isaac.c.
4006         Don't include rand-isaac.c; include randint.h and randread.h instead.
4007         (RANDOM_SOURCE_OPTION): New enum.
4008         (long_opts, usage, main): New option --random-source.
4009         * src/sort.c: Likewise.
4010         * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
4011         All callers changed to use randint interface.
4012         (fillrand): Remove.  All callers changed to use randread interface.
4013         (dopass): Remove dependency on ISAAC buffer size.
4014         (genpattern): Don't wipe the random state here.
4015         (randint_source): New static var.
4016         (clear_random_data): New function.
4017         (main): Allocate random source, and arrange to wipe it on exit.
4018         * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
4019         (longopts, usage, main): Remove undocumented --seed option;
4020         it's now replaced by --random-source.
4021         (rand_state, get_hash): Remove.
4022         (randread_source): New static var.
4023         (random_state, cmp_hashes, compare_random): New functions; they guarantee
4024         no collisions in the random hash function.
4025         (keycompare): Use compare_random for -R; don't fall back on comparing
4026         via memcoll, since compare_random does the right thing.
4027         * tests/misc/Makefile.am (TESTS): Add shuf.
4028         * tests/misc/shuf: New file.
4030 2006-07-29  Paul Eggert  <eggert@cs.ucla.edu>
4032         * src/copy.c (set_author): Preserve the st_author field via the
4033         file descriptor dest_desc.
4035 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
4037         * NEWS: chmod now preserves setuid and setgid bits on directories
4038         if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
4040         Fix test case problems if working directory is setgid,
4041         reported by Bob Proulx.
4042         * tests/cp/fail-perm: Use symbolic mode so that we clear
4043         setgid bit more reliably on directories.
4044         * tests/mkdir/special-1 (set_mode_string): Likewise.
4046 2006-07-27  Jim Meyering  <jim@meyering.net>
4048         * src/chgrp.c (usage): Use correct grammar in description of the
4049         --reference option
4050         * src/chown.c (usage): Likewise.
4052 2006-07-26  Thomas Schwinge  <tschwinge@gnu.org>  (tiny change)
4054         * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
4055         Correctly access SRC_SB's element ST_AUTHOR.
4057 2006-07-26  Jim Meyering  <jim@meyering.net>
4059         * tests/ls/stat-failed: Adapt to match new expected output.
4060         From Paul Eggert.
4062         * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
4063         than having the code test for all of the other types first.
4064         Hoist the set-uid/gid-testing code "up" into this new block.
4065         Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
4066         C_ORPHAN, not as C_FILE.
4068 2006-07-26  Jim Meyering  <jim@meyering.net>
4070         Checking in a change from Paul.
4072         2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
4074         * src/ls.c (DT_INIT): Remove.  All uses removed.
4075         (enum filetype): Use an ordinary enum rather than trying to keep
4076         the values in sync with DT_FIFO etc.  That way, we don't have
4077         to make special assumptions about them.  All uses changed.
4078         (whiteout): New constant member of enum filetype.
4079         (filetype_letter): New constant, for use with enum filetype.
4080         (FILETYPE_INDICATORS): New initializer list.
4081         (print_dir): Add case for DT_WHT.
4082         (gobble_file): If stat fails, don't discard information from
4083         readdir; instead, preserve it so it can be printed.
4084         (print_long_format): Fall back on readdir result if stat info
4085         is not available.  Use "?" to denote each unknown mode char,
4086         instead of an overall "?", since we now know some of the mode
4087         typically.
4088         (print_type_indicator): Now that MODE isn't necessarily
4089         useful, guard all uses.
4090         Now that two blocks in the type-checking tree can set "type = C_FILE",
4091         move the suffix-handling code out and down.
4093 2006-07-26  Jim Meyering  <jim@meyering.net>
4095         Prepare for the above change.
4096         * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
4097         and adjust uses.  From a patch by Paul Eggert.
4099 2006-07-26  Jim Meyering  <jim@meyering.net>
4101         * src/ls.c: Correct indentation/formatting in a few places.
4103 2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
4105         * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
4106         Problem report and fix from Bob Proulx.
4107         * NEWS: Clarify the "chmod 0500" news, and correct the vague
4108         statements about compatibility with BSD.
4110 2006-07-25  Jim Meyering  <jim@meyering.net>
4112         * src/ls.c (gobble_file): When handling a stat-failed entry,
4113         print the entry name not the absolute_name -- to be consistent
4114         with the usual case.
4115         * tests/ls/stat-failed: Update accordingly.
4117         * src/ls.c: Add parens around the new uses of ?: ternary operator.
4119         * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
4120         symlinks.
4122         Get --dired offsets right when handling stat-failed entries.
4123         * src/ls.c (print_long_format): Be careful to increment P by the
4124         appropriate amount, even when inode_number_width and nlink_width
4125         are zero.
4126         * tests/ls/stat-failed: Test for the above.
4128         * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
4129         have_acl member.  That would happen for a directory with both a
4130         non-stat'able entry and one with an ACL.
4132         * src/ls.c (gobble_file): Make it so failure to stat a
4133         non-command-line file provokes an exit status of 1, not 0.
4134         Say "cannot access" rather than "cannot stat".
4135         * tests/ls/stat-failed: New file/test, for the above.
4136         * tests/ls/Makefile.am (TESTS): Add stat-failed.
4137         * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
4138         of "cannot access " to diagnostic.
4140         * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
4142         * src/ls.c [enum filetype] (command_line): Remove member.  Not needed.
4143         Replace all occurrences of "type == command_line" with the
4144         equivalent, "command_line_arg".
4146         * src/ls.c: Apply the stat-failed parts of Red Hat's
4147         coreutils-selinux.patch.  From Ulrich Drepper.
4148         This makes it so files not mentioned on the command line (e.g.,
4149         names read from a directory that *is* mentioned on the command
4150         line) for which stat fails are still listed.  With --color,
4151         such files are colored just like ORPHANs (aka dangling symlinks).
4153         * src/df.c (n_valid_args): Declare global to be static.
4155 2006-07-24  Jim Meyering  <jim@meyering.net>
4157         * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
4158         system lacks d_type support.
4160 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4162         * man/chmod.x: Update to reflect recent changes to coreutils.texi.
4164 2006-07-21  Jim Meyering  <jim@meyering.net>
4166         * src/su.c (usage): Correct typo in --help output: s/commmand/command/
4167         Reported by Tim Waugh.
4168         Also remove the comment duplicating much of --help output.
4170         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
4171         name so the list remains alphabetized.
4173         Fix another bug: ls --indicator-style=file-type would call
4174         stat for a symlink, even though it wasn't always needed.
4175         In some cases, that unnecessary stat would cause ls to fail.
4176         * src/ls.c (gobble_file): Don't treat symlinks specially (in
4177         requiring a stat syscall).  Remove the offending exclusion.
4179         * NEWS: Mention the fix.
4181         * tests/ls/stat-dtype: New file/test, for the above fix.
4182         Also exercises the new df feature, below.
4184         * src/df.c (main): Fail and don't print the headers if no
4185         file system is processed.  This makes it easy to test whether
4186         a specified directory is on a file system of a given type or types.
4187         Otherwise, applications would have had to parse df's output.
4188         E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
4190         Fix a bug: ls --file-type worked like --indicator-style=slash,
4191         rather than like --indicator-style=file-type.
4192         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
4193         (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
4194         not to 'p'.
4195         (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
4196         * NEWS: Mention the fix.
4197         * tests/ls-2/tests (file-type): New test, for the above fix.
4199 2006-07-19  Jim Meyering  <jim@meyering.net>
4201         * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
4203         * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
4205 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4207         * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
4208         of directories alone unless you specify them explicitly.
4209         install and mkdir now implement X correctly.
4210         install now creates parent directories with mode 755, without
4211         changing their owner or group.
4212         * src/chmod.c (process_file): Adjust to mode_adjust API change.
4213         * src/install.c: Include mkancesdirs.h.
4214         (announce_mkdir, make_ancestor): New functions.
4215         (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
4216         (mode): Use it.
4217         (dir_mode, dir_mode_bits): New vars.
4218         (main): Set dir modes separately from nondir, so that the X
4219         op of -m works correctly.
4220         (main): Remove cwd_errno cruft, since make_dir_parents no longer
4221         affects cwd.  Adjust to new make_dir_parents API.
4222         (install_file_in_file_parents): 2nd arg is now char *, not char
4223         const *.  Use mkancesdirs instead of rolling our own code.
4224         (change_attributes): Don't worry about AFS, since that kludge
4225         should not be needed any more.
4226         * src/mkdir.c (struct mkdir_options): New struct.
4227         (announce_mkdir, make_ancestor): New functions.
4228         (main): Use them.  Adjust to mode_adjust API change.  Stick with
4229         umask 0.  Use make_dir_parents for all the work.
4230         * src/mkfifo.c (main): Adjust to new mode_adjust API.
4231         * src/mknod.c (main): Likewise.
4232         * tests/chmod/setgid: Do the setgid test instead of bailing.
4233         * tests/mkdir/p-3: Remove re_protect case that no longer applies.
4234         GNU chmod now behaves like other versions of chmod.
4235         * tests/mkdir/perm: Add a test for the X bug.
4237 2006-07-14  Paul Eggert  <eggert@cs.ucla.edu>
4239         * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
4240         This doesn't fix any bugs, since OUT always equals stdout, but it
4241         makes the code easier to understand.
4243 2006-07-14  Jim Meyering  <jim@meyering.net>
4245         * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
4246         rather than open-coding it.  Now supports mercurial, too.
4247         * .hgignore: New file.
4248         * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
4249         all generated files, including ones like configure and po/*.po
4250         that are currently version-controlled in cvs.
4252         * Makefile.am (EXTRA_DIST): Add a few more .??* files.
4253         They've been in CVS, just haven't been distributed before this.
4254         Distribute ChangeLog-2005, too.
4255         (MAINTAINERCLEANFILES): Add THANKS-to-translators.
4257 2006-07-11  Paul Eggert  <eggert@cs.ucla.edu>
4259         * src/system.h: Assume <dirent.h> exists, since gnulib assumes
4260         this now as well.
4262 2006-07-09  Jim Meyering  <jim@meyering.net>
4264         * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
4265         That happens with Linux/tmpfs.
4266         * tests/mv/Makefile.am (TESTS): Add dir2dir.
4268 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4270         Adjust to recent updates from gnulib.
4271         * src/dd.c (apply_translations): Use toupper rather than
4272         islower followed by toupper; it's simpler and typically
4273         faster now that we assume at least C89 semantics.  Similarly
4274         for tolower.
4275         * src/sort.c (inittables): Likewise.
4276         * src/expand.c (expand): Don't assume that isprint etc. return
4277         booleans (needed for pre-C99 hosts).
4278         * src/fmt.c (check_punctuation): Likewise.
4279         * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
4280         * src/tr.c (is_char_class_member): Likewise.
4281         * src/unexpand.c (unexpand): Likewise.
4282         * src/join.c (is_blank): Remove; no longer needed.  All uses
4283         replaced by isblank (to_uchar (...)).
4284         * src/pinky.c (create_fullname): Don't assume char is unsigned.
4285         * src/printf.c (print_esc): Likewise.
4286         * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
4287         (copy_unescaped_string): Likewise.
4288         * src/stat.c (print_it): Likewise.
4289         * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
4290         convenience on GNU systems.  All uses changed.  Don't bother
4291         looking for any dirent.h substitute other than ndir.h.
4292         (D_INO): Remove unnecessary parentheses.
4293         (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
4294         (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
4295         (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove.  All uses changed
4296         to ctype.h equivalents.
4297         (isblank): Renamed from ISBLANK.  Check for HAVE_DECL_ISBLANK too.
4298         All uses changed.
4300 2006-07-08  Jim Meyering  <jim@meyering.net>
4302         * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
4304         * Makefile.maint (sc_the_the): New rule.
4306         * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
4307         * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
4308         in a comment.
4310 2006-07-07  Jim Meyering  <jim@meyering.net>
4312         * NEWS: Mention that mv can now remove an empty destination directory,
4313         and give an example.  Prompted by a report from Florent Bayle.
4315 2006-07-05  Jim Meyering  <jim@meyering.net>
4317         * src/ls.c (usage): Correct the description of -G: it is useful
4318         only in a long listing.  Reported by Martin Pool in
4319         <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
4321         * man/chmod.x: Correct the description of the sticky bit.  Reported
4322         by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
4324         * src/copy.c (copy_internal): Don't work around old NFS clients like
4325         SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
4326         ENOTEMPTY upon failed rename.  Otherwise, we risk misinterpreting
4327         a banal failure as a recursive move-into-self failure.
4328         Reported by Florent Bayle in <http://bugs.debian.org/376749>.
4330         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
4332 2006-07-03  Jim Meyering  <jim@meyering.net>
4334         Plug another unusual leak.
4335         (AD_mark_helper): Free malloc'd filename if hash_insert says
4336         that string is already in the hash table.
4338         The dev/inode of the topmost directory in each hierarchy were not
4339         being recorded.
4340         * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
4341         (AD_push): Call it from here instead.
4343         Fix two small leaks.
4344         * src/remove.c (AD_stack_clear): New function.
4345         (rm_1): Use it.
4346         (AD_pop_and_chdir): Free *prev_dir just before longjmp.
4348         * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
4349         Add $VG_PATH_PREFIX as a prefix to $PATH
4351         * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
4352         * tests/Makefile.am (evar-check): Remove rule.
4353         (EXTRA_DIST): Remove .env-warn.
4354         * tests/.env-warn: Remove file.  No longer used.
4355         Suggestion from Eric Blake.
4357 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4359         * src/system.h: Include <stdint.h> unconditionally, since we
4360         now assume the stdint module.
4362 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4364         * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
4365         only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
4366         * src/tail.c (main): Implement this.
4367         * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
4368         (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
4370 2006-07-01  Jim Meyering  <jim@meyering.net>
4372         * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
4374         * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
4375         passes once again.
4377 2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4379         * NEWS: seq now uses long double internally rather than double.
4380         It now defaults to a minimal fixed point format if possible.
4381         It lets you use %a, %A, %E, %F, %G.
4382         * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
4383         * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
4384         (isfinite) [!defined isfinite]: New macro.
4385         (separator, terminator): Now points to const.
4386         (first, step, last): Remove.
4387         (usage): Update to match new behavior.
4388         (struct operand, operand): New type.
4389         (scan_arg): Renamed from scan_double_arg, since we no longer use double.
4390         All uses changed.
4391         Compute and return a value of type operand, not double.
4392         (long_double_format): Renamed from valid_format, and now returns a
4393         new format with an "L" added if needed, if the original format was
4394         valid.  Allow %a, %A, %E, %F, and %G formats.
4395         (print_numbers): Take numeric values as args rather than from globals.
4396         Print long double, not double.
4397         (get_width_format): Remove.
4398         (get_default_format): New function.
4399         (main): Implement new way of calculating default format.
4400         Don't worry about locale's representation of the decimal point, since
4401         the arguments are always processed in the C locale.
4402         * tests/seq/basic (neg-2): Adjust to new default format.
4403         (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
4404         implementation should do the right thing.
4406 2006-06-30  Jim Meyering  <jim@meyering.net>
4408         * tests/stty/basic-1: Work around an intermittent test failure
4409         on HP-UX 11.11.  Report and analysis from Bob Proulx.
4410         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
4412 2006-06-28  Paul Eggert  <eggert@cs.ucla.edu>
4414         * NEWS: Support obsolete usages like "sort +1 -2" even when
4415         conforming to POSIX 1003.1-2001, since this is a pure extension to
4416         POSIX.  Problem reported by Christian in:
4417         http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
4418         * src/sort.c (main): Implement this.
4420         * src/system.h (CLOSEDIR): Remove.  All uses changed to closedir.
4421         Autoconf 2.60 says this stuff was obsolete.
4423 2006-06-28  Jim Meyering  <jim@meyering.net>
4425         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
4427 2006-06-28  Bob Proulx  <bob@proulx.com>  (tiny change)
4429         * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
4430         (set -x when VERBOSE=yes) when stderr is redirected before stdout
4431         causing shell tracing of the stdout redirection to be written to
4432         the stderr file.  Avoid problem and test failure on HP-UX by
4433         redirecting stderr last.
4434         * tests/dd/unblock-sync: Order shell file redirections for
4435         stderr and stdout in the common style.
4436         tests/acl: Likewise.
4438 2006-06-27  Jim Meyering  <jim@meyering.net>
4440         * tests/misc/cat-proc: Try to avoid any spurious numeric
4441         differences in frequently-changing /proc/cpuinfo.
4442         Reported by Nelson Beebe.
4444 2006-06-26  Jim Meyering  <jim@meyering.net>
4446         Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
4447         fd_to_subdirp failure, not just when errno == EACCES.
4448         * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
4449         rmdir, here, even though rmdir may happen to be adequate.
4451         * NEWS: rm no longer fails to remove an empty, unreadable directory
4452         * src/remove.c (remove_cwd_entries): If we can't open a directory,
4453         and the failure is not being ignored, try to remove the directory
4454         with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
4455         Problem report and test case from Paul Eggert in
4456         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
4458         * tests/rm/empty-inacc: New test, for the above.
4460         Avoid a segfault for wc --files0=- < /dev/null.
4461         * src/wc.c (compute_number_width): Return right away if nfiles == 0.
4463 2006-06-25  Jim Meyering  <jim@meyering.net>
4465         * NEWS: wc accepts a new option --files0-from=FILE, where FILE
4466         contains a list of NUL-separated file names.
4468         * src/wc.c: Include "readtokens.h".
4469         (usage): Describe the new option, and adjust the `Usage':
4470         with this option, no FILE may be specified on the command line.
4471         (main): Handle the new option.
4472         * tests/misc/wc-files0: New tests, for the above.
4473         * tests/misc/wc-files0-from: Likewise.
4474         * tests/misc/Makefile.am (TESTS): Add wc-files0.
4476 2006-06-24  Jim Meyering  <jim@meyering.net>
4478         * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
4480 2006-06-22  Jim Meyering  <jim@meyering.net>
4482         * src/tee.c (tee_files): Rename from tee, to avoid conflict with
4483         the function in glibc's <fcntl.h>.  Reported by Andreas Schwab.
4485 2006-06-19  Jim Meyering  <jim@meyering.net>
4487         * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4488         so this check is not run as part of "make distcheck".
4490 2006-06-18  Bob Proulx  <bob@proulx.com>  (tiny change)
4492         * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
4494 2006-06-18  Jim Meyering  <jim@meyering.net>
4496         * tests/misc/pwd-long: Make error output a little clearer.
4498 2006-06-17  Jim Meyering  <jim@meyering.net>
4500         * tests/rm/inaccessible: Skip this test on systems without openat
4501         support.  Reported by Bob Proulx.
4503 2006-06-15  Bob Proulx  <bob@proulx.com>  (tiny change)
4505         * tests/misc/mknod: Improve permission checks to handle
4506         running mkdir test in set-gid directories.
4508 2006-06-14  Jim Meyering  <jim@meyering.net>
4510         * tests/du/basic: Revamp not to hard-code file system block sizes.
4512 2006-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4514         * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
4515         files0-from test.
4517 2006-06-11  Jim Meyering  <jim@meyering.net>
4519         * .gitignore: New file.
4520         * Makefile.am (EXTRA_DIST): Add .gitignore.
4522         Setting TIME_STYLE=long-iso in the environment would make the
4523         cp/same-file test fail.
4524         * tests/envvar-check (vars): Add TIME_STYLE to the list.
4525         * tests/cp/same-file: Revert last change.
4526         Source the envvar-check script, to ensure that TIME_STYLE
4527         settings don't affect these tests.
4529 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
4531         * tests/cp/same-file: Execute 'ls' in the C locale, so that it
4532         uses POSIX time stamp formats.  Problem reported by John Nixon in
4533         <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
4535 2006-06-10  Jim Meyering  <jim@meyering.net>
4537         * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
4539         Require a "Version N.M" line at the top of the ChangeLog
4540         file only when making the actual release, not when running
4541         "make distcheck".
4542         * Makefile.maint (maintainer-distcheck): Don't depend on
4543         changelog-check.
4544         (alpha beta major): Depend on it here, instead.
4546 2006-06-08  Jim Meyering  <jim@meyering.net>
4548         Ensure that cat works with any of the options, -A -v -e -E -T,
4549         when applied to files in /proc and /sys, even when the FIONREAD
4550         ioctl produces nonsensical results.  Before this change, cat would
4551         produce no output (or truncated output), for some linux kernels.
4553         * src/cat.c (write_pending): New function, factored out of cat.
4554         (cat): Also interpret a negative ioctl/FIONREAD count as indicating
4555         that there are bytes to read.  Some versions of linux-2.6.16 do that.
4556         Write any pending output before returning.
4557         Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
4558         * NEWS: Mention this bug fix.
4559         * tests/misc/cat-proc: New file.  Test for the above.
4560         * tests/misc/Makefile.am (TESTS): Add cat-proc.
4562 2006-06-07  Paul Eggert  <eggert@cs.ucla.edu>
4564         * src/expr.c (eval4): Detect overflow properly when multiplying
4565         INTMAX_MIN * -1.
4567 2006-06-06  Paul Eggert  <eggert@cs.ucla.edu>
4569         * NEWS: The 'expr' command now detects and reports integer overflow.
4570         (It would be better to use extended precision instead, but that
4571         would be more work.)
4572         * src/expr.c (integer_overflow): New function.
4573         (eval4, eval3): Check for integer overflow.
4575 2006-06-05  Paul Eggert  <eggert@cs.ucla.edu>
4577         Fix problems when building with Solaris/SVR4/etc. make, which uses a
4578         different and somewhat bogus implementation of VPATH.  In the
4579         directory tests/misc, rename tests whose names might appear in the
4580         Automake-generated rules.  For example, we can't use a test named
4581         'test', since Automake generates a rule that contains the text
4582         "if test -f ./$$tst; ...", and this might expand to something like
4583         "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
4584         which executes the 'test' script rather than the 'test' command.
4585         * tests/misc/false-status: Renamed from tests/misc/false.
4586         * tests/misc/pwd-long: Renamed from tests/misc/pwd.
4587         * tests/misc/sort-merge: Renamed from tests/misc/sort.
4588         ($prog): Set to 'sort' rather than to $PROG.
4589         * tests/misc/test-diag: Renamed from tests/misc/test.
4590         * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
4591         in case Solaris make has prepended the directory.
4592         (TESTS): Adjust to above renamings.
4593         * tests/misc/expand: Don't assign to PROG; no longer needed
4594         now that Makefile.am sets PROG to the basename.
4595         * tests/misc/fold: Likewise.
4597 2006-06-03  Jim Meyering  <jim@meyering.net>
4599         Make `cp --link --no-dereference' work also on systems where the
4600         link system call cannot create a hard link to a symbolic link.
4601         * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
4602         the link syscall on a symlink when it would do the wrong thing.
4603         Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
4604         * tests/cp/link-no-deref: New file/test for the above.
4605         * tests/cp/Makefile.am (TESTS): Add link-no-deref.
4606         * NEWS: Mention the change (doesn't affect Linux).
4608 2006-06-01  Paul Eggert  <eggert@cs.ucla.edu>
4610         Fix some porting problems in the test cases reported by
4611         Ralf Wildenhues for HP-UX 11.23 in:
4612         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
4613         * tests/help-version: Don't assume that \< \> works in sed.
4614         * tests/misc/close-stdout: Don't assume that >&- works.
4615         Add a /dev/full test.
4616         * tests/touch/no-create-missing: Don't assume that >&- works.
4618 2006-05-30  Jim Meyering  <jim@meyering.net>
4620         * src/ls.c (usage): Add `v' to the list of sorting-related options.
4621         From Justin Pryzby.
4623 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4625         * tests/cp/fail-perm: source lang-default.
4626         * tests/rm/inaccessible: Likewise.
4628 2006-05-28  Jim Meyering  <jim@meyering.net>
4630         * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
4631         Recognize it, too.  Reported by Ralf Wildenhues, in
4632         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
4634 2006-05-27  Jim Meyering  <jim@meyering.net>
4636         * src/chgrp.c: Support new options: --preserve-root and
4637         --no-preserve-root.  Somehow this program was skipped when those
4638         options were added to chown, chmod, and rm.  Reported by
4639         vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
4640         * NEWS: Mention this.
4642 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
4644         * NEWS: Remove mention of --seed.  We'll replace it with something
4645         better, and don't want to indicate that it is supported.
4646         * src/sort.c (usage): Likewise.
4648 2006-05-20  Jim Meyering  <jim@meyering.net>
4650         * src/chmod.c (main): Use FTS_PHYSICAL here, too.
4652         * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
4653         and arrange for -D to set fts' FTS_PHYSICAL bit as well as
4654         FTS_COMFOLLOW.  Spotted by Justin Pryzby.
4656         * gnupload: Merge changes from automake, retaining the ""--to...
4657         kludge to placate overzealous `make distcheck' check.
4659 2006-05-19  Jim Meyering  <jim@meyering.net>
4661         * src/du.c (main): Don't let -D, -L, or -P turn off the internal
4662         FTS_TIGHT_CYCLE_CHECK directory traversal option.
4663         Reported by Justin Pryzby in http://bugs.debian.org/367691
4665 2006-05-15  Jim Meyering  <jim@meyering.net>
4667         * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
4668         From Tomas Pospisek.
4670 2006-05-13  Jim Meyering  <jim@meyering.net>
4672         * tests/mv/no-target-dir: Test two more cases.
4674 2006-05-11  Jim Meyering  <jim@meyering.net>
4676         mv -T DIR EMPTY_DIR no longer fails unconditionally
4677         * src/copy.c (copy_internal): Don't manually prohibit a move where
4678         the destination is an existing directory.  Sometimes doing that is
4679         valid.  Let the rename system call enforce the rules.  That is
4680         allowed only when the source is a directory and the destination
4681         directory (to be replaced) is empty.  Reported by Eric Blake.
4682         * tests/mv/no-target-dir: New file/test for this.
4683         * tests/mv/Makefile.am (TESTS): Add no-target-dir.
4684         * NEWS: Mention this.
4686         * tests/mv/atomic: New file/test for yesterday's fix.
4687         * tests/mv/Makefile.am (TESTS): Add atomic.
4689         * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
4691 2006-05-10  Jim Meyering  <jim@meyering.net>
4693         * src/copy.c (copy_internal): Don't explicitly unlink the destination
4694         when moving a symlink into the place of an existing non-directory.
4695         Reported by Joshua Hudson.
4696         * NEWS: mention this.
4698 2006-05-07  Jim Meyering  <jim@meyering.net>
4700         * Makefile.maint (patch-check): Fail if patch generates any output,
4701         even merely for changed offsets.
4703         * src/c99-to-c89.diff: Adjust to reflect new offsets.
4705         * NEWS: Mention changes affecting df, pwd, shred.
4707 2006-05-06  Jim Meyering  <jim@meyering.net>
4709         * tests/ls/stat-vs-dirent: New test, to detect the bogus file
4710         system condition where dirent.d_ino != stat.st_ino.
4711         * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
4713 2006-05-06  Eric Blake  <ebb9@byu.net>
4715         * tests/ls/inode: Expand to test inode from readdir case.
4716         * tests/ls/follow-slink: Expand to test broken links encountered
4717         implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
4719 2006-05-06  Eric Blake  <ebb9@byu.net>
4721         * tests/mv/leak-fd: Work even on case-insensitive file system.
4723 2006-05-04  Jim Meyering  <jim@meyering.net>
4725         * NEWS: Mention the 2006-03-19 pwd-related change that makes
4726         lib/getcwd.c work around inconsistent file system dirent.d_ino data.
4728 2006-05-03  Jim Meyering  <jim@meyering.net>
4730         * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
4731         Use better macro parameter names: s/basename/key_name/,
4732         s/basefunc/key_cmp_func.  Fix typo in comment.
4734 2006-04-29  Eric Blake  <ebb9@byu.net>
4736         * src/ls.c (main): On systems with d_type, directories_first only
4737         implies format_needs_type, not format_needs_stat.
4739 2006-05-03  Jim Meyering  <jim@meyering.net>
4741         * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
4742         after comma in arg list, from Eric Blake.
4744 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
4746         * tests/misc/date (relative-3): New test, derived from a bug
4747         report by John Thomas McDole.
4749 2006-04-23  Francesco Montorsi  <fr_m@hotmail.com>
4751         New option for ls: --group-directories-first.
4752         It makes ls list directories before files.
4753         * NEWS [New features]: Mention it.
4754         * src/ls.c (sort_type): Rearrange to use as an array index when
4755         choosing sort function; added new sort_numtypes member for
4756         compile-time check.
4757         (time_type): Add new time_numtypes member for compile-time check.
4758         (directories_first): New global variable.
4759         (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
4760         (long_options): Add --directories-first.
4761         (main): Support new option.
4762         (is_directory): New function.
4763         (extract_dirs_from_files): Use it.
4764         (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
4765         (LIST_SORTFUNCTION_VARIANTS): New macros.
4766         (sort_functions): New global variable.
4767         (sort_files): Use it.
4768         (usage): Document new option.
4770 2006-04-18  Paul Eggert  <eggert@cs.ucla.edu>
4772         * src/shred.c (fillrand): The assertion was way too weak, due to
4773         what must be a typo.  Strengthen it to its intended value.
4774         (dopass): Don't use alloca; it's not worth the aggravation here,
4775         since it's used only to get a page-aligned buffer, and page
4776         alignment doesn't buy us much here.  I'm suspicious that alloca
4777         causes problems on some hosts, due to a recent bug report by Adam
4778         Waltman: http://bugs.gentoo.org/130246.
4780 2006-04-18  Jim Meyering  <jim@meyering.net>
4782         * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
4783         sha384sum, sha512sum.
4785 2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4787         * src/chmod.c (describe_change): Adjust to filemode changes.
4788         * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
4789         (print_long_format): Use (new) filemodestring rather than
4790         (old) mode_string, so that we get more file types right, at least
4791         in theory.  Adjust to filemode changes.
4792         * src/stat.c (human_access): Likewise.
4794 2006-04-18  Jim Meyering  <jim@meyering.net>
4796         * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
4797         ignore file.  This has never been enabled.  Reported by Eric Blake.
4799 2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
4801         * src/ln.c (linkfunc): Remove.  This method ran into a compiler/linker
4802         bug in Interix.  Just call symlink or link directly.  All uses changed.
4803         * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
4804         * src/stat.c (USE_STATVFS): New macro.
4805         Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
4806         (NAMEMAX_FORMAT): define a bit more clearly, now that the
4807         statvfs-using code is a bit more regular.
4808         * src/system.h (sync) [!HAVE_SYNC]: New macro.
4810 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
4812         * NEWS: csplit, nl, expr now conform to POSIX better, and are
4813         more-compatible with traditional Unix, with respect to regular
4814         expressions.
4815         * src/csplit.c (extract_regexp): Set re_syntax_options to a
4816         value that is compatible with what POSIX requires.
4817         * src/nl.c (build_type_arg): Likewise.
4818         * src/expr.c (docolon): Likewise.  Also, don't let anchors match
4819         newline; this fixes an incompatibility with tradition and with POSIX.
4820         Don't warn about leading ^.  POSIX says it is unspecified whether
4821         ^ is a special character, which means that implementations can
4822         either treat it as special or not, but either way a warning is not
4823         allowed (unless the regexp is otherwise invalid).  Instead, anchor
4824         the expression but treat ^ as an anchor; this is the traditional
4825         behavior (e.g., Solaris 10).
4826         (eval4, eval3, eval2): Treat non-numeric args, division by zero,
4827         and the like as invalid expressions (exit status 2), not as
4828         failure of 'expr' (exit status 3).  This is more consistent with
4829         how Solaris behaves.
4830         * tests/expr/basic (fail-a): Adjust exit status to match new expr
4831         behavior, for status 2 versus 3.
4832         (anchor): New test.
4833         (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
4834         (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
4835         (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
4836         (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
4837         (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
4838         (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
4839         (bre61, bre62): New tests.
4840         * tests/misc/csplit: Use \{...\} in test RE, to test that we're
4841         conforming to POSIX.
4843         Port to Solaris 8.
4844         * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
4845         "if !".  Do not assume that 'sed' can handle long, newline-free input.
4846         * tests/du/long-sloop: Likewise.  Evaluate expr once, not $n times.
4848 2006-04-10  Paul Eggert  <eggert@cs.ucla.edu>
4850         Adjust to new regex.h API (with new fastmap type), and clean
4851         up the regex storage allocation a bit.
4853         * src/csplit.c (struct control): Put re_compiled member at the
4854         end, since it's large.  Change regexpr member from char * to bool;
4855         all uses changed.  Add new member fastmap.
4856         (extract_regexp): regexp arg is now char const *, not char *.
4857         Don't bother duplicating the regular expression; it's not needed.
4858         Set fastmap from new fastmap member.  Don't bother allocating
4859         a buffer, as the regexp code does a better job than we do.
4860         * src/expr.c (docolon): Allocate and use a fastmap.
4861         Don't bother allocating a buffer.
4862         * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
4863         New vars.
4864         (build_type_arg): New fastmap arg.  All uses changed.
4865         Don't bother allocating a buffer, but set a fastmap.
4866         * src/ptx.c (context_regex_string, word_regex_string): Remove.
4867         (context_regex, word_regex): New vars, replacing the above.
4868         All uses changed.
4869         (struct regex_data): New type.
4870         (compile_regex): Renamed from alloc_and_compile_regex, since
4871         we no longer allocate storage.  Arg is now a struct regex_data *,
4872         not a const char *.  All uses changed.  Don't allocate the fastmap;
4873         instead, take it from the caller.  Don't convert size_t to int,
4874         to avoid arithmetic overflow problems.  Don't bother freeing
4875         storage afterwards; it's not worth the aggravation.
4876         * src/tac.c (compiled_separator_fastmap): New ver.
4877         (main): Use it.  Don't bother allocating a buffer.
4879 2006-03-30  Jim Meyering  <jim@meyering.net>
4881         * src/dd.c (iwrite): Remove assignment without effect.
4882         Reported by Felix Rauch Valenti.
4884 2006-03-22  Eric Blake  <ebb9@byu.net>
4886         * src/ptx.c (usage): Remove mention of --copyright/-C.
4887         (main): Alias --copyright to --version plus a deprecation warning.
4888         * NEWS: Mention this.
4890 2006-03-27  Jim Meyering  <jim@meyering.net>
4892         * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
4893         use of strtod.  Tiny patch from Nickolai Zeldovich.
4895 2006-03-11  Eric Blake  <ebb9@byu.net>
4897         * tests/misc/dirname: New file.
4898         * tests/basename/Makefile.am: Delete.
4899         * tests/basename/basic: Move to...
4900         * tests/misc/basename: ... this new file.  Add some tests,
4901         including fixed behavior for //.
4902         * tests/misc/Makefile.am (TESTS): Sort.  Add basename, dirname.
4903         * tests/Makefile.am (SUBDIRS): Remove basename.
4904         * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
4906         Improvements to dirname/basename handling on platforms like
4907         cygwin with distinct // and with drive letters.
4908         * NEWS: Document new behavior.
4909         * src/basename.c (main): Don't strip suffix from file system
4910         roots.
4911         * src/cp.c (target_directory_operand): Use new last_component.
4912         (ASSIGN_BASENAME_STRDUPA): Likewise.  Reduce time spent
4913         traversing the string.
4914         * src/dircolors.c (guess_shell_syntax): Use new last_component.
4915         * src/install.c (target_directory_operand, install_file_in_dir):
4916         Likewise.
4917         * src/ln.c (target_directory_operand, main): Likewise.
4918         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
4919         * src/mv.c (target_directory_operand, movefile): Likewise.
4920         * src/remove.c (rm_1): Likewise.
4921         * src/shred.c (wipename): Likewise.
4922         * src/split.c (next_file_name): Likewise.
4923         * src/su.c (log_su, run_shell): Likewise.
4925 2006-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4927         * NEWS: nohup diagnostics are now more precise, and nohup now
4928         redirects stderr to nohup.out if stdout is closed and stderr is a tty.
4929         * src/nohup.c (main): Implement this.
4930         * tests/misc/nohup: Test the new behavior.
4932 2006-03-12  Jim Meyering  <jim@meyering.net>
4934         * src/copy.c (set_author): Rename function, from preserve_author.
4936         * src/remove.c (AD_pop_and_chdir): Use new macro,
4937         CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
4939         * src/system.h (SAME_INODE): Remove definition.
4940         Include "same-inode.h", instead.
4942 2006-03-11  Eric Blake  <ebb9@byu.net>
4944         * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
4946 2006-03-10  Jim Meyering  <jim@meyering.net>
4948         Fix a bug whereby a user with write access to a directory being removed
4949         could cause the removal of that directory to fail with an erroneous
4950         diagnostic about a directory cycle.  Reported by Vineet Chadha.
4952         * NEWS: Mention this.
4953         * src/remove.c (AD_pop_and_chdir): If the directory we're about to
4954         leave (and try to rmdir) is the one whose dev_ino is being used to
4955         detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
4957 2006-03-08  Paul Eggert  <eggert@cs.ucla.edu>
4959         * NEWS: Document dd's new 'directory' and 'nolinks' flags.
4960         * src/dd.c (set_fd_flags): Handle file-creation flags on file
4961         descriptors, rather than ignoring them.
4962         * tests/dd/misc: Add test cases for append, nofollow, directory,
4963         and nolinks flags.  Simplify redirection to /dev/null in some cases.
4965         * tests/dd/misc: iflags->iflag.  This fixes a typo that meant the
4966         noatime test never tested anything.
4968 2006-03-05  Paul Eggert  <eggert@cs.ucla.edu>
4970         * src/dd.c (flags, usage): New flags directory, nolinks.
4971         * src/system.h (O_NOLINKS): Define to 0 if not already defined.
4973         * src/ls.c (usage): Mention that -f disables --color.
4974         Problem reported by Niels Möller.
4976 2006-03-03  Justin Pryzby  <pryzbyj@justinpryzby.com>
4978         * man/*.x: Add references to syscalls from utilities of the same name.
4980 2006-03-05  Jim Meyering  <jim@meyering.net>
4982         * tests/help-version: Set SHELL, if not already set, in order to
4983         avoid failure when `make check' is run through debuild;  dircolors
4984         would fail due to lack of $SHELL.  Reported by Sven Joachim.
4986         Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
4987         * src/base64.c (wrap_write, do_encode, main): Change type of
4988         parameters and locals, wrap_column, form size_t to uintmax_t.
4989         (main): Adjust to use xstrtoumax, accordingly.
4991 2006-03-03  Jim Meyering  <jim@meyering.net>
4993         Don't fail when run from an environment with SHELL not a Bourne
4994         shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
4995         * tests/dircolors/simple: Invoke each non-failing test with -b.
4996         Reported by Michael Stone.
4998 2006-02-27  Jim Meyering  <jim@meyering.net>
5000         * tests/misc/base64: Derive --decode-using tests from the
5001         encode-based ones.
5003         * tests/misc/base64: Factor out a long constant string.
5004         Split lines to stay within 80 columns.
5006         * tests/misc/Makefile.am (TESTS): Add base64.
5007         * tests/misc/base64: Test base64.  From Simon Josefsson.
5009         * src/base64.c (do_decode): Use correct type for parameter,
5010         ignore_garbage: s/size_t/bool/.
5012         * src/base64.c: Don't include .h files already included by system.h:
5013         <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
5014         Include "system.h" before the other lib/*.h header files.
5015         Include <sys/types.h> before "system.h".
5016         (wrap_write): Remove declaration of unused local, initial_column.
5017         (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
5019         * README: Add base64 to the list.
5021 2006-02-17  Simon Josefsson  <jas@extundo.com>
5023         New program: base64.
5024         * AUTHORS: Mention base64.
5025         * NEWS: Likewise.
5026         * man/Makefile.am: Build base64.1.
5027         * man/base64.x: New file.
5028         * src/Makefile.am (bin_PROGRAMS): Add base64.
5029         * src/base64.c: New file.
5031 2006-02-25  Eric Blake  <ebb9@byu.net>
5033         In ls, avoid calling stat for --inode (-i), when possible.
5034         * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
5035         * src/system.h: ... here, for use in ...
5036         * src/ls.c (main): ... here.  Prefer dirent.d_ino to stat when
5037         possible.
5038         (gobble_file): Add inode argument.
5039         (print_dir): Pass inode if available.
5040         (usage): Remove inaccuracy.
5042 2006-02-23  Jim Meyering  <jim@meyering.net>
5044         * TODO: Update/correct some obsolete entries.
5046 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5048         * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
5049         * src/join.c (usage): Likewise.
5050         Documentation problem reported by Philip Kensche.
5052 2006-02-20  Eric Blake  <ebb9@byu.net>
5054         * man/rm.x: Update documentation to match previous patch.
5056 2006-02-18  Eric Blake  <ebb9@byu.net>
5058         New option for rm: --interactive=once (-I).
5059         * NEWS: Document it, along with change to rm --interactive.
5060         * TODO: Remove entry for implementing rm -I
5061         * src/rm.c (INTERACTIVE_OPTION): New enum value.
5062         (interactive_type): New enum.
5063         (long_opts): Let interactive take an optional argument.
5064         (interactive_args, interactive_types): New option arguments.
5065         (usage): Document -I, --interactive=WHEN.  Use program_name
5066         instead of a basename.
5067         (main): New -I option, new behavior to --interactive.
5068         * tests/rm/interactive-once: New tests.
5069         * tests/rm/interactive-always: Ditto.
5070         * tests/rm/Makefile.am (TESTS): Run them.
5072 2006-02-18  Jim Meyering  <jim@meyering.net>
5074         * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
5075         expression match more of the target lines, e.g., those that start with
5076         `-S,' (short option followed by a comma) or that include `=[...]'.
5077         Patch by Nicolas François.
5078         Fix the four offenders thus exposed:
5079         * src/join.c (usage): Use two spaces (not one) to separate the
5080         --first-only option string from its description, so help2man formats
5081         the derived man page properly.
5082         * src/pr.c (usage): Likewise.
5083         * src/uniq.c (usage): Likewise.
5084         * src/install.c (usage): Likewise.
5086 2006-02-15  Jim Meyering  <jim@meyering.net>
5088         * Makefile.maint (alpha beta major): For `make major', ensure that the
5089         version string is of the form N.N[.N]*, where N is one or more digits.
5091 2006-02-14  Jim Meyering  <jim@meyering.net>
5093         * INSTALL: Update from gnulib.
5095 2006-02-13  Jim Meyering  <jim@meyering.net>
5097         * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
5099 2006-02-12  Jim Meyering  <jim@meyering.net>
5101         * Makefile.maint (patch-check): New target.
5102         (local-checks-available): Add to the list.
5104 2006-02-11  Jim Meyering  <jim@meyering.net>
5106         * src/c99-to-c89.diff: New file.
5107         * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
5109         * .x-po-check: New file, with exclusions so that `make distcheck'
5110         passes once again.
5111         * Makefile.am (EXTRA_DIST): Add .x-po-check.
5113         rm -r must remove an empty directory, even if it is inaccessible.
5114         * src/remove.c (close_preserve_errno): New function.
5115         (fd_to_subdirp): Don't print a diagnostic in this function.
5116         Do it from the callers instead, unless rmdir succeeds.
5117         (remove_cwd_entries, remove_dir): Adjust callers.
5118         * tests/rm/empty-inacc: New test for the above.
5119         * tests/rm/Makefile.am (TESTS): Add empty-inacc.
5120         * NEWS: Mention this bug fix.
5121         * tests/rm/rm2: Adjust two expected diagnostics, now that they're
5122         a tiny bit less precise: cannot remove `a/1': ... instead of
5123         cannot open directory `a/1': ...
5125         * Makefile.maint (syntax-check-rules): Automatically derive this
5126         list of sc_-prefixed rule names.
5128 2006-02-10  Paul Eggert  <eggert@cs.ucla.edu>
5130         * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
5131         (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
5132         Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
5133         (syntax-check-rules): Bring back sc_changelong.  (Hmm, why did it
5134         go away? was that an accident?)
5135         (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
5136         (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
5137         (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
5138         (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
5139         (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
5140         (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
5141         (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
5142         (author_mark_check, makefile_path_separator_check):
5143         Output line numbers, to simplify navigation of Emacs *compilation*
5144         buffers.
5145         (sc_prohibit_atoi_atof, sc_file_system):
5146         Rework slightly so that Makefile.maint doesn't get reported as a
5147         violation of its own syntax rules.
5148         (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
5149         it at run-time (which didn't work with Bison).  Fix a makefile typo,
5150         caught by Makefile.maint itself: spaces where a tab should be.
5151         (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
5152         which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
5153         Ignore djgpp and man subdirectories, to avoid false matches with
5154         Bison and coreutils, respectively.  Use sort -u to remove the
5155         resulting duplicates.
5156         * gnupload: Rework slightly to avoid bogus warning from
5157         sc_two_space_separator_in_usage.
5159 2006-02-10  Jim Meyering  <jim@meyering.net>
5161         Use gzip's --rsyncable option only if it's available.
5162         * Makefile.maint (gzip_rsyncable): New variable.
5163         (GZIP_ENV): Use it.
5165 2006-02-08  Jim Meyering  <jim@meyering.net>
5167         * Makefile.maint (local-checks-available): Define in terms of
5168         the expansion, $(syntax-check-rules), rather than the single,
5169         top-level target `syntax-check', so that it's easier to exclude
5170         individual rules (via $(local-checks-to-skip)).
5171         (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
5173 2006-02-07  Jim Meyering  <jim@meyering.net>
5175         * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
5176         is on Tru64), define O_DIRECT to that.  Patch From James Lemley.
5178         * tests/help-version (expected_failure_status_vdir):
5179         Redirect an expected disk-full diagnostic to /dev/null.
5181 2006-02-06  Jim Meyering  <jim@meyering.net>
5183         * src/unexpand.c (usage): Use two spaces (not one) to separate the
5184         --first-only option string from its description, so help2man formats
5185         the derived man page properly.
5186         * src/rm.c (usage): Likewise for --no-preserve-root.
5187         * src/chown.c (usage): Likewise.
5188         * src/chgrp.c (usage): Likewise.
5190         Add a rule to ensure that the above doesn't happen again.
5191         * Makefile.maint (sc_two_space_separator_in_usage): New rule.
5192         (syntax-check-rules): Add it.
5193         * .x-sc_two_space_separator_in_usage: New empty file.
5194         * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
5196 2006-02-06  Jim Meyering  <jim@meyering.net>
5198         * src/cp.c (usage): Use two spaces (not one) to separate each
5199         option string from its description, so help2man formats the
5200         derived man page properly.
5201         * src/mv.c (usage): Likewise.
5202         Patch from Nicolas François in http://bugs.debian.org/351601.
5204 2006-02-04  Jim Meyering  <jim@meyering.net>
5206         * src/copy.c (copy_internal): cp -RL would fail when encountering
5207         the same directory more than once in the hierarchy beneath a single
5208         command-line argument.  That is legitimate, e.g. when there are
5209         two or more symbolic links, each pointing to some directory that
5210         would not otherwise be copied.  Reported by Christophe LYON.
5211         * tests/cp/cp-deref: New file.  Test for today's fix.
5212         * tests/cp/Makefile.am (TESTS): Add cp-deref.
5213         * NEWS: Document this.
5215 2006-02-03  Jim Meyering  <jim@meyering.net>
5217         * configure.ac: Require automake-1.9.6, not 1.8.3.
5219 2006-02-01  Paul Eggert  <eggert@cs.ucla.edu>
5221         * src/od.c (usage): Mention that -t a ignores high order bit.
5222         Documentation problem reported by Ed Avis.
5224 2006-02-01  Jim Meyering  <jim@meyering.net>
5226         * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
5228 2006-01-30  Paul Eggert  <eggert@cs.ucla.edu>
5230         * src/head.c (main): Use a better diagnostic when someone uses a
5231         trailing numeric option in an invalid way.  Problem reported by
5232         Karl Berry.
5233         * src/tail.c (parse_options): Likewise.
5235 2006-01-30  Jim Meyering  <jim@meyering.net>
5237         * man/wc.x: Include `count' keyword in man page synopsis,
5238         per suggestion from http://bugs.debian.org/181585.
5240 2006-01-24  Paul Eggert  <eggert@cs.ucla.edu>
5242         * src/df.c (show_dev): If the file system claims to have
5243         more available than total blocks, report the number of used
5244         blocks as being total - available (a negative number) rather
5245         than as garbage.  Problem reported by Toralf Foerster.
5247 2006-01-24  Jim Meyering  <jim@meyering.net>
5249         * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
5250         to put a regular file in O_NONBLOCK mode fails with EPERM.
5251         That happens on Linux (up to 2.6.15) when using tail -f on a file with
5252         the append-only attribute.  Reported by Dean Gaudet.  For details,
5253         see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
5254         * NEWS: Mention this fix.
5255         * tests/tail-2/append-only: New file.  Test for the above.
5256         * tests/tail-2/Makefile.am (TESTS): Add append-only.
5257         * tests/Makefile.am (check-root): Add tail-2/append-only
5259 2006-01-21  Jim Meyering  <jim@meyering.net>
5261         * NEWS: Mention fts-related improvements and bug fixes.
5263 2006-01-19  Jim Meyering  <jim@meyering.net>
5265         * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
5266         reported as http://bugs.debian.org/147577.  Forwarded by Thomas Hood.
5268 2006-01-18  Jim Meyering  <jim@meyering.net>
5270         * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
5272 2006-01-17  Jim Meyering  <jim@meyering.net>
5274         Now that fts no longer changes the current working directory, adjust
5275         its clients accordingly -- note that du.c uses fts but doesn't need
5276         any adjustment, since it doesn't operate on the actual files,
5277         but rather just uses the stat buffers provided by fts.
5279         * src/chown-core.c: Include "openat.h".
5280         Don't include "lchown.h".
5281         (restricted_chown): Accept a new parameter, CWD_FD, and use it in
5282         calling openat, lchownat, chownat, rather than open, lchown, chown.
5283         Update caller.
5284         * src/chmod.c: Include "openat.h".
5285         (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
5287         * tests/du/long-from-unreadable: New test, to exercise one small
5288         corner of fts.c.
5290 2006-01-13  Jim Meyering  <jim@meyering.net>
5292         * tests/Makefile.am (SUBDIRS): Add comments discouraging the
5293         addition of new directories under tests/.
5295         * tests/acl: Redirect stdin to /dev/null.  Otherwise, FreeBSD 5.0's
5296         getfacl would hang.
5298 2006-01-12  Jim Meyering  <jim@meyering.net>
5300         * tests/du/long-sloop: Adjust not to hard-code the expected
5301         diagnostic corresponding to ELOOP.  Solaris' diagnostic differs
5302         from that of GNU libc.  Reported by Paul Eggert.
5304         * tests/du/long-sloop: Create file at end of symlink chain.
5306         * tests/misc/test: New file, with a test for one of the
5307         bugs fixed by yesterday's test.c changes.
5308         * tests/misc/Makefile.am (TESTS): Add test.
5310 2006-01-11  Jim Meyering  <jim@meyering.net>
5312         * tests/du/long-sloop: New file.  Test for today's fts.c bug fix.
5313         That bug could make du -L, chgrp -L, or chown -L fail to diagnose
5314         a very long sequence of symbolic links (not necessarily a loop).
5315         * tests/du/Makefile.am (TESTS): Add long-sloop.
5317 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
5319         * src/test.c (test_syntax_error): Append a newline.  All callers
5320         changed, except for the ones that didn't already append a newline.
5321         Bug reported by Eric Blake.
5323 2006-01-11  Jim Meyering  <jim@meyering.net>
5325         * src/system.h (X2NREALLOC): Now that verify_true is no longer
5326         void, cast its result to void, to avoid gcc's warning that
5327         ``left-hand operand of comma expression has no effect''.
5328         (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
5330 2006-01-10  Jim Meyering  <jim@meyering.net>
5332         * tests/chmod/no-x: Add a test for today's fts.c fix.
5334 2006-01-10  Jim Meyering  <jim@meyering.net>  (tiny change)
5336         * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
5337         This is necessary for Dragonfly.  Patch by Joerg Sonnenberger.
5339 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
5341         * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
5342         Use verify_true instead of verify_expr, to sync with gnulib.
5344 2006-01-08  Jim Meyering  <jim@meyering.net>
5346         * src/date.c (usage): Adjust the formatting of the entries for
5347         %::z and %:::z (separate with two spaces, not one) so that help2man
5348         formats them properly.  Reported by Philip Rowlands.
5350 2006-01-06  Paul Eggert  <eggert@cs.ucla.edu>
5352         * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
5354 2006-01-06  Jim Meyering  <jim@meyering.net>
5356         * Makefile.maint (copyright-check): Use date +%Y in place of
5357         hard-coded 2005.
5359         * src/remove.c (rm_1): Remove `static' attribute on local `status'.
5360         First off, the attribute should have been `volatile' (not static)
5361         to avoid longjmp-related risk of clobber.  Secondly, now there is
5362         no longer any risk of a local variable being clobbered, so there's
5363         no need for any attribute at all.
5365 2006-01-05  Jim Meyering  <jim@meyering.net>
5367         * src/remove.c: Give a few functions the inline attribute.
5368         (AD_pop_and_chdir): Use gotos to avoid some duplication.
5369         (AD_push): Rewrite an assertion so that the entire computation
5370         goes away when assertions are turned off.
5372         * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
5373         It's already defined in "system.h".
5374         * Makefile.maint: Add a FIXME comment.
5376 2006-01-04  Jim Meyering  <jim@meyering.net>
5378         * ChangeLog: Remove entries from 2005-10-22 and earlier.
5379         * ChangeLog-2005: New file, for entries up to version 5.92.
5381 2006-01-03  Jim Meyering  <jim@meyering.net>
5383         * tests/du/no-x: Also allow a slightly different diagnostic -- the
5384         one you get when using openat-enabled fts.c and du (coming soon).
5385         * tests/chmod/no-x: Likewise.
5386         * tests/chgrp/no-x: Likewise.
5388         * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
5390 2006-01-02  Paul Eggert  <eggert@cs.ucla.edu>
5392         * src/chown-core.c (RC_do_ordinary_chown): New enum value.
5393         (restricted_chown): Return it, if the file cannot be accessed due
5394         to EPERM, or if no uid or gid are required, or if the file is
5395         neither a directory nor a regular file.  Rewrite to avoid gotos.
5396         (change_file_owner): Handle RC_do_ordinary_chown case.
5397         Rewrite to avoid gotos.
5398         * tests/chgrp/basic: Make sure we can change the group of
5399         inaccessible files.
5401         * src/date.c (usage): Explain %g, %G, and %V a bit better.
5403 2006-01-02  Jim Meyering  <jim@meyering.net>
5405         * src/copy.c (set_owner): Correct a comment.
5407         * src/tail.c (parse_options): Change warning to say that --retry
5408         is useful `mainly' (not `only') when following by name.
5409         Reported here: http://bugs.debian.org/273781
5411 2006-01-01  Paul Eggert  <eggert@cs.ucla.edu>
5413         * NEWS: Document that mkfifo and mknod -m no longer set special bits.
5414         * src/copy.c: Include lchmod.h.
5415         (copy_internal): Use lchmod rather than chmod.
5416         * src/cp.c: Include lchmod.h.
5417         (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
5418         * src/mkdir.c: Include lchmod.h.
5419         (usage): Clarify -m's operation.
5420         (main): Use lchmod rather than chmod.  Don't use lchmod unless the
5421         new mode contains bits outside the 777 range.
5422         * src/mkfifo.c (usage): Clarify -m's operation.
5423         (main): If -m is given, don't invoke chmod; use umask 0 instead.
5424         Report an error if -m asks for bits outside the 777 range.
5425         * src/mknod.c (usage, main): Likewise.
5427         * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
5429 2005-12-27  Jim Meyering  <jim@meyering.net>
5431         * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
5432         (sc_prohibit_assert_without_use): New rule.
5433         (syntax-check-rules): Add it to the list.
5434         * .x-sc_prohibit_assert_without_use: New empty file.
5435         * Makefile.am (EXTRA_DIST): Add it.
5437         * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
5439         * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
5440         Don't include <assert.h>; it wasn't used.
5442 2005-12-26  Paul Eggert  <eggert@cs.ucla.edu>
5444         * src/chown-core.c (restricted_chown):
5445         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
5446         * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
5447         | O_NOFOLLOW too, for consistency with other dir-openers.
5448         Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
5449         (is_empty_dir): Likewise.
5450         * src/shred.c (wipename): Likewise.  Don't bother trying to open
5451         dir for writing, since POSIX prohibits it.
5453 2005-12-22  Jim Meyering  <jim@meyering.net>
5455         * tests/help-version: Redirect stderr to /dev/full, to suppress
5456         write error diagnostic.
5458 2005-12-19  Jim Meyering  <jim@meyering.net>
5460         * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
5461         Avoid a minor race condition when `-m MODE' is specified, by using
5462         open, fchown, and close rather than just chown.  To do that reliably --
5463         even with an overly restrictive umask -- ensure that each mkdir,
5464         mknod and mkfifo call uses a mode including at least owner-read access.
5465         * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
5466         the subsequent chown (or equivalent open,fchown,close) fails.
5467         * tests/misc/mknod: New tests.
5468         * tests/misc/Makefile.am (TESTS): Add mknod.
5470 2005-12-17  Jim Meyering  <jim@meyering.net>
5472         * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
5473         e.g., on a named pipe.
5474         (OPEN_NO_FOLLOW_SYMLINK): Remove definition.  Use O_NOFOLLOW in
5475         place of all uses, since it is guaranteed (system.h) to be defined.
5477 2005-12-05  Andreas Gruenbacher  <agruen@suse.de>
5479         Add POSIX ACL support
5480         * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
5481         is no requirement for ACL support; particularly, it does not exist
5482         on systems that have POSIX ACLs.
5483         * src/copy.h (cp_option_init) [umask_kill]: Remove member.
5484         * src/cp.c (umask_kill): With default acls, the umask is not to be
5485         applied.  Remove umask_kill, don't change the process umask, and let
5486         the kernel apply the umask where appropriate.
5487         * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
5488         * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
5489         umask_kill.
5490         (copy_reg, copy_internal): Use copy_acl and set_acl
5491         instead of fchown/chown. Fix the logic for POSIX ACLs.
5492         (chown_succeded): Remove; we now always copy acls and
5493         preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
5494         did a chown before or not.
5495         * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
5496         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
5497         mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
5498         to link with it via $(LIB_ACL), for the utilities that need it.
5500 2005-12-16  Paul Eggert  <eggert@cs.ucla.edu>
5502         * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
5503         (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
5504         (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
5505         value is now signified by whether cwd_errno is null.
5506         (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
5507         pointer-to-bool to pointer-to-errno-value.  All callers changed.
5508         (rm_1): Don't bother setting a local cwd failure flag and then
5509         ORing it into the caller's.  Just set the caller's.
5510         (rm): Use cwd failure errno value to print a slightly-better
5511         diagnostic.
5513 2005-12-15  Jim Meyering  <jim@meyering.net>
5515         * src/stat.c (print_it): Properly handle a backslash at the
5516         end of a --printf format string.  Reported by Paul Eggert.
5517         * tests/misc/stat-printf (end-bs): Add a test for the above.
5519 2005-12-15  Paul Eggert  <eggert@cs.ucla.edu>
5521         * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
5522         Don't assume /etc/passwd contains user names; use 'id' instead.
5524 2005-12-15  Jim Meyering  <jim@meyering.net>
5526         stat: revert behavior of --format=FMT (-c)
5527         stat: add new option: --printf=FMT
5528         * NEWS: Mention this.
5529         * src/stat.c (isodigit, octtobin, hextobin): Define.
5530         (PRINTF_OPTION): Define.
5531         (interpret_backslash_escapes, trailing_delim): New globals.
5532         (usage): Document them.  Alphabetize on long option names.
5533         (print_esc_char): New function.
5534         (print_it): Rewrite, in order to handle backslash escapes.
5535         (main): Handle new option.  Set globals for --format, too.
5537         * tests/misc/stat-printf: Test --printf and --format.
5538         * tests/misc/Makefile.am (TESTS): Add stat-printf.
5540 2005-12-14  Paul Eggert  <eggert@cs.ucla.edu>
5542         * NEWS: sort now reports incompatible options.
5543         * src/sort.c (incompatible_options, check_ordering_compatibility):
5544         New functions.
5545         (main): Use them.  Don't bother with a usage message for
5546         "sort -c a b", for consistency with other error diagnostics.
5547         * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
5548         New tests.
5550         * src/cat.c (main): Undo previous change.  close_stdout already
5551         does the check, so the previous change wasn't necessary.
5553 2005-12-13  Paul Eggert  <eggert@cs.ucla.edu>
5555         * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
5557 2005-12-12  Paul Eggert  <eggert@cs.ucla.edu>
5559         Install a more-conservative approach for sort -R.  It's the
5560         same basic idea as the existing code, except it uses the full ISAAC
5561         approach (called the "more kosher" approach in the existing comments).
5562         This makes "sort -R" quite a bit slower (about a factor of 2 on my
5563         little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
5564         better to be conservative here at first, and review any performance
5565         improvements carefully.
5566         * .x-sc_require_config_h: Add src/rand-isaac.c.
5567         * src/rand-isaac.h: Remove.  All uses now simply include rand-isaac.c.
5568         * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
5569         (shred_SOURCES, sort_SOURCES): Remove.
5570         (EXTRA_DIST): Add rand-isaac.c.
5571         * src/rand-isaac.c: Revert to what used to be in shred.c, without
5572         changing it to allow for varying numbers of words in the state.
5573         Alter so that we include rand-isaac.c directly rather than
5574         compiling it and linking to it.  Don't include config.h or
5575         system.h; that's the includer's responsibility.
5576         Omit functions that are specific to shred.
5577         (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
5578         (isaac_step, struct irand_state):
5579         Resurrect these, with the same defns that used to be in shred.c.
5580         (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
5581         (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
5582         static again.
5583         (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
5584         (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
5585         (irand_init, irand32, irand_mod):
5586         Number of words is constant again.
5587         (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
5588         * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
5589         * src/sort.c: Likewise.
5590         * src/shred.c (fillrand, dopass, main): Undo previous change.
5591         (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
5592         from rand-isaac.c.
5593         * src/sort.c: Don't include md5.h; it wasn't needed.
5594         (struct keyfield): Rename random_hash to random, for consistency
5595         with the other member names.  All uses changed.
5596         (usage): Tweak wording to mention STRING for --seed option.
5597         (short_options): Rorder for consistency with other programs.
5598         (rand_state): Now a struct, not a pointer to one.  All uses changed.
5599         (HASH_WORDS, HASH_SIZE): Remove.
5600         (get_hash): Remove comments around resbuf size, since we can assume C89.
5601         Use a "more-kosher" (but slower) approach of invoking isaac_refill.
5602         (keycompare): Adjust to the new get_hash.
5603         Add a FIXME.
5604         (badfieldspec): Omit recently-introduced comment; it isn't needed.
5605         (main): Don't set need_random simply because gkey has it set; that
5606         doesn't necessarily mean we'll need random numbers.
5607         Redo seeding to match new get_hash approach.
5609 2005-12-10  Jim Meyering  <jim@meyering.net>
5611         * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
5613         Avoid shred segfault on 64-bit systems.
5614         * src/rand-isaac.c (isaac_refill): Don't try to negate a
5615         local of type uint32_t.  Make the local an `int' instead.
5617         * NEWS: Mention sort's new options.
5619         * src/rand-isaac.c (isaac_mix): Declare to be static.
5620         Mark all other functions as `extern' so the tight-scope
5621         part of `make distcheck' passes once again.
5622         * src/rand-isaac.h (isaac_mix): Remove declaration.
5624         * src/sort.c (get_hash): Change position of `*' in parameter
5625         type to conform with convention.
5626         (main): Split a long line so it fits in 80 columns.
5627         (keycompare): Remove stray SPACE before TAB that was
5628         causing `make distcheck' to fail.
5630         * src/shred.c: Don't include gethrxtime.h.  No longer needed.
5632         * tests/misc/sort-rand: New file: basic tests for the new options.
5633         * tests/misc/Makefile.am (TESTS): Add sort-rand.
5635 2005-12-10  Frederik Eaton  <frederik@ofb.net>
5637         * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
5638         (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
5639         * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
5640         Make state size runtime-configurable.
5641         (isaac_new, isaac_copy): New functions.
5642         * src/rand-isaac.h: New file.
5643         * src/shred.c: Include rand-isaac.h.  Move ISAAC code to rand-isaac.c.
5644         (fillrand, main): Adjust to the fact that the state size is now
5645         runtime-configurable.
5646         * src/sort.c (short_options, long_options, WORDS, keycompare, main):
5647         (usage): Add options --random-sort and --seed to implement a random
5648         shuffle.
5649         Include md5.h and rand-isaac.h.
5650         (get_hash): New function.
5651         (rand_state): New var.
5652         (HASH_WORDS, HASH_SIZE): New macros.
5654 2005-12-09  Paul Eggert  <eggert@cs.ucla.edu>
5656         * tests/dd/misc: Add test for dd iflags=noatime.
5658 2005-12-09  Jim Meyering  <jim@meyering.net>
5660         * src/sort.c (usage): Mention white space vs -b and -t options.
5661         From The Wanderer.
5663 2005-12-09  Eric Blake  <ebb9@byu.net>
5665         * src/test.c (main): Fix misleading comment.
5667 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
5669         * NEWS: Mention dd's new noatime flag.
5670         * src/system.h (O_NOATIME): Define to 0 if not already defined.
5671         * src/dd.c (flags, usage): Add support for noatime flag.
5673 2005-12-07  Jim Meyering  <jim@meyering.net>
5675         Distribute the cvsu script, used only by `make syntax-check'.
5676         * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
5677         * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
5678         distribute a copy of this script.
5679         * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
5681         * tests/mv/acl: exit-77 before the trap, not after, if we fail
5682         to create a temporary directory on another partition.
5683         From Andreas Gruenbacher.
5685 2005-12-06  Tomas Pospisek  <tpo@sourcepole.ch>  (tiny change)
5687         * man/basename.x: Cross-reference to dirname and readlink.
5688         * man/dirname.x: Cross-reference to basename and readlink.
5690 2005-12-05  Andreas Gruenbacher
5692         * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
5693         (set_owner, preserve_author): New functions, factored out of copy_reg.
5694         (copy_reg): Use them.
5695         (copy_internal): Use them here, too.
5697 2005-12-04  Jim Meyering  <jim@meyering.net>
5699         * src/sleep.c (usage): Say what happens with two or more arguments.
5700         Suggested by Justin Pryzby.
5702         * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
5703         where it's used.
5705 2005-12-03  Jim Meyering  <jim@meyering.net>
5707         * src/rm.c (long_opts): Change the name of each undocumented, for-
5708         testing-only option to start with `-', so that it cannot render
5709         ambiguous any prefix it happens to share with some other option name.
5710         Problem reported by Eric Blake.
5711         * src/head.c (long_options): Likewise.
5712         * src/tail.c (long_options): Likewise.
5714         * tests/misc/head-elide-tail: Update uses of undocumented, for-
5715         testing-only --presume* options to start with `---'.
5716         * tests/rm/dangling-symlink: Likewise.
5717         * tests/rm/dir-no-w: Likewise.
5718         * tests/rm/isatty: Likewise.
5720 2005-11-30  Jim Meyering  <jim@meyering.net>
5722         * Makefile.maint: Add a comment about cvsu.
5724 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
5726         * NEWS: df updates for "none", "proc", inaccessible file systems.
5727         * src/df.c (show_point): Ignore inaccessible file systems.
5728         (usage): -a includes dummy file systems, not size-0 file systems.
5730         * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
5731         to avoid collision with POSIX name space.  All uses changed.
5733 2005-11-24  Jim Meyering  <jim@meyering.net>
5735         * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
5736         * tests/acl: Add `$0: ' prefix to diagnostics.
5738         * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
5740 2005-11-23  Paul Eggert  <eggert@cs.ucla.edu>
5742         * src/copy.c: Improve performance a bit by optimizing away
5743         unnecessary system calls and going to a block size of at least
5744         8192 (on normal hosts, anyway).  This improved performance 5% on my
5745         Debian stable host (2.4.27 kernel, x86, copying from root
5746         ext3 file system to itself).
5747         Include "buffer-lcm.h".
5748         (copy_reg): Omit last argument.  All callers changed.
5749         Use xmalloc to allocate rather than trusting alloca
5750         (which is unwise with large block sizes).
5751         Declare locals more locally, if possible.
5752         Use uintptr_t words instead of int words, for a bit more speed
5753         when looking for null blocks on 64-bit hosts.
5754         Optimize away reads of zero bytes on regular files.
5755         In the typical case, insist on 8 KiB buffers, at least.
5756         Avoid unnecessary extra call to fstat when checking for sparse files.
5757         Avoid now-unnecessary cast to off_t, and "0L".
5758         Avoid unnecessary test of *new_dst when checking for same owner
5759         and group.
5761 2005-11-22  Paul Eggert  <eggert@cs.ucla.edu>
5763         * src/remove.c (rm): Don't assume C99 for-loop syntax.
5765 2005-11-22  Jim Meyering  <jim@meyering.net>
5767         * src/remove.c (AD_push): Remove debugging cruft.
5769         * tests/rm/unread2 (rm): Change expected diagnostic,
5770         `cannot open directory' to `cannot remove', to align with
5771         new version of rm.
5772         * tests/rm/rm2: Ensure that rm now continues removing entries
5773         even after certain types of failure.
5775         * src/remove.c: Rewrite.  Now, this module is reentrant on systems
5776         that provide openat (Solaris), and on systems like Linux+procfs
5777         where our openat emulation code is reentrant.  This also fixes a
5778         few low-probability leaks and eliminates some code that could,
5779         in very unusual circumstances, cause rm() (via a callee) to exit.
5780         * NEWS: Mention this.
5782         * configure.ac: Put copyright dates all on one line so the
5783         emacs function that updates them works properly.
5785 2005-11-18  Paul Eggert  <eggert@cs.ucla.edu>
5787         * configure.ac (AM_PROG_CC_C_O): Add.  Needed for CVS Automake.
5788         Problem reported by Eric Blake.
5789         (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
5790         we get a standard-conforming compiler.  This relies on the new
5791         m4/c.m4 file.  Note that it's a bit tricky, since c.m4 doesn't
5792         define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
5793         m4/c.m4 can go away with Autoconf 2.60 comes out.
5795 2005-11-17  Jim Meyering  <jim@meyering.net>
5797         * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
5798         (AD_mark_current_as_unremovable): Likewise, but for a local.
5799         (rm_1): Likewise.
5801         * tests/mv/acl: Let traps handle removing temporary directories.
5803         Expect acl-related tests to fail, until the corresponding
5804         patches are committed.
5805         * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
5806         * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
5808         ACL tests, from Andreas Gruenbacher.
5809         * tests/acl, tests/mv/acl, tests/cp/acl: New files.
5810         * tests/mv/Makefile.am (TESTS): Add acl.
5811         * tests/cp/Makefile.am (TESTS): Add acl.
5813         * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
5815 2005-11-16  Paul Eggert  <eggert@cs.ucla.edu>
5817         * NEWS: Improve quality of ln's diagnostics.
5818         * src/ln.c (do_link, usage): Likewise.
5819         (do_link): Don't use alloca on a buffer of unbounded size.
5821 2005-11-16  Jim Meyering  <jim@meyering.net>
5823         * tests/cp/fail-perm: Accommodate HPUX.  It appears to fail
5824         with EACCES rather than EPERM.  Reported by Peter O'Gorman here:
5825         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
5826         This also affects AIX 4.3.3, according to Ralf Wildenhues, in
5827         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
5829 2005-11-14  Jim Meyering  <jim@meyering.net>
5831         * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
5833 2005-11-13  Jim Meyering  <jim@meyering.net>
5835         * announce-gen: Accept new option, --gpg-key-id=ID and
5836         emit a blurb telling how to use the .sig files.
5837         * Makefile.cfg (gpg_key_ID): Define.
5838         * Makefile.maint (announcement): Use new option and key.
5840         Require that most .c files include <config.h>.
5841         * Makefile.maint (sc_require_config_h): New rule.
5842         (syntax-check-rules): Add it.
5843         * .x-sc_require_config_h: New file listing exceptions to the
5844         above rule.  Some are legit, others are simply grandfathered in.
5845         * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
5847 2005-11-12  Jim Meyering  <jim@meyering.net>
5849         * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
5851 2005-11-11  Jim Meyering  <jim@meyering.net>
5853         * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
5854         Mention new readlink options in 5.3.0's `New features' section.
5855         Spotted by Thomas Hood.
5857 2005-11-08  Jim Meyering  <jim@meyering.net>
5859         * NEWS: Merge in changes from b5_9x branch.
5861 2005-11-08  Paul Eggert  <eggert@cs.ucla.edu>
5863         * NEWS: ls now defaults to --time-style='locale', which in turn acts
5864         like --time-style='posix-long-iso' if the locale settings are messed up.
5865         * src/ls.c (decode_switches): Implement this.
5867 2005-11-08  Jim Meyering  <jim@meyering.net>
5869         * tests/du/2g: s/expensive/very expensive/ in a comment.
5870         From Paul Townsend.
5872 2005-10-17  Eric Blake  <ebb9@byu.net>
5874         * src/ls.c (usage): Fix descriptions of --sort, --time.
5875         Reported by Vitaly A. Ostanin.
5877 2005-11-04  Paul Eggert  <eggert@cs.ucla.edu>
5879         * src/ln.c: Include filenamecat.c.
5880         (FILE_BASENAME_CONCAT): Remove.
5881         (do_link): Remove last arg DEST_IS_DIR.  All callers changed.
5882         (main): Use file_name_concat, base_name, and strip_trailing_slashes
5883         instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
5884         the use of alloca.
5886 2005-11-04  Jim Meyering  <jim@meyering.net>
5888         * src/du.c (process_file): Don't overflow for files of size >= 2^31
5889         on systems with stat.st_blocks of a signed 32-bit type.
5890         This bug causes trouble on some AIX 5.1 systems.
5891         Report and trivial patch from Paul Townsend:
5892         <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
5893         * NEWS: Mention this.
5895         * tests/du/2g: New (very-expensive) test for the above-fixed bug.
5896         * tests/du/Makefile.am (TESTS): Add it here.
5897         * tests/very-expensive: New file.
5898         * tests/Makefile.am (EXTRA_DIST): Add it here.
5899         * tests/cp/perm: Mark this test as `very-expensive', too.
5901 2005-11-02  Paul Eggert  <eggert@cs.ucla.edu>
5903         * NEWS: Mention that rm -d and maybe ln -d are scheduled for
5904         removal in 2006.
5905         * src/remove.h (struct rm_options): Remove unlink_dirs.  All uses
5906         removed.
5907         * src/rm.c (usage): Don't mention rm -d.
5909 2005-11-02  Jim Meyering  <jim@meyering.net>
5911         * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
5912         From Andreas Schwab.
5914         * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
5915         `M+N records in/out' lines don't pollute `make check' output.
5917         * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
5918         fixed on 2005-10-31.  This test uses the new, IN_PIPE specifier.
5919         * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
5920         to indicate that the input file should be piped into the command
5921         under test (via `cat FILE | $prog ...').
5923         * src/remove.c (remove_entry): Emit a better diagnostic when rm
5924         (without -r) fails to remove a directory on a non-Linux system.
5925         This change affects only newer Solaris systems (with priv_*
5926         functions like priv_allocset).  Reported by Keith Thompson.
5928         * tests/rm/dir-nonrecur: New file/test for the above fix.
5929         * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
5931 2005-11-01  Paul Eggert  <eggert@cs.ucla.edu>
5933         * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
5934         POSIX 1002.1-2001 requires.
5935         * src/tail.c (parse_obsolete_option): Implement this.
5936         Problem reported by Vincent Lefevre.
5937         * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
5938         * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
5939         (test_vector): Add special cases for _POSIX2_VERSION, and
5940         regularize the old ones a bit.
5941         * tests/touch/obsolescent: Add y2000 test.
5943 2005-10-31  Paul Eggert  <eggert@cs.ucla.edu>
5945         * src/dd.c (skip): Fix off-by-one error reported by
5946         Theodoros V. Kalamatianos.
5948 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
5950         * tests/mkdir/p-3: Require that the test be run as non-root.
5951         Problem and trivial fix reported by Theodoros V. Kalamatianos.
5953 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
5955         * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
5956         boundary between DEST and SOURCE in the result.
5958 2005-10-26  Dmitry V. Levin  <ldv@altlinux.org>
5960         * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
5961         back to text, to sync with documentation and for backwards
5962         compatibility.
5964 2005-10-25  Jim Meyering  <jim@meyering.net>
5966         * tests/dircolors/simple (other-wr): Add an explicit test for
5967         the dircolors bug (NULL-dereference) fixed yesterday.
5969 2005-10-24  Jim Meyering  <jim@meyering.net>
5971         * src/tac.c (tac_file): When determining whether a file is seekable,
5972         also test whether it is a tty.  Using only the lseek-based test would
5973         give a false positive on Solaris.  Reported by Peter Fales.
5975 2005-10-24  Dmitry V. Levin  <ldv@altlinux.org>
5977         * tests/install/d-slashdot: New test, for "install -d" failure.
5978         * tests/install/Makefile.am (TESTS): Add d-slashdot.
5979         * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
5980         * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
5982 2005-10-24  Jim Meyering  <jim@meyering.net>
5984         * src/dircolors.c (ls_codes): Add missing comma.
5985         Anonymous report and patch from
5986         http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
5988         * src/dircolors.c: Add compile-time assertion that the slack_codes
5989         and ls_codes arrays have the same number of elements.  This would
5990         have prevented the above-fixed bug.
5992         * src/expand.c (parse_tab_stops): Add a comment to make this function
5993         identical to the one in unexpand.c.
5994         * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
5995         identical to the one in expand.c.
5997         * src/expand.c (next_file): Don't assume fopen cannot return stdin.
5999 2005-10-23  Jim Meyering  <jim@meyering.net>
6001         * src/md5sum.c (digest_check, main): Use ptr_align rather than
6002         a dangerous pointer-value-to-`unsigned' cast.
6003         * NEWS: mention the new sha* programs.
6004         * AUTHORS: Add new sha* programs.
6006 2005-08-28  David Madore  <david.madore@ens.fr>
6008         Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
6009         * README: Add their names to the list.
6010         * src/md5sum.c: Provide framework for computing sha-2 hashes.
6011         * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
6012         Rules for compiling sha-2 utilities
6013         (noinst_HEADERS): Remove checksum.h.
6014         * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
6015         New files.
6016         * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
6017         (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
6018         * tests/misc/sha224sum, tests/misc/sha256sum: New files.
6019         * tests/misc/sha384sum, tests/misc/sha512sum: New files.
6020         * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
6021         sha384sum, sha512sum test scripts here rather that each in its
6022         own directory.
6024 2005-08-28  David Madore  <david.madore@ens.fr>
6026         * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
6027         of the FIPS test vectors).
6029 2005-10-23  Jim Meyering  <jim@meyering.net>
6031         * configure.ac: Use 6.0-cvs as the version string.
6032         * NEWS: Adjust accordingly.
6035         -----
6037         Copyright (C) 2005, 2006 Free Software Foundation, Inc.
6039         Copying and distribution of this file, with or without
6040         modification, are permitted provided the copyright notice
6041         and this notice are preserved.