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