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