Fix a bug in how the LS_COLORS ln=target attribute is handled.
[coreutils/bo.git] / ChangeLog
blobf95dcfd8623276a6aa67217a1aec55c1c707f75f
1 2007-04-07  Eric Blake  <ebb9@byu.net>
3         Fix a bug in how the LS_COLORS ln=target attribute is handled.
4         * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
5         ln=target attribute applies.  Reported by Kirk Kelsey.
7 2007-04-02  Jim Meyering  <jim@meyering.net>
9         * src/copy.c (copy_reg): Initialize local "con", before calling
10         getfscreatecon, in case that function (or its inline stub) does
11         not set it.
13 2007-04-01  Paul Eggert  <eggert@cs.ucla.edu>
15         * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
16         ls -x DIR would sometimes output the wrong string in place of the
17         first entry.
18         * NEWS: Mention the bug fix.
19         * tests/ls/x-option: New file.
20         * tests/ls/Makefile.am (TESTS): Add x-option.
22         gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
23         * bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
24         md5 to crypt/md5 and sha1 to crypt/sha1.
26 2007-03-30  Jim Meyering  <jim@meyering.net>
28         * NEWS: Mention these SELinux changes.
30         * ChangeLog-selinux: Remove file.
31         Move its contents into this file, removing old dates.
33         * src/runcon.c (main): Don't reorder arguments.  Reported by
34         Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
35         * tests/misc/runcon-no-reorder: New file.  Test for the above.
36         * tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
38         * src/runcon.c (main): Remove "." at end of a diagnostic.
40         * src/runcon.c: New program.
41         * src/Makefile.am (bin_PROGRAMS): Add runcon.
42         (runcon_LDADD): Define.
43         * README: Add runcon to the list of programs.
44         * AUTHORS: Add this: runcon: Russell Coker
45         * tests/help-version: Add runcon as an exception.
46         * man/Makefile.am (dist_man_MANS): Add runcon.1.
47         (runcon.1): New dependency.
49         mkfifo, mknod: Accept new "-Z, --context=C" option.
50         * src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
51         (main): Honor it.
52         * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
54         mkdir: Accept new "-Z, --context=C" option.
55         * src/mkdir.c: Include <selinux/selinux.h>.
56         (main): Honor it.
57         * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
59         * tests/cp/cp-a-selinux: New file.  Test for the bug reported in
60         <http://bugzilla.redhat.com/219900>.
61         * tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
63         * tests/selinux: New file.
64         * tests/Makefile.am (EXTRA_DIST): Add selinux.
65         * tests/misc/selinux: Source the new script, rather than open coding it.
67         Change how "cp -a" and "cp --preserve=context" work with SELinux.
68         Now, cp -a attempts to preserve context, but failure to do so does
69         not change cp's exit status.  However "cp --preserve=context" is
70         similar, but failure *does* cause cp to exit with nonzero status.
71         * src/copy.h (struct cp_options) [require_preserve_context]: New member.
72         * src/copy.c (copy_reg, copy_internal): Implement the above.
73         * src/mv.c (cp_option_init): Initialize the new member.
74         * src/install.c (cp_option_init): Likewise.
75         * src/cp.c (cp_option_init): Likewise.
76         (decode_preserve_arg): Set it or reset it.
78         cp, mv, install: add SELinux support, but unlike with the Red Hat
79         patch, mv and cp do not provide the "-Z context" option.
80         * src/copy.c: Include <selinux/selinux.h>.
81         (restore_default_fscreatecon): New function.
82         (copy_reg): Make cp --preserve=context work for existing destination.
83         (copy_internal): Likewise for new destinations.
84         * src/copy.h (cp_options) [preserve_security_context]: New member.
85         * src/cp.c: Include <selinux/selinux.h>.
86         (selinux_enabled): New global.
87         (usage): Mention new --preserve=context option.
88         (PRESERVE_CONTEXT): Define/use.
89         (decode_preserve_arg): Handle PRESERVE_CONTEXT.
90         (main): Remove an obsolete comment.
91         If --preserve=context is specified on a system without SELinux
92         enabled, give a diagnostic and fail.
93         * src/mv.c: Include <selinux/selinux.h>.
94         Set x->preserve_security_context if SELinux is enabled.
95         * src/install.c: Accept new "-Z, --context=C" option.
96         Accept --preserve-context option (but not -P option).
97         Accept alternate spelling: --preserve_context, for now.
98         Include <selinux/selinux.h> and "quotearg.h".
99         (selinux_enabled, use_default_selinux_context): New globals.
100         (PRESERVE_CONTEXT_OPTION): Define.
101         (cp_option_init): Default: do not preserve security context.
102         (setdefaultfilecon): New function.
103         (main): Honor new options.
104         * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
105         Add $(LIB_SELINUX).
106         * src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
108         * tests/misc/selinux [VERBOSE]: Print version info for each
109         of the tested tools, not just ls.
111         * src/c99-to-c89.diff: Remove the ls.c patch, now that I've
112         temporarily removed the offending c99'ism.
114         * src/chcon.c (usage): Split a string literal that was longer than 509.
116         * src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
117         Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
119         * src/c99-to-c89.diff: Adjust offsets.
121         * AUTHORS: Add chcon.
123         * src/c99-to-c89.diff: Remove trailing blanks.
125         * src/chcon.c: Don't include "dirname.h".  system.h already includes it.
127         * gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
129         * src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
131         * src/id.c (main): Tweak id -Z diagnostic.
133         id: Add SELinux support: -Z option.
134         * src/id.c (main): Apply patches from Fedora, with these changes:
135         Remove #ifdef WITH_SELINUX.
136         Use error (EXIT_FAILURE, not fprintf+exit(1).
137         * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
139         stat: Add support for SELinux in the form of a %C format directive.
140         * src/stat.c (follow_links): Make this variable file-global.
141         (out_file_context): New function.
142         (print_statfs): Honor %C.
143         (print_stat): Honor %C.
144         (do_stat): Remove follow_links parameter.
145         (usage): Document the two %C directives.
146         (main): Accept -Z (though it's a no-op).
147         * src/Makefile.am (stat_LDADD): Define.
149         ls: Add support for SELinux and a slightly modified -Z option.
150         I started with the patches from Red Hat.
151         The entries below tell how the code evolved.
153         * src/ls.c (print_long_format, print_file_name_and_frills): When
154         there is no security context (due to getfilecon/lgetfilecon failing
155         with e.g. ENOTSUP), print it as "?", not "".
156         * src/ls.c (print_file_name_and_frills): Make -Z work without -l.
157         (length_of_file_name_and_frills): Likewise.
159         * src/ls.c: Remove the --lcontext and --scontext options.
160         Change the way -Z, --context work so that it no longer implies -l.
161         Thus, -Z -l will work like -lcontext and -Z without -l will work
162         like --scontext.
164         Adjust tests to reflect new 'ls -l' syntax -- affects only
165         systems with SELinux when operating on a file with no ACL.
166         These tests assumed that everything before the first space on
167         each line is the 10-byte mode string.  But there may also be a "+"
168         in the 11th column, just before the space.  However, note that this
169         is not new.  The same thing would have happened even without the
170         change below, when listing a file with an ACL.
171         * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
172         * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
173         * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
175         Don't make compilation depend on USE_ACL.  An SELinux security
176         context counts as an "alternate access control method", so ls
177         must output a "+" for each file with a security context.
178         * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
179         (FILE_HAS_ACL): Remove macro definition.  Use f->have_acl directly.
180         (gobble_file): Record whether a file has a security context, and
181         update the condition used to determine whether to print the "+".
182         (gobble_file): Call getfilecon/lgetfilecon also when
183         format == long_format, so that we get the "+".
185         * src/ls.c (gobble_file): Add a comment explaining why (with a
186         security context option) ls doesn't exit nonzero due to e.g.,
187         getfilecon failing with errno == ENOTSUP.
189         * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
190         to ENOTSUP.
192         * src/ls.c (gobble_file): Factor out three small blocks using
193         getfilecon and lgetfilecon.
194         Don't ignore return value from getfilecon and lgetfilecon.
196         * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
197         ternary operator).
198         (print_scontext_format): Likewise.
199         (print_scontext): Declare to be "bool", not int.  Adjust uses.
201         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
203         * tests/misc/chcon: New file.
204         * tests/misc/chcon-fail: New file.
205         * tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
206         * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
208         * tests/misc/Makefile.am (TESTS): Add selinux.
209         * tests/misc/selinux: New file.
210         * tests/help-version: Skip chcon.
211         * man/chcon.x: New file.
212         * man/Makefile.am: Build chcon.1.
214         New program: chcon
215         * gl/modules/selinux-at: New module.  Check for libselinux and set
216         LIB_SELINUX here, unconditionally, rather than depending on
217         the configure-time --enable-selinux option.
218         * gl/modules/selinux-h: New module.
219         * bootstrap.conf (gnulib_modules): Add selinux-at.
220         * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
221         * gl/lib/se-selinux_.h: New file.
222         * gl/lib/se-context_.h: New file.
223         * gl/m4/selinux-selinux-h.m4: New file.
224         * gl/m4/selinux-context-h.m4: New file.
225         * src/Makefile.am (bin_PROGRAMS): Add chcon.
226         (chcon_LDADD): Define.
227         * README: Add chcon to the list of programs.
228         * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
230 2007-03-29  Jim Meyering  <jim@meyering.net>
232         * .vg-suppressions: Add libc-getpwuid-leak.
234 2007-03-28  Jim Meyering  <jim@meyering.net>
236         Help translators include translation team's web or email address.
237         * src/system.h (emit_bug_reporting_address): New function.
238         * src/base64.c: Use it rather than a literal printf.
239         * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
240         * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
241         * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
242         * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
243         * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
244         * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
245         * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
246         * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
247         * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
248         * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
249         * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
250         * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
251         * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
252         * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
253         * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
254         * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
255         * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
256         * src/who.c, src/whoami.c, src/yes.c: Likewise.
258         * src/stty.c: Don't include "vasprintf.h", now that its
259         declarations are guaranteed to be in gnulib's stdio.h.
260         * src/who.c: Likewise.
262 2007-03-27  Jim Meyering  <jim@meyering.net>
264         * README: Use "install", not "ginstall" in the list of program names.
265         * src/Makefile.am (check-README): Substitute s/ginstall/install/.
267 2007-03-25  Jim Meyering  <jim@meyering.net>
269         * src/c99-to-c89.diff: Regenerate.
271 2007-03-25  Paul Eggert  <eggert@cs.ucla.edu>
273         Avoid the need for euidaccess and/or lstat on every directory entry
274         with 'rm -r dir' (without -f), if we are root, or if we are removing
275         a directory tree that is full of symbolic links.
276         * bootstrap.conf (gnulib_modules): Add write-any-file.
277         * src/copy.c: Include write-any-file.h.
278         (UNWRITABLE): Remove macro, replacing with....
279         (writable_destination): New function, which uses can_write_any_file
280         to avoid the need for euidaccess when we are privileged.
281         (overwrite_prompt, abandon_move): Use it.
282         * src/remove.c: Include write-any-file.h.
283         (D_TYPE): New macro.
284         (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
285         (write_protected_non_symlink): Don't bother to stat if we can write
286         any file.
287         (prompt): New arg PDIRENT_TYPE.  All callers changed.
288         Use readdir dirent type to avoid the need for 'lstat' on each directory
289         entry in cases like 'rm -r dir', if we are root, or if the tree is
290         full of symbolic links.
291         (DT_IS_KNOWN, DT_MUST_BE): Remove.
292         (remove_entry): New arg DIRENT_TYPE_ARG.  All callers changed.
294 2007-03-24  Jim Meyering  <jim@meyering.net>
296         If strace malfunctions, skip the test rather than failing it.
297         * tests/mv/atomic: Required on a mips-unknown-linux-gnu system
298         running the aging linux-2.4.27-mipscvs-20040814.
300 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
302         * src/pathchk.c: Don't include euidaccess.h, as we don't call
303         euidaccess.
305 2007-03-23  Jim Meyering  <jim@meyering.net>
307         * README-package-renamed-to-coreutils: Add a URL for the FAQ,
308         and a couple more archive links.
310 2007-03-22  Jim Meyering  <jim@meyering.net>
312         Post-release version change.
313         * NEWS: Add a line for 6.9+.
314         * configure.ac (AC_INIT): Set new version string.
316         Version 6.9.
317         * NEWS: Record release date and new version number.
318         * configure.ac (AC_INIT): New version number.
320         * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
322 2007-03-22  Paul Eggert  <eggert@cs.ucla.edu>
324         Improve a test script.
325         * tests/mv/hard-3: Check for 'ls' failure, too.
326         Generate more-useful debugging output when 'ls' fails.
328 2007-03-21  Jim Meyering  <jim@meyering.net>
330         Fix a test script not to claim an ext2 file system is of type xfs.
331         * tests/du/slink: When using df --local and df --type=TYPE,
332         test only the exit code.  Don't bother with stdout.
333         Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
335         * gl/lib/savewd.c: Remove this file, since the savewd_save change
336         is now in gnulib.  The other wasn't useful.
338 2007-03-20  Jim Meyering  <jim@meyering.net>
340         * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
342         Skip part of this test when "." is not a local file system.
343         * tests/install/basic-1: Otherwise, it would fail on some NFS
344         file systems.
345         * tests/mkdir/p-3: Likewise.
347 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
349         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
350         Add $(LIB_ACL_TRIVIAL).
352 2007-03-18  Jim Meyering  <jim@meyering.net>
354         Fix a generic NFS-related test failure.
355         * tests/mkdir/p-3: When setting up an unreadable "." in an
356         inaccessible parent, make the parent inaccessible *after* making "."
357         unreadable.  Otherwise, running "chmod a-r ." in an already-
358         inaccessible parent would fail on NFS with "Stale NFS file handle".
360         Fix a bug in how pr -m -s works.
361         * NEWS: Describe how the fix affects pr.
362         * src/pr.c (init_parameters): The --merge (-m) option does
363         not imply --expand-tabs (-e), so don't set "untabify_input".
364         Reported by Wis Macomson.
365         * tests/misc/pr: New file.  Test for the above fix.
366         * tests/misc/Makefile.am (TESTS): Add pr.
367         * THANKS: Update.
369 2007-03-17  Jim Meyering  <jim@meyering.net>
371         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
372         * bootstrap: Put ""s around use of $build_aux, in case
373         someone uses a name containing shell meta-characters.
374         Reported by Alfred M. Szmidt.
375         * tests/misc/tty-eof: Add shuf to the list of tested commands.
377         Avoid test failure on NFS-mounted Solaris ZFS file system.
378         * tests/du/basic: Skip a test if "." is on a non-local file system.
380         Avoid an obscure build failure, prefer waitpid over wait.
381         * src/install.c (strip): Use waitpid, not wait.  It's equivalent,
382         but feels less obsolescent.
384         * bootstrap: Don't use \> in grep regexp.  For HP-UX.
386 2007-03-16  Jim Meyering  <jim@meyering.net>
388         Begin adding support for Solaris ZFS (4 entries per trivial ACL)
389         * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
390         (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
391         (is_trivial_acl): New function.  Incomplete, for now.
392         (file_has_acl, copy_acl): Use the new function, rather than
393         counting the number of entries in an ACL.
395         * bootstrap: Update from gnulib.
397         * .x-sc_prohibit_atoi_atof: Add TODO here, too.
399 2007-03-16  Paul Eggert  <eggert@cs.ucla.edu>
401         * src/copy.c: Include filemode.h.
402         (overwrite_prompt): Say "try to overwrite", not "overwrite", to
403         make it clearer that the attempt may fail.  Problem reported by
404         Dan Jacobson in:
405         http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
406         Output symbolic mode as well as numeric.
407         * tests/mv/i-2 (fail): Adjust to new prompt format.
409 2007-03-15  Jim Meyering  <jim@meyering.net>
411         Enforce policy: don't use *scanf functions.
412         * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
413         * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
414         * TODO: note that stty.c needs this small clean-up.
416 2007-03-13  Jim Meyering  <jim@meyering.net>
418         Prepare to work on ACL-related failure when using Solaris ZFS.
419         * gl/lib/acl.c: New file, copied from gnulib.
421         Work around a failing test due to an NFS-based race condition.
422         * tests/cp/sparse: Accept a report that the copy is *smaller*.
424 2007-03-12  Jim Meyering  <jim@meyering.net>
426         Make bootstrap.conf a tiny bit more generic.
427         * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
428         files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
430 2007-03-10  Jim Meyering  <jim@meyering.net>
432         Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
433         * gl/lib/savewd.c: Copy this file from gnulib, then change
434         "errno != EACCES" to (errno != EACCES && errno != ESTALE).
435         The symptom was this failure in tests/install/basic-1:
436         ginstall: cannot create directory `rel/a': Stale NFS file handle
438         The preceding change solved part of the problem.  Now ginstall fails.
439         * tests/install/basic-1: Temporarily, don't redirect ginstall's
440         stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
441         is failing.
443         * tests/install/basic-1: When setting up an unreadable "." in an
444         inaccessible parent, make the parent inaccessible *after* making "."
445         unreadable.  Otherwise, running "chmod a-r ." in an already-
446         inaccessible parent would fail on NFS with "Stale NFS file handle".
447         Reported by Bob Proulx.
449         * Makefile.maint (po-check): Exclude c99-to-c89.diff.
451 2007-03-09  Jim Meyering  <jim@meyering.net>
453         Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
454         * tests/chgrp/basic: Don't let failure by chgrp to set the
455         group of a symlink make this test fail.  Do give a diagnostic.
456         In the chgrp-no-change-ctime test, add darwin7.9.0 as another
457         known-failing system.
458         When failing on some other system, print $host_triplet, too.
459         Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
460         Reported by Peter Fales.
462 2007-03-08  Jim Meyering  <jim@meyering.net>
464         * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
466 2007-03-08  Paul Eggert  <eggert@cs.ucla.edu>
468         rm without -f: give a better diagnostic when euidaccess fails.
469         * src/remove.c (write_protected_non_symlink): Return int, not bool,
470         so that we can indicate failure too (as a postive error number).
471         (prompt): If write_protected_non_symlink fails, report that error
472         number and fail rather than charging ahead and removing the dubious
473         entry.  Redo the logic of printing a diagnostic so that we need to
474         invoke quote (full_filename (...)) only once.  More details at:
475         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
477 2007-03-08  Jim Meyering  <jim@meyering.net>
479         Generalize a few more cvs-isms.
480         * bootstrap (checkout_only_file): Rename from CVS_only_file.
481         Change comments and diagnostics not to say "CVS".
483         * bootstrap: Run libtool, if necessary.
485         Make bootstrap a little more general.
486         * bootstrap (build_aux): Factor out/use this definition.
487         Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
488         (insert_sorted_if_absent): Move function definition "up", to
489         precede new first use.
490         If $build_aux/ doesn't exist initially, create it, and
491         mark it as ignored.
493 2007-03-03  Andrew Church  <achurch@achurch.org>  (tiny change)
494             Paul Eggert  <eggert@cs.ucla.edu>
496         Fix a bug: cp -x would fail to set mount point permissions.
497         * NEWS: mention cp -x bug fix
498         * src/copy.c (copy_internal): Don't return immediately after
499         copying a mount point that we do not intend to recurse under.
500         Based on a patch by Andrew Church.
502 2007-03-03  Jim Meyering  <jim@meyering.net>
504         pwd-unreadable-parent: Skip test on ia64/Linux, too.
505         * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
506         Reported by Bob Proulx.
508 2007-03-02  Jim Meyering  <jim@meyering.net>
510         pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
511         * tests/misc/pwd-unreadable-parent: Rather than trying to decide
512         whether this test has a chance of succeeding, run it only when
513         $(host_os) is linux-gnu.  It was failing on powerpc-apple-darwin8.8.0
514         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
516         * tests/misc/pwd-long: Also allow "+" in $PWD.
518         Remove another coreutils-ism.  Formatting cleanup.
519         * Makefile.maint (my-distcheck): Update an outdated comment.
520         (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
521         (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
523 2007-03-01  Jim Meyering  <jim@meyering.net>
525         * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
526         (my-distcheck): Use the new variable, instead of too-long literal.
528         Make "make syntax-check" rules less coreutils-specific.
529         * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
530         (sc_cast_of_alloca_return_value): Likewise.
531         (sc_root_tests): Do nothing if there is no check-root target
532         in tests/Makefile.am.
534         Run the writable-files check only for release-building targets.
535         * Makefile.maint (local-checks-available): Remove writable-files.
536         (alpha beta major): Put it here, instead.
538         "make syntax-check" now runs only Makefile.cfg-selected tests
539         * Makefile.maint (syntax-check-rules): Hoist this definition so that
540         it precedes the indirect use in the definition of $(local-check).
541         (local-check): Use :=, not just "=".
542         (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
544 2007-02-28  Bruno Haible  <bruno@clisp.org>
546         * bootstrap.conf (gnulib_modules): Replace xreadlink with
547         xreadlink-with-size. Add xreadlink.
548         * src/copy.c (copy_internal): Update.
549         * src/ls.c (is_directory): Update.
550         * src/stat.c (print_stat): Update.
551         * src/readlink.c (main): Use the one-argument xreadlink function.
553 2007-02-28  Paul Eggert  <eggert@cs.ucla.edu>
555         * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
556         Problem reported by Philip Rowlands in
557         <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
559 2007-02-28  Jim Meyering  <jim@meyering.net>
561         * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
562         list of exceptions, for the "make distcheck" sc_file_system rule.
564         * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
566 2007-02-27  Paul Eggert  <eggert@cs.ucla.edu>
568         Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
569         * NEWS: With -P, the default block size and output format is not
570         affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
571         * src/df.c (main): Implement this.
573 2007-02-27  Jim Meyering  <jim@meyering.net>
575         Add a test for the above.
576         * tests/misc/df-P: New file.
577         * tests/misc/Makefile.am (TESTS): Add df-P.
579 2007-02-25  Jim Meyering  <jim@meyering.net>
581         * Makefile.maint (announcement): Adjust so that it works with
582         announce-gen's --gnulib-snapshot-time-stamp option.
583         Indent one of the command lines using TAB, not 8 spaces.
585         Post-release version change.
586         * NEWS: Add a line for 6.8+.
587         * configure.ac (AC_INIT): Set new version string.
589 2007-02-24  Jim Meyering  <jim@meyering.net>
591         Version 6.8.
592         * NEWS: Record release date and new version number.
593         * configure.ac (AC_INIT): New version number.
595         Don't skip this test on new-enough Linux/GNU systems.
596         * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
597         rather than for __GETCWD_PREFIX in config.h (the latter is no
598         longer defined, ever, due to gnulib changes).
599         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
601         Remove the "gnits" option; it prohibits my using "+" as a version
602         string suffix, and all it does (beyond the default "gnu" option)
603         is to _require_ the THANKS file.
604         * configure.ac (AM_INIT_AUTOMAKE): Remove it.
606         Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
607         * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
608         * tests/chown/Makefile.am, tests/cp/Makefile.am:
609         * tests/du/Makefile.am, tests/expr/Makefile.am:
610         * tests/factor/Makefile.am, tests/general/Makefile.am:
611         * tests/install/Makefile.am, tests/ln/Makefile.am:
612         * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
613         * tests/mv/Makefile.am, tests/readlink/Makefile.am:
614         * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
615         * tests/seq/Makefile.am, tests/stty/Makefile.am:
616         * tests/tee/Makefile.am, tests/touch/Makefile.am:
618         * README: Document the OSF/1 4.0d build failure and work-around.
619         Reported by Bruno Haible.
621         * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
622         Nicer connotations.
623         * configure.ac: Use 6.7+, not 6.7-dirty.
625 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
627         * NEWS: sort no longer compresses temporaries by default.
628         * bootstrap.conf: Remove findprog.
629         * doc/coreutils.texi (sort invocation): The default is to not
630         compress.  Don't treat "" specially.
631         * src/sort.c: Don't include findprog.h.
632         (create_temp): Compress only if the user specified --compress-program.
633         * tests/misc/sort-compress: Adjusts tests to match new behavior.
635 2007-02-24  Jim Meyering  <jim@meyering.net>
637         Avoid a shell syntax error, when building with an inadequate Perl.
638         * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
639         it can expand to "/.../missing perl".
641         * man/Makefile.am (.x.1): Warn when unable to update a man page.
642         Suggestion from Bruno Haible.
644 2007-02-23  Bruno Haible  <bruno@clisp.org>
646         Handle better the combination of old Perl and a pre-c99 compiler.
647         * man/Makefile.am (.x.1): If the autoconf test has determined that
648         perl is missing or not a sufficient version, do nothing.
650         * tests/readlink/can-e: Put the closing double-quote at the end of a
651         backquoted word, not in the middle. Works around a bug in sh on
652         OSF/1 4.0d.
653         * tests/readlink/can-f: Likewise.
654         * tests/readlink/can-m: Likewise.
656         * tests/du/slink: Skip the test if executing on an nfsv3 file system.
657         This avoids a test failure at least on OSF/1 4.0d.
659 2007-02-23  Jim Meyering  <jim@meyering.net>
661         * src/date.c (usage): Split a diagnostic that had grown to be
662         longer than the C89 maximum of 509 bytes.
664 2007-02-23  Ed Santiago <ed@edsantiago.com>
666         * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
667         for a separator.  Include sample RFC 2822 and 3339 output.
669 2007-02-23  Jim Meyering  <jim@meyering.net>
671         With -Dlint, make shuf free all heap-allocated storage.
672         * src/shuf.c (main): Move declaration of input_lines to
673         function scope, and initialize to NULL, so we can free it.
674         [lint]: Free all malloc'd memory.
675         * tests/misc/shuf: Also test shuf's -e and -i options.
677 2007-02-22  Jim Meyering  <jim@meyering.net>
679         Merge in a change from some other incarnation of this file (gzip?)
680         * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
682         Adjust preceding change not to perform an unaligned access.
683         * src/copy.c (copy_reg): Undo previous change.  Instead, make
684         it clearer that we're using a single-byte sentinel, and
685         [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
686         Reported by Andreas Schwab.
688         Placate valgrind, wrt ./cp --sparse=always
689         * src/copy.c (copy_reg): Place the sentinel by setting a
690         full word's worth of bits, not just a single byte's worth.
691         This avoids a harmless (but distracting) case of memory being
692         used-uninitialized.
694 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
696         Honor dd's noatime flag if possible, even if not supported on build fs
697         * doc/coreutils.texi (dd invocation): Warn that noatime might not be
698         reliable.
699         * src/dd.c (flags, usage): Look at O_NOATIME, not
700         HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
701         flag, so that dd attempts O_NOATIME even if the build file system
702         does not support it.  Problem reported by Jim Meyering today in
703         bug-coreutils.
704         * tests/dd/misc: Generate a warning, not a failure, if noatime
705         exists but fails.
707 2007-02-21  Jim Meyering  <jim@meyering.net>
709         * tests/misc/date: Remove vestigial use of Data::Dumper.
711 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
713         * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
714         about out-of-range initializer with Sun C 5.8.
716 2007-02-20  Jim Meyering  <jim@meyering.net>
718         * bootstrap (CVS_only_file): Use README-hacking.
720         Now that we use GIT, not cvs, rename README-cvs.
721         * README-hacking: Renamed from...
722         Update to reflect that we now use git.
724         * README-cvs: ...this.
726         * src/env.c (main): When invoked with no arguments (i.e. when printing
727         the environment), use a local variable to iterate through the global
728         "environ" array, rather than "environ" itself.  This is solely to
729         avoid changing the environment for an LD_PRELOAD-substituted "puts"
730         or "exit" function.  Tiny patch by Harvey Eneman.  See
731         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
732         * THANKS: Update.
734         * bootstrap: Move definitions of temporary directory names and the
735         new bt_regex "up" to precede all uses, so it's clearer what their
736         scope is.  Also, use [.], rather than \\., since the former works
737         even if eval'd.
739         * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
740         Based on the bison 2007-02-19 change by Joel E. Denny.
742 2007-02-19  Paul Eggert  <eggert@cs.ucla.edu>
744         * NEWS: sort now uses a --compress-program option rather than
745         an environment variable.
746         * doc/coreutils.texi (sort invocation): Document this.
747         * src/sort.c (usage): Likewise.
748         (COMPRESS_PROGRAM_OPTION): New const.
749         (long_options, create_temp, main): Support new option.
750         * tests/misc/sort-compress: Test it.
752 2007-02-19  Jim Meyering  <jim@meyering.net>
754         * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
756 2007-02-18  Jim Meyering  <jim@meyering.net>
758         * src/system.h: Don't include exit.h, now that it's subsumed
759         by the gnulib-generated stdlib.h.
761         * tests/rm/fail-eacces: Skip this test when running as root.
762         Reported by Matthew Woehlke.
764         * bootstrap: Use "._bootmp" as the temporary directory name,
765         not ".#bootmp".  The latter's "#" caused trouble with the new,
766         gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
768 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
770         * bootstrap.conf (gnulib_modules): Add c-strcase.  Remove strcase.
771         * src/dircolors.c: Include c-strcase.h.
772         (dc_parse_stream): Use c_strcasecmp rather than
773         strcasecmp to avoid unreliable results in locales like Turkish
774         where strcasecmp is incompatible with the C locale.
776 2007-02-13  Jim Meyering  <jim@meyering.net>
778         Also check for and print stderr output, in case a program fails.
779         * tests/misc/tty-eof: Occasionally (not reproducible), this
780         test would fail, with one or more programs exiting nonzero, e.g.,
781         tty-eof: sha224sum exited with status 1 (expected 0)
782         Now, maybe we'll get a clue, the next time that happens.
784 2007-02-12  Jim Meyering  <jim@meyering.net>
786         * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
788         * tests/misc/pwd-unreadable-parent: Skip the test if we're
789         definitely using the replacement.
790         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
792 2007-02-10  Jim Meyering  <jim@meyering.net>
794         Remove excess leading spaces that would make help2man misbehave.
795         * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
796         * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
797         * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
798         * src/date.c (usage): Use two spaces after each optional flag, not one.
799         Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
801         * Makefile.maint (longopt_re): Relax the regexp, making square
802         brackets optional, so it matches the newly reported violations, too.
804         * src/csplit.c (usage): Use two spaces (not one) to separate
805         each option string from its description, so help2man formats
806         the derived man page properly.  Reported by Thomas Huriaux in
807         <http://bugs.debian.org/410407>.
808         * src/df.c (usage): Likewise.
809         * src/du.c (usage): Likewise.
810         * src/install.c (usage): Likewise.
811         * src/ls.c (usage): Likewise.
813 2007-02-03  Jim Meyering  <jim@meyering.net>
815         Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
816         * NEWS: Mention the bug fix.
817         * tests/misc/pwd-unreadable-parent: New file.
818         * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
820 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
822         * NEWS: Document fix for cp --preserve=mode.
823         * src/copy.c (copy_internal): Omit the group- or other-writeable
824         permissions when creating a directory, to avoid a race condition
825         if the special mode bits aren't right just after the directory is
826         created.
827         * src/cp.c (make_dir_parents_private): Likewise.
828         * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
829         race fix in copy.c.
831         * NEWS: Document fix for cp --parents.
832         * src/cp.c (make_dir_parents_private): Report the error sooner with
833         "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
834         creating the directory, DEST/DIR.
835         * tests/cp/cp-parents: Test for the non-race-condition bug fixed
836         by the above change.
838 2007-02-02  Jim Meyering  <jim@meyering.net>
840         * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
842         * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
843         consistent, so this can be applied with patch -p0.
844         Reported by Matthew Woehlke.
846         Arrange for "make check-root" to run the new root-only test.
847         * tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
848         (all_t): Add t9.
850         * Makefile.maint (patch-check): Use patch with its -p2 option,
851         since that makes this check slightly more strict.
853         Use a directory on a loopback device mounted with -o context=...
854         * tests/cp/cp-a-selinux: Since this test now runs mount and umount,
855         it is a root-only one.
857 2007-01-29  Jim Meyering  <jim@meyering.net>
859         Plug a leak in ls.
860         * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
861         determine dev/inode or upon detecting a symlink loop.
863         * src/ls.c: Rename three global variables.
864         (cwd_file): Rename from 'files'.
865         (cwd_n_alloc): Rename from 'nfiles'.
866         (cwd_n_used): Rename from 'files_index'.
868         Shave 8 bytes off the size of "struct fileinfo".
869         * src/ls.c (fileinfo): Put all members of type "bool" together.
871 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
873         Modify "ls" to sort its data faster, using the new gnulib mpsort
874         module rather than qsort.  This is particularly a win in
875         environments where strcoll is slow, since mpsort typically calls
876         strcoll less often than qsort does.
877         * bootstrap.conf (gnulib_modules): Add mpsort.
878         * src/ls.c: Include mpsort.h.
879         (sorted_file, sorted_file_alloc): New vars, for a new vector of
880         pointers to the file info, for speed.
881         (clear_files, extract_dirs_from_files, sort_files, print_current_files):
882         (print_many_per_line, print_horizontal, print_with_commas):
883         (calculate_columns): Set and use new vector.
884         (initialize_ordering_vector): New function.
886 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
888         Adjust to today's change to gnulib, which added a module for
889         string.h to replace the little include files like strcase.h.
890         * src/dircolors.c: Don't include strcase.h.
891         * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
893 2007-01-26  Jim Meyering  <jim@meyering.net>
895         * src/dd.c (advance_input_after_read_error): Change diagnostic to
896         say "invalid file offset" rather than "screwy file offset".
898         * .x-sc_cast_of_argument_to_free: Remove this file.
899         * Makefile.am (EXTRA_DIST): Likewise.
901 2007-01-25  Dan Hipschman  <dsh@linux.ucla.edu>
903         * src/sort.c (create_temp): Remove superfluous access-X_OK
904         check.  find_in_path does this for us.
906 2007-01-24  Jim Meyering  <jim@meyering.net>
908         Remove usually-skipped test.
909         * tests/cp/open-perm-race: Remove this file.  It is subsumed
910         by parent-perm-race.
911         * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
912         * tests/sort/Makefile.am: Regenerate.
914         Pass "make distcheck" again.
915         * src/sort.c (usage): Split a diagnostic that had grown to be
916         longer than the C89 maximum of 509 bytes.
917         * .x-sc_cast_of_argument_to_free: New file.  Allow a cast in sort.c.
918         FIXME: this is just temporary, while we wait to remove the offending
919         access-calling code.
920         * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
921         * Makefile.maint (sc_cast_of_argument_to_free): Use the
922         canonical, $$($(CVS_LIST_EXCEPT)).
923         * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
925 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
927         * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
928         like it will be approved.  Also add --check=quiet, --check=silent
929         as long aliases, and --check=diagnose-first as an alias for -c.
930         * doc/coreutils.texi (sort invocation): Document this.
931         Also, mention that sort -c can take at most one file.
932         * src/sort.c: Implement this.
933         Include argmatch.h.
934         (usage): Document the change.
935         (CHECK_OPTION): New constant.
936         (long_options): --check now takes an optional argument, and is now
937         treated differently from 'c'.
938         (check_args, check_types): New constant arrays.
939         (check): New arg CHECKONLY, which suppresses diagnostic if -C.
940         (main): Parse the new options.
941         * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
942         New tests for -C.
944 2007-01-24  Jim Meyering  <jim@meyering.net>
946         Fix a typo.
947         * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
948         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
950         Don't depend on "which".
951         * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
952         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
954 2007-01-24  Dan Hipschman  <dsh@linux.ucla.edu>
956         Test sort compression.
957         * tests/misc/Makefile.am: Add the test.
958         * tests/misc/sort-compress: New file containing the tests.
960 2007-01-24  Jim Meyering  <jim@meyering.net>
962         * NEWS: sort temp file compression: tweak wording.
963         * src/sort.c (struct sortfile) [name]: Declare member to be const.
965 2007-01-21  Jim Meyering  <jim@meyering.net>
967         * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
968         In pipe_fork callers, use these named constants, not "2" and "8".
969         (proctab, nprocs): Declare to be "static".
970         (pipe_fork) [lint]: Initialize local, pid,
971         to avoid unwarranted may-be-used-uninitialized warning.
972         (create_temp): Use the active voice.  Describe parameters, too.
974 2007-01-21  James Youngman  <jay@gnu.org>
976         Centralize all the uses of sigprocmask().  Don't restore an invalid
977         saved mask.
978         * src/sort.c (enter_cs, leave_cs): New functions for protecting
979         code sequences against signal delivery.
980         * (exit_cleanup): Use enter_cs and leave_cs instead of
981         calling sigprocmask directly.
982         (create_temp_file, pipe_fork, zaptemp): Likewise
984 2007-01-21  Dan Hipschman  <dsh@linux.ucla.edu>
986         Add compression of temp files to sort.
987         * NEWS: Mention this.
988         * bootstrap.conf: Import findprog.
989         * configure.ac: Add AC_FUNC_FORK.
990         * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
991         variable.
992         * src/sort.c (compress_program): New global, holds the name of the
993         external compression program.
994         (struct sortfile): New type used by mergepfs and friends instead
995         of filenames to hold PIDs of compressor processes.
996         (proctab): New global, holds compressor PIDs on which to wait.
997         (enum procstate, struct procnode): New types used by proctab.
998         (proctab_hasher, proctab_comparator): New functions for proctab.
999         (nprocs): New global, number of forked but unreaped children.
1000         (reap, reap_some): New function, wait for/cleanup forked processes.
1001         (register_proc, update_proc, wait_proc): New functions for adding,
1002         modifying and removing proctab entries.
1003         (create_temp_file): Change parameter type to pointer to file
1004         descriptor, and return type to pointer to struct tempnode.
1005         (dup2_or_die): New function used in create_temp and open_temp.
1006         (pipe_fork): New function, creates a pipe and child process.
1007         (create_temp): Creates a temp file and possibly a compression
1008         program to which we filter output.
1009         (open_temp): Opens a compressed temp file and creates a
1010         decompression process through which to filter the input.
1011         (mergefps): Change FILES parameter type to struct sortfile array
1012         and update access accordingly.  Use open_temp and reap_some.
1013         (avoid_trashing_input, merge): Change FILES parameter like
1014         mergefps and call create_temp instead of create_temp_file.
1015         (sort): Call create_temp instead of create_temp_file.
1016         Use reap_some.
1017         (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
1019         The idea of compressing sorts temporary files was first
1020         suggested/implemented by Jay Soffian in 1998, and again
1021         by Charles Randall in 2001.
1023 2007-01-20  Jim Meyering  <jim@meyering.net>
1025         * tests/misc/pwd-long: Work properly even when run from the
1026         wrong one of two or more bind-mounted sibling directories.
1027         Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
1029 2007-01-20  Paul Eggert  <eggert@cs.ucla.edu>
1031         Standardize on list of signals when an app catches signals.
1032         * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
1033         SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
1034         * src/ls.c (main): Likewise (except SIGPIPE was already caught).
1035         Note that ls.c is special, as it also catches SIGTSTP.
1036         * src/sort.c (main): Likewise.  Also catch SIGQUIT.  More details in
1037         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
1039 2007-01-19  Dan Hipschman  <dsh@linux.ucla.edu>
1040         and Paul Eggert  <eggert@cs.ucla.edu>
1042         * src/sort.c (cleanup): Clear temphead at the end.
1043         (exit_cleanup): New function.
1044         (main): Don't invoke atexit until we're ready.
1045         Invoke it with exit_cleanup, not with cleanup and close_stdout,
1046         to avoid a race condition with cleanup and signal handling.  More
1047         details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
1049 2007-01-18  Jim Meyering  <jim@meyering.net>
1051         * src/c99-to-c89.diff: Adjust remove.c offsets.
1053 2007-01-17  Jim Meyering  <jim@meyering.net>
1055         Make "rm --interactive=never ..." never prompt.
1056         * NEWS: Mention this.
1057         * src/remove.h (enum rm_interactive): New ternary type.
1058         (struct rm_options) [interactive]: Use it, here -- rather than bool.
1059         * src/remove.c (prompt): Reflect type change.
1060         * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
1061         * src/rm.c (main): Add a FIXME comment for '-d' option.
1062         Adapt to type change of rm_options.interactive.
1064         * tests/rm/i-never: New file.  Test for the above fix.
1065         * tests/rm/Makefile.am (TESTS): Add i-never.
1067 2007-01-15  Jim Meyering  <jim@meyering.net>
1069         * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
1070         emit foo.h, for each foo_.h.  This yields one false-positive, fts.h,
1071         but that's ok, since fts_.h will eventually be renamed.
1073         * src/remove.c (remove_dir): Don't use errno in diagnostic.
1074         Root-only test failure reported by Alex van Hout and Jon Grosshart in
1075         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
1077         * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
1078         s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
1080 2007-01-14  Bruno Haible  <bruno@clisp.org>
1082         Enable use of gnulib's new fchdir module.
1083         * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
1084         since we use canonicalize.
1085         (gnulib_modules): Add fchdir.
1086         * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
1088 2007-01-13  Jim Meyering  <jim@meyering.net>
1090         * tests/cp/open-perm-race: Remove gdb-based test.
1091         It would run only when compiled with -g, and besides is now
1092         subsumed by file-perm-race.
1093         * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
1095         * Transform all Makefile.am files so that when running "make check",
1096         CU_TEST_NAME is set to the name of the test.  This is so that when I
1097         run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
1098         on the entire package it is more convenient to map a leak or error
1099         found in a valgrind log file back to the offending test.
1100         Use this command:
1101         (echo tests/Makefile.am.in; find tests -name Makefile.am) \
1102          |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
1103            -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
1105 2007-01-11  Jim Meyering  <jim@meyering.net>
1107         Avoid a leak in expr's implementation of the ":" (match) operator.
1108         * src/expr.c (docolon): Free the regexp buffer using regfree, rather
1109         than doing it manually, being careful to set fastmap to NULL first.
1110         Free any re_regs.start and .end members, if necessary.
1112         * tests/misc/test-diag: Work also when libc's error function
1113         reports the entire program name ("../../src/test"), rather than
1114         just the final component.
1116 2007-01-10  Jim Meyering  <jim@meyering.net>
1118         Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
1119         * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
1120         (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
1121         directory.  Non-directory entries lack fts_statp data when using
1122         the FTS_NOSTAT option.
1124 2007-01-07  Jim Meyering  <jim@meyering.net>
1126         * tests/sample-test: Update copyright date to 2007.
1127         * Makefile.maint (copyright-check): Also check the copyright date
1128         in tests/sample-test.
1130 2007-01-06  Jim Meyering  <jim@meyering.net>
1132         * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
1133         based on examples from G.P. Halkes in
1134         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
1136 2007-01-06  G.P. Halkes  <buscom@ghalkes.nl>
1138         * src/fmt.c (copy_rest): Correct prefix handling.
1139         Don't elide a line with the prefix followed by only white space.
1140         (get_line): Move EOF-check to loop-termination condition.
1141         * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
1142         (pfx-2): Remove test; its premise was contrary to the documentation.
1144 2007-01-05  Jim Meyering  <jim@meyering.net>
1146         Avoid a used-uninitialized bug for invalid input, i.e., when the size
1147         of the input, not counting newlines, is 1 % 4.
1148         * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
1149         It may be smaller when flushing.
1151 2007-01-05  Mike Frysinger  <vapier@gentoo.org>
1153         * src/dircolors.hin: Add a TERM directive for cons25.
1155 2007-01-04  Jim Meyering  <jim@meyering.net>
1157         * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
1158         case you don't have convenient access to glibc info documentation.
1160         Use the release year, not the current year.
1161         * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
1162         * src/Makefile.am (RELEASE_YEAR): Define it.
1163         (.sh): Use it.
1164         Thanks to a prod from Eric Blake.
1166         Ensure that "group --version" always prints the current year.
1167         * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
1168         * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
1169         Suggestion from Eric Blake.
1171         When decoding, always allow newlines in input, with almost no
1172         performance impact.
1173         * src/base64.c (do_decode): Initialize decode context.
1174         Call base64_decode one more time, after all input is processed.
1175         (usage): When decoding, newlines are always accepted.
1177         * tests/misc/base64: Add a bunch of tests, for the above.
1178         * gl/lib/base64.c: Include <string.h>.
1179         (base64_decode_ctx_init, get_4, decode_4): New functions.
1180         (base64_decode): Efficiently handle interspersed newlines.
1181         (base64_decode_alloc): Update signature.
1182         * gl/lib/base64.h (struct base64_decode_context): Define.
1183         (base64_decode_ctx_init): Add prototype.
1184         (base64_decode, base64_decode_alloc): Update prototypes.
1186         * gl/lib/base64.c: Copied from gnulib.
1187         * gl/lib/base64.h: Likewise.
1189 2007-01-03  Jim Meyering  <jim@meyering.net>
1191         * THANKS: Add Evan Hunt.
1193 2007-01-03  Bruno Haible  <bruno@clisp.org>
1195         Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
1196         * tests/chown/deref: Apply lang-default.
1197         * tests/misc/split-a: Likewise.
1198         * tests/mv/reply-no: Likewise.
1200         * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
1201         Needed on MacOS X.
1203 2007-01-02  Paul Eggert  <eggert@cs.ucla.edu>
1205         Now, "ls -FRL" always follows symbolic links on Linux.
1206         * NEWS: Mention this bug fix.
1207         * src/ls.c (gobble_file): Fix bug reported by
1208         Nobuyuki Tsuchimura in
1209         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
1210         where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
1211         * tests/ls/follow-slink: Add a test for this case.
1213 2007-01-01  Jim Meyering  <jim@meyering.net>
1215         * tests/rm/fail-eperm: Revert last change.  The PATH=... setting
1216         is not honored at least on HP-UX 11.23 systems.
1217         Instead, simply transform the actual output diagnostic.
1218         Test failure reported by Bob Proulx.
1220 2006-12-30  Jim Meyering  <jim@meyering.net>
1222         * bootstrap (gnulib_extra_files): Remove announce-gen.
1223         * bootstrap.conf (gnulib_modules): Add it here instead, now that
1224         it's a module.
1226         * tests/misc/base64: Factor a long, repetitive string.
1228         * src/c99-to-c89.diff: Adjust remove.c offsets.
1230         Clean up after the change of 2006-12-28.
1231         * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
1232         now that this function never modifies the pointer.  Adjust comments
1233         and code accordingly.
1234         (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
1235         now that AD_pop_and_chdir no longer does that.
1237         * tests/rm/fail-eperm: Avoid spurious differences (the error function
1238         from latest glibc no longer prints the full program_name): so don't
1239         invoke rm via ../../src/rm.  Instead, invoke it via "PATH=../../src rm".
1241         * tests/mv/acl (skip): Skip this test also if the destination
1242         directory, which is on a different file system, lacks ACL support.
1244         * src/copy.c (copy_reg): Rewrite a comment that was rendered
1245         inaccurate by the 2006-10-18 change.
1247 2006-12-28  Jim Meyering  <jim@meyering.net>
1249         When moving "up" the hierarchy, be careful to remove a just-emptied
1250         directory before opening ".", to avoid trouble with file system
1251         implementations that cache readdir results at opendir-time.
1252         * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
1253         Don't update **DIRP.  Don't call fdopendir here.
1254         (remove_dir): Call fdopendir here instead.
1255         Report and patch from Mikulas Patocka:
1256         <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
1258 2006-12-27  Jim Meyering  <jim@meyering.net>
1260         * src/tail.c (usage): Mention +N for --bytes and --lines.
1261         Suggestion from Evan Hunt.
1263 2006-12-26  Jim Meyering  <jim@meyering.net>
1265         * configure.ac: Require autoconf-2.61 and automake-1.10.
1266         Without the former (even with autoconf-2.60), "make distcheck"
1267         would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
1268         due to an inttypes.h generated with CFLAGS including -pedantic.
1269         With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
1271         * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
1272         tag, using the release version number as the message.
1273         (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
1275 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1277         * NEWS: dd bs= operands now silently override later ibs= and obs=,
1278         as POSIX requires.
1279         * src/dd.c (scanargs): Implement it.
1280         * tests/dd/misc (outbytes): Test it.
1281         * doc/coreutils.texi (dd invocation): Specify that bs=N
1282         overrides later ibs and obs, undoing part of the
1283         previous change.  (The behavior was wrong.)
1285 2006-12-20  Jim Meyering  <jim@meyering.net>
1287         "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
1288         * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
1289         Don't let a non-directory get by with errno == EPERM, either.
1290         Check the file type directly (using cached stat value), rather
1291         than trying to guess it from errno values.
1292         Karl Berry reported that a cross-partition "mv /etc/issue ~"
1293         failed with the um,... suboptimal diagnostic,
1294         "mv: cannot remove `/etc/issue': Not a directory".
1295         * tests/rm/Makefile.am (TESTS): Add fail-eacces.
1296         * tests/rm/fail-eacces: New file.
1297         * NEWS: Mention that both mv and rm are affected.
1299         "cut -f 2- A B" no longer triggers a double-free bug
1300         * src/cut.c (cut_fields): Set file-scoped global to NULL after
1301         freeing it.  This avoids a double-free (and core dump on some systems)
1302         for this usage: "echo 1>a; echo 2>b; cut -f2- a b".  Reported by
1303         James Hunt in <http://bugzilla.redhat.com/220312>.
1304         * NEWS: List this bug fix.
1305         * THANKS: Mention him.
1306         * tests/misc/cut: New file.
1307         * tests/misc/Makefile.am (TESTS): Add cut.
1309 2006-12-15  Jim Meyering  <jim@meyering.net>
1311         * tests/cp/open-perm-race: Correct the gdb-existence check.
1312         Don't run either subsequent gdb command in a sub-shell.
1313         Reported by Thomas Schwinge.
1314         * THANKS: bring up to date.
1316 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1318         Make sure cp -p isn't too generous with file permissions.
1319         * tests/cp/Makefile.am (TESTS): Add file-perm-race.
1320         * tests/cp/file-perm-race: New file.
1322         Ensure cp -pR --parents isn't too generous with parent permissions.
1323         * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
1324         * tests/cp/parent-perm-race: New file.
1326 2006-12-14  Jim Meyering  <jim@meyering.net>
1328         * tests/chgrp/default-no-deref: Don't assume that files are created
1329         with the primary group by default.  That's not true in a directory
1330         with the set-GID bit set.
1332         Don't hang when there's no input tty.
1333         * tests/cp/open-perm-race: Skip this test if there is no
1334         controlling input `terminal'.
1336         Test for a hard-to-detect race fix, using gdb.
1337         * tests/cp/open-perm-race: New file, to test for the
1338         cp --preserve=ownership fix of 2006-12-06.
1340         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
1341         (TESTS): Add open-perm-race.
1343         * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
1344         * src/chown.c (main): Likewise.
1345         * src/chown-core.c (change_file_owner): Add to a comment.
1346         * tests/chown/preserve-root: Add tests.
1348         * NEWS: --preserve-root now works with chgrp, chmod, and chown.
1349         * src/chmod.c (process_file): Do honor the --preserve-root option.
1350         * src/chown-core.c (change_file_owner): Likewise, but here, also
1351         handle the case in which a traversal would go "through" a symlink
1352         to root.  Reported by Matthew M. Boedicker
1353         * tests/chown/preserve-root: Test for the above.
1354         * tests/chown/Makefile.am (TESTS): Add preserve-root.
1356         * NEWS: Mention the chmod fix induced by the 2006-12-11 change
1357         to gnulib's m4/openat.m4.
1359 2006-12-13  Andreas Schwab  <schwab@suse.de>
1361         Don't fail if mv/acl test succeeds.
1362         * tests/mv/acl (skip): Check for acl support in the file system.
1363         * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
1364         (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
1366 2006-12-13  Paul Eggert  <eggert@cs.ucla.edu>
1368         Remove some arbitrary restrictions on size fields, so that
1369         commands like "sort -k 18446744073709551616" no longer fail merely
1370         because 18446744073709551616 doesn't fit in uintmax_t.  The trick
1371         is that these fields can all be treated as effectively infinity;
1372         their exact values don't matter, since no internal buffer can be
1373         that long.
1374         * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
1375         ULONG_MAX if the code assumes this.  Silently truncate too-large
1376         values to SIZE_MAX, as the remaining code will do the right thing
1377         in this case.
1378         * src/sort.c (parse_field_count): Likewise.
1379         * src/uniq.c (size_opt, main): Likewise.
1380         * tests/join/Test.pm (bigfield): New test.
1381         * tests/sort/Test.pm (bigfield): New test.
1382         * tests/uniq/Test.pm (121): New test.
1384 2006-12-13  Jim Meyering  <jim@meyering.net>
1386         * tests/chgrp/default-no-deref: New test.
1387         * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
1389 2006-12-12  Jim Meyering  <jim@meyering.net>
1391         * src/system.h (SETVBUF): Remove definition, now that the
1392         autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
1393         * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
1394         * src/od.c (open_next_file): Likewise.
1396 2006-12-09  Jim Meyering  <jim@meyering.net>
1398         * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
1399         "source".  I.e. "GNU coreutils 6.7".
1401         * NEWS: With the change from "-pre" to "-dirty" suffix, also change
1402         from NEXT_VER-pre to CUR_VER-dirty.  So, this is 6.7-dirty.
1403         * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
1405         * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
1406         whenever uniq is expected to fail.  This should catch the other case
1407         [test #112] in which uniq emits "cat: write error: Broken pipe" on
1408         some systems.
1410 2006-12-08  Jim Meyering  <jim@meyering.net>
1412         Include bootstrap tool version info in the announcement form.
1413         * Makefile.maint (gnulib_snapshot_date): Define.
1414         (announcement): Use two new announce-gen options,
1415         --bootstrap-tools and --gnulib-snapshot-date.
1416         * Makefile.cfg (gnulib_dir): Set.
1418         Post-release version change.
1419         * NEWS: Add a line for 6.8-dirty.
1420         * configure.ac (AC_INIT): Set new version string.
1422 2006-12-07  Jim Meyering  jim@meyering.net
1424         Version 6.7.
1425         * NEWS: Record release date.  Remove '-pre' suffix.
1426         * configure.ac (AC_INIT): Remove version string suffix.
1428 2006-12-07  Jim Meyering  <jim@meyering.net>
1430         Make the output of "make check" more reproducible.
1431         * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
1432         evoke diagnostics like this when COLUMNS=0 in the environment:
1433         ls: ignoring invalid width in environment variable COLUMNS: 0
1434         * tests/touch/no-rights: Likewise.
1435         * tests/help-version: Likewise.
1436         * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
1437         118, since it emits "cat: write error: Broken pipe" on some systems.
1439 2006-12-06  Paul Eggert  <eggert@cs.ucla.edu>
1441         * NEWS: Document the cp -p fix for special bits.
1442         * src/copy.c (set_owner): Now returns a three-way result, so
1443         that the caller can clear the special bits.  All callers changed.
1444         (copy_reg): Don't set the special bits if chown failed.
1445         (copy_internal): Likewise.
1446         * tests/cp/special-bits: Test this fix.
1448 2006-12-06  Paul Eggert  <eggert@cs.ucla.edu>
1450         * NEWS: Document the cp --preserve=ownership fix.
1451         * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
1452         * src/copy.c (fchmod_or_lchmod): New function.
1453         (copy_reg): New arg OMITTED_PERMISSIONS.  All uses changed.
1454         Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
1455         When creating a file, use O_EXCL, so we're more likely to detect
1456         funny business by other processes.  At the end, if permissions
1457         were omitted, chmod them back in.
1458         (copy_internal): If the ownership might change, omit some permissions
1459         at first, then restore them after chowning the file.
1460         * src/cp.c (make_dir_parents_private): Likewise.
1461         * src/copy.c (cached_umask): New function.
1462         * src/copy.h (cached_umask): New decl.
1464 2006-12-06  Jim Meyering  <jim@meyering.net>
1466         Make the output of "make check" more reproducible.
1467         * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
1469 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1471         * src/install.c (install_file_in_file): Preserve time stamps
1472         before changing owner or file mode bits, for consistency with
1473         other coreutils programs.
1475 2006-12-03  Jim Meyering  <jim@meyering.net>
1477         * tests/misc/date-sec: Output a fixed string.
1479         * NEWS: du --one-file-system (-x) would skip subdirectories of any
1480         directory listed as second or subsequent command line argument.
1481         * tests/du/one-file-system: New file.  Test for today's fts.c fix.
1482         * tests/du/Makefile.am (TESTS): Add one-file-system.
1483         Reported by Mike Frysinger.
1485 2006-12-02  Jim Meyering  <jim@meyering.net>
1487         * tests/du/basic: Generate 4KB file simply using printf, rather than
1488         seq+head.  This avoids a spurious "Broken pipe" diagnostic from seq.
1490 2006-11-28  Jim Meyering  <jim@meyering.net>
1492         * tests/mv/no-target-dir: Detect a buggy rename syscall.  If found,
1493         skip this test.  This happens at least on ia64 linux-2.4.19 w/ext3.
1494         Reported by Matthew Woehlke.
1496         * tests/mv/dir2dir: Also accept EBUSY.
1497         Reported by Matthew Woehlke.
1499 2006-11-27  Jim Meyering  <jim@meyering.net>
1501         * Makefile.maint (patch-check): Rewrite to diagnose failure.
1502         * src/c99-to-c89.diff: Adjust shred.c offsets.
1504 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1506         Improve the check for departures from C89, and fix the departures
1507         I found.
1508         * Makefile.maint (my-distcheck): Also check for C89 compatibility
1509         as best we can with GCC.
1510         * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
1511         declaration; C89 doesn't allow this.
1512         * src/dcgen: Don't generate string literals longer than
1513         what C89 requires support for.
1514         * src/cut.c (usage): Don't use string literals longer than
1515         what C89 requires support for.
1516         * src/date.c (usage): Likewise.
1517         * src/dd.c (usage): Likewise.
1518         * src/du.c (usage): Likewise.
1519         * src/ls.c (usage): Likewise.
1520         * src/od.c (usage): Likewise.
1521         * src/readlink.c (usage): Likewise.
1522         * src/seq.c (usage): Likewise.
1523         * src/shred.c (usage): Likewise.
1525 2006-11-26  Mike Frysinger  <vapier@gentoo.org>
1527         Recognize new archive, audio and image formats.
1528         Give audio files a separate color.
1529         * src/dircolors.hin: Add comments for common .sh and .csh scripts.
1530         Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
1531         suffixes.  Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
1532         .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
1533         Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes.  Change
1534         audio color to 00;36 to differentiate from image/video color.
1536 2006-11-26  Jim Meyering  <jim@meyering.net>
1538         * Makefile.maint (patch-check): Compile patched sources with
1539         CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
1540         no violations remain.
1542         * src/c99-to-c89.diff: Remove 3 bogus hunks.
1544         * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
1545         Update callers.
1547         * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
1549         * src/rm.c (main): Remove unnecessary (assuming C99) braces.
1551 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1553         Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
1554         while trying to retain the readability of C99 as much as possible.
1555         * src/remove.c (rm_1): Remove decl of local, fd_cwd.
1556         Replace each of two uses with literal AT_FDCWD.
1557         (cache_stat_init): Return its argument, for convenience.
1558         Update the caller in remove_dir.
1559         (AD_pop_and_chdir): Return prev_dir rather than storing through
1560         a pointer argument.  All uses changed.
1561         (AD_ensure_initialized): New function.
1562         (AD_mark_helper): Use it, to avoid the need for declaration
1563         after statement.
1564         (rm): Move cycle_check_init call into callee...
1565         (rm_1): ...here.
1566         Use an else clause in place of a "continue" statement.
1567         (close_preserve_errno): Remove.
1568         (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
1570 2006-11-25  Jim Meyering  <jim@meyering.net>
1572         * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
1574 2006-11-24  Theodoros V. Kalamatianos  <thkala@softlab.ece.ntua.gr> (tiny change)
1576         * tests/du/inacc-dest: Skip this test when running as root.
1578 2006-11-23  Jim Meyering  <jim@meyering.net>
1580         * announce-gen: Remove file.  It's moving to gnulib.
1581         * bootstrap: Pull it from gnulib/build-aux instead.
1582         * Makefile.maint (announcement): Reflect move to ./build-aux.
1584         * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
1585         rather than a pipeline that would sometimes evoke a diagnostic
1586         like "seq: write error: Broken pipe".
1588         * tests/help-version: Suppress dd transfer rate output.
1590         * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
1592 2006-11-22  Jim Meyering  <jim@meyering.net>
1594         * announce-gen (print_news_deltas): Fix silly, but harmless typo:
1595         change "(:?..." to "(?:..." in regexps.
1597         Post-release version change.
1598         * NEWS: Add a line for 6.7-pre.
1599         * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
1601         Version 6.6.
1602         * NEWS: Record release date.  Remove "-pre" suffix.
1603         * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
1605         * announce-gen: Remove unused --release-archive-directory option.
1606         (print_news_deltas): Accept new adjective, "Noteworthy", in addition
1607         to the old "Major".
1608         Match version numbers in NEWS using tighter regular expressions.
1609         (main): Require the --gpg-key-id=ID option.
1610         * Makefile.maint (announcement): Don't use now-removed
1611         --release-archive-directory=... option.
1613         * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
1615 2006-11-21  Jim Meyering  <jim@meyering.net>
1617         * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
1618         skip the test rather than failing.  Reported by Michael Deutschmann.
1620         * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
1621         rather than just "exit N".
1623         Arrange for "make check-root" to run the new root-only test.
1624         * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
1625         (all_t): Add t7.
1627 2006-11-20  Jim Meyering  <jim@meyering.net>
1629         Add a root-only test for today's lib/idcache.c fix.
1630         * tests/ls/nameless-uid: New file.
1631         * tests/ls/Makefile.am (TESTS): Add nameless-uid.
1632         (TESTS_ENVIRONMENT): Add PERL to the list.
1634 2006-11-19  Jim Meyering  <jim@meyering.net>
1636         * tests/tail-2/assert-2: Mark as a very-expensive test, because I
1637         find the 7-second sleep annoyingly long.  Besides, this test is
1638         probably far too specific and timing sensitive ever to trigger again.
1639         * tests/tail-2/assert: Likewise.
1641         Post-release version change.
1642         * NEWS: Add a line for 6.6-pre.
1643         * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
1645         Version 6.5.
1646         * NEWS: Record release date.  Remove "-cvs" suffix.
1647         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1649 2006-11-18  Jim Meyering  <jim@meyering.net>
1651         "ln --backup f f" produces a misleading diagnostic:
1652         ln: creating hard link `f' => `f': No such file or directory
1653         * src/ln.c (do_link): Give a better diagnostic in this unusual case.
1654         (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
1655         * tests/ln/Makefile.am (TESTS): Add hard-backup.
1656         * tests/ln/hard-backup: New test for the above.
1657         * NEWS: Mention this fix.
1659 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1661         * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
1662         directly too.
1663         * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
1664         * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
1665         * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
1666         Omit unnecessary parenthesization of args.
1667         * src/od.c (EQUAL_BLOCKS): Likewise.
1668         * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
1670 2006-11-16  Jim Meyering  <jim@meyering.net>
1672         * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
1673         automake we're skipping this test), and give a diagnostic to tell
1674         the user the same thing.  Reported by Mike Grayson.
1676 2006-11-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1678         * man/Makefile.am (dist_man_MANS): Replace all optional manpages
1679         with `$(MAN)', computed at configure time; also, list them ...
1680         (optional_mans): ... in this new variable.
1681         (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
1683 2006-11-16  Jim Meyering  <jim@meyering.net>
1685         Help valgrind see that there is no leak in dd.c.
1686         * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
1687         so we need not free them at all.  This is easier than freeing
1688         both buffers at each of the early "return"s.
1690         * src/csplit.c (load_buffer): Plug an inconsequential leak.
1692 2006-11-15  Jim Meyering  <jim@meyering.net>
1694         * .x-po-check: Exclude gl/ files.  Otherwise, po-check would
1695         complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
1697 2006-11-14  Jim Meyering  <jim@meyering.net>
1699         * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
1700         remove the now-unnecessary use of AC_LIBSOURCES.
1702         Adapt to new version of gnulib-tool.
1703         * gl/modules/root-dev-ino: New file.
1704         * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
1705         * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
1706         * m4/root-dev-ino.m4: Move this file ...
1707         * gl/m4/root-dev-ino.m4: ... to here.
1709         * bootstrap.conf (gnulib_modules): Add root-dev-ino.
1711 2006-11-13  Jim Meyering  <jim@meyering.net>
1713         * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
1714         From Paul Eggert.
1716         Plug another technically-unimportant leak in sort.
1717         * src/sort.c (main): Don't allocate memory for each new key here.
1718         (insertkey): Allocate memory for each key here, instead.
1719         (key_init): Rename from new_key.  Don't allocate.
1721         * src/sort.c (main): Plug a tiny memory leak.
1722         Move declaration of local "minus" down to be nearer point of use.
1724 2006-11-12  Jim Meyering  <jim@meyering.net>
1726         du would exit early, when encountering an inaccessible directory
1727         Reported by Mike Frysinger, in
1728         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
1729         * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
1730         * tests/chgrp/no-x: Remove the "fts_read failed: ..."
1731         diagnostic from the expected output when using native fdopendir.
1732         * tests/chmod/no-x: Likewise.
1733         * tests/du/no-x: Likewise.
1734         * NEWS: Mention this bug fix.
1735         * tests/du/Makefile.am (TESTS): Add inacc-dest.
1737         * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
1738         for xalloc.h itself.
1740         Avoid false-positive when testing via valgrind.
1741         * tests/mv/atomic: Grep strace output for a more specific pattern
1742         than just "unlink", since that got a false positive when testing
1743         under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
1744         * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
1746 2006-10-28  Jim Meyering  <jim@meyering.net>
1748         * Makefile.maint (patch-check): Make it easier to regenerate
1749         the src/c99-to-c89.diff file.  E.g., I do this:
1750         make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
1752         * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
1754 2006-10-26  Jim Meyering  <jim@meyering.net>
1756         * src/system.h (ftello): Add a compile-time check for the highly
1757         unlikely condition of off_t narrower than long int, rather than
1758         handling it at run time.  Based on a patch from Paul Eggert.
1760 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1762         * tests/chmod/c-option: When double-quoting part of a word, prefer
1763         to double-quote the whole word.  This is a bit easier to read (at
1764         least for me), and in some cases it avoids a shell bug with Tru64
1765         4.0 sh reported by Nelson H. F. Beebe.  For example, instead of
1766         "$abs_srcdir"/../setgid-check we now write
1767         "$abs_srcdir/../setgid-check".
1768         * tests/cp/cp-parents: Likewise.
1769         * tests/du/inaccessible-cwd: Likewise.
1770         * tests/du/long-from-unreadable: Likewise.
1771         * tests/install/basic-1: Likewise.
1772         * tests/install/trap: Likewise.
1773         * tests/misc/close-stdout: Likewise.
1774         * tests/mkdir/concurrent-1: Likewise.
1775         * tests/mkdir/p-1: Likewise.
1776         * tests/mkdir/p-3: Likewise.
1777         * tests/mkdir/parents: Likewise.
1778         * tests/mkdir/perm: Likewise.
1779         * tests/readlink/can-e: Likewise.
1780         * tests/readlink/can-f: Likewise.
1781         * tests/readlink/can-m: Likewise.
1782         * tests/rm/inaccessible: Likewise.
1783         * tests/rm/unread3: Likewise.
1784         * tests/touch/no-create-missing: Likewise.
1786         * lib/.cvsignore: Add uinttostr.c.
1788 2006-10-25  Jim Meyering  <jim@meyering.net>
1790         Portability to Tru64 V4.0.
1791         * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
1792         Define inline replacement function.
1793         This (along with a yesterday's fix for autoconf's
1794         _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
1795         now builds once more on Tru64 V4.0.  Reported by Nelson Beebe.
1797 2006-10-25  Bruno Haible  <bruno@clisp.org>
1799         * src/cat.c (infile): Add "const" to declaration.
1800         * src/csplit.c (prefix): Likewise.
1801         * src/printf.c (cfcc_msg): Likewise.
1802         * src/tail.c (valid_file_spec): Likewise.
1803         * src/cut.c (cut_file): Likewise, for a parameter.
1804         * src/expr.c (str_value): Likewise.
1805         * src/fold.c (fold_file): Likewise.
1806         * src/pr.c (init_header): Likewise.
1807         * src/dircolors.c (dc_parse_stream): Likewise, for a local.
1808         * src/tr.c (make_printable_str): Likewise.
1809         * src/nl.c (body_type, header_type, footer_type, current_type):
1810         (separator_str, build_type_arg, nl_file): Likewise, for many.
1811         * src/paste.c (main): Don't assign a read-only string to 'optarg'.
1812         * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
1814 2006-10-25  Jim Meyering  <jim@meyering.net>
1816         * tests/sample-test: Update copyright year list to include only
1817         the current year, since this is what I'll want in any new test.
1819 2006-10-24  Jim Meyering  <jim@meyering.net>
1821         * src/c99-to-c89.diff: Update to reflect new offsets.
1823         * NEWS: new feature: rm accepts new option: --one-file-system
1824         Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
1825         * src/remove.h (struct rm_options) [one_file_system]: New member.
1826         * src/rm.c (rm_option_init): Initialize it.
1827         (usage): Document the option.
1828         * src/mv.c (rm_option_init): Likewise.
1829         * src/remove.c (remove_dir): With --one-file-system and --recursive,
1830         for each directory command line argument, do not affect a file system
1831         different from that of the starting directory.  And give a diagnostic.
1832         * src/rm.c (ONE_FILE_SYSTEM): New enum.
1833         (main): Handle new option.
1834         * tests/rm/one-file-system: Test the above.
1835         * tests/rm/Makefile.am (TESTS): Add one-file-system.
1836         * tests/Makefile.am (check-root): Add the rm/one-file-system
1837         test to the list.
1838         (EXTRA_DIST): Add other-fs-tmpdir.
1840         * tests/mv/setup: Removed.  Renamed to...
1841         * tests/other-fs-tmpdir: ...this new file.
1842         * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
1843         * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
1844         * tests/mv/backup-is-src: Likewise.
1845         * tests/mv/hard-link-1: Likewise.
1846         * tests/mv/leak-fd: Likewise.
1847         * tests/mv/mv-special-1: Likewise.
1848         * tests/mv/part-fail: Likewise.
1849         * tests/mv/part-hardlink: Likewise.
1850         * tests/mv/part-rename: Likewise.
1851         * tests/mv/part-symlink: Likewise.
1852         * tests/mv/partition-perm: Likewise.
1853         * tests/mv/to-symlink: Likewise.
1854         * tests/mv/into-self-2: Likewise.
1856         Don't let a failure in one test stop "make -k" from running the others.
1857         * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
1858         (check-root): Depend on them, rather than executing the five
1859         commands in a single rule.  Reported by Greg Schafer.
1861 2006-10-23  Bob Proulx  <bob@proulx.com>  (tiny change)
1863         * Makefile.maint (alpha beta major): Use a better log message for
1864         the automatic commit of .prev-version.
1866 2006-10-23  Jim Meyering  <jim@meyering.net>
1868         * tests/misc/pwd-long: Undo last change, since it made Perl invoke
1869         pwd via a shell.  Instead, ensure that the absolute name of the
1870         pwd binary consists solely of reasonable characters.
1871         Whoops.  Don't exec the perl script.  Otherwise, the sh-trap-based
1872         clean-up code isn't run.
1874         * NEWS: Add a line for 6.5-cvs.
1875         * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
1877 2006-10-22  Jim Meyering  <jim@meyering.net>
1879         Version 6.4.
1881         * NEWS: Record the 6.4 release date.
1882         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1884         * Makefile.maint: Complete the adaptation to function with a working
1885         directory that is using git (rather than cvs) for version control.
1887 2006-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1889         * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
1890         * tests/cp/cp-parents: Likewise.
1891         * tests/mkdir/parents: Likewise.
1892         * tests/mkdir/perm: Likewise.
1894         * tests/sample-test: Quote variables containing absolute build
1895         tree paths.  In the cleanup trap, make sure `cd' succeeds before
1896         `chmod'ing and `rm'ing the temporary files.
1897         * tests/chgrp/basic: Likewise.
1898         * tests/chgrp/deref: Likewise.
1899         * tests/chgrp/no-x: Likewise.
1900         * tests/chgrp/posix-H: Likewise.
1901         * tests/chgrp/recurse: Likewise.
1902         * tests/chmod/c-option: Likewise.
1903         * tests/chmod/equal-x: Likewise.
1904         * tests/chmod/equals: Likewise.
1905         * tests/chmod/inaccessible: Likewise.
1906         * tests/chmod/no-x: Likewise.
1907         * tests/chmod/octal: Likewise.
1908         * tests/chmod/setgid: Likewise.
1909         * tests/chmod/umask-x: Likewise.
1910         * tests/chmod/usage: Likewise.
1911         * tests/chown/basic: Likewise.
1912         * tests/chown/deref: Likewise.
1913         * tests/chown/separator: Likewise.
1914         * tests/cp/acl: Likewise.
1915         * tests/cp/backup-1: Likewise.
1916         * tests/cp/backup-dir: Likewise.
1917         * tests/cp/backup-is-src: Likewise.
1918         * tests/cp/cp-HL: Likewise.
1919         * tests/cp/cp-deref: Likewise.
1920         * tests/cp/cp-i: Likewise.
1921         * tests/cp/cp-mv-backup: Likewise.
1922         * tests/cp/cp-parents: Likewise.
1923         * tests/cp/deref-slink: Likewise.
1924         * tests/cp/dir-rm-dest: Likewise.
1925         * tests/cp/dir-slash: Likewise.
1926         * tests/cp/dir-vs-file: Likewise.
1927         * tests/cp/fail-perm: Likewise.
1928         * tests/cp/into-self: Likewise.
1929         * tests/cp/link: Likewise.
1930         * tests/cp/link-no-deref: Likewise.
1931         * tests/cp/link-preserve: Likewise.
1932         * tests/cp/no-deref-link1: Likewise.
1933         * tests/cp/no-deref-link2: Likewise.
1934         * tests/cp/no-deref-link3: Likewise.
1935         * tests/cp/perm: Likewise.
1936         * tests/cp/preserve-2: Likewise.
1937         * tests/cp/r-vs-symlink: Likewise.
1938         * tests/cp/same-file: Likewise.
1939         * tests/cp/slink-2-slink: Likewise.
1940         * tests/cp/sparse: Likewise.
1941         * tests/cp/special-bits: Likewise.
1942         * tests/cp/src-base-dot: Likewise.
1943         * tests/cp/symlink-slash: Likewise.
1944         * tests/dd/not-rewound: Likewise.
1945         * tests/dd/skip-seek2: Likewise.
1946         * tests/dd/unblock-sync: Likewise.
1947         * tests/du/2g: Likewise.
1948         * tests/du/8gb: Likewise.
1949         * tests/du/basic: Likewise.
1950         * tests/du/deref: Likewise.
1951         * tests/du/deref-args: Likewise.
1952         * tests/du/exclude: Likewise.
1953         * tests/du/fd-leak: Likewise.
1954         * tests/du/hard-link: Likewise.
1955         * tests/du/inaccessible-cwd: Likewise.
1956         * tests/du/long-from-unreadable: Likewise.
1957         * tests/du/long-sloop: Likewise.
1958         * tests/du/no-deref: Likewise.
1959         * tests/du/no-x: Likewise.
1960         * tests/du/restore-wd: Likewise.
1961         * tests/du/slash: Likewise.
1962         * tests/du/slink: Likewise.
1963         * tests/du/trailing-slash: Likewise.
1964         * tests/du/two-args: Likewise.
1965         * tests/fmt/long-line: Likewise.
1966         * tests/install/basic-1: Likewise.
1967         * tests/install/create-leading: Likewise.
1968         * tests/install/d-slashdot: Likewise.
1969         * tests/install/trap: Likewise.
1970         * tests/ln/misc: Likewise.
1971         * tests/ln/target-1: Likewise.
1972         * tests/ls/color-dtype-dir: Likewise.
1973         * tests/ls/dangle: Likewise.
1974         * tests/ls/dired: Likewise.
1975         * tests/ls/file-type: Likewise.
1976         * tests/ls/follow-slink: Likewise.
1977         * tests/ls/infloop: Likewise.
1978         * tests/ls/inode: Likewise.
1979         * tests/ls/m-option: Likewise.
1980         * tests/ls/no-arg: Likewise.
1981         * tests/ls/recursive: Likewise.
1982         * tests/ls/rt-1: Likewise.
1983         * tests/ls/stat-dtype: Likewise.
1984         * tests/ls/stat-failed: Likewise.
1985         * tests/ls/stat-vs-dirent: Likewise.
1986         * tests/misc/cat-proc: Likewise.
1987         * tests/misc/close-stdout: Likewise.
1988         * tests/misc/csplit: Likewise.
1989         * tests/misc/date-sec: Likewise.
1990         * tests/misc/false-status: Likewise.
1991         * tests/misc/head-c: Likewise.
1992         * tests/misc/head-pos: Likewise.
1993         * tests/misc/mknod: Likewise.
1994         * tests/misc/nl: Likewise.
1995         * tests/misc/nohup: Likewise.
1996         * tests/misc/pathchk1: Likewise.
1997         * tests/misc/printf: Likewise.
1998         * tests/misc/printf-hex: Likewise.
1999         * tests/misc/pwd-long: Likewise.
2000         * tests/misc/shuf: Likewise.
2001         * tests/misc/sort-rand: Likewise.
2002         * tests/misc/split-a: Likewise.
2003         * tests/misc/split-fail: Likewise.
2004         * tests/misc/split-l: Likewise.
2005         * tests/misc/stat-fmt: Likewise.
2006         * tests/misc/tac-continue: Likewise.
2007         * tests/misc/wc-files0: Likewise.
2008         * tests/mkdir/concurrent-1: Likewise.
2009         * tests/mkdir/p-1: Likewise.
2010         * tests/mkdir/p-2: Likewise.
2011         * tests/mkdir/p-3: Likewise.
2012         * tests/mkdir/p-slashdot: Likewise.
2013         * tests/mkdir/p-thru-slink: Likewise.
2014         * tests/mkdir/p-v: Likewise.
2015         * tests/mkdir/parents: Likewise.
2016         * tests/mkdir/perm: Likewise.
2017         * tests/mkdir/t-slash: Likewise.
2018         * tests/mv/acl: Likewise.
2019         * tests/mv/atomic: Likewise.
2020         * tests/mv/backup-dir: Likewise.
2021         * tests/mv/childproof: Likewise.
2022         * tests/mv/diag: Likewise.
2023         * tests/mv/dir-file: Likewise.
2024         * tests/mv/dir2dir: Likewise.
2025         * tests/mv/dup-source: Likewise.
2026         * tests/mv/hard-2: Likewise.
2027         * tests/mv/hard-3: Likewise.
2028         * tests/mv/hard-4: Likewise.
2029         * tests/mv/hard-link-1: Likewise.
2030         * tests/mv/hard-verbose: Likewise.
2031         * tests/mv/i-2: Likewise.
2032         * tests/mv/i-3: Likewise.
2033         * tests/mv/i-4: Likewise.
2034         * tests/mv/i-5: Likewise.
2035         * tests/mv/i-link-no: Likewise.
2036         * tests/mv/into-self-4: Likewise.
2037         * tests/mv/leak-fd: Likewise.
2038         * tests/mv/mv-special-1: Likewise.
2039         * tests/mv/no-target-dir: Likewise.
2040         * tests/mv/part-fail: Likewise.
2041         * tests/mv/part-hardlink: Likewise.
2042         * tests/mv/part-rename: Likewise.
2043         * tests/mv/part-symlink: Likewise.
2044         * tests/mv/partition-perm: Likewise.
2045         * tests/mv/perm-1: Likewise.
2046         * tests/mv/reply-no: Likewise.
2047         * tests/mv/trailing-slash: Likewise.
2048         * tests/mv/update: Likewise.
2049         * tests/od/od-N: Likewise.
2050         * tests/od/x8: Likewise.
2051         * tests/readlink/can-e: Likewise.
2052         * tests/readlink/can-f: Likewise.
2053         * tests/readlink/can-m: Likewise.
2054         * tests/readlink/rl-1: Likewise.
2055         * tests/rm/cycle: Likewise.
2056         * tests/rm/dangling-symlink: Likewise.
2057         * tests/rm/deep-1: Likewise.
2058         * tests/rm/dir-no-w: Likewise.
2059         * tests/rm/dir-nonrecur: Likewise.
2060         * tests/rm/dot-rel: Likewise.
2061         * tests/rm/empty-inacc: Likewise.
2062         * tests/rm/f-1: Likewise.
2063         * tests/rm/fail-2eperm: Likewise.
2064         * tests/rm/hash: Likewise.
2065         * tests/rm/i-1: Likewise.
2066         * tests/rm/i-no-r: Likewise.
2067         * tests/rm/ignorable: Likewise.
2068         * tests/rm/inaccessible: Likewise.
2069         * tests/rm/interactive-always: Likewise.
2070         * tests/rm/interactive-once: Likewise.
2071         * tests/rm/ir-1: Likewise.
2072         * tests/rm/isatty: Likewise.
2073         * tests/rm/no-give-up: Likewise.
2074         * tests/rm/r-1: Likewise.
2075         * tests/rm/r-2: Likewise.
2076         * tests/rm/r-3: Likewise.
2077         * tests/rm/r-4: Likewise.
2078         * tests/rm/readdir-bug: Likewise.
2079         * tests/rm/rm1: Likewise.
2080         * tests/rm/rm2: Likewise.
2081         * tests/rm/rm3: Likewise.
2082         * tests/rm/rm4: Likewise.
2083         * tests/rm/rm5: Likewise.
2084         * tests/rm/sunos-1: Likewise.
2085         * tests/rm/unread2: Likewise.
2086         * tests/rm/unread3: Likewise.
2087         * tests/rmdir/fail-perm: Likewise.
2088         * tests/rmdir/t-slash: Likewise.
2089         * tests/shred/exact: Likewise.
2090         * tests/shred/remove: Likewise.
2091         * tests/sum/sysv: Likewise.
2092         * tests/tail-2/append-only: Likewise.
2093         * tests/tail-2/assert: Likewise.
2094         * tests/tail-2/assert-2: Likewise.
2095         * tests/tail-2/big-4gb: Likewise.
2096         * tests/tail-2/fflush: Likewise.
2097         * tests/tail-2/infloop-1: Likewise.
2098         * tests/tail-2/proc-ksyms: Likewise.
2099         * tests/tail-2/start-middle: Likewise.
2100         * tests/tail-2/tail-n0f: Likewise.
2101         * tests/tee/basic: Likewise.
2102         * tests/tee/dash: Likewise.
2103         * tests/touch/fail-diag: Likewise.
2104         * tests/touch/no-create-missing: Likewise.
2105         * tests/touch/not-owner: Likewise.
2106         * tests/touch/obsolescent: Likewise.
2107         * tests/touch/read-only: Likewise.
2108         * tests/touch/relative: Likewise.
2110 2006-10-21  Jim Meyering  <jim@meyering.net>
2112         * NEWS: (cp --backup fix): Fix a typo.
2114         * .gitignore: Remove some references to files in subdirectories.
2115         * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
2116         * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
2118         * src/copy.c (copy_internal): Add a comment saying why we prefer
2119         mknod over mkfifo.
2121         Enable an fts optimization (call lstat only for directories,
2122         on some file system types) also with the --preserve-root option
2123         of chown or chgrp.
2124         * src/chown-core.c (change_file_owner): Compare fts_statp-based
2125         dev/ino against root dev/ino only for directories.
2126         (chown_files): Don't let the root_dev_ino setting influence whether
2127         we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
2129 2006-10-20  Jim Meyering  <jim@meyering.net>
2131         * src/od.c (usage): Change description of default to use "-w16",
2132         not the now-invalid "-w 16" syntax.  From Dan Jacobson.
2134 2006-10-19  Jim Meyering  <jim@meyering.net>
2136         * bootstrap: Add names to each .gitignore file (if it exists)
2137         as well as to .cvsignore.
2139         * Makefile.maint (po-check): This rule didn't detect the new use
2140         of "gettext" (as opposed to the use of "_" everywhere else) in
2141         lib/xstrtol.h.  Adjust the grep regexp so that now it does.
2143 2006-10-18  Paul Eggert  <eggert@cs.ucla.edu>
2145         * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
2146         when opening dst_name.
2147         (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
2148         (SYSCALL) to test for failure in a system call.
2150         * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
2151         a fifo.  This preserves the special mode bits on Solaris 10, which
2152         is compatible with what Solaris 10 cp -R does.
2154         * src/copy.c (copy_internal): Remove redundant and confusing local
2155         variable src_type.
2157         * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
2158         7777.  This matches historical 'cp' behavior and avoids some
2159         (though not all) implementation-defined behavior of mkdir.
2160         * src/cp.c (make_dir_parents_private): Likewise.
2161         * src/copy.c (copy_internal): Don't pass 'open' a mode greater
2162         than 777.  This is required by POSIX.  It doesn't make any difference
2163         in actual behavior on any host that I know of.
2165 2006-10-17  Jim Meyering  <jim@meyering.net>
2167         * src/dd.c (usage): Use two spaces (not one) to separate the
2168         "fdatasync" option string from its description, so help2man formats
2169         the derived man page properly.  Reported by Samuel Thibault
2170         in <http://bugs.debian.org/393649>.
2172 2006-10-16  Jim Meyering  <jim@meyering.net>
2174         * .x-sc_trailing_blank: Remove names of files that are no longer
2175         version-controlled.
2177 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2179         * src/groups.sh (version): Reword message to match the other programs.
2180         Problem reported by Eric Blake.
2182 2006-10-14  Jim Meyering  <jim@meyering.net>
2184         * Makefile.maint (headers_with_interesting_macro_defs): Define.
2185         (.re-defmac, sc_always_defined_macros): New rules.
2187         * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
2188         Instead, include "exit.h".  This hereby retires the work-around for
2189         "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
2191         * src/cksum.c (uint_fast32_t): Don't define.
2192         Instead, include <stdint.h>.
2194         * src/pinky.c (S_IWGRP): Don't define.
2195         It's already defined by "stat-macros.h" (included via system.h).
2197         * Makefile.cfg: Remove cruft that's now handled via bootstrap.
2198         * Makefile.maint: Likewise, remove these targets/rules/variables:
2199         (local_updates, update, cvs-update, wget_files, get-targets): Remove.
2200         (cvs_files, wget-update, automake_repo): Likewise.
2201         Move the comment about cvsu to build-aux/vc-list-files,
2202         where cvsu is actually used.
2204         * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
2206         Work also when the working directory (with e.g. coreutils sources)
2207         is version controlled with git, rather than CVS.
2208         * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2209         rather than CVS.
2210         In messages and comments, say e.g., "checked-out sources",
2211         rather than "CVS sources".
2212         (version_controlled_file): New function.  Work for git as well as
2213         for CVS.  Don't use grep's -q option.
2214         (slurp): Call it here, in place of CVS-specific code.
2216         * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
2217         to dir1/dir2~.
2218         * src/copy.c (copy_internal): Although we do create a backup of each
2219         destination directory when in move mode, don't do that when copying.
2220         Reported by Peter Breitenlohner, in
2221         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
2222         * tests/cp/backup-dir: New file.  Test for the above.
2223         * tests/cp/Makefile.am (TESTS): Add backup-dir.
2225 2006-10-13  Jim Meyering  <jim@meyering.net>
2227         More chown/chgrp dereferencing-related fixes.
2228         * src/chown-core.c (change_file_owner): Don't use fts_statp if
2229         we're dereferencing symlinks.
2230         Reverse conjuncts, so that we use dereference file_stats
2231         (aka ent->fts_statp) only *after* we've confirmed that
2232         chopt->affect_symlink_referent is true.  Otherwise, we might
2233         use ent->fts_statp uninitialized.
2234         Don't turn on FTS_NOSTAT when dereferencing symlinks.
2235         * tests/chown/deref: Update the expected diagnostic, now that
2236         this test case (trying to use "chown --dereference ..." on a
2237         dangling symlink) takes a different code path.
2239 2006-10-13  Paul Eggert  <eggert@cs.ucla.edu>
2241         Sync from Bison, as follows:
2243         2006-10-01  Paul Eggert  <eggert@cs.ucla.edu>
2245         Fix problems with translating English-language diagnostics.
2246         * bootstrap: Fix bug introduced in recent bootstrap changes, with
2247         respect to bison-runtime pot generation.  The YY_ stuff
2248         wasn't being captured.
2250 2006-10-13  Jim Meyering  <jim@meyering.net>
2252         * src/chown-core.c (change_file_owner): Use fstatat, not stat,
2253         now that we're using fts_open with FTS_CWDFD.
2254         * tests/chgrp/posix-H: Add --preserve-root to an invocation of
2255         chgrp, to exercise the above fix.
2256         * NEWS: Mention the above.
2258         * src/du-tests: Clean up a little, though it's still not portable.
2260         * .vg-suppressions: Add 3 more for debian unstable.
2262         * tests/ls/Test.pm: Remove long-unused file.
2263         * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
2264         Suggestions from Bruno Haible.
2266 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2268         * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
2269         (MAINTAINERCLEANFILES): Add .kludge-stamp.
2270         * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
2271         instead of $(man_MANS).
2273 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2275         * configure.ac: Avoid compiler warnings about default return
2276         type in function definitions and unused variables in tests.
2277         * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
2278         if this is #defined.
2280 2006-10-12  Jim Meyering  <jim@meyering.net>
2282         * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
2283         Call gl_INIT directly, rather than through the above.
2285 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2287         * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
2288         variable was sometimes used without being initialized.  This
2289         messed up the installation of the INSTALL file in some cases.
2291 2006-10-11  Jim Meyering  <jim@meyering.net>
2293         * src/ls.c (usage): Correct description of -s, --size.
2294         It works even without -l.  Suggestion from Karl Berry.
2296 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
2298         * src/ls.c (quote_name): Use initializer rather than memset to
2299         initialize an object to zero.  This is easier to read and is less
2300         likely to introduce a runtime error due to a mixup.  It causes
2301         gcc -W to issue a warning, but you can work around this by
2302         appending -Wno-missing-field-initializers.
2303         * src/pathchk.c (portable_chars_only): Likewise.
2304         * src/shred.c (main): Likewise.
2305         * src/stty.c (main): Likewise.
2306         * src/tr.c (card_of_complement): Likewise.
2307         * src/wc.c (wc): Likewise.
2309 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
2311         * src/sort.c (usage): Mention again that sort fields are origin 1.
2313         * NEWS: Fix typo: iso-8602 -> iso-8601.  Problem reported by
2314         Bob Proulx.
2316         * bootstrap (usage, main program, symlink_to_gnulib): Add option
2317         --copy.  Inspired by a suggestion from Bruno Haible.
2319 2006-10-09  Jim Meyering  <jim@meyering.net>
2321         Avoid a compiler warning.
2322         * src/pathchk.c (portable_chars_only): Initialize variable of type
2323         mbstate_t via memset, rather than via '{0}'.  Patch from Bruno Haible.
2325 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
2327         Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
2328         wrong file name in some cases.  Lars Wendler reported a bug in
2329         my original fix.
2330         * src/install.c (make_ancestor): New arg COMPONENT.
2331         * src/mkdir.c (make_ancestor): Likewise.
2332         * tests/install/basic-1: Check for install -Dv bug.
2333         * tests/mkdir/Makefile.am (TESTS): Add p-v.
2334         * tests/mkdir/p-v: New file, to test this bug.
2336 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
2338         * src/chgrp.c: Don't include lchown.h; no longer needed.
2339         * src/chown.c: Likewise.
2341         * tests/ls/stat-dtype: Use a dynamic test to decide whether the
2342         current file system has useful d_type info.
2344         * src/dd.c (flags): noatime and nofollow now depend on
2345         HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
2346         (usage): Output info about noatime and nofollow only if
2347         they are known to work.
2348         * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
2349         than O_NOFOLLOW, when testing whether it's possible to avoid a
2350         race condition reliably.
2352 2006-10-05  Jim Meyering  <jim@meyering.net>
2354         * src/c99-to-c89.diff: Update to reflect new offsets.
2356         * tests/install/basic-1: Skip the latter part of this test if the
2357         just-built dd binary is not readable.  Otherwise, this test would fail
2358         when binaries were created as root.  Reported by Bauke Jan Douma in
2359         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
2361 2006-10-03  Paul Eggert  <eggert@cs.ucla.edu>
2363         * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
2364         MiB, since XFS hosts can legitimately have large values of
2365         st_blksize.  Problem reported by Tony Ernst in
2366         <http://savannah.gnu.org/bugs/?17903>.
2368 2006-10-04  Jim Meyering  <jim@meyering.net>
2370         * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
2371         Paul Eggert pointed out that the specified file may exist,
2372         in spite of such an errno value.
2373         * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
2374         * tests/rm/ignore-name-too-long: Remove file.
2375         * NEWS: Update here, too.
2377 2006-10-03  Jim Meyering  <jim@meyering.net>
2379         * tests/rm/fail-eperm: Report failure also if rm is terminated by
2380         a signal.
2382         * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
2383         and one in shred.c -- that were added before coreutils-6.3.
2384         Reported by Michael Deutschmann.
2386         * src/c99-to-c89.diff: Update to reflect new offsets.
2388         * src/remove.c (remove_entry): With -f, exit successfully in spite
2389         of a missing file under some very unusual conditions (with errno
2390         being any of ENOENT, ENOTDIR, ENAMETOOLONG).
2392         With --force (-f), rm no longer fails for ENOTDIR.
2393         * src/remove.c (ignorable_missing): New function.
2394         Use it everywhere, rather than open-coding the test.
2395         Andreas Schwab reported the ENOTDIR problem.
2396         (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
2398         * NEWS: Mention the bug fix.
2399         * tests/rm/ignorable: New file.  Test for the ENOTDIR case.
2400         * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
2401         * tests/rm/Makefile.am (TESTS): Add the new file names.
2403         * bootstrap: Undo last change to this file, since now gnulib-tool
2404         sticks with the automake default in generating dependencies.
2406         * NEWS: Add a line for 6.4-cvs.
2407         * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
2409 2006-09-30  Jim Meyering  <jim@meyering.net>
2411         Version 6.3.
2412         * NEWS: Record the 6.3 release date.
2413         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2415         * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
2417         * src/c99-to-c89.diff: Update offsets.
2419 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
2421         * tests/rm/readdir-bug: Don't use $(...) in a shell script,
2422         as it doesn't work with Solaris /bin/sh.
2424 2006-09-29  Jim Meyering  <jim@meyering.net>
2426         * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
2427         the pinky segfault.
2429         * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
2430         use .1 as the increment.  Actual output varies too much.
2431         [eq-wid-3]: New, commented out test.
2433         * src/shuf.c (read_input): Fix an off-by-one error that
2434         would cause an infloop for piped input of 8KB or more.
2435         * NEWS: Mention the fix.
2436         * tests/misc/shuf: Test for the above fix.
2438         Since any system may be affected by the Darwin readdir bug,
2439         perform the extra rewinddir unconditionally.  The performance
2440         impact of rewinding a directory is negligible.
2441         * src/remove.c (NEED_REWIND): Define to use
2442         CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
2444         * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
2445         increment translates to a slightly larger value.
2446         This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
2447         The final expected value wasn't being printed.
2449         Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
2450         and NFS, whereby rm would not remove all files in a directory.
2451         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
2452         (NEED_REWIND): New macro, so that we incur the cost of the work-around
2453         rewinddir only on afflicted systems.
2454         * NEWS: Clarify and correct.
2455         * tests/rm/readdir-bug: New file.  Test for the above fix.
2456         * tests/rm/Makefile.am (TESTS): Add it.
2457         Prompted by testing and analysis from Bruno Haible:
2458         http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
2460 2006-09-28  Paul Eggert  <eggert@cs.ucla.edu>
2462         * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
2463         suggested for Debian stable, which uses Perl 5.8.4.
2465 2006-09-28  Jim Meyering  <jim@meyering.net>
2467         Automatically generated dependencies are important even
2468         when all of the sources in a directory come from gnulib.
2469         * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
2470         option that gnulib-tool adds to what becomes our lib/gnulib.mk.
2472         * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
2473         Ensure that IFS is set properly and unset PATH.
2474         Sanitize inputs.
2475         Work properly even when the name of the selected file starts with "-".
2476         Invoke rm via "../../src/rm", and adjust expected output.
2477         Prompted by a patch from Tim Waugh.
2479         * README-cvs: Add Bison to the list of required packages.
2481 2006-09-26  Jim Meyering  <jim@meyering.net>
2483         * src/c99-to-c89.diff: Update offsets.
2485         * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
2486         it from removing a directory containing 188 or more entries.
2487         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
2488         20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
2489         Reported by Matthew Woehlke.
2491 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
2493         * NEWS: "groups user" no longer outputs "user :"; you need at least
2494         two users.  "groups" now processes options like --help more compatibly.
2495         * src/groups.sh: Implement the option-processing change.
2496         Handle user and group names with special characters more robustly.
2497         Report write errors instead of exiting silently with status 1.
2499 2006-09-26  Jim Meyering  <jim@meyering.net>
2501         * README: Warn not to run autoreconf manually.  Use bootstrap instead.
2503         * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
2504         Rewrite to avoid using temporary, $status.
2506         * NEWS: Mention the bug fix.
2507         * src/groups.sh: Don't hide a write failure.
2508         Reported by Iain Calder <ic56@rogers.com>.
2510 2006-09-25  Jim Meyering  <jim@meyering.net>
2512         * src/chown.c (usage): Clarify --dereference description.
2513         * src/chgrp.c (usage): Likewise.  Suggestion from Jamie McClelland.
2515 2006-09-24  Jim Meyering  <jim@meyering.net>
2517         * NEWS: Mention these fixes.
2518         * src/copy.c (copy_reg): With --verbose (-v), print
2519         "removed `file_name'" just after unlinking a file.
2520         (copy_internal): Likewise, in three more places.
2521         Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
2522         * tests/mv/hard-verbose: New file.  Test for the above fix.
2523         * tests/mv/Makefile.am (TESTS): Add hard-verbose.
2525         * tests/help-version (sync_args): Don't call sync, since it spins up
2526         disks that I've deliberately caused to spin down (but not unmounted).
2528         * NEWS: Mention the improvement to sort.
2530         * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
2531         as well as existing.
2533         * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
2534         since that predated addition of d_type support.
2536 2006-09-23  Jim Meyering  <jim@meyering.net>
2538         * gl/modules/getloadavg.diff: New file.  Work around the way the latest
2539         version of the getloadavg module interacts with our bootstrap script.
2540         * bootstrap (gnulib_tool_options): Add "--local-dir gl".
2541         * Makefile.am (EXTRA_DIST): Sort file names.
2542         Add bootstrap and gl/modules/getloadavg.diff
2544 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
2546         * bootstrap: Add support for --force.
2547         (usage): New function.  Describe usage less tersely.
2548         (CVS_only_file): New var.
2550         * NEWS: Document fix for cp -i and mv -i.
2551         * src/copy.c (copy_internal): With -i, prompt even if the source
2552         is a directory and the destination is not.  This is required by
2553         POSIX and gives the user a chance to bail out before failing.
2554         * tests/cp/Makefile.am (TESTS): Add cp-i.
2555         * tests/cp/cp-i: New file.
2556         * tests/mv/Makefile.am (TESTS): Add i-5.
2557         * tests/mv/i-5: New file.
2559 2006-09-20  Jim Meyering  <jim@meyering.net>
2561         * NEWS: Mention the chmod bug fix.
2563         * tests/chmod/inaccessible: New test, specifically for this bug.
2564         Based on a test case from Paul Eggert.
2565         * tests/chmod/Makefile.am (TESTS): Add inaccessible.
2567         Fix the 2006-09-18 bug differently.
2568         * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
2569         tell fts_read to stat the file again, in case it has become
2570         accessible since the initial fts_open call.
2571         * src/chown-core.c (change_file_owner): Likewise.
2573         * src/chmod.c: Revert last change.  There is a better way.
2574         * src/chown-core.c: Likewise.
2576 2006-09-19  Paul Eggert  <eggert@cs.ucla.edu>
2578         * src/ln.c (target_directory_operand): Rewrite to avoid porting
2579         problem on Tandem reported by Matthew Woehlke in
2580         <https://savannah.gnu.org/bugs/?17172>.
2582 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2584         Fix bug where chmod, chown, and chgrp did not process operands
2585         left-to-right in some cases.
2586         * src/chmod.c (wd_errno): New var.
2587         (chmod_file): New function, with most of the contents of the
2588         old prcess_file function.
2589         (process_files): Use it.  This gives file names to fts one
2590         at a time, so that they are processed left-to-right as POSIX
2591         requires.
2592         * src/chown-core.c (wd_errno, chown_files): Likewise.
2593         (chown_file): New function.
2594         * tests/install/basic-1: Redo test so as to not workaround
2595         the chmod bug, thereby testing for it.
2597         * src/shuf.c (main): Quote the entire range when reporting an
2598         invalid one, rather than just the part that contained the error.
2600         * tests/stty/row-col-1: Rewrite to avoid temporary file that is
2601         sometimes left behind if the test is skipped or interrupted.
2603         * bootstrap (symlink_to_gnulib): New function.
2604         (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
2605         to copies-of-gnulib.
2606         (cp_mark_as_generated, slurp, gnulib_files):
2607         Avoid making a copy if it's the same as the old version.
2608         (gnulib_files): Add support for this variable (used by Bison).
2610         * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
2611         indicating flaw in kernel.  Reword to say that the flaw isn't
2612         serious for coreutils, since the flaw does affect ls -i.
2614         * tests/chgrp/basic: Fix bug in test case exposed by building on
2615         Solaris 8 in a setgid directory.  The test case incorrectly
2616         assumed that 'symlink' would be in group $g1.
2618 2006-09-18  Jim Meyering  <jim@meyering.net>
2620         * NEWS: Add a line for 6.3-cvs.
2621         * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
2623         Version 6.2.
2624         * NEWS: Record the 6.2 release date.
2625         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2627 2006-09-17  Jim Meyering  <jim@meyering.net>
2629         * tests/chgrp/basic: On an OpenBSD system, rather than failing
2630         due to a known problem, merely warn about it.
2631         Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
2632         Instead, use stat to test file system for desired results, directly.
2633         * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
2635         * tests/envvar-check: Add more variable names to the list of those
2636         that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
2637         QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
2639 2006-09-16  Paul Eggert  <eggert@cs.ucla.edu>
2641         * NEWS: Document that mkdir -p and install -d now fork on occasion.
2642         * bootstrap.conf (gnulib_modules): Add savewd.
2643         * src/install.c: Include savewd.h.
2644         (process_dir): New function.
2645         (main, install_file_in_file_parents): Use it, along with the new
2646         savewd module, to avoid some race conditions.
2647         * src/mkdir.c: Include savewd.h.
2648         (struct mkdir_options): New members make_ancestor_function, mode,
2649         mode_bits.
2650         (make_ancestor): Return 1 if the resulting directory is not readable.
2651         (process_dir): New function.
2652         (main): Use it, along with new savewd module, to avoid some
2653         race conditions.  Fill in new slots of struct mkdir_options, so
2654         that callees get the values.
2655         * tests/install/basic-1: Test for coreutils 5.97 bug that was
2656         fixed in coreutils 6.0, and which should still be fixed with
2657         this change.
2658         * tests/mkdir/p-3: Likewise.
2660 2006-09-15  Jim Meyering  <jim@meyering.net>
2662         * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
2663         The 2006-09-08 changes made it so "mv dir new-name/" would
2664         fail on NetBSD 1.6.  This makes it work once again.
2666 2006-09-14  Jim Meyering  <jim@meyering.net>
2668         * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
2669         Instead, since it's a little fragile, assert the condition.
2670         (target_directory_operand): Update comment to reflect latest change.
2672 2006-09-12  Paul Eggert  <eggert@cs.ucla.edu>
2674         * src/who.c (print_user): Rewrite to avoid warning from
2675         GCC 4.1.1 with -Wall.
2677 2006-09-12  Jim Meyering  <jim@meyering.net>
2679         * tests/mv/atomic: Check for specific strace output, rather than
2680         simply nonempty.  RHEL AS 4 would fail this test due to strace
2681         generating "[ Process PID=14434 runs in 32 bit mode. ]".
2682         Reported by Nelson Beebe.
2684 2006-09-11  Jim Meyering  <jim@meyering.net>
2686         * src/remove.c (remove_dir): Move new cache_stat_init call onto
2687         it's own line.
2688         (rm_1): Move declaration of "st" and new cache_stat_init call
2689         "down" to nearer where they're used.
2690         * src/c99-to-c89.diff: Add another set of curly braces.
2692 2006-09-10  Paul Eggert  <eggert@cs.ucla.edu>
2694         * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
2695         substr's last operand is very large.  Performance problem reported
2696         by Sebastian Kreft.
2698 2006-09-09  Jim Meyering  <jim@meyering.net>
2700         * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
2701         are no .m4 files.
2702         (sc_require_config_h): Skip this test if there are no version-
2703         controlled .c files.
2704         (sc_prohibit_assert_without_use): Likewise.
2706 2006-09-08  Jim Meyering  <jim@meyering.net>
2708         * bootstrap: Export CVS_RSH separate from its assignment, to work
2709         even with Solaris 10's /bin/sh.  Suggestion from Mark D. Baushke.
2711 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2713         * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
2714         no file operand is given, and standard input is any FIFO.
2715         This is in response to Open Group XCU ERN 114.
2716         * src/tail.c (main): Likewise.
2718 2006-09-08  Jim Meyering  <jim@meyering.net>
2720         mv and "cp -r" no longer fail when invoked with two arguments
2721         where the first one names a directory and the second name ends in
2722         a slash and doesn't exist.  E.g., "mv dir B/", for nonexistent B,
2723         now succeeds, once more. This reverts part of the 2004-06-27
2724         change for 5.3.0.
2725         * NEWS: Say the above.
2726         * src/mv.c (target_directory_operand): Don't require (here)
2727         that the target operand "look like" a directory.  This change
2728         pushes the test down to the rename syscall level, where a
2729         "mv dir existing-non-dir/" will mistakenly succeed on older systems
2730         that ignore trailing slashes in the rename destination argument.
2731         * src/cp.c (target_directory_operand): Likewise, but for cp.
2732         * tests/mv/trailing-slash: Exercise the above fixes.
2733         * tests/cp/trailing-slash: New file.
2734         * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
2736         * bootstrap: Use the previously unused variable, $src,
2737         to avoid repeating "$GNULIB_SRCDIR/$file".
2739         * bootstrap (cp_mark_as_generated): Don't use "local", to
2740         accommodate ancient "/bin/sh".  Suggested by Ralf Wildenhues.
2741         Rename now-global "$src" and "$dst" to have cp_ prefix.
2742         Safer, and avoids confusion.
2744         * bootstrap (cp_mark_as_generated): New function.
2745         (slurp): Use it to prepend editor hints and a warning that
2746         the file we're copying is generated.
2747         Suggestion from Bruce Korb.
2748         (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
2749         Fix last-minute typo.
2751 2006-09-07  Jim Meyering  <jim@meyering.net>
2753         * bootstrap: Revert last change.  There are less disruptive ways
2754         to mark these generated files as read-only.
2756         * src/c99-to-c89.diff: Update to have proper offsets.
2758 2006-09-06  Jim Meyering  <jim@meyering.net>
2760         Ensure that some gnulib-tool-generated files are read-only.
2761         * bootstrap (slurp): Put the body of this function in a sub-shell,
2762         with "umask a-w" so that all new files are read-only.  Remove each
2763         file before we write to it, in case it's read-only.
2764         Make po/Makevars and runtime-po/Makevars read-only, too.
2766 2006-09-05  Jim Meyering  <jim@meyering.net>
2768         * tests/cp/acl: Skip this test when cp lacks ACL support.
2769         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
2771         * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
2772         context from change of 2006-09-02.
2774 2006-09-04  Jim Meyering  <jim@meyering.net>
2776         * README-cvs: Fix typo in update command.
2778 2006-09-03  Jim Meyering  <jim@meyering.net>
2780         * NEWS: Tweak the wording in the new change description so that
2781         no one can think this change causes e.g., `rm -fr foo../' to fail.
2783         * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
2784         Use $CONFIG_HEADER, rather than hard-coding it.
2785         * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
2787 2006-09-02  Paul Eggert  <eggert@cs.ucla.edu>
2789         * NEWS: rm now rejects attempts to remove /, ./, and ../.
2790         * src/basename.c: Don't include dirname.h, since system.h does it now.
2791         * src/chmod.c: Likewise.
2792         * src/copy.c: Likewise.
2793         * src/cp.c: Likewise.
2794         * src/df.c: Likewise.
2795         * src/dircolors.c: Likewise.
2796         * src/dirname.c: Likewise.
2797         * src/du.c: Likewise.
2798         * src/install.c: Likewise.
2799         * src/ln.c: Likewise.
2800         * src/ls.c: Likewise.
2801         * src/mkdir.c: Likewise.
2802         * src/mv.c: Likewise.
2803         * src/remove.c: Likewise.
2804         * src/rm.c: Likewise.
2805         * src/rmdir.c: Likewise.
2806         * src/shred.c: Likewise.
2807         * src/split.c: Likewise.
2808         * src/su.c: Likewise.
2809         * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
2810         now.
2811         (dot_or_dotdot): Succeed even if "." or ".." is followed by a
2812         slash.
2813         * src/rm.c (usage, main): --preserve-root is now the default.
2814         * src/remove.h: Fix comment.
2815         * src/remove.c (cache_fstatat, cache_stat_init): New functions.
2816         (cache_statted, cache_stat_ok): New functions.
2817         (write_protected_non_symlink): Remove struct stat ** buf_p arg,
2818         which is no longer needed with the new functions.  All callers
2819         changed.
2820         (prompt, is_dir_lstat, remove_entry, remove_dir):
2821         New struct stat * arg.  All callers changed.
2822         (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
2823         (remove_cwd_entries, remove_dir, rm_1):
2824         Use and maintain the file status cache.
2825         (prompt, remove_entry): Omit the first "directory" in the diagnostic
2826         "Cannot remove directory `foo': is a directory".  This causes "rm"
2827         to pass a test case that it would otherwise fail now that it
2828         "knows" more about its argument.  I think the diagnostic is better
2829         without the first "directory" anyway.
2830         (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
2831         (rm_1): Reject attempts to remove /, ./, or ../.
2832         * tests/rm/Makefile.am (TESTS): Add r-4.
2833         * tests/rm/r-4: New file.
2835 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2837         * src/stat.c: Include <stddef.h>
2838         (alignof): New macro.
2839         (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
2840         Remove.
2841         (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
2842         (FSID_VAL): Remove.
2843         (print_statfs): If f_fsid isn't an integer, grab its words one
2844         at a time in little-endian order.  This is a bit easier to configure
2845         and should avoid a compilation failure on MacOS reported by Bruno
2846         Haible.
2848 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2850         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
2851         work around a Mac OS X porting problem reported by Bruno Haible in
2852         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
2853         (print_statfs): Use them.
2855         * bootstrap.conf (gnulib_modules): Add isapipe.
2856         * src/tail.c: Include isapipe.h.
2857         (IS_PIPE_LIKE_FILE_TYPE): Remove.
2858         (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
2859         tailable, since this seems to be portable.
2860         (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
2861         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
2863         * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
2864         it for us.
2866 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2868         * src/copy.c (copy_internal): Don't test whether macros like
2869         S_ISLNK are defined, since they're always defined now.
2870         * src/cp.c (main): Likewise.
2871         * src/ln.c (main): Likewise.
2872         * src/ls.c (get_link_name, make_link_name): Likewise.
2873         * src/mknod.c (main): Likewise.
2874         * src/mkfifo.c (usage): Likewise.
2875         * src/who.c (S_IWGRP): Likewise.
2877         Adjust to recent gnulib changes for the gnulib module.
2878         * bootstrap.conf (gnulib_modules): Add fcntl.
2879         * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove.  Other code
2880         is already assuming these macros are defined.
2881         (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
2882         (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
2883         Remove; the fcntl module now handles these.
2885         Adjust to recent gnulib changes for the inttypes module.
2886         * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
2887         (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
2889         * src/system.h: Don't bother to include <stdint.h>, since we can
2890         now assume inttypes.h does the equivalent of including stdint.h.
2892 2006-08-27  Jim Meyering  <jim@meyering.net>
2894         * src/copy.c (copy_internal): Don't make a backup if the last
2895         component of the source name is "." or "..".
2896         Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
2897         * NEWS: Mention this.
2898         * tests/cp/src-base-dot: New file.  Test for the above fix.
2899         * tests/cp/Makefile.am (TESTS): Add src-base-dot.
2901         * src/system.h (DOT_OR_DOTDOT): Remove macro.  Rewrite as a...
2902         (dot_or_dotdot): ...new static inline function.
2903         * src/remove.c (rm_1): Reflect this renaming.
2904         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2906         * src/copy.c (copy_internal): Add comments.
2908 2006-08-26  Paul Eggert  <eggert@cs.ucla.edu>
2910         * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
2911         since Automake supplies them for us.  It always did -I$(srcdir),
2912         and with the recent change to AC_CONFIG_HEADERS in configure.ac it
2913         is now also doing -I../lib.
2915         * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
2916         Fail if the first "echo" fails.  Suppress diagnostics from "ls po/*.po"
2917         since there might not be any .po files.
2918         (WGET_COMMAND): Set to empty if wget doesn't
2919         seem to be available.
2921 2006-08-26  Jim Meyering  <jim@meyering.net>
2923         This test was failing in some environments.
2924         * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
2925         to set LS_COLORS in the environment.
2926         * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
2927         Reported by Bob Proulx.
2929         * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
2931         * Makefile.am (EXTRA_DIST): Remove these files here, too:
2932         .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
2933         .x-sc_two_space_separator_in_usage.
2935         Fix "mv --verbose --backup" so its output includes the
2936         " (backup: foo.~1~)" suffix also when backing up a directory.
2937         * NEWS: Report this bug fix.
2938         * src/copy.c (emit_verbose): New function, factored out of...
2939         (copy_internal): ...here.  Use the new function.
2940         * tests/mv/backup-dir: Test for the above fix.
2941         * tests/mv/Makefile.am (TESTS): Add backup-dir.
2943 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2945         * .x-sc_no_if_have_config_h: Remove; no longer needed.
2946         * .x-sc_prohibit_assert_without_use: Remove; it was empty.
2947         * .x-sc_two_space_separator_in_usage: Likewise.
2948         * Makefile.maint (sc_no_have_config_h): Renamed from
2949         sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
2950         is absent everywhere.
2951         * bootstrap.conf (gnulib_modules): Add config-h.
2952         * src/shred.c: Include <config.h> unconditionally, since
2953         we now assume config.h exists.
2954         * src/dircolors.c: Likewise.
2956 2006-08-26  Jim Meyering  <jim@meyering.net>
2958         "ls --color" would highlight other-writable and sticky directories
2959         no differently than regular directories on a file system with
2960         dirent.d_type support.
2961         * NEWS: Say the above.
2962         * src/ls.c (gobble_file): With --color, also stat the file when
2963         we know it is a directory.
2964         Derived from an anonymous one-line fix and bug report:
2965         <http://savannah.gnu.org/bugs/?15043>.
2966         * tests/ls/color-dtype-dir: New file.  Test for the above fix.
2967         * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
2969 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2971         * .cvsignore: Remove stamp-h1.  Add coreutils-*, to ignore
2972         tarballs.
2973         * bootstrap.conf: Add configmake, verify.
2974         * src/.cvsignore: Remove localedir.h.
2975         * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
2976         subsumed by configmake.
2977         * src/system.h: Include configmake.h rather than localedir.h
2978         (LOCALEDIR): New macro.
2980         Rewrite to avoid some unnecessary casts, macros, literals.
2981         * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
2982         not macros.
2983         (SECTOR_SIZE, SECTOR_MASK): New constants.
2984         (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
2985         and use the SECTOR_* constants when applicable.  Check for size <
2986         0 rather than size == -1, since negative-size files are a sign of
2987         trouble anyway.
2989 2006-08-25  Bruno Haible  <bruno@clisp.org>
2991         * src/shred.c (dopass): Assume a continuable error if EIO even
2992         if the current position is not a multiple of 512.
2994 2006-08-24  Jim Meyering  <jim@meyering.net>
2996         * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
2998 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
3000         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define.  This
3001         macro was being used without being defined.
3002         (SB_F_NAMEMAX): Remove cast.
3003         (f_fsid) [BeOS]: Likewise.
3004         (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
3005         All uses changed.
3006         (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
3007         functions.
3008         (xstrcat): Remove.  All uses changed to use the above functions.
3009         (print_statfs, print_stat): 2nd arg is now the prefix len, not the
3010         buffer len.  All uses changed.  Output '?', not '*', for unknown
3011         data or errors.  Do not assume signed values can be interchanged
3012         with unsigned when printing.
3013         (print_statfs): For %i, print the fsid as a single int, not as a
3014         pair.
3015         (print_it): Quote invalid format better.
3017         * NEWS: printf supports the I flag.
3018         * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
3020 2006-08-23  Bruno Haible  <bruno@clisp.org>
3022         * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
3023         (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
3024         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
3026         * src/ls.c (SA_RESTART): Fallback define.
3028 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
3030         * src/system.h (EDQUOT): Define if not already defined.
3031         Problem reported by Bruno Haible for BeOS.
3033         * .cvsignore: Remove config.h, config.hin, as they are now
3034         in lib.
3035         * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
3036         to lib.
3037         * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
3039         * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
3040         to accommodate today's gnulib change.
3042 2006-08-23  Jim Meyering  <jim@meyering.net>
3044         * NEWS: Mention the sweeping infrastructure changes.
3046 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3048         * bootstrap.conf (gnulib_modules): Add gnupload.
3049         * Makefile.maint (emit_upload_commands): gnupload is now
3050         in build-aux.
3051         * gnupload: Remove from CVS, since it's now a gnulib module.
3053         * bootstrap (bootstrap_conf_cleanup): Remove.
3054         (excluded_files): New var.
3055         * bootstrap.conf: Likewise.
3056         * bootstrap (slurp): Exclude files early if they're in the
3057         excluded_files list.  That way, their names don't get put into
3058         .cvsignore.
3060         * aclocal.m4, config.hin, configure:
3061         Remove from CVS, since ./bootstrap generates them automatically.
3062         * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
3063         configure, *.cache, *.lineno, *.log.
3064         Remove more-specific entries.  This catches files like configure.lineno.
3065         * man/.cvsignore: Add Makefile.in.
3066         * src/.cvsignore: Add Makefile.in.
3067         Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
3069         * tests/.cvsignore:
3070         * tests/chgrp/.cvsignore:
3071         * tests/chmod/.cvsignore:
3072         * tests/chown/.cvsignore:
3073         * tests/cp/.cvsignore:
3074         * tests/cut/.cvsignore:
3075         * tests/dd/.cvsignore:
3076         * tests/dircolors/.cvsignore:
3077         * tests/du/.cvsignore:
3078         * tests/expr/.cvsignore:
3079         * tests/factor/.cvsignore:
3080         * tests/fmt/.cvsignore:
3081         * tests/head/.cvsignore:
3082         * tests/install/.cvsignore:
3083         * tests/join/.cvsignore:
3084         * tests/ln/.cvsignore:
3085         * tests/ls/.cvsignore:
3086         * tests/ls-2/.cvsignore:
3087         * tests/md5sum/.cvsignore:
3088         * tests/misc/.cvsignore:
3089         * tests/mkdir/.cvsignore:
3090         * tests/mv/.cvsignore:
3091         * tests/od/.cvsignore:
3092         * tests/pr/.cvsignore:
3093         * tests/readlink/.cvsignore:
3094         * tests/rm/.cvsignore:
3095         * tests/rmdir/.cvsignore:
3096         * tests/seq/.cvsignore:
3097         * tests/sha1sum/.cvsignore:
3098         * tests/shred/.cvsignore:
3099         * tests/sort/.cvsignore:
3100         * tests/stty/.cvsignore:
3101         * tests/sum/.cvsignore:
3102         * tests/tac/.cvsignore:
3103         * tests/tail/.cvsignore:
3104         * tests/tail-2/.cvsignore:
3105         * tests/tee/.cvsignore:
3106         * tests/test/.cvsignore:
3107         * tests/touch/.cvsignore:
3108         * tests/tr/.cvsignore:
3109         * tests/tsort/.cvsignore:
3110         * tests/unexpand/.cvsignore:
3111         * tests/uniq/.cvsignore:
3112         * tests/wc/.cvsignore:
3113         Add Makefile.in.  Sort entries if necessary.  Remove *.I, *.E,
3114         *.X, *.O, *-tests, build-script, mk-script if they're never
3115         created in this directory.
3117 2006-08-22  Bruno Haible  <bruno@clisp.org>
3119         BeOS portability.
3120         * src/uptime.c: Include OS.h if it exists.
3121         (print_uptime): On BeOS, use the get_system_info function (actually a
3122         macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
3123         (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
3125 2006-08-22  Jim Meyering  <jim@meyering.net>
3127         * .cvsignore: Add ABOUT-NLS.
3129         Move the check-AUTHORS rule to be run as part of "make distcheck",
3130         rather than "make check".
3131         * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
3132         cause "make check" to fail on systems unable to build all binaries.
3133         * Makefile.maint (check-AUTHORS): New rule.
3134         (local-checks-available): Add it here.
3135         Reported by Bruno Haible.  Needed for BeOS.
3137 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3139         * src/df.c (print_header, show_dev): Use a column width that
3140         depends on the block size of -P is specified and not autoscaling.
3141         Problem reported by Gustavo G. Rondina in:
3142         http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
3144 2006-08-21  Jim Meyering  <jim@meyering.net>
3146         * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
3147         when the shell variable, SHELL, is not set.
3148         Trigger the failure with "(unset SHELL; make check TESTS=simple)".
3149         Reported by Sven Joachim in <http://bugs.debian.org/355368>.
3151         * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
3152         in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
3153         Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
3154         od: invalid type string `u8';
3155         this system doesn't provide a 8-byte integral type
3156         FIXME: add a test for this, but skip it when sizeof uintmax < 8.
3158 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3160         Add a bootstrap procedure, so that the CVS version contains fewer
3161         files and we bootstrap the rest from gnulib, gettext, etc.
3162         * README-cvs: New file.
3163         * bootstrap: New file.
3164         * bootstrap.conf: New file.
3165         * .x-sc_trailing_blank: Remove config-log, .gdb-history.  Add .po.
3166         * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
3167         of gnulib-tool.
3168         (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
3169         (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
3170         (gl_EARLY): Add.
3171         (gl_MACROS): Call just after gl_EARLY, just for clarity.
3172         * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
3173         * src/kill.c (strtoimax): Remove decl.
3174         * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
3175         * src/wc.c: Likewise.
3176         * src/ls.c (sort_files): Rewrite to avoid need for C99-style
3177         declaration, so that we don't need to patch this file.
3178         * src/printf.c (strtoimax, strtoumax): Remove decls.
3179         * src/su.c: Include getpass.h.
3180         (getpass): remove.
3181         * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
3182         Include inttypes.h unconditionally.
3183         (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
3184         (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
3185         (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
3186         (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
3187         (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
3189         * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
3190         * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
3191         * tests/chmod/Makefile.in, tests/chown/Makefile.in:
3192         * tests/cp/Makefile.in, tests/cut/Makefile.in:
3193         * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
3194         * tests/du/Makefile.in, tests/expr/Makefile.in:
3195         * tests/factor/Makefile.in, tests/fmt/Makefile.in:
3196         * tests/general/Makefile.in, tests/head/Makefile.in:
3197         * tests/install/Makefile.in, tests/join/Makefile.in:
3198         * tests/ln/Makefile.in, tests/ls/Makefile.in:
3199         * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
3200         * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
3201         * tests/mv/Makefile.in, tests/od/Makefile.in:
3202         * tests/pr/Makefile.in, tests/readlink/Makefile.in:
3203         * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
3204         * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
3205         * tests/shred/Makefile.in, tests/sort/Makefile.in:
3206         * tests/stty/Makefile.in, tests/sum/Makefile.in:
3207         * tests/tac/Makefile.in, tests/tail/Makefile.in:
3208         * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
3209         * tests/test/Makefile.in, tests/touch/Makefile.in:
3210         * tests/tr/Makefile.in, tests/tsort/Makefile.in:
3211         * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
3212         * tests/wc/Makefile.in:
3213         Remove from CVS, since ./bootstrap generates them automatically.
3215 2006-08-20  Eric Blake  <ebb9@byu.net>
3217         * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
3218         the patch from 2006-08-18 broke on cygwin.
3220 2006-08-20  Jim Meyering  <jim@meyering.net>
3222         * NEWS: Add a line for 6.2-cvs.
3223         * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
3225 2006-08-19  Jim Meyering  <jim@meyering.net>
3227         * Version 6.1.
3228         * NEWS: Record the 6.1 release date.
3229         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3231         * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
3233         Avoid test failure when `make check' is run through debuild.
3234         * tests/help-version: Ensure that $SHELL is set to some value
3235         and exported.  Patch from Sven Joachim.  For details, see
3236         <http://bugs.debian.org/355368>.
3238         * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
3240         * README: Describe potential "pre-C99 build failure", and work-around.
3242         Some of my 2006-07-03 changes to tests/*/Makefile.am were being
3243         backed out due to updates provoked by the copyright changes.
3244         * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
3245         it propagates to the derived Makefile.am files.
3246         ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
3247         so we don't mistakenly edit them again.
3248         * tests/cut/Makefile.am: Regenerate.
3249         * tests/head/Makefile.am: Likewise.
3250         * tests/join/Makefile.am: Likewise.
3251         * tests/pr/Makefile.am: Likewise.
3252         * tests/sort/Makefile.am: Likewise.
3253         * tests/tac/Makefile.am: Likewise.
3254         * tests/tail/Makefile.am: Likewise.
3255         * tests/test/Makefile.am: Likewise.
3256         * tests/tr/Makefile.am: Likewise.
3257         * tests/uniq/Makefile.am: Likewise.
3258         * tests/wc/Makefile.am: Likewise.
3260         * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
3261         when the file's apparent size is not a multiple of its block size.
3262         * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
3263         For some file sizes, writing that single byte would unnecessarily
3264         waste a few file blocks.  That write may have been necessary in the
3265         early days of Linux, but now, removing it should be safe.
3266         Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
3267         * tests/cp/sparse: New test for the above.
3268         * tests/cp/Makefile.am (TESTS): Add sparse.
3270         * tests/sparse-file: New file, essence factored out of...
3271         * tests/du/8gb: ... here.  Use the new script.
3273 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
3275         * src/system.h (select_plural): Reduce by 1000000, not 1000, since
3276         the CVS gettext manual now suggests 1000000.
3278 2006-08-18  Bruno Haible  <bruno@clisp.org>
3280         Add support for NetBSD 3.0.
3281         * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
3282         f_fstypename.
3283         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
3284         has a field f_fstypename.
3285         This undoes the 2006-08-15 to src/stat.c.
3287 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
3289         Copyright notice fixes.
3291         * COPYING: Upgrade to latest version from FSF.
3293         * src/uname.c: Use (C) in copyright notice.
3295         * .vg-suppressions: Add copyright notice.
3296         * ChangeLog: Likewise.
3297         * ChangeLog-2005: Likewise.
3298         * Makefile.am: Likewise.
3299         * NEWS: Likewise.
3300         * README: Likewise.
3301         * README-valgrind: Likewise.
3302         * TODO: Likewise.
3303         * announce-gen: Likewise.
3304         * man/Makefile.am: Likewise.
3305         * man/chmod.x: Likewise.
3306         * man/chown.x: Likewise.
3307         * man/df.x: Likewise.
3308         * man/du.x: Likewise.
3309         * man/rm.x: Likewise.
3310         * src/dircolors.hin: Likewise.
3311         * src/du-tests: Likewise.
3312         * src/extract-magic: Likewise.
3313         * src/tac-pipe.c: Likewise.
3314         * src/wheel-gen.pl: Likewise.
3315         * tests/Coreutils.pm: Likewise.
3316         * tests/Makefile.am.in: Likewise.
3317         * tests/acl: Likewise.
3318         * tests/envvar-check: Likewise.
3319         * tests/expensive: Likewise.
3320         * tests/group-names: Likewise.
3321         * tests/help-version: Likewise.
3322         * tests/mk-script: Likewise.
3323         * tests/priv-check: Likewise.
3324         * tests/rwx-to-mode: Likewise.
3325         * tests/sample-test: Likewise.
3326         * tests/setgid-check: Likewise.
3327         * tests/chgrp/basic: Likewise.
3328         * tests/chgrp/deref: Likewise.
3329         * tests/chgrp/no-x: Likewise.
3330         * tests/chgrp/posix-H: Likewise.
3331         * tests/chgrp/recurse: Likewise.
3332         * tests/chmod/c-option: Likewise.
3333         * tests/chmod/equal-x: Likewise.
3334         * tests/chmod/equals: Likewise.
3335         * tests/chmod/no-x: Likewise.
3336         * tests/chmod/octal: Likewise.
3337         * tests/chmod/setgid: Likewise.
3338         * tests/chmod/umask-x: Likewise.
3339         * tests/chmod/usage: Likewise.
3340         * tests/chown/basic: Likewise.
3341         * tests/chown/deref: Likewise.
3342         * tests/chown/separator: Likewise.
3343         * tests/cp/Makefile.am: Likewise.
3344         * tests/cp/acl: Likewise.
3345         * tests/cp/backup-1: Likewise.
3346         * tests/cp/backup-is-src: Likewise.
3347         * tests/cp/cp-HL: Likewise.
3348         * tests/cp/cp-deref: Likewise.
3349         * tests/cp/cp-mv-backup: Likewise.
3350         * tests/cp/cp-parents: Likewise.
3351         * tests/cp/deref-slink: Likewise.
3352         * tests/cp/dir-rm-dest: Likewise.
3353         * tests/cp/dir-slash: Likewise.
3354         * tests/cp/dir-vs-file: Likewise.
3355         * tests/cp/fail-perm: Likewise.
3356         * tests/cp/into-self: Likewise.
3357         * tests/cp/link: Likewise.
3358         * tests/cp/link-no-deref: Likewise.
3359         * tests/cp/link-preserve: Likewise.
3360         * tests/cp/no-deref-link1: Likewise.
3361         * tests/cp/no-deref-link2: Likewise.
3362         * tests/cp/no-deref-link3: Likewise.
3363         * tests/cp/perm: Likewise.
3364         * tests/cp/preserve-2: Likewise.
3365         * tests/cp/r-vs-symlink: Likewise.
3366         * tests/cp/same-file: Likewise.
3367         * tests/cp/slink-2-slink: Likewise.
3368         * tests/cp/special-bits: Likewise.
3369         * tests/cp/symlink-slash: Likewise.
3370         * tests/cut/Makefile.am: Likewise.
3371         * tests/cut/Test.pm: Likewise.
3372         * tests/dd/misc: Likewise.
3373         * tests/dd/not-rewound: Likewise.
3374         * tests/dd/skip-seek: Likewise.
3375         * tests/dd/skip-seek2: Likewise.
3376         * tests/dd/unblock-sync: Likewise.
3377         * tests/dircolors/simple: Likewise.
3378         * tests/du/2g: Likewise.
3379         * tests/du/8gb: Likewise.
3380         * tests/du/Makefile.am: Likewise.
3381         * tests/du/basic: Likewise.
3382         * tests/du/deref: Likewise.
3383         * tests/du/deref-args: Likewise.
3384         * tests/du/exclude: Likewise.
3385         * tests/du/fd-leak: Likewise.
3386         * tests/du/files0-from: Likewise.
3387         * tests/du/hard-link: Likewise.
3388         * tests/du/inaccessible-cwd: Likewise.
3389         * tests/du/long-from-unreadable: Likewise.
3390         * tests/du/long-sloop: Likewise.
3391         * tests/du/no-deref: Likewise.
3392         * tests/du/no-x: Likewise.
3393         * tests/du/restore-wd: Likewise.
3394         * tests/du/slash: Likewise.
3395         * tests/du/slink: Likewise.
3396         * tests/du/trailing-slash: Likewise.
3397         * tests/du/two-args: Likewise.
3398         * tests/expr/basic: Likewise.
3399         * tests/factor/basic: Likewise.
3400         * tests/fmt/basic: Likewise.
3401         * tests/fmt/long-line: Likewise.
3402         * tests/general/Makefile.am: Likewise.
3403         * tests/general/atgeneral.m4: Likewise.
3404         * tests/general/dd.at: Likewise.
3405         * tests/head/Makefile.am: Likewise.
3406         * tests/head/Test.pm: Likewise.
3407         * tests/install/basic-1: Likewise.
3408         * tests/install/create-leading: Likewise.
3409         * tests/install/d-slashdot: Likewise.
3410         * tests/install/trap: Likewise.
3411         * tests/join/Makefile.am: Likewise.
3412         * tests/join/Test.pm: Likewise.
3413         * tests/ln/backup-1: Likewise.
3414         * tests/ln/misc: Likewise.
3415         * tests/ln/sf-1: Likewise.
3416         * tests/ln/target-1: Likewise.
3417         * tests/ls/Makefile.am: Likewise.
3418         * tests/ls/Test.pm: Likewise.
3419         * tests/ls/dangle: Likewise.
3420         * tests/ls/dired: Likewise.
3421         * tests/ls/file-type: Likewise.
3422         * tests/ls/follow-slink: Likewise.
3423         * tests/ls/infloop: Likewise.
3424         * tests/ls/inode: Likewise.
3425         * tests/ls/m-option: Likewise.
3426         * tests/ls/no-arg: Likewise.
3427         * tests/ls/recursive: Likewise.
3428         * tests/ls/rt-1: Likewise.
3429         * tests/ls/stat-dtype: Likewise.
3430         * tests/ls/stat-failed: Likewise.
3431         * tests/ls/stat-vs-dirent: Likewise.
3432         * tests/ls/symlink-slash: Likewise.
3433         * tests/ls/time-1: Likewise.
3434         * tests/ls-2/tests: Likewise.
3435         * tests/md5sum/basic-1: Likewise.
3436         * tests/md5sum/newline-1: Likewise.
3437         * tests/misc/Makefile.am: Likewise.
3438         * tests/misc/base64: Likewise.
3439         * tests/misc/basename: Likewise.
3440         * tests/misc/cat-proc: Likewise.
3441         * tests/misc/close-stdout: Likewise.
3442         * tests/misc/csplit: Likewise.
3443         * tests/misc/date: Likewise.
3444         * tests/misc/date-sec: Likewise.
3445         * tests/misc/df: Likewise.
3446         * tests/misc/dirname: Likewise.
3447         * tests/misc/expand: Likewise.
3448         * tests/misc/false-status: Likewise.
3449         * tests/misc/fold: Likewise.
3450         * tests/misc/head-c: Likewise.
3451         * tests/misc/head-elide-tail: Likewise.
3452         * tests/misc/head-pos: Likewise.
3453         * tests/misc/mknod: Likewise.
3454         * tests/misc/nice: Likewise.
3455         * tests/misc/nl: Likewise.
3456         * tests/misc/nohup: Likewise.
3457         * tests/misc/paste-no-nl: Likewise.
3458         * tests/misc/pathchk1: Likewise.
3459         * tests/misc/printf: Likewise.
3460         * tests/misc/printf-hex: Likewise.
3461         * tests/misc/pwd-long: Likewise.
3462         * tests/misc/sha224sum: Likewise.
3463         * tests/misc/sha256sum: Likewise.
3464         * tests/misc/sha384sum: Likewise.
3465         * tests/misc/sha512sum: Likewise.
3466         * tests/misc/shuf: Likewise.
3467         * tests/misc/sort-merge: Likewise.
3468         * tests/misc/sort-rand: Likewise.
3469         * tests/misc/split-a: Likewise.
3470         * tests/misc/split-fail: Likewise.
3471         * tests/misc/split-l: Likewise.
3472         * tests/misc/stat-fmt: Likewise.
3473         * tests/misc/stat-printf: Likewise.
3474         * tests/misc/tac-continue: Likewise.
3475         * tests/misc/test-diag: Likewise.
3476         * tests/misc/tty-eof: Likewise.
3477         * tests/misc/wc-files0: Likewise.
3478         * tests/misc/wc-files0-from: Likewise.
3479         * tests/mkdir/concurrent-1: Likewise.
3480         * tests/mkdir/p-1: Likewise.
3481         * tests/mkdir/p-2: Likewise.
3482         * tests/mkdir/p-3: Likewise.
3483         * tests/mkdir/p-slashdot: Likewise.
3484         * tests/mkdir/p-thru-slink: Likewise.
3485         * tests/mkdir/parents: Likewise.
3486         * tests/mkdir/perm: Likewise.
3487         * tests/mkdir/special-1: Likewise.
3488         * tests/mkdir/t-slash: Likewise.
3489         * tests/mkdir/writable-under-readonly: Likewise.
3490         * tests/mv/Makefile.am: Likewise.
3491         * tests/mv/acl: Likewise.
3492         * tests/mv/atomic: Likewise.
3493         * tests/mv/backup-is-src: Likewise.
3494         * tests/mv/childproof: Likewise.
3495         * tests/mv/diag: Likewise.
3496         * tests/mv/dir-file: Likewise.
3497         * tests/mv/dir2dir: Likewise.
3498         * tests/mv/dup-source: Likewise.
3499         * tests/mv/force: Likewise.
3500         * tests/mv/hard-2: Likewise.
3501         * tests/mv/hard-3: Likewise.
3502         * tests/mv/hard-4: Likewise.
3503         * tests/mv/hard-link-1: Likewise.
3504         * tests/mv/i-1: Likewise.
3505         * tests/mv/i-2: Likewise.
3506         * tests/mv/i-3: Likewise.
3507         * tests/mv/i-4: Likewise.
3508         * tests/mv/i-link-no: Likewise.
3509         * tests/mv/into-self: Likewise.
3510         * tests/mv/into-self-2: Likewise.
3511         * tests/mv/into-self-3: Likewise.
3512         * tests/mv/into-self-4: Likewise.
3513         * tests/mv/leak-fd: Likewise.
3514         * tests/mv/mv-special-1: Likewise.
3515         * tests/mv/no-target-dir: Likewise.
3516         * tests/mv/part-fail: Likewise.
3517         * tests/mv/part-hardlink: Likewise.
3518         * tests/mv/part-rename: Likewise.
3519         * tests/mv/part-symlink: Likewise.
3520         * tests/mv/partition-perm: Likewise.
3521         * tests/mv/perm-1: Likewise.
3522         * tests/mv/reply-no: Likewise.
3523         * tests/mv/setup: Likewise.
3524         * tests/mv/to-symlink: Likewise.
3525         * tests/mv/trailing-slash: Likewise.
3526         * tests/mv/update: Likewise.
3527         * tests/mv/vfat: Likewise.
3528         * tests/od/od-N: Likewise.
3529         * tests/od/x8: Likewise.
3530         * tests/pr/Makefile.am: Likewise.
3531         * tests/pr/Test.pm: Likewise.
3532         * tests/readlink/can-e: Likewise.
3533         * tests/readlink/can-f: Likewise.
3534         * tests/readlink/can-m: Likewise.
3535         * tests/readlink/rl-1: Likewise.
3536         * tests/rm/Makefile.am: Likewise.
3537         * tests/rm/cycle: Likewise.
3538         * tests/rm/dangling-symlink: Likewise.
3539         * tests/rm/deep-1: Likewise.
3540         * tests/rm/dir-no-w: Likewise.
3541         * tests/rm/dir-nonrecur: Likewise.
3542         * tests/rm/dot-rel: Likewise.
3543         * tests/rm/empty-inacc: Likewise.
3544         * tests/rm/empty-name: Likewise.
3545         * tests/rm/f-1: Likewise.
3546         * tests/rm/fail-2eperm: Likewise.
3547         * tests/rm/fail-eperm: Likewise.
3548         * tests/rm/hash: Likewise.
3549         * tests/rm/i-1: Likewise.
3550         * tests/rm/i-no-r: Likewise.
3551         * tests/rm/inaccessible: Likewise.
3552         * tests/rm/interactive-always: Likewise.
3553         * tests/rm/interactive-once: Likewise.
3554         * tests/rm/ir-1: Likewise.
3555         * tests/rm/isatty: Likewise.
3556         * tests/rm/no-give-up: Likewise.
3557         * tests/rm/r-1: Likewise.
3558         * tests/rm/r-2: Likewise.
3559         * tests/rm/r-3: Likewise.
3560         * tests/rm/rm1: Likewise.
3561         * tests/rm/rm2: Likewise.
3562         * tests/rm/rm3: Likewise.
3563         * tests/rm/rm4: Likewise.
3564         * tests/rm/rm5: Likewise.
3565         * tests/rm/sunos-1: Likewise.
3566         * tests/rm/unread2: Likewise.
3567         * tests/rm/unread3: Likewise.
3568         * tests/rm/unreadable: Likewise.
3569         * tests/rmdir/fail-perm: Likewise.
3570         * tests/rmdir/ignore: Likewise.
3571         * tests/rmdir/t-slash: Likewise.
3572         * tests/seq/basic: Likewise.
3573         * tests/sha1sum/basic-1: Likewise.
3574         * tests/sha1sum/sample-vec: Likewise.
3575         * tests/shred/exact: Likewise.
3576         * tests/shred/remove: Likewise.
3577         * tests/sort/Makefile.am: Likewise.
3578         * tests/sort/Test.pm: Likewise.
3579         * tests/sort-time/Makefile: Likewise.
3580         * tests/sort-time/README: Likewise.
3581         * tests/sort-time/rand-gen: Likewise.
3582         * tests/stty/basic-1: Likewise.
3583         * tests/stty/row-col-1: Likewise.
3584         * tests/sum/basic-1: Likewise.
3585         * tests/sum/sysv: Likewise.
3586         * tests/tac/Makefile.am: Likewise.
3587         * tests/tac/Test.pm: Likewise.
3588         * tests/tail/Makefile.am: Likewise.
3589         * tests/tail/Test.pm: Likewise.
3590         * tests/tail-2/Makefile.am: Likewise.
3591         * tests/tail-2/append-only: Likewise.
3592         * tests/tail-2/assert: Likewise.
3593         * tests/tail-2/assert-2: Likewise.
3594         * tests/tail-2/big-4gb: Likewise.
3595         * tests/tail-2/fflush: Likewise.
3596         * tests/tail-2/infloop-1: Likewise.
3597         * tests/tail-2/proc-ksyms: Likewise.
3598         * tests/tail-2/start-middle: Likewise.
3599         * tests/tail-2/tail-n0f: Likewise.
3600         * tests/tee/basic: Likewise.
3601         * tests/tee/dash: Likewise.
3602         * tests/test/Makefile.am: Likewise.
3603         * tests/test/Test.pm: Likewise.
3604         * tests/touch/Makefile.am: Likewise.
3605         * tests/touch/dangling-symlink: Likewise.
3606         * tests/touch/empty-file: Likewise.
3607         * tests/touch/fail-diag: Likewise.
3608         * tests/touch/fifo: Likewise.
3609         * tests/touch/no-create-missing: Likewise.
3610         * tests/touch/no-rights: Likewise.
3611         * tests/touch/not-owner: Likewise.
3612         * tests/touch/obsolescent: Likewise.
3613         * tests/touch/read-only: Likewise.
3614         * tests/touch/relative: Likewise.
3615         * tests/tr/Makefile.am: Likewise.
3616         * tests/tr/Test.pm: Likewise.
3617         * tests/tr/failures: Likewise.
3618         * tests/tsort/basic-1: Likewise.
3619         * tests/unexpand/basic-1: Likewise.
3620         * tests/uniq/Makefile.am: Likewise.
3621         * tests/uniq/Test.pm: Likewise.
3622         * tests/wc/Makefile.am: Likewise.
3623         * tests/wc/Test.pm: Likewise.
3625 2006-08-17  Jim Meyering  <jim@meyering.net>
3627         ls -CF would misalign columns in some cases.
3628         * src/ls.c (get_type_indicator): New function.  extracted from...
3629         (print_type_indicator): ...here.  Use it.
3630         (length_of_file_name_and_frills): Use it here, too, rather than
3631         assuming stat.st_mode is valid.
3632         Reported by Andreas Schwab, here:
3633         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
3634         See the test for this above. FYI, I did ls -CF /proc and visually
3635         inspected the result.
3637         * src/copy.c (copy_internal, same_file_ok): Adjust comments not
3638         to mention the now-removed cp_options.xstat member.
3640         * Makefile.maint (patch-check): Adapt to work now that the patch
3641         modifies more than one file in src/.
3643         With this patch, permit building with Solaris cc on Solaris 7.
3644         * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
3645         This integrates patches from Bruno Haible.
3647 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
3649         Fix some problems reported by Bruno Haible.
3650         * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
3651         Skip this test if "chmod g+s d" silently does nothing.
3652         * tests/ls-2/tests: Skip this test suite if we can't set up files
3653         properly for the setuid-etc test.  This simplifies some of the
3654         hacks we were using to work around porting problems.
3656 2006-08-16  Jim Meyering  <jim@meyering.net>
3658         * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
3659         * tests/cp/acl: Instead, skip the test if either setfacl
3660         or getfacl fails.
3661         Reported by Michael Stone.
3663 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
3665         * tests/lang-default (LC_ALL): Set to "C", so we get
3666         English-language diagnostics.  Unset the other variables; it
3667         should be portable to use 'unset' for this stuff nowadays.
3668         Problem reported by Bruno Haible.  Using "C" reverses the
3669         2000-10-22 change to fileutils in this area.
3671         Fix bugs when printing plurals of numbers that are not
3672         unsigned long int values.
3673         * src/system.h (select_plural): New function.
3674         * src/md5sum.c (digest_check): Use select_plural to avoid bug.
3675         * src/uptime.c (print_uptime): Likewise.
3676         * src/dd.c (print_stats): Likewise.  Also, don't use ngettext to
3677         print a floating point number, as reducing to 0 or 1 doesn't work
3678         for some languages.  Instead, just use "s" for seconds since it
3679         doesn't need a plural form.
3681 2006-08-16  Bruno Haible  <bruno@clisp.org>
3683         Old versions of gzip would write --help output to stderr, and it
3684         would be annoying to see that in the output of every "make" command.
3685         * Makefile.maint (gzip_rsyncable): Throw away stderr output of
3686         "gzip --help".
3688 2006-08-16  Andreas Schwab  <schwab@suse.de>
3690         * tests/cp/acl: Don't use non-portable == operator for test.
3692 2006-08-16  Jim Meyering  <jim@meyering.net>
3694         * tests/ls/stat-dtype: Use stat to test file system type, rather
3695         than df -T, in case /etc/mtab lies.  Reported by Michael Stone.
3697 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3699         * NEWS: Mention that df exits with nonzero status if it generates
3700         no output.  This change was in 6.0 but inadvertently unmentioned.
3701         * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
3702         a boolean.
3703         (show_dev): Don't set it until we actually output something.
3704         Print the header if this is the first output.
3705         (main): Don't print a header, as that is now show_dev's job.
3706         * tests/misc/Makefile.am (TESTS): Add df.
3707         * tests/misc/df: New file.
3709 2006-08-15  Eric Blake  <ebb9@byu.net>
3711         * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
3712         statvfs.f_type not present.  See
3713         <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
3715 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3717         * src/dd.c (print_stats): Don't substitute "1" for number, as this
3718         causes confusion for the Hungarian translators.  Problem reported
3719         by Egmont Koblinger here:
3720         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
3722 2006-08-15  Jim Meyering  <jim@meyering.net>
3724         * .x-sc_require_config_h: Add lib/at-func.c.
3726         * NEWS: Add a line for 6.1-cvs.
3727         * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
3729 2006-08-15  Jim Meyering  <jim@meyering.net>
3731         * Version 6.0.
3732         * NEWS: Record the 6.0 release date.
3733         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3735         * TODO: Add an item (convert to use gnulib-tool), add to the plan
3736         for id-vs-getgrouplist, and remove a few completed items.
3738         * Makefile.maint (alpha beta major): Fix syntax error.
3740 2006-08-13  Jim Meyering  <jim@meyering.net>
3742         * src/shred.c (usage): Don't indent the second line of an item.
3743         Otherwise, help2man would misformat the output.
3744         Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
3746 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
3748         * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
3749         Suggested by Eric Blake to avoid problems like
3750         <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
3752 2006-08-11  Jim Meyering  <jim@meyering.net>
3754         * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
3755         failure that this test checks for (stat/dirent inode mismatch at
3756         a mount point), so continue to give a diagnostic about the failure,
3757         but don't actually count it as a failure.
3759 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3761         * ABOUT-NLS: Update from gettext 0.15.
3762         * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
3764         * src/csplit.c (struct control): Remove fastmap member.
3765         (extract_regexp): Allocate fastmap separately, since otherwise
3766         it might move due to a realloc.  This fixes a bug that led
3767         to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
3769 2006-08-10  Jim Meyering  <jim@meyering.net>
3771         * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
3772         reports "Linux".  This avoids a failure on Solaris 10's tmpfs.
3773         Redirect both stdout and stderr of df invocations.
3775         * src/dircolors.hin: Add a TERM directive for each of the following:
3776         ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
3777         rxvt-cygwin-native, screen.linux, xterm-256color.
3778         Sort the TERM directives.
3779         From Mike Frysinger.
3781 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3783         * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
3784         See Debian bug 373736.
3786         * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
3787         bug 317503.
3789         * src/.cvsignore: Add shuf.
3791         * Makefile.maint: Remove the po-update procedure; it doesn't
3792         work with the new repository on http://www.iro.umontreal.ca/.
3793         For now I guess we'll have to fix things by hand.
3794         (do-po-update, po-update): Remove.  All references removed.
3796         * src/shuf.c (next_line): New function.
3797         (read_input): Use it, to avoid relying on GCC-specific behavior
3798         with void * arithmetic.  Problem reported by Bob Proulx.
3799         * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
3800         to detect this sort of problem automatically in the future.
3802 2006-08-09  Jim Meyering  <jim@meyering.net>
3804         * src/ls.c: Add a compile-time check to ensure that filetype
3805         and filetype_letter have the same number of elements.
3807         * tests/misc/sort-rand: Remove use of --seed=S.
3809 2006-08-08  Paul Eggert  <eggert@cs.ucla.edu>
3811         Add a command 'shuf', and modify shred and sort to use the new
3812         random number generator library of 'shuf'.
3814         * AUTHORS: Add shuf.
3815         * README: Likewise.
3816         * NEWS: Likewise.  Mention new --random-source option for shred
3817         and sort.  Move "sort +1 -2" notice to the appropriate section,
3818         and clarify its role with respect to POSIXLY_CORRECT.
3819         * man/.cvsignore: Add shuf.1.
3820         * man/Makefile.am (dist_man_MANS): Add shuf.1.
3821         (shuf.1): New dependency.
3822         * man/shuf.x: New file.
3823         * src/Makefile.am (bin_PROGRAMS): Add shuf.
3824         (EXTRA_DIST): Remove rand-isaac.c.
3825         (shuf_LDADD): New macro.
3826         * src/rand-isaac.c: Remove, moving most of its contents to
3827         lib/rand-isaac.c.
3828         * src/shuf.c: New file.
3829         * src/shred.c: Use new random-number interface rather than rand-isaac.c.
3830         Don't include rand-isaac.c; include randint.h and randread.h instead.
3831         (RANDOM_SOURCE_OPTION): New enum.
3832         (long_opts, usage, main): New option --random-source.
3833         * src/sort.c: Likewise.
3834         * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
3835         All callers changed to use randint interface.
3836         (fillrand): Remove.  All callers changed to use randread interface.
3837         (dopass): Remove dependency on ISAAC buffer size.
3838         (genpattern): Don't wipe the random state here.
3839         (randint_source): New static var.
3840         (clear_random_data): New function.
3841         (main): Allocate random source, and arrange to wipe it on exit.
3842         * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
3843         (longopts, usage, main): Remove undocumented --seed option;
3844         it's now replaced by --random-source.
3845         (rand_state, get_hash): Remove.
3846         (randread_source): New static var.
3847         (random_state, cmp_hashes, compare_random): New functions; they guarantee
3848         no collisions in the random hash function.
3849         (keycompare): Use compare_random for -R; don't fall back on comparing
3850         via memcoll, since compare_random does the right thing.
3851         * tests/misc/Makefile.am (TESTS): Add shuf.
3852         * tests/misc/shuf: New file.
3854 2006-07-29  Paul Eggert  <eggert@cs.ucla.edu>
3856         * src/copy.c (set_author): Preserve the st_author field via the
3857         file descriptor dest_desc.
3859 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
3861         * NEWS: chmod now preserves setuid and setgid bits on directories
3862         if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
3864         Fix test case problems if working directory is setgid,
3865         reported by Bob Proulx.
3866         * tests/cp/fail-perm: Use symbolic mode so that we clear
3867         setgid bit more reliably on directories.
3868         * tests/mkdir/special-1 (set_mode_string): Likewise.
3870 2006-07-27  Jim Meyering  <jim@meyering.net>
3872         * src/chgrp.c (usage): Use correct grammar in description of the
3873         --reference option
3874         * src/chown.c (usage): Likewise.
3876 2006-07-26  Thomas Schwinge  <tschwinge@gnu.org>  (tiny change)
3878         * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
3879         Correctly access SRC_SB's element ST_AUTHOR.
3881 2006-07-26  Jim Meyering  <jim@meyering.net>
3883         * tests/ls/stat-failed: Adapt to match new expected output.
3884         From Paul Eggert.
3886         * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
3887         than having the code test for all of the other types first.
3888         Hoist the set-uid/gid-testing code "up" into this new block.
3889         Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
3890         C_ORPHAN, not as C_FILE.
3892 2006-07-26  Jim Meyering  <jim@meyering.net>
3894         Checking in a change from Paul.
3896         2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
3898         * src/ls.c (DT_INIT): Remove.  All uses removed.
3899         (enum filetype): Use an ordinary enum rather than trying to keep
3900         the values in sync with DT_FIFO etc.  That way, we don't have
3901         to make special assumptions about them.  All uses changed.
3902         (whiteout): New constant member of enum filetype.
3903         (filetype_letter): New constant, for use with enum filetype.
3904         (FILETYPE_INDICATORS): New initializer list.
3905         (print_dir): Add case for DT_WHT.
3906         (gobble_file): If stat fails, don't discard information from
3907         readdir; instead, preserve it so it can be printed.
3908         (print_long_format): Fall back on readdir result if stat info
3909         is not available.  Use "?" to denote each unknown mode char,
3910         instead of an overall "?", since we now know some of the mode
3911         typically.
3912         (print_type_indicator): Now that MODE isn't necessarily
3913         useful, guard all uses.
3914         Now that two blocks in the type-checking tree can set "type = C_FILE",
3915         move the suffix-handling code out and down.
3917 2006-07-26  Jim Meyering  <jim@meyering.net>
3919         Prepare for the above change.
3920         * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
3921         and adjust uses.  From a patch by Paul Eggert.
3923 2006-07-26  Jim Meyering  <jim@meyering.net>
3925         * src/ls.c: Correct indentation/formatting in a few places.
3927 2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
3929         * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
3930         Problem report and fix from Bob Proulx.
3931         * NEWS: Clarify the "chmod 0500" news, and correct the vague
3932         statements about compatibility with BSD.
3934 2006-07-25  Jim Meyering  <jim@meyering.net>
3936         * src/ls.c (gobble_file): When handling a stat-failed entry,
3937         print the entry name not the absolute_name -- to be consistent
3938         with the usual case.
3939         * tests/ls/stat-failed: Update accordingly.
3941         * src/ls.c: Add parens around the new uses of ?: ternary operator.
3943         * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
3944         symlinks.
3946         Get --dired offsets right when handling stat-failed entries.
3947         * src/ls.c (print_long_format): Be careful to increment P by the
3948         appropriate amount, even when inode_number_width and nlink_width
3949         are zero.
3950         * tests/ls/stat-failed: Test for the above.
3952         * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
3953         have_acl member.  That would happen for a directory with both a
3954         non-stat'able entry and one with an ACL.
3956         * src/ls.c (gobble_file): Make it so failure to stat a
3957         non-command-line file provokes an exit status of 1, not 0.
3958         Say "cannot access" rather than "cannot stat".
3959         * tests/ls/stat-failed: New file/test, for the above.
3960         * tests/ls/Makefile.am (TESTS): Add stat-failed.
3961         * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
3962         of "cannot access " to diagnostic.
3964         * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
3966         * src/ls.c [enum filetype] (command_line): Remove member.  Not needed.
3967         Replace all occurrences of "type == command_line" with the
3968         equivalent, "command_line_arg".
3970         * src/ls.c: Apply the stat-failed parts of Red Hat's
3971         coreutils-selinux.patch.  From Ulrich Drepper.
3972         This makes it so files not mentioned on the command line (e.g.,
3973         names read from a directory that *is* mentioned on the command
3974         line) for which stat fails are still listed.  With --color,
3975         such files are colored just like ORPHANs (aka dangling symlinks).
3977         * src/df.c (n_valid_args): Declare global to be static.
3979 2006-07-24  Jim Meyering  <jim@meyering.net>
3981         * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
3982         system lacks d_type support.
3984 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3986         * man/chmod.x: Update to reflect recent changes to coreutils.texi.
3988 2006-07-21  Jim Meyering  <jim@meyering.net>
3990         * src/su.c (usage): Correct typo in --help output: s/commmand/command/
3991         Reported by Tim Waugh.
3992         Also remove the comment duplicating much of --help output.
3994         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
3995         name so the list remains alphabetized.
3997         Fix another bug: ls --indicator-style=file-type would call
3998         stat for a symlink, even though it wasn't always needed.
3999         In some cases, that unnecessary stat would cause ls to fail.
4000         * src/ls.c (gobble_file): Don't treat symlinks specially (in
4001         requiring a stat syscall).  Remove the offending exclusion.
4003         * NEWS: Mention the fix.
4005         * tests/ls/stat-dtype: New file/test, for the above fix.
4006         Also exercises the new df feature, below.
4008         * src/df.c (main): Fail and don't print the headers if no
4009         file system is processed.  This makes it easy to test whether
4010         a specified directory is on a file system of a given type or types.
4011         Otherwise, applications would have had to parse df's output.
4012         E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
4014         Fix a bug: ls --file-type worked like --indicator-style=slash,
4015         rather than like --indicator-style=file-type.
4016         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
4017         (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
4018         not to 'p'.
4019         (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
4020         * NEWS: Mention the fix.
4021         * tests/ls-2/tests (file-type): New test, for the above fix.
4023 2006-07-19  Jim Meyering  <jim@meyering.net>
4025         * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
4027         * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
4029 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4031         * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
4032         of directories alone unless you specify them explicitly.
4033         install and mkdir now implement X correctly.
4034         install now creates parent directories with mode 755, without
4035         changing their owner or group.
4036         * src/chmod.c (process_file): Adjust to mode_adjust API change.
4037         * src/install.c: Include mkancesdirs.h.
4038         (announce_mkdir, make_ancestor): New functions.
4039         (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
4040         (mode): Use it.
4041         (dir_mode, dir_mode_bits): New vars.
4042         (main): Set dir modes separately from nondir, so that the X
4043         op of -m works correctly.
4044         (main): Remove cwd_errno cruft, since make_dir_parents no longer
4045         affects cwd.  Adjust to new make_dir_parents API.
4046         (install_file_in_file_parents): 2nd arg is now char *, not char
4047         const *.  Use mkancesdirs instead of rolling our own code.
4048         (change_attributes): Don't worry about AFS, since that kludge
4049         should not be needed any more.
4050         * src/mkdir.c (struct mkdir_options): New struct.
4051         (announce_mkdir, make_ancestor): New functions.
4052         (main): Use them.  Adjust to mode_adjust API change.  Stick with
4053         umask 0.  Use make_dir_parents for all the work.
4054         * src/mkfifo.c (main): Adjust to new mode_adjust API.
4055         * src/mknod.c (main): Likewise.
4056         * tests/chmod/setgid: Do the setgid test instead of bailing.
4057         * tests/mkdir/p-3: Remove re_protect case that no longer applies.
4058         GNU chmod now behaves like other versions of chmod.
4059         * tests/mkdir/perm: Add a test for the X bug.
4061 2006-07-14  Paul Eggert  <eggert@cs.ucla.edu>
4063         * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
4064         This doesn't fix any bugs, since OUT always equals stdout, but it
4065         makes the code easier to understand.
4067 2006-07-14  Jim Meyering  <jim@meyering.net>
4069         * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
4070         rather than open-coding it.  Now supports mercurial, too.
4071         * .hgignore: New file.
4072         * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
4073         all generated files, including ones like configure and po/*.po
4074         that are currently version-controlled in cvs.
4076         * Makefile.am (EXTRA_DIST): Add a few more .??* files.
4077         They've been in CVS, just haven't been distributed before this.
4078         Distribute ChangeLog-2005, too.
4079         (MAINTAINERCLEANFILES): Add THANKS-to-translators.
4081 2006-07-11  Paul Eggert  <eggert@cs.ucla.edu>
4083         * src/system.h: Assume <dirent.h> exists, since gnulib assumes
4084         this now as well.
4086 2006-07-09  Jim Meyering  <jim@meyering.net>
4088         * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
4089         That happens with Linux/tmpfs.
4090         * tests/mv/Makefile.am (TESTS): Add dir2dir.
4092 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4094         Adjust to recent updates from gnulib.
4095         * src/dd.c (apply_translations): Use toupper rather than
4096         islower followed by toupper; it's simpler and typically
4097         faster now that we assume at least C89 semantics.  Similarly
4098         for tolower.
4099         * src/sort.c (inittables): Likewise.
4100         * src/expand.c (expand): Don't assume that isprint etc. return
4101         booleans (needed for pre-C99 hosts).
4102         * src/fmt.c (check_punctuation): Likewise.
4103         * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
4104         * src/tr.c (is_char_class_member): Likewise.
4105         * src/unexpand.c (unexpand): Likewise.
4106         * src/join.c (is_blank): Remove; no longer needed.  All uses
4107         replaced by isblank (to_uchar (...)).
4108         * src/pinky.c (create_fullname): Don't assume char is unsigned.
4109         * src/printf.c (print_esc): Likewise.
4110         * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
4111         (copy_unescaped_string): Likewise.
4112         * src/stat.c (print_it): Likewise.
4113         * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
4114         convenience on GNU systems.  All uses changed.  Don't bother
4115         looking for any dirent.h substitute other than ndir.h.
4116         (D_INO): Remove unnecessary parentheses.
4117         (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
4118         (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
4119         (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove.  All uses changed
4120         to ctype.h equivalents.
4121         (isblank): Renamed from ISBLANK.  Check for HAVE_DECL_ISBLANK too.
4122         All uses changed.
4124 2006-07-08  Jim Meyering  <jim@meyering.net>
4126         * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
4128         * Makefile.maint (sc_the_the): New rule.
4130         * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
4131         * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
4132         in a comment.
4134 2006-07-07  Jim Meyering  <jim@meyering.net>
4136         * NEWS: Mention that mv can now remove an empty destination directory,
4137         and give an example.  Prompted by a report from Florent Bayle.
4139 2006-07-05  Jim Meyering  <jim@meyering.net>
4141         * src/ls.c (usage): Correct the description of -G: it is useful
4142         only in a long listing.  Reported by Martin Pool in
4143         <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
4145         * man/chmod.x: Correct the description of the sticky bit.  Reported
4146         by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
4148         * src/copy.c (copy_internal): Don't work around old NFS clients like
4149         SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
4150         ENOTEMPTY upon failed rename.  Otherwise, we risk misinterpreting
4151         a banal failure as a recursive move-into-self failure.
4152         Reported by Florent Bayle in <http://bugs.debian.org/376749>.
4154         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
4156 2006-07-03  Jim Meyering  <jim@meyering.net>
4158         Plug another unusual leak.
4159         (AD_mark_helper): Free malloc'd filename if hash_insert says
4160         that string is already in the hash table.
4162         The dev/inode of the topmost directory in each hierarchy were not
4163         being recorded.
4164         * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
4165         (AD_push): Call it from here instead.
4167         Fix two small leaks.
4168         * src/remove.c (AD_stack_clear): New function.
4169         (rm_1): Use it.
4170         (AD_pop_and_chdir): Free *prev_dir just before longjmp.
4172         * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
4173         Add $VG_PATH_PREFIX as a prefix to $PATH
4175         * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
4176         * tests/Makefile.am (evar-check): Remove rule.
4177         (EXTRA_DIST): Remove .env-warn.
4178         * tests/.env-warn: Remove file.  No longer used.
4179         Suggestion from Eric Blake.
4181 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4183         * src/system.h: Include <stdint.h> unconditionally, since we
4184         now assume the stdint module.
4186 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4188         * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
4189         only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
4190         * src/tail.c (main): Implement this.
4191         * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
4192         (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
4194 2006-07-01  Jim Meyering  <jim@meyering.net>
4196         * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
4198         * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
4199         passes once again.
4201 2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4203         * NEWS: seq now uses long double internally rather than double.
4204         It now defaults to a minimal fixed point format if possible.
4205         It lets you use %a, %A, %E, %F, %G.
4206         * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
4207         * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
4208         (isfinite) [!defined isfinite]: New macro.
4209         (separator, terminator): Now points to const.
4210         (first, step, last): Remove.
4211         (usage): Update to match new behavior.
4212         (struct operand, operand): New type.
4213         (scan_arg): Renamed from scan_double_arg, since we no longer use double.
4214         All uses changed.
4215         Compute and return a value of type operand, not double.
4216         (long_double_format): Renamed from valid_format, and now returns a
4217         new format with an "L" added if needed, if the original format was
4218         valid.  Allow %a, %A, %E, %F, and %G formats.
4219         (print_numbers): Take numeric values as args rather than from globals.
4220         Print long double, not double.
4221         (get_width_format): Remove.
4222         (get_default_format): New function.
4223         (main): Implement new way of calculating default format.
4224         Don't worry about locale's representation of the decimal point, since
4225         the arguments are always processed in the C locale.
4226         * tests/seq/basic (neg-2): Adjust to new default format.
4227         (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
4228         implementation should do the right thing.
4230 2006-06-30  Jim Meyering  <jim@meyering.net>
4232         * tests/stty/basic-1: Work around an intermittent test failure
4233         on HP-UX 11.11.  Report and analysis from Bob Proulx.
4234         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
4236 2006-06-28  Paul Eggert  <eggert@cs.ucla.edu>
4238         * NEWS: Support obsolete usages like "sort +1 -2" even when
4239         conforming to POSIX 1003.1-2001, since this is a pure extension to
4240         POSIX.  Problem reported by Christian in:
4241         http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
4242         * src/sort.c (main): Implement this.
4244         * src/system.h (CLOSEDIR): Remove.  All uses changed to closedir.
4245         Autoconf 2.60 says this stuff was obsolete.
4247 2006-06-28  Jim Meyering  <jim@meyering.net>
4249         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
4251 2006-06-28  Bob Proulx  <bob@proulx.com>  (tiny change)
4253         * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
4254         (set -x when VERBOSE=yes) when stderr is redirected before stdout
4255         causing shell tracing of the stdout redirection to be written to
4256         the stderr file.  Avoid problem and test failure on HP-UX by
4257         redirecting stderr last.
4258         * tests/dd/unblock-sync: Order shell file redirections for
4259         stderr and stdout in the common style.
4260         tests/acl: Likewise.
4262 2006-06-27  Jim Meyering  <jim@meyering.net>
4264         * tests/misc/cat-proc: Try to avoid any spurious numeric
4265         differences in frequently-changing /proc/cpuinfo.
4266         Reported by Nelson Beebe.
4268 2006-06-26  Jim Meyering  <jim@meyering.net>
4270         Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
4271         fd_to_subdirp failure, not just when errno == EACCES.
4272         * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
4273         rmdir, here, even though rmdir may happen to be adequate.
4275         * NEWS: rm no longer fails to remove an empty, unreadable directory
4276         * src/remove.c (remove_cwd_entries): If we can't open a directory,
4277         and the failure is not being ignored, try to remove the directory
4278         with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
4279         Problem report and test case from Paul Eggert in
4280         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
4282         * tests/rm/empty-inacc: New test, for the above.
4284         Avoid a segfault for wc --files0=- < /dev/null.
4285         * src/wc.c (compute_number_width): Return right away if nfiles == 0.
4287 2006-06-25  Jim Meyering  <jim@meyering.net>
4289         * NEWS: wc accepts a new option --files0-from=FILE, where FILE
4290         contains a list of NUL-separated file names.
4292         * src/wc.c: Include "readtokens.h".
4293         (usage): Describe the new option, and adjust the `Usage':
4294         with this option, no FILE may be specified on the command line.
4295         (main): Handle the new option.
4296         * tests/misc/wc-files0: New tests, for the above.
4297         * tests/misc/wc-files0-from: Likewise.
4298         * tests/misc/Makefile.am (TESTS): Add wc-files0.
4300 2006-06-24  Jim Meyering  <jim@meyering.net>
4302         * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
4304 2006-06-22  Jim Meyering  <jim@meyering.net>
4306         * src/tee.c (tee_files): Rename from tee, to avoid conflict with
4307         the function in glibc's <fcntl.h>.  Reported by Andreas Schwab.
4309 2006-06-19  Jim Meyering  <jim@meyering.net>
4311         * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4312         so this check is not run as part of "make distcheck".
4314 2006-06-18  Bob Proulx  <bob@proulx.com>  (tiny change)
4316         * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
4318 2006-06-18  Jim Meyering  <jim@meyering.net>
4320         * tests/misc/pwd-long: Make error output a little clearer.
4322 2006-06-17  Jim Meyering  <jim@meyering.net>
4324         * tests/rm/inaccessible: Skip this test on systems without openat
4325         support.  Reported by Bob Proulx.
4327 2006-06-15  Bob Proulx  <bob@proulx.com>  (tiny change)
4329         * tests/misc/mknod: Improve permission checks to handle
4330         running mkdir test in set-gid directories.
4332 2006-06-14  Jim Meyering  <jim@meyering.net>
4334         * tests/du/basic: Revamp not to hard-code file system block sizes.
4336 2006-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4338         * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
4339         files0-from test.
4341 2006-06-11  Jim Meyering  <jim@meyering.net>
4343         * .gitignore: New file.
4344         * Makefile.am (EXTRA_DIST): Add .gitignore.
4346         Setting TIME_STYLE=long-iso in the environment would make the
4347         cp/same-file test fail.
4348         * tests/envvar-check (vars): Add TIME_STYLE to the list.
4349         * tests/cp/same-file: Revert last change.
4350         Source the envvar-check script, to ensure that TIME_STYLE
4351         settings don't affect these tests.
4353 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
4355         * tests/cp/same-file: Execute 'ls' in the C locale, so that it
4356         uses POSIX time stamp formats.  Problem reported by John Nixon in
4357         <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
4359 2006-06-10  Jim Meyering  <jim@meyering.net>
4361         * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
4363         Require a "Version N.M" line at the top of the ChangeLog
4364         file only when making the actual release, not when running
4365         "make distcheck".
4366         * Makefile.maint (maintainer-distcheck): Don't depend on
4367         changelog-check.
4368         (alpha beta major): Depend on it here, instead.
4370 2006-06-08  Jim Meyering  <jim@meyering.net>
4372         Ensure that cat works with any of the options, -A -v -e -E -T,
4373         when applied to files in /proc and /sys, even when the FIONREAD
4374         ioctl produces nonsensical results.  Before this change, cat would
4375         produce no output (or truncated output), for some linux kernels.
4377         * src/cat.c (write_pending): New function, factored out of cat.
4378         (cat): Also interpret a negative ioctl/FIONREAD count as indicating
4379         that there are bytes to read.  Some versions of linux-2.6.16 do that.
4380         Write any pending output before returning.
4381         Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
4382         * NEWS: Mention this bug fix.
4383         * tests/misc/cat-proc: New file.  Test for the above.
4384         * tests/misc/Makefile.am (TESTS): Add cat-proc.
4386 2006-06-07  Paul Eggert  <eggert@cs.ucla.edu>
4388         * src/expr.c (eval4): Detect overflow properly when multiplying
4389         INTMAX_MIN * -1.
4391 2006-06-06  Paul Eggert  <eggert@cs.ucla.edu>
4393         * NEWS: The 'expr' command now detects and reports integer overflow.
4394         (It would be better to use extended precision instead, but that
4395         would be more work.)
4396         * src/expr.c (integer_overflow): New function.
4397         (eval4, eval3): Check for integer overflow.
4399 2006-06-05  Paul Eggert  <eggert@cs.ucla.edu>
4401         Fix problems when building with Solaris/SVR4/etc. make, which uses a
4402         different and somewhat bogus implementation of VPATH.  In the
4403         directory tests/misc, rename tests whose names might appear in the
4404         Automake-generated rules.  For example, we can't use a test named
4405         'test', since Automake generates a rule that contains the text
4406         "if test -f ./$$tst; ...", and this might expand to something like
4407         "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
4408         which executes the 'test' script rather than the 'test' command.
4409         * tests/misc/false-status: Renamed from tests/misc/false.
4410         * tests/misc/pwd-long: Renamed from tests/misc/pwd.
4411         * tests/misc/sort-merge: Renamed from tests/misc/sort.
4412         ($prog): Set to 'sort' rather than to $PROG.
4413         * tests/misc/test-diag: Renamed from tests/misc/test.
4414         * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
4415         in case Solaris make has prepended the directory.
4416         (TESTS): Adjust to above renamings.
4417         * tests/misc/expand: Don't assign to PROG; no longer needed
4418         now that Makefile.am sets PROG to the basename.
4419         * tests/misc/fold: Likewise.
4421 2006-06-03  Jim Meyering  <jim@meyering.net>
4423         Make `cp --link --no-dereference' work also on systems where the
4424         link system call cannot create a hard link to a symbolic link.
4425         * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
4426         the link syscall on a symlink when it would do the wrong thing.
4427         Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
4428         * tests/cp/link-no-deref: New file/test for the above.
4429         * tests/cp/Makefile.am (TESTS): Add link-no-deref.
4430         * NEWS: Mention the change (doesn't affect Linux).
4432 2006-06-01  Paul Eggert  <eggert@cs.ucla.edu>
4434         Fix some porting problems in the test cases reported by
4435         Ralf Wildenhues for HP-UX 11.23 in:
4436         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
4437         * tests/help-version: Don't assume that \< \> works in sed.
4438         * tests/misc/close-stdout: Don't assume that >&- works.
4439         Add a /dev/full test.
4440         * tests/touch/no-create-missing: Don't assume that >&- works.
4442 2006-05-30  Jim Meyering  <jim@meyering.net>
4444         * src/ls.c (usage): Add `v' to the list of sorting-related options.
4445         From Justin Pryzby.
4447 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4449         * tests/cp/fail-perm: source lang-default.
4450         * tests/rm/inaccessible: Likewise.
4452 2006-05-28  Jim Meyering  <jim@meyering.net>
4454         * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
4455         Recognize it, too.  Reported by Ralf Wildenhues, in
4456         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
4458 2006-05-27  Jim Meyering  <jim@meyering.net>
4460         * src/chgrp.c: Support new options: --preserve-root and
4461         --no-preserve-root.  Somehow this program was skipped when those
4462         options were added to chown, chmod, and rm.  Reported by
4463         vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
4464         * NEWS: Mention this.
4466 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
4468         * NEWS: Remove mention of --seed.  We'll replace it with something
4469         better, and don't want to indicate that it is supported.
4470         * src/sort.c (usage): Likewise.
4472 2006-05-20  Jim Meyering  <jim@meyering.net>
4474         * src/chmod.c (main): Use FTS_PHYSICAL here, too.
4476         * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
4477         and arrange for -D to set fts' FTS_PHYSICAL bit as well as
4478         FTS_COMFOLLOW.  Spotted by Justin Pryzby.
4480         * gnupload: Merge changes from automake, retaining the ""--to...
4481         kludge to placate overzealous `make distcheck' check.
4483 2006-05-19  Jim Meyering  <jim@meyering.net>
4485         * src/du.c (main): Don't let -D, -L, or -P turn off the internal
4486         FTS_TIGHT_CYCLE_CHECK directory traversal option.
4487         Reported by Justin Pryzby in http://bugs.debian.org/367691
4489 2006-05-15  Jim Meyering  <jim@meyering.net>
4491         * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
4492         From Tomas Pospisek.
4494 2006-05-13  Jim Meyering  <jim@meyering.net>
4496         * tests/mv/no-target-dir: Test two more cases.
4498 2006-05-11  Jim Meyering  <jim@meyering.net>
4500         mv -T DIR EMPTY_DIR no longer fails unconditionally
4501         * src/copy.c (copy_internal): Don't manually prohibit a move where
4502         the destination is an existing directory.  Sometimes doing that is
4503         valid.  Let the rename system call enforce the rules.  That is
4504         allowed only when the source is a directory and the destination
4505         directory (to be replaced) is empty.  Reported by Eric Blake.
4506         * tests/mv/no-target-dir: New file/test for this.
4507         * tests/mv/Makefile.am (TESTS): Add no-target-dir.
4508         * NEWS: Mention this.
4510         * tests/mv/atomic: New file/test for yesterday's fix.
4511         * tests/mv/Makefile.am (TESTS): Add atomic.
4513         * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
4515 2006-05-10  Jim Meyering  <jim@meyering.net>
4517         * src/copy.c (copy_internal): Don't explicitly unlink the destination
4518         when moving a symlink into the place of an existing non-directory.
4519         Reported by Joshua Hudson.
4520         * NEWS: mention this.
4522 2006-05-07  Jim Meyering  <jim@meyering.net>
4524         * Makefile.maint (patch-check): Fail if patch generates any output,
4525         even merely for changed offsets.
4527         * src/c99-to-c89.diff: Adjust to reflect new offsets.
4529         * NEWS: Mention changes affecting df, pwd, shred.
4531 2006-05-06  Jim Meyering  <jim@meyering.net>
4533         * tests/ls/stat-vs-dirent: New test, to detect the bogus file
4534         system condition where dirent.d_ino != stat.st_ino.
4535         * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
4537 2006-05-06  Eric Blake  <ebb9@byu.net>
4539         * tests/ls/inode: Expand to test inode from readdir case.
4540         * tests/ls/follow-slink: Expand to test broken links encountered
4541         implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
4543 2006-05-06  Eric Blake  <ebb9@byu.net>
4545         * tests/mv/leak-fd: Work even on case-insensitive file system.
4547 2006-05-04  Jim Meyering  <jim@meyering.net>
4549         * NEWS: Mention the 2006-03-19 pwd-related change that makes
4550         lib/getcwd.c work around inconsistent file system dirent.d_ino data.
4552 2006-05-03  Jim Meyering  <jim@meyering.net>
4554         * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
4555         Use better macro parameter names: s/basename/key_name/,
4556         s/basefunc/key_cmp_func.  Fix typo in comment.
4558 2006-04-29  Eric Blake  <ebb9@byu.net>
4560         * src/ls.c (main): On systems with d_type, directories_first only
4561         implies format_needs_type, not format_needs_stat.
4563 2006-05-03  Jim Meyering  <jim@meyering.net>
4565         * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
4566         after comma in arg list, from Eric Blake.
4568 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
4570         * tests/misc/date (relative-3): New test, derived from a bug
4571         report by John Thomas McDole.
4573 2006-04-23  Francesco Montorsi  <fr_m@hotmail.com>
4575         New option for ls: --group-directories-first.
4576         It makes ls list directories before files.
4577         * NEWS [New features]: Mention it.
4578         * src/ls.c (sort_type): Rearrange to use as an array index when
4579         choosing sort function; added new sort_numtypes member for
4580         compile-time check.
4581         (time_type): Add new time_numtypes member for compile-time check.
4582         (directories_first): New global variable.
4583         (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
4584         (long_options): Add --directories-first.
4585         (main): Support new option.
4586         (is_directory): New function.
4587         (extract_dirs_from_files): Use it.
4588         (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
4589         (LIST_SORTFUNCTION_VARIANTS): New macros.
4590         (sort_functions): New global variable.
4591         (sort_files): Use it.
4592         (usage): Document new option.
4594 2006-04-18  Paul Eggert  <eggert@cs.ucla.edu>
4596         * src/shred.c (fillrand): The assertion was way too weak, due to
4597         what must be a typo.  Strengthen it to its intended value.
4598         (dopass): Don't use alloca; it's not worth the aggravation here,
4599         since it's used only to get a page-aligned buffer, and page
4600         alignment doesn't buy us much here.  I'm suspicious that alloca
4601         causes problems on some hosts, due to a recent bug report by Adam
4602         Waltman: http://bugs.gentoo.org/130246.
4604 2006-04-18  Jim Meyering  <jim@meyering.net>
4606         * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
4607         sha384sum, sha512sum.
4609 2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4611         * src/chmod.c (describe_change): Adjust to filemode changes.
4612         * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
4613         (print_long_format): Use (new) filemodestring rather than
4614         (old) mode_string, so that we get more file types right, at least
4615         in theory.  Adjust to filemode changes.
4616         * src/stat.c (human_access): Likewise.
4618 2006-04-18  Jim Meyering  <jim@meyering.net>
4620         * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
4621         ignore file.  This has never been enabled.  Reported by Eric Blake.
4623 2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
4625         * src/ln.c (linkfunc): Remove.  This method ran into a compiler/linker
4626         bug in Interix.  Just call symlink or link directly.  All uses changed.
4627         * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
4628         * src/stat.c (USE_STATVFS): New macro.
4629         Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
4630         (NAMEMAX_FORMAT): define a bit more clearly, now that the
4631         statvfs-using code is a bit more regular.
4632         * src/system.h (sync) [!HAVE_SYNC]: New macro.
4634 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
4636         * NEWS: csplit, nl, expr now conform to POSIX better, and are
4637         more-compatible with traditional Unix, with respect to regular
4638         expressions.
4639         * src/csplit.c (extract_regexp): Set re_syntax_options to a
4640         value that is compatible with what POSIX requires.
4641         * src/nl.c (build_type_arg): Likewise.
4642         * src/expr.c (docolon): Likewise.  Also, don't let anchors match
4643         newline; this fixes an incompatibility with tradition and with POSIX.
4644         Don't warn about leading ^.  POSIX says it is unspecified whether
4645         ^ is a special character, which means that implementations can
4646         either treat it as special or not, but either way a warning is not
4647         allowed (unless the regexp is otherwise invalid).  Instead, anchor
4648         the expression but treat ^ as an anchor; this is the traditional
4649         behavior (e.g., Solaris 10).
4650         (eval4, eval3, eval2): Treat non-numeric args, division by zero,
4651         and the like as invalid expressions (exit status 2), not as
4652         failure of 'expr' (exit status 3).  This is more consistent with
4653         how Solaris behaves.
4654         * tests/expr/basic (fail-a): Adjust exit status to match new expr
4655         behavior, for status 2 versus 3.
4656         (anchor): New test.
4657         (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
4658         (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
4659         (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
4660         (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
4661         (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
4662         (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
4663         (bre61, bre62): New tests.
4664         * tests/misc/csplit: Use \{...\} in test RE, to test that we're
4665         conforming to POSIX.
4667         Port to Solaris 8.
4668         * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
4669         "if !".  Do not assume that 'sed' can handle long, newline-free input.
4670         * tests/du/long-sloop: Likewise.  Evaluate expr once, not $n times.
4672 2006-04-10  Paul Eggert  <eggert@cs.ucla.edu>
4674         Adjust to new regex.h API (with new fastmap type), and clean
4675         up the regex storage allocation a bit.
4677         * src/csplit.c (struct control): Put re_compiled member at the
4678         end, since it's large.  Change regexpr member from char * to bool;
4679         all uses changed.  Add new member fastmap.
4680         (extract_regexp): regexp arg is now char const *, not char *.
4681         Don't bother duplicating the regular expression; it's not needed.
4682         Set fastmap from new fastmap member.  Don't bother allocating
4683         a buffer, as the regexp code does a better job than we do.
4684         * src/expr.c (docolon): Allocate and use a fastmap.
4685         Don't bother allocating a buffer.
4686         * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
4687         New vars.
4688         (build_type_arg): New fastmap arg.  All uses changed.
4689         Don't bother allocating a buffer, but set a fastmap.
4690         * src/ptx.c (context_regex_string, word_regex_string): Remove.
4691         (context_regex, word_regex): New vars, replacing the above.
4692         All uses changed.
4693         (struct regex_data): New type.
4694         (compile_regex): Renamed from alloc_and_compile_regex, since
4695         we no longer allocate storage.  Arg is now a struct regex_data *,
4696         not a const char *.  All uses changed.  Don't allocate the fastmap;
4697         instead, take it from the caller.  Don't convert size_t to int,
4698         to avoid arithmetic overflow problems.  Don't bother freeing
4699         storage afterwards; it's not worth the aggravation.
4700         * src/tac.c (compiled_separator_fastmap): New ver.
4701         (main): Use it.  Don't bother allocating a buffer.
4703 2006-03-30  Jim Meyering  <jim@meyering.net>
4705         * src/dd.c (iwrite): Remove assignment without effect.
4706         Reported by Felix Rauch Valenti.
4708 2006-03-22  Eric Blake  <ebb9@byu.net>
4710         * src/ptx.c (usage): Remove mention of --copyright/-C.
4711         (main): Alias --copyright to --version plus a deprecation warning.
4712         * NEWS: Mention this.
4714 2006-03-27  Jim Meyering  <jim@meyering.net>
4716         * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
4717         use of strtod.  Tiny patch from Nickolai Zeldovich.
4719 2006-03-11  Eric Blake  <ebb9@byu.net>
4721         * tests/misc/dirname: New file.
4722         * tests/basename/Makefile.am: Delete.
4723         * tests/basename/basic: Move to...
4724         * tests/misc/basename: ... this new file.  Add some tests,
4725         including fixed behavior for //.
4726         * tests/misc/Makefile.am (TESTS): Sort.  Add basename, dirname.
4727         * tests/Makefile.am (SUBDIRS): Remove basename.
4728         * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
4730         Improvements to dirname/basename handling on platforms like
4731         cygwin with distinct // and with drive letters.
4732         * NEWS: Document new behavior.
4733         * src/basename.c (main): Don't strip suffix from file system
4734         roots.
4735         * src/cp.c (target_directory_operand): Use new last_component.
4736         (ASSIGN_BASENAME_STRDUPA): Likewise.  Reduce time spent
4737         traversing the string.
4738         * src/dircolors.c (guess_shell_syntax): Use new last_component.
4739         * src/install.c (target_directory_operand, install_file_in_dir):
4740         Likewise.
4741         * src/ln.c (target_directory_operand, main): Likewise.
4742         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
4743         * src/mv.c (target_directory_operand, movefile): Likewise.
4744         * src/remove.c (rm_1): Likewise.
4745         * src/shred.c (wipename): Likewise.
4746         * src/split.c (next_file_name): Likewise.
4747         * src/su.c (log_su, run_shell): Likewise.
4749 2006-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4751         * NEWS: nohup diagnostics are now more precise, and nohup now
4752         redirects stderr to nohup.out if stdout is closed and stderr is a tty.
4753         * src/nohup.c (main): Implement this.
4754         * tests/misc/nohup: Test the new behavior.
4756 2006-03-12  Jim Meyering  <jim@meyering.net>
4758         * src/copy.c (set_author): Rename function, from preserve_author.
4760         * src/remove.c (AD_pop_and_chdir): Use new macro,
4761         CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
4763         * src/system.h (SAME_INODE): Remove definition.
4764         Include "same-inode.h", instead.
4766 2006-03-11  Eric Blake  <ebb9@byu.net>
4768         * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
4770 2006-03-10  Jim Meyering  <jim@meyering.net>
4772         Fix a bug whereby a user with write access to a directory being removed
4773         could cause the removal of that directory to fail with an erroneous
4774         diagnostic about a directory cycle.  Reported by Vineet Chadha.
4776         * NEWS: Mention this.
4777         * src/remove.c (AD_pop_and_chdir): If the directory we're about to
4778         leave (and try to rmdir) is the one whose dev_ino is being used to
4779         detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
4781 2006-03-08  Paul Eggert  <eggert@cs.ucla.edu>
4783         * NEWS: Document dd's new 'directory' and 'nolinks' flags.
4784         * src/dd.c (set_fd_flags): Handle file-creation flags on file
4785         descriptors, rather than ignoring them.
4786         * tests/dd/misc: Add test cases for append, nofollow, directory,
4787         and nolinks flags.  Simplify redirection to /dev/null in some cases.
4789         * tests/dd/misc: iflags->iflag.  This fixes a typo that meant the
4790         noatime test never tested anything.
4792 2006-03-05  Paul Eggert  <eggert@cs.ucla.edu>
4794         * src/dd.c (flags, usage): New flags directory, nolinks.
4795         * src/system.h (O_NOLINKS): Define to 0 if not already defined.
4797         * src/ls.c (usage): Mention that -f disables --color.
4798         Problem reported by Niels Möller.
4800 2006-03-03  Justin Pryzby  <pryzbyj@justinpryzby.com>
4802         * man/*.x: Add references to syscalls from utilities of the same name.
4804 2006-03-05  Jim Meyering  <jim@meyering.net>
4806         * tests/help-version: Set SHELL, if not already set, in order to
4807         avoid failure when `make check' is run through debuild;  dircolors
4808         would fail due to lack of $SHELL.  Reported by Sven Joachim.
4810         Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
4811         * src/base64.c (wrap_write, do_encode, main): Change type of
4812         parameters and locals, wrap_column, form size_t to uintmax_t.
4813         (main): Adjust to use xstrtoumax, accordingly.
4815 2006-03-03  Jim Meyering  <jim@meyering.net>
4817         Don't fail when run from an environment with SHELL not a Bourne
4818         shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
4819         * tests/dircolors/simple: Invoke each non-failing test with -b.
4820         Reported by Michael Stone.
4822 2006-02-27  Jim Meyering  <jim@meyering.net>
4824         * tests/misc/base64: Derive --decode-using tests from the
4825         encode-based ones.
4827         * tests/misc/base64: Factor out a long constant string.
4828         Split lines to stay within 80 columns.
4830         * tests/misc/Makefile.am (TESTS): Add base64.
4831         * tests/misc/base64: Test base64.  From Simon Josefsson.
4833         * src/base64.c (do_decode): Use correct type for parameter,
4834         ignore_garbage: s/size_t/bool/.
4836         * src/base64.c: Don't include .h files already included by system.h:
4837         <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
4838         Include "system.h" before the other lib/*.h header files.
4839         Include <sys/types.h> before "system.h".
4840         (wrap_write): Remove declaration of unused local, initial_column.
4841         (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
4843         * README: Add base64 to the list.
4845 2006-02-17  Simon Josefsson  <jas@extundo.com>
4847         New program: base64.
4848         * AUTHORS: Mention base64.
4849         * NEWS: Likewise.
4850         * man/Makefile.am: Build base64.1.
4851         * man/base64.x: New file.
4852         * src/Makefile.am (bin_PROGRAMS): Add base64.
4853         * src/base64.c: New file.
4855 2006-02-25  Eric Blake  <ebb9@byu.net>
4857         In ls, avoid calling stat for --inode (-i), when possible.
4858         * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
4859         * src/system.h: ... here, for use in ...
4860         * src/ls.c (main): ... here.  Prefer dirent.d_ino to stat when
4861         possible.
4862         (gobble_file): Add inode argument.
4863         (print_dir): Pass inode if available.
4864         (usage): Remove inaccuracy.
4866 2006-02-23  Jim Meyering  <jim@meyering.net>
4868         * TODO: Update/correct some obsolete entries.
4870 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
4872         * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
4873         * src/join.c (usage): Likewise.
4874         Documentation problem reported by Philip Kensche.
4876 2006-02-20  Eric Blake  <ebb9@byu.net>
4878         * man/rm.x: Update documentation to match previous patch.
4880 2006-02-18  Eric Blake  <ebb9@byu.net>
4882         New option for rm: --interactive=once (-I).
4883         * NEWS: Document it, along with change to rm --interactive.
4884         * TODO: Remove entry for implementing rm -I
4885         * src/rm.c (INTERACTIVE_OPTION): New enum value.
4886         (interactive_type): New enum.
4887         (long_opts): Let interactive take an optional argument.
4888         (interactive_args, interactive_types): New option arguments.
4889         (usage): Document -I, --interactive=WHEN.  Use program_name
4890         instead of a basename.
4891         (main): New -I option, new behavior to --interactive.
4892         * tests/rm/interactive-once: New tests.
4893         * tests/rm/interactive-always: Ditto.
4894         * tests/rm/Makefile.am (TESTS): Run them.
4896 2006-02-18  Jim Meyering  <jim@meyering.net>
4898         * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
4899         expression match more of the target lines, e.g., those that start with
4900         `-S,' (short option followed by a comma) or that include `=[...]'.
4901         Patch by Nicolas François.
4902         Fix the four offenders thus exposed:
4903         * src/join.c (usage): Use two spaces (not one) to separate the
4904         --first-only option string from its description, so help2man formats
4905         the derived man page properly.
4906         * src/pr.c (usage): Likewise.
4907         * src/uniq.c (usage): Likewise.
4908         * src/install.c (usage): Likewise.
4910 2006-02-15  Jim Meyering  <jim@meyering.net>
4912         * Makefile.maint (alpha beta major): For `make major', ensure that the
4913         version string is of the form N.N[.N]*, where N is one or more digits.
4915 2006-02-14  Jim Meyering  <jim@meyering.net>
4917         * INSTALL: Update from gnulib.
4919 2006-02-13  Jim Meyering  <jim@meyering.net>
4921         * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
4923 2006-02-12  Jim Meyering  <jim@meyering.net>
4925         * Makefile.maint (patch-check): New target.
4926         (local-checks-available): Add to the list.
4928 2006-02-11  Jim Meyering  <jim@meyering.net>
4930         * src/c99-to-c89.diff: New file.
4931         * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
4933         * .x-po-check: New file, with exclusions so that `make distcheck'
4934         passes once again.
4935         * Makefile.am (EXTRA_DIST): Add .x-po-check.
4937         rm -r must remove an empty directory, even if it is inaccessible.
4938         * src/remove.c (close_preserve_errno): New function.
4939         (fd_to_subdirp): Don't print a diagnostic in this function.
4940         Do it from the callers instead, unless rmdir succeeds.
4941         (remove_cwd_entries, remove_dir): Adjust callers.
4942         * tests/rm/empty-inacc: New test for the above.
4943         * tests/rm/Makefile.am (TESTS): Add empty-inacc.
4944         * NEWS: Mention this bug fix.
4945         * tests/rm/rm2: Adjust two expected diagnostics, now that they're
4946         a tiny bit less precise: cannot remove `a/1': ... instead of
4947         cannot open directory `a/1': ...
4949         * Makefile.maint (syntax-check-rules): Automatically derive this
4950         list of sc_-prefixed rule names.
4952 2006-02-10  Paul Eggert  <eggert@cs.ucla.edu>
4954         * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
4955         (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
4956         Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
4957         (syntax-check-rules): Bring back sc_changelong.  (Hmm, why did it
4958         go away? was that an accident?)
4959         (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
4960         (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
4961         (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
4962         (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
4963         (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
4964         (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
4965         (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
4966         (author_mark_check, makefile_path_separator_check):
4967         Output line numbers, to simplify navigation of Emacs *compilation*
4968         buffers.
4969         (sc_prohibit_atoi_atof, sc_file_system):
4970         Rework slightly so that Makefile.maint doesn't get reported as a
4971         violation of its own syntax rules.
4972         (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
4973         it at run-time (which didn't work with Bison).  Fix a makefile typo,
4974         caught by Makefile.maint itself: spaces where a tab should be.
4975         (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
4976         which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
4977         Ignore djgpp and man subdirectories, to avoid false matches with
4978         Bison and coreutils, respectively.  Use sort -u to remove the
4979         resulting duplicates.
4980         * gnupload: Rework slightly to avoid bogus warning from
4981         sc_two_space_separator_in_usage.
4983 2006-02-10  Jim Meyering  <jim@meyering.net>
4985         Use gzip's --rsyncable option only if it's available.
4986         * Makefile.maint (gzip_rsyncable): New variable.
4987         (GZIP_ENV): Use it.
4989 2006-02-08  Jim Meyering  <jim@meyering.net>
4991         * Makefile.maint (local-checks-available): Define in terms of
4992         the expansion, $(syntax-check-rules), rather than the single,
4993         top-level target `syntax-check', so that it's easier to exclude
4994         individual rules (via $(local-checks-to-skip)).
4995         (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
4997 2006-02-07  Jim Meyering  <jim@meyering.net>
4999         * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
5000         is on Tru64), define O_DIRECT to that.  Patch From James Lemley.
5002         * tests/help-version (expected_failure_status_vdir):
5003         Redirect an expected disk-full diagnostic to /dev/null.
5005 2006-02-06  Jim Meyering  <jim@meyering.net>
5007         * src/unexpand.c (usage): Use two spaces (not one) to separate the
5008         --first-only option string from its description, so help2man formats
5009         the derived man page properly.
5010         * src/rm.c (usage): Likewise for --no-preserve-root.
5011         * src/chown.c (usage): Likewise.
5012         * src/chgrp.c (usage): Likewise.
5014         Add a rule to ensure that the above doesn't happen again.
5015         * Makefile.maint (sc_two_space_separator_in_usage): New rule.
5016         (syntax-check-rules): Add it.
5017         * .x-sc_two_space_separator_in_usage: New empty file.
5018         * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
5020 2006-02-06  Jim Meyering  <jim@meyering.net>
5022         * src/cp.c (usage): Use two spaces (not one) to separate each
5023         option string from its description, so help2man formats the
5024         derived man page properly.
5025         * src/mv.c (usage): Likewise.
5026         Patch from Nicolas François in http://bugs.debian.org/351601.
5028 2006-02-04  Jim Meyering  <jim@meyering.net>
5030         * src/copy.c (copy_internal): cp -RL would fail when encountering
5031         the same directory more than once in the hierarchy beneath a single
5032         command-line argument.  That is legitimate, e.g. when there are
5033         two or more symbolic links, each pointing to some directory that
5034         would not otherwise be copied.  Reported by Christophe LYON.
5035         * tests/cp/cp-deref: New file.  Test for today's fix.
5036         * tests/cp/Makefile.am (TESTS): Add cp-deref.
5037         * NEWS: Document this.
5039 2006-02-03  Jim Meyering  <jim@meyering.net>
5041         * configure.ac: Require automake-1.9.6, not 1.8.3.
5043 2006-02-01  Paul Eggert  <eggert@cs.ucla.edu>
5045         * src/od.c (usage): Mention that -t a ignores high order bit.
5046         Documentation problem reported by Ed Avis.
5048 2006-02-01  Jim Meyering  <jim@meyering.net>
5050         * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
5052 2006-01-30  Paul Eggert  <eggert@cs.ucla.edu>
5054         * src/head.c (main): Use a better diagnostic when someone uses a
5055         trailing numeric option in an invalid way.  Problem reported by
5056         Karl Berry.
5057         * src/tail.c (parse_options): Likewise.
5059 2006-01-30  Jim Meyering  <jim@meyering.net>
5061         * man/wc.x: Include `count' keyword in man page synopsis,
5062         per suggestion from http://bugs.debian.org/181585.
5064 2006-01-24  Paul Eggert  <eggert@cs.ucla.edu>
5066         * src/df.c (show_dev): If the file system claims to have
5067         more available than total blocks, report the number of used
5068         blocks as being total - available (a negative number) rather
5069         than as garbage.  Problem reported by Toralf Foerster.
5071 2006-01-24  Jim Meyering  <jim@meyering.net>
5073         * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
5074         to put a regular file in O_NONBLOCK mode fails with EPERM.
5075         That happens on Linux (up to 2.6.15) when using tail -f on a file with
5076         the append-only attribute.  Reported by Dean Gaudet.  For details,
5077         see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
5078         * NEWS: Mention this fix.
5079         * tests/tail-2/append-only: New file.  Test for the above.
5080         * tests/tail-2/Makefile.am (TESTS): Add append-only.
5081         * tests/Makefile.am (check-root): Add tail-2/append-only
5083 2006-01-21  Jim Meyering  <jim@meyering.net>
5085         * NEWS: Mention fts-related improvements and bug fixes.
5087 2006-01-19  Jim Meyering  <jim@meyering.net>
5089         * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
5090         reported as http://bugs.debian.org/147577.  Forwarded by Thomas Hood.
5092 2006-01-18  Jim Meyering  <jim@meyering.net>
5094         * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
5096 2006-01-17  Jim Meyering  <jim@meyering.net>
5098         Now that fts no longer changes the current working directory, adjust
5099         its clients accordingly -- note that du.c uses fts but doesn't need
5100         any adjustment, since it doesn't operate on the actual files,
5101         but rather just uses the stat buffers provided by fts.
5103         * src/chown-core.c: Include "openat.h".
5104         Don't include "lchown.h".
5105         (restricted_chown): Accept a new parameter, CWD_FD, and use it in
5106         calling openat, lchownat, chownat, rather than open, lchown, chown.
5107         Update caller.
5108         * src/chmod.c: Include "openat.h".
5109         (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
5111         * tests/du/long-from-unreadable: New test, to exercise one small
5112         corner of fts.c.
5114 2006-01-13  Jim Meyering  <jim@meyering.net>
5116         * tests/Makefile.am (SUBDIRS): Add comments discouraging the
5117         addition of new directories under tests/.
5119         * tests/acl: Redirect stdin to /dev/null.  Otherwise, FreeBSD 5.0's
5120         getfacl would hang.
5122 2006-01-12  Jim Meyering  <jim@meyering.net>
5124         * tests/du/long-sloop: Adjust not to hard-code the expected
5125         diagnostic corresponding to ELOOP.  Solaris' diagnostic differs
5126         from that of GNU libc.  Reported by Paul Eggert.
5128         * tests/du/long-sloop: Create file at end of symlink chain.
5130         * tests/misc/test: New file, with a test for one of the
5131         bugs fixed by yesterday's test.c changes.
5132         * tests/misc/Makefile.am (TESTS): Add test.
5134 2006-01-11  Jim Meyering  <jim@meyering.net>
5136         * tests/du/long-sloop: New file.  Test for today's fts.c bug fix.
5137         That bug could make du -L, chgrp -L, or chown -L fail to diagnose
5138         a very long sequence of symbolic links (not necessarily a loop).
5139         * tests/du/Makefile.am (TESTS): Add long-sloop.
5141 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
5143         * src/test.c (test_syntax_error): Append a newline.  All callers
5144         changed, except for the ones that didn't already append a newline.
5145         Bug reported by Eric Blake.
5147 2006-01-11  Jim Meyering  <jim@meyering.net>
5149         * src/system.h (X2NREALLOC): Now that verify_true is no longer
5150         void, cast its result to void, to avoid gcc's warning that
5151         ``left-hand operand of comma expression has no effect''.
5152         (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
5154 2006-01-10  Jim Meyering  <jim@meyering.net>
5156         * tests/chmod/no-x: Add a test for today's fts.c fix.
5158 2006-01-10  Jim Meyering  <jim@meyering.net>  (tiny change)
5160         * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
5161         This is necessary for Dragonfly.  Patch by Joerg Sonnenberger.
5163 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
5165         * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
5166         Use verify_true instead of verify_expr, to sync with gnulib.
5168 2006-01-08  Jim Meyering  <jim@meyering.net>
5170         * src/date.c (usage): Adjust the formatting of the entries for
5171         %::z and %:::z (separate with two spaces, not one) so that help2man
5172         formats them properly.  Reported by Philip Rowlands.
5174 2006-01-06  Paul Eggert  <eggert@cs.ucla.edu>
5176         * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
5178 2006-01-06  Jim Meyering  <jim@meyering.net>
5180         * Makefile.maint (copyright-check): Use date +%Y in place of
5181         hard-coded 2005.
5183         * src/remove.c (rm_1): Remove `static' attribute on local `status'.
5184         First off, the attribute should have been `volatile' (not static)
5185         to avoid longjmp-related risk of clobber.  Secondly, now there is
5186         no longer any risk of a local variable being clobbered, so there's
5187         no need for any attribute at all.
5189 2006-01-05  Jim Meyering  <jim@meyering.net>
5191         * src/remove.c: Give a few functions the inline attribute.
5192         (AD_pop_and_chdir): Use gotos to avoid some duplication.
5193         (AD_push): Rewrite an assertion so that the entire computation
5194         goes away when assertions are turned off.
5196         * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
5197         It's already defined in "system.h".
5198         * Makefile.maint: Add a FIXME comment.
5200 2006-01-04  Jim Meyering  <jim@meyering.net>
5202         * ChangeLog: Remove entries from 2005-10-22 and earlier.
5203         * ChangeLog-2005: New file, for entries up to version 5.92.
5205 2006-01-03  Jim Meyering  <jim@meyering.net>
5207         * tests/du/no-x: Also allow a slightly different diagnostic -- the
5208         one you get when using openat-enabled fts.c and du (coming soon).
5209         * tests/chmod/no-x: Likewise.
5210         * tests/chgrp/no-x: Likewise.
5212         * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
5214 2006-01-02  Paul Eggert  <eggert@cs.ucla.edu>
5216         * src/chown-core.c (RC_do_ordinary_chown): New enum value.
5217         (restricted_chown): Return it, if the file cannot be accessed due
5218         to EPERM, or if no uid or gid are required, or if the file is
5219         neither a directory nor a regular file.  Rewrite to avoid gotos.
5220         (change_file_owner): Handle RC_do_ordinary_chown case.
5221         Rewrite to avoid gotos.
5222         * tests/chgrp/basic: Make sure we can change the group of
5223         inaccessible files.
5225         * src/date.c (usage): Explain %g, %G, and %V a bit better.
5227 2006-01-02  Jim Meyering  <jim@meyering.net>
5229         * src/copy.c (set_owner): Correct a comment.
5231         * src/tail.c (parse_options): Change warning to say that --retry
5232         is useful `mainly' (not `only') when following by name.
5233         Reported here: http://bugs.debian.org/273781
5235 2006-01-01  Paul Eggert  <eggert@cs.ucla.edu>
5237         * NEWS: Document that mkfifo and mknod -m no longer set special bits.
5238         * src/copy.c: Include lchmod.h.
5239         (copy_internal): Use lchmod rather than chmod.
5240         * src/cp.c: Include lchmod.h.
5241         (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
5242         * src/mkdir.c: Include lchmod.h.
5243         (usage): Clarify -m's operation.
5244         (main): Use lchmod rather than chmod.  Don't use lchmod unless the
5245         new mode contains bits outside the 777 range.
5246         * src/mkfifo.c (usage): Clarify -m's operation.
5247         (main): If -m is given, don't invoke chmod; use umask 0 instead.
5248         Report an error if -m asks for bits outside the 777 range.
5249         * src/mknod.c (usage, main): Likewise.
5251         * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
5253 2005-12-27  Jim Meyering  <jim@meyering.net>
5255         * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
5256         (sc_prohibit_assert_without_use): New rule.
5257         (syntax-check-rules): Add it to the list.
5258         * .x-sc_prohibit_assert_without_use: New empty file.
5259         * Makefile.am (EXTRA_DIST): Add it.
5261         * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
5263         * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
5264         Don't include <assert.h>; it wasn't used.
5266 2005-12-26  Paul Eggert  <eggert@cs.ucla.edu>
5268         * src/chown-core.c (restricted_chown):
5269         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
5270         * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
5271         | O_NOFOLLOW too, for consistency with other dir-openers.
5272         Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
5273         (is_empty_dir): Likewise.
5274         * src/shred.c (wipename): Likewise.  Don't bother trying to open
5275         dir for writing, since POSIX prohibits it.
5277 2005-12-22  Jim Meyering  <jim@meyering.net>
5279         * tests/help-version: Redirect stderr to /dev/full, to suppress
5280         write error diagnostic.
5282 2005-12-19  Jim Meyering  <jim@meyering.net>
5284         * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
5285         Avoid a minor race condition when `-m MODE' is specified, by using
5286         open, fchown, and close rather than just chown.  To do that reliably --
5287         even with an overly restrictive umask -- ensure that each mkdir,
5288         mknod and mkfifo call uses a mode including at least owner-read access.
5289         * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
5290         the subsequent chown (or equivalent open,fchown,close) fails.
5291         * tests/misc/mknod: New tests.
5292         * tests/misc/Makefile.am (TESTS): Add mknod.
5294 2005-12-17  Jim Meyering  <jim@meyering.net>
5296         * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
5297         e.g., on a named pipe.
5298         (OPEN_NO_FOLLOW_SYMLINK): Remove definition.  Use O_NOFOLLOW in
5299         place of all uses, since it is guaranteed (system.h) to be defined.
5301 2005-12-05  Andreas Gruenbacher  <agruen@suse.de>
5303         Add POSIX ACL support
5304         * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
5305         is no requirement for ACL support; particularly, it does not exist
5306         on systems that have POSIX ACLs.
5307         * src/copy.h (cp_option_init) [umask_kill]: Remove member.
5308         * src/cp.c (umask_kill): With default acls, the umask is not to be
5309         applied.  Remove umask_kill, don't change the process umask, and let
5310         the kernel apply the umask where appropriate.
5311         * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
5312         * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
5313         umask_kill.
5314         (copy_reg, copy_internal): Use copy_acl and set_acl
5315         instead of fchown/chown. Fix the logic for POSIX ACLs.
5316         (chown_succeded): Remove; we now always copy acls and
5317         preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
5318         did a chown before or not.
5319         * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
5320         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
5321         mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
5322         to link with it via $(LIB_ACL), for the utilities that need it.
5324 2005-12-16  Paul Eggert  <eggert@cs.ucla.edu>
5326         * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
5327         (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
5328         (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
5329         value is now signified by whether cwd_errno is null.
5330         (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
5331         pointer-to-bool to pointer-to-errno-value.  All callers changed.
5332         (rm_1): Don't bother setting a local cwd failure flag and then
5333         ORing it into the caller's.  Just set the caller's.
5334         (rm): Use cwd failure errno value to print a slightly-better
5335         diagnostic.
5337 2005-12-15  Jim Meyering  <jim@meyering.net>
5339         * src/stat.c (print_it): Properly handle a backslash at the
5340         end of a --printf format string.  Reported by Paul Eggert.
5341         * tests/misc/stat-printf (end-bs): Add a test for the above.
5343 2005-12-15  Paul Eggert  <eggert@cs.ucla.edu>
5345         * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
5346         Don't assume /etc/passwd contains user names; use 'id' instead.
5348 2005-12-15  Jim Meyering  <jim@meyering.net>
5350         stat: revert behavior of --format=FMT (-c)
5351         stat: add new option: --printf=FMT
5352         * NEWS: Mention this.
5353         * src/stat.c (isodigit, octtobin, hextobin): Define.
5354         (PRINTF_OPTION): Define.
5355         (interpret_backslash_escapes, trailing_delim): New globals.
5356         (usage): Document them.  Alphabetize on long option names.
5357         (print_esc_char): New function.
5358         (print_it): Rewrite, in order to handle backslash escapes.
5359         (main): Handle new option.  Set globals for --format, too.
5361         * tests/misc/stat-printf: Test --printf and --format.
5362         * tests/misc/Makefile.am (TESTS): Add stat-printf.
5364 2005-12-14  Paul Eggert  <eggert@cs.ucla.edu>
5366         * NEWS: sort now reports incompatible options.
5367         * src/sort.c (incompatible_options, check_ordering_compatibility):
5368         New functions.
5369         (main): Use them.  Don't bother with a usage message for
5370         "sort -c a b", for consistency with other error diagnostics.
5371         * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
5372         New tests.
5374         * src/cat.c (main): Undo previous change.  close_stdout already
5375         does the check, so the previous change wasn't necessary.
5377 2005-12-13  Paul Eggert  <eggert@cs.ucla.edu>
5379         * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
5381 2005-12-12  Paul Eggert  <eggert@cs.ucla.edu>
5383         Install a more-conservative approach for sort -R.  It's the
5384         same basic idea as the existing code, except it uses the full ISAAC
5385         approach (called the "more kosher" approach in the existing comments).
5386         This makes "sort -R" quite a bit slower (about a factor of 2 on my
5387         little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
5388         better to be conservative here at first, and review any performance
5389         improvements carefully.
5390         * .x-sc_require_config_h: Add src/rand-isaac.c.
5391         * src/rand-isaac.h: Remove.  All uses now simply include rand-isaac.c.
5392         * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
5393         (shred_SOURCES, sort_SOURCES): Remove.
5394         (EXTRA_DIST): Add rand-isaac.c.
5395         * src/rand-isaac.c: Revert to what used to be in shred.c, without
5396         changing it to allow for varying numbers of words in the state.
5397         Alter so that we include rand-isaac.c directly rather than
5398         compiling it and linking to it.  Don't include config.h or
5399         system.h; that's the includer's responsibility.
5400         Omit functions that are specific to shred.
5401         (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
5402         (isaac_step, struct irand_state):
5403         Resurrect these, with the same defns that used to be in shred.c.
5404         (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
5405         (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
5406         static again.
5407         (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
5408         (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
5409         (irand_init, irand32, irand_mod):
5410         Number of words is constant again.
5411         (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
5412         * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
5413         * src/sort.c: Likewise.
5414         * src/shred.c (fillrand, dopass, main): Undo previous change.
5415         (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
5416         from rand-isaac.c.
5417         * src/sort.c: Don't include md5.h; it wasn't needed.
5418         (struct keyfield): Rename random_hash to random, for consistency
5419         with the other member names.  All uses changed.
5420         (usage): Tweak wording to mention STRING for --seed option.
5421         (short_options): Rorder for consistency with other programs.
5422         (rand_state): Now a struct, not a pointer to one.  All uses changed.
5423         (HASH_WORDS, HASH_SIZE): Remove.
5424         (get_hash): Remove comments around resbuf size, since we can assume C89.
5425         Use a "more-kosher" (but slower) approach of invoking isaac_refill.
5426         (keycompare): Adjust to the new get_hash.
5427         Add a FIXME.
5428         (badfieldspec): Omit recently-introduced comment; it isn't needed.
5429         (main): Don't set need_random simply because gkey has it set; that
5430         doesn't necessarily mean we'll need random numbers.
5431         Redo seeding to match new get_hash approach.
5433 2005-12-10  Jim Meyering  <jim@meyering.net>
5435         * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
5437         Avoid shred segfault on 64-bit systems.
5438         * src/rand-isaac.c (isaac_refill): Don't try to negate a
5439         local of type uint32_t.  Make the local an `int' instead.
5441         * NEWS: Mention sort's new options.
5443         * src/rand-isaac.c (isaac_mix): Declare to be static.
5444         Mark all other functions as `extern' so the tight-scope
5445         part of `make distcheck' passes once again.
5446         * src/rand-isaac.h (isaac_mix): Remove declaration.
5448         * src/sort.c (get_hash): Change position of `*' in parameter
5449         type to conform with convention.
5450         (main): Split a long line so it fits in 80 columns.
5451         (keycompare): Remove stray SPACE before TAB that was
5452         causing `make distcheck' to fail.
5454         * src/shred.c: Don't include gethrxtime.h.  No longer needed.
5456         * tests/misc/sort-rand: New file: basic tests for the new options.
5457         * tests/misc/Makefile.am (TESTS): Add sort-rand.
5459 2005-12-10  Frederik Eaton  <frederik@ofb.net>
5461         * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
5462         (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
5463         * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
5464         Make state size runtime-configurable.
5465         (isaac_new, isaac_copy): New functions.
5466         * src/rand-isaac.h: New file.
5467         * src/shred.c: Include rand-isaac.h.  Move ISAAC code to rand-isaac.c.
5468         (fillrand, main): Adjust to the fact that the state size is now
5469         runtime-configurable.
5470         * src/sort.c (short_options, long_options, WORDS, keycompare, main):
5471         (usage): Add options --random-sort and --seed to implement a random
5472         shuffle.
5473         Include md5.h and rand-isaac.h.
5474         (get_hash): New function.
5475         (rand_state): New var.
5476         (HASH_WORDS, HASH_SIZE): New macros.
5478 2005-12-09  Paul Eggert  <eggert@cs.ucla.edu>
5480         * tests/dd/misc: Add test for dd iflags=noatime.
5482 2005-12-09  Jim Meyering  <jim@meyering.net>
5484         * src/sort.c (usage): Mention white space vs -b and -t options.
5485         From The Wanderer.
5487 2005-12-09  Eric Blake  <ebb9@byu.net>
5489         * src/test.c (main): Fix misleading comment.
5491 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
5493         * NEWS: Mention dd's new noatime flag.
5494         * src/system.h (O_NOATIME): Define to 0 if not already defined.
5495         * src/dd.c (flags, usage): Add support for noatime flag.
5497 2005-12-07  Jim Meyering  <jim@meyering.net>
5499         Distribute the cvsu script, used only by `make syntax-check'.
5500         * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
5501         * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
5502         distribute a copy of this script.
5503         * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
5505         * tests/mv/acl: exit-77 before the trap, not after, if we fail
5506         to create a temporary directory on another partition.
5507         From Andreas Gruenbacher.
5509 2005-12-06  Tomas Pospisek  <tpo@sourcepole.ch>  (tiny change)
5511         * man/basename.x: Cross-reference to dirname and readlink.
5512         * man/dirname.x: Cross-reference to basename and readlink.
5514 2005-12-05  Andreas Gruenbacher
5516         * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
5517         (set_owner, preserve_author): New functions, factored out of copy_reg.
5518         (copy_reg): Use them.
5519         (copy_internal): Use them here, too.
5521 2005-12-04  Jim Meyering  <jim@meyering.net>
5523         * src/sleep.c (usage): Say what happens with two or more arguments.
5524         Suggested by Justin Pryzby.
5526         * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
5527         where it's used.
5529 2005-12-03  Jim Meyering  <jim@meyering.net>
5531         * src/rm.c (long_opts): Change the name of each undocumented, for-
5532         testing-only option to start with `-', so that it cannot render
5533         ambiguous any prefix it happens to share with some other option name.
5534         Problem reported by Eric Blake.
5535         * src/head.c (long_options): Likewise.
5536         * src/tail.c (long_options): Likewise.
5538         * tests/misc/head-elide-tail: Update uses of undocumented, for-
5539         testing-only --presume* options to start with `---'.
5540         * tests/rm/dangling-symlink: Likewise.
5541         * tests/rm/dir-no-w: Likewise.
5542         * tests/rm/isatty: Likewise.
5544 2005-11-30  Jim Meyering  <jim@meyering.net>
5546         * Makefile.maint: Add a comment about cvsu.
5548 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
5550         * NEWS: df updates for "none", "proc", inaccessible file systems.
5551         * src/df.c (show_point): Ignore inaccessible file systems.
5552         (usage): -a includes dummy file systems, not size-0 file systems.
5554         * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
5555         to avoid collision with POSIX name space.  All uses changed.
5557 2005-11-24  Jim Meyering  <jim@meyering.net>
5559         * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
5560         * tests/acl: Add `$0: ' prefix to diagnostics.
5562         * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
5564 2005-11-23  Paul Eggert  <eggert@cs.ucla.edu>
5566         * src/copy.c: Improve performance a bit by optimizing away
5567         unnecessary system calls and going to a block size of at least
5568         8192 (on normal hosts, anyway).  This improved performance 5% on my
5569         Debian stable host (2.4.27 kernel, x86, copying from root
5570         ext3 file system to itself).
5571         Include "buffer-lcm.h".
5572         (copy_reg): Omit last argument.  All callers changed.
5573         Use xmalloc to allocate rather than trusting alloca
5574         (which is unwise with large block sizes).
5575         Declare locals more locally, if possible.
5576         Use uintptr_t words instead of int words, for a bit more speed
5577         when looking for null blocks on 64-bit hosts.
5578         Optimize away reads of zero bytes on regular files.
5579         In the typical case, insist on 8 KiB buffers, at least.
5580         Avoid unnecessary extra call to fstat when checking for sparse files.
5581         Avoid now-unnecessary cast to off_t, and "0L".
5582         Avoid unnecessary test of *new_dst when checking for same owner
5583         and group.
5585 2005-11-22  Paul Eggert  <eggert@cs.ucla.edu>
5587         * src/remove.c (rm): Don't assume C99 for-loop syntax.
5589 2005-11-22  Jim Meyering  <jim@meyering.net>
5591         * src/remove.c (AD_push): Remove debugging cruft.
5593         * tests/rm/unread2 (rm): Change expected diagnostic,
5594         `cannot open directory' to `cannot remove', to align with
5595         new version of rm.
5596         * tests/rm/rm2: Ensure that rm now continues removing entries
5597         even after certain types of failure.
5599         * src/remove.c: Rewrite.  Now, this module is reentrant on systems
5600         that provide openat (Solaris), and on systems like Linux+procfs
5601         where our openat emulation code is reentrant.  This also fixes a
5602         few low-probability leaks and eliminates some code that could,
5603         in very unusual circumstances, cause rm() (via a callee) to exit.
5604         * NEWS: Mention this.
5606         * configure.ac: Put copyright dates all on one line so the
5607         emacs function that updates them works properly.
5609 2005-11-18  Paul Eggert  <eggert@cs.ucla.edu>
5611         * configure.ac (AM_PROG_CC_C_O): Add.  Needed for CVS Automake.
5612         Problem reported by Eric Blake.
5613         (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
5614         we get a standard-conforming compiler.  This relies on the new
5615         m4/c.m4 file.  Note that it's a bit tricky, since c.m4 doesn't
5616         define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
5617         m4/c.m4 can go away with Autoconf 2.60 comes out.
5619 2005-11-17  Jim Meyering  <jim@meyering.net>
5621         * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
5622         (AD_mark_current_as_unremovable): Likewise, but for a local.
5623         (rm_1): Likewise.
5625         * tests/mv/acl: Let traps handle removing temporary directories.
5627         Expect acl-related tests to fail, until the corresponding
5628         patches are committed.
5629         * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
5630         * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
5632         ACL tests, from Andreas Gruenbacher.
5633         * tests/acl, tests/mv/acl, tests/cp/acl: New files.
5634         * tests/mv/Makefile.am (TESTS): Add acl.
5635         * tests/cp/Makefile.am (TESTS): Add acl.
5637         * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
5639 2005-11-16  Paul Eggert  <eggert@cs.ucla.edu>
5641         * NEWS: Improve quality of ln's diagnostics.
5642         * src/ln.c (do_link, usage): Likewise.
5643         (do_link): Don't use alloca on a buffer of unbounded size.
5645 2005-11-16  Jim Meyering  <jim@meyering.net>
5647         * tests/cp/fail-perm: Accommodate HPUX.  It appears to fail
5648         with EACCES rather than EPERM.  Reported by Peter O'Gorman here:
5649         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
5650         This also affects AIX 4.3.3, according to Ralf Wildenhues, in
5651         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
5653 2005-11-14  Jim Meyering  <jim@meyering.net>
5655         * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
5657 2005-11-13  Jim Meyering  <jim@meyering.net>
5659         * announce-gen: Accept new option, --gpg-key-id=ID and
5660         emit a blurb telling how to use the .sig files.
5661         * Makefile.cfg (gpg_key_ID): Define.
5662         * Makefile.maint (announcement): Use new option and key.
5664         Require that most .c files include <config.h>.
5665         * Makefile.maint (sc_require_config_h): New rule.
5666         (syntax-check-rules): Add it.
5667         * .x-sc_require_config_h: New file listing exceptions to the
5668         above rule.  Some are legit, others are simply grandfathered in.
5669         * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
5671 2005-11-12  Jim Meyering  <jim@meyering.net>
5673         * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
5675 2005-11-11  Jim Meyering  <jim@meyering.net>
5677         * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
5678         Mention new readlink options in 5.3.0's `New features' section.
5679         Spotted by Thomas Hood.
5681 2005-11-08  Jim Meyering  <jim@meyering.net>
5683         * NEWS: Merge in changes from b5_9x branch.
5685 2005-11-08  Paul Eggert  <eggert@cs.ucla.edu>
5687         * NEWS: ls now defaults to --time-style='locale', which in turn acts
5688         like --time-style='posix-long-iso' if the locale settings are messed up.
5689         * src/ls.c (decode_switches): Implement this.
5691 2005-11-08  Jim Meyering  <jim@meyering.net>
5693         * tests/du/2g: s/expensive/very expensive/ in a comment.
5694         From Paul Townsend.
5696 2005-10-17  Eric Blake  <ebb9@byu.net>
5698         * src/ls.c (usage): Fix descriptions of --sort, --time.
5699         Reported by Vitaly A. Ostanin.
5701 2005-11-04  Paul Eggert  <eggert@cs.ucla.edu>
5703         * src/ln.c: Include filenamecat.c.
5704         (FILE_BASENAME_CONCAT): Remove.
5705         (do_link): Remove last arg DEST_IS_DIR.  All callers changed.
5706         (main): Use file_name_concat, base_name, and strip_trailing_slashes
5707         instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
5708         the use of alloca.
5710 2005-11-04  Jim Meyering  <jim@meyering.net>
5712         * src/du.c (process_file): Don't overflow for files of size >= 2^31
5713         on systems with stat.st_blocks of a signed 32-bit type.
5714         This bug causes trouble on some AIX 5.1 systems.
5715         Report and trivial patch from Paul Townsend:
5716         <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
5717         * NEWS: Mention this.
5719         * tests/du/2g: New (very-expensive) test for the above-fixed bug.
5720         * tests/du/Makefile.am (TESTS): Add it here.
5721         * tests/very-expensive: New file.
5722         * tests/Makefile.am (EXTRA_DIST): Add it here.
5723         * tests/cp/perm: Mark this test as `very-expensive', too.
5725 2005-11-02  Paul Eggert  <eggert@cs.ucla.edu>
5727         * NEWS: Mention that rm -d and maybe ln -d are scheduled for
5728         removal in 2006.
5729         * src/remove.h (struct rm_options): Remove unlink_dirs.  All uses
5730         removed.
5731         * src/rm.c (usage): Don't mention rm -d.
5733 2005-11-02  Jim Meyering  <jim@meyering.net>
5735         * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
5736         From Andreas Schwab.
5738         * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
5739         `M+N records in/out' lines don't pollute `make check' output.
5741         * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
5742         fixed on 2005-10-31.  This test uses the new, IN_PIPE specifier.
5743         * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
5744         to indicate that the input file should be piped into the command
5745         under test (via `cat FILE | $prog ...').
5747         * src/remove.c (remove_entry): Emit a better diagnostic when rm
5748         (without -r) fails to remove a directory on a non-Linux system.
5749         This change affects only newer Solaris systems (with priv_*
5750         functions like priv_allocset).  Reported by Keith Thompson.
5752         * tests/rm/dir-nonrecur: New file/test for the above fix.
5753         * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
5755 2005-11-01  Paul Eggert  <eggert@cs.ucla.edu>
5757         * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
5758         POSIX 1002.1-2001 requires.
5759         * src/tail.c (parse_obsolete_option): Implement this.
5760         Problem reported by Vincent Lefevre.
5761         * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
5762         * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
5763         (test_vector): Add special cases for _POSIX2_VERSION, and
5764         regularize the old ones a bit.
5765         * tests/touch/obsolescent: Add y2000 test.
5767 2005-10-31  Paul Eggert  <eggert@cs.ucla.edu>
5769         * src/dd.c (skip): Fix off-by-one error reported by
5770         Theodoros V. Kalamatianos.
5772 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
5774         * tests/mkdir/p-3: Require that the test be run as non-root.
5775         Problem and trivial fix reported by Theodoros V. Kalamatianos.
5777 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
5779         * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
5780         boundary between DEST and SOURCE in the result.
5782 2005-10-26  Dmitry V. Levin  <ldv@altlinux.org>
5784         * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
5785         back to text, to sync with documentation and for backwards
5786         compatibility.
5788 2005-10-25  Jim Meyering  <jim@meyering.net>
5790         * tests/dircolors/simple (other-wr): Add an explicit test for
5791         the dircolors bug (NULL-dereference) fixed yesterday.
5793 2005-10-24  Jim Meyering  <jim@meyering.net>
5795         * src/tac.c (tac_file): When determining whether a file is seekable,
5796         also test whether it is a tty.  Using only the lseek-based test would
5797         give a false positive on Solaris.  Reported by Peter Fales.
5799 2005-10-24  Dmitry V. Levin  <ldv@altlinux.org>
5801         * tests/install/d-slashdot: New test, for "install -d" failure.
5802         * tests/install/Makefile.am (TESTS): Add d-slashdot.
5803         * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
5804         * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
5806 2005-10-24  Jim Meyering  <jim@meyering.net>
5808         * src/dircolors.c (ls_codes): Add missing comma.
5809         Anonymous report and patch from
5810         http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
5812         * src/dircolors.c: Add compile-time assertion that the slack_codes
5813         and ls_codes arrays have the same number of elements.  This would
5814         have prevented the above-fixed bug.
5816         * src/expand.c (parse_tab_stops): Add a comment to make this function
5817         identical to the one in unexpand.c.
5818         * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
5819         identical to the one in expand.c.
5821         * src/expand.c (next_file): Don't assume fopen cannot return stdin.
5823 2005-10-23  Jim Meyering  <jim@meyering.net>
5825         * src/md5sum.c (digest_check, main): Use ptr_align rather than
5826         a dangerous pointer-value-to-`unsigned' cast.
5827         * NEWS: mention the new sha* programs.
5828         * AUTHORS: Add new sha* programs.
5830 2005-08-28  David Madore  <david.madore@ens.fr>
5832         Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
5833         * README: Add their names to the list.
5834         * src/md5sum.c: Provide framework for computing sha-2 hashes.
5835         * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
5836         Rules for compiling sha-2 utilities
5837         (noinst_HEADERS): Remove checksum.h.
5838         * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
5839         New files.
5840         * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
5841         (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
5842         * tests/misc/sha224sum, tests/misc/sha256sum: New files.
5843         * tests/misc/sha384sum, tests/misc/sha512sum: New files.
5844         * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
5845         sha384sum, sha512sum test scripts here rather that each in its
5846         own directory.
5848 2005-08-28  David Madore  <david.madore@ens.fr>
5850         * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
5851         of the FIPS test vectors).
5853 2005-10-23  Jim Meyering  <jim@meyering.net>
5855         * configure.ac: Use 6.0-cvs as the version string.
5856         * NEWS: Adjust accordingly.
5859         -----
5861         Copyright (C) 2005, 2006 Free Software Foundation, Inc.
5863         Copying and distribution of this file, with or without
5864         modification, are permitted provided the copyright notice
5865         and this notice are preserved.