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