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