* .gitignore: Remove some references to files in subdirectories.
[platform/upstream/coreutils.git] / ChangeLog
1 2006-10-21  Jim Meyering  <jim@meyering.net>
2
3         * .gitignore: Remove some references to files in subdirectories.
4         * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
5         * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
6
7         * src/copy.c (copy_internal): Add a comment saying why we prefer
8         mknod over mkfifo.
9
10         Enable an fts optimization (call lstat only for directories,
11         on some file system types) also with the --preserve-root option
12         of chown or chgrp.
13         * src/chown-core.c (change_file_owner): Compare fts_statp-based
14         dev/ino against root dev/ino only for directories.
15         (chown_files): Don't let the root_dev_ino setting influence whether
16         we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
17
18 2006-10-20  Jim Meyering  <jim@meyering.net>
19
20         * src/od.c (usage): Change description of default to use "-w16",
21         not the now-invalid "-w 16" syntax.  From Dan Jacobson.
22
23 2006-10-19  Jim Meyering  <jim@meyering.net>
24
25         * bootstrap: Add names to each .gitignore file (if it exists)
26         as well as to .cvsignore.
27
28         * Makefile.maint (po-check): This rule didn't detect the new use
29         of "gettext" (as opposed to the use of "_" everywhere else) in
30         lib/xstrtol.h.  Adjust the grep regexp so that now it does.
31
32 2006-10-18  Paul Eggert  <eggert@cs.ucla.edu>
33
34         * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
35         when opening dst_name.
36         (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
37         (SYSCALL) to test for failure in a system call.
38
39         * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
40         a fifo.  This preserves the special mode bits on Solaris 10, which
41         is compatible with what Solaris 10 cp -R does.
42
43         * src/copy.c (copy_internal): Remove redundant and confusing local
44         variable src_type.
45
46         * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
47         7777.  This matches historical 'cp' behavior and avoids some
48         (though not all) implementation-defined behavior of mkdir.
49         * src/cp.c (make_dir_parents_private): Likewise.
50         * src/copy.c (copy_internal): Don't pass 'open' a mode greater
51         than 777.  This is required by POSIX.  It doesn't make any difference
52         in actual behavior on any host that I know of.
53
54 2006-10-17  Jim Meyering  <jim@meyering.net>
55
56         * src/dd.c (usage): Use two spaces (not one) to separate the
57         "fdatasync" option string from its description, so help2man formats
58         the derived man page properly.  Reported by Samuel Thibault
59         in <http://bugs.debian.org/393649>.
60
61 2006-10-16  Jim Meyering  <jim@meyering.net>
62
63         * .x-sc_trailing_blank: Remove names of files that are no longer
64         version-controlled.
65
66 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
67
68         * src/groups.sh (version): Reword message to match the other programs.
69         Problem reported by Eric Blake.
70
71 2006-10-14  Jim Meyering  <jim@meyering.net>
72
73         * Makefile.maint (headers_with_interesting_macro_defs): Define.
74         (.re-defmac, sc_always_defined_macros): New rules.
75
76         * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
77         Instead, include "exit.h".  This hereby retires the work-around for
78         "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
79
80         * src/cksum.c (uint_fast32_t): Don't define.
81         Instead, include <stdint.h>.
82
83         * src/pinky.c (S_IWGRP): Don't define.
84         It's already defined by "stat-macros.h" (included via system.h).
85
86         * Makefile.cfg: Remove cruft that's now handled via bootstrap.
87         * Makefile.maint: Likewise, remove these targets/rules/variables:
88         (local_updates, update, cvs-update, wget_files, get-targets): Remove.
89         (cvs_files, wget-update, automake_repo): Likewise.
90         Move the comment about cvsu to build-aux/vc-list-files,
91         where cvsu is actually used.
92
93         * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
94
95         Work also when the working directory (with e.g. coreutils sources)
96         is version controlled with git, rather than CVS.
97         * bootstrap (CVS_only_file): Test for the existence of README-cvs,
98         rather than CVS.
99         In messages and comments, say e.g., "checked-out sources",
100         rather than "CVS sources".
101         (version_controlled_file): New function.  Work for git as well as
102         for CVS.  Don't use grep's -q option.
103         (slurp): Call it here, in place of CVS-specific code.
104
105         * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
106         to dir1/dir2~.
107         * src/copy.c (copy_internal): Although we do create a backup of each
108         destination directory when in move mode, don't do that when copying.
109         Reported by Peter Breitenlohner, in
110         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
111         * tests/cp/backup-dir: New file.  Test for the above.
112         * tests/cp/Makefile.am (TESTS): Add backup-dir.
113
114 2006-10-13  Jim Meyering  <jim@meyering.net>
115
116         More chown/chgrp dereferencing-related fixes.
117         * src/chown-core.c (change_file_owner): Don't use fts_statp if
118         we're dereferencing symlinks.
119         Reverse conjuncts, so that we use dereference file_stats
120         (aka ent->fts_statp) only *after* we've confirmed that
121         chopt->affect_symlink_referent is true.  Otherwise, we might
122         use ent->fts_statp uninitialized.
123         Don't turn on FTS_NOSTAT when dereferencing symlinks.
124         * tests/chown/deref: Update the expected diagnostic, now that
125         this test case (trying to use "chown --dereference ..." on a
126         dangling symlink) takes a different code path.
127
128 2006-10-13  Paul Eggert  <eggert@cs.ucla.edu>
129
130         Sync from Bison, as follows:
131
132         2006-10-01  Paul Eggert  <eggert@cs.ucla.edu>
133
134         Fix problems with translating English-language diagnostics.
135         * bootstrap: Fix bug introduced in recent bootstrap changes, with
136         respect to bison-runtime pot generation.  The YY_ stuff
137         wasn't being captured.
138
139 2006-10-13  Jim Meyering  <jim@meyering.net>
140
141         * src/chown-core.c (change_file_owner): Use fstatat, not stat,
142         now that we're using fts_open with FTS_CWDFD.
143         * tests/chgrp/posix-H: Add --preserve-root to an invocation of
144         chgrp, to exercise the above fix.
145         * NEWS: Mention the above.
146
147         * src/du-tests: Clean up a little, though it's still not portable.
148
149         * .vg-suppressions: Add 3 more for debian unstable.
150
151         * tests/ls/Test.pm: Remove long-unused file.
152         * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
153         Suggestions from Bruno Haible.
154
155 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
156
157         * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
158         (MAINTAINERCLEANFILES): Add .kludge-stamp.
159         * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
160         instead of $(man_MANS).
161
162 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
163
164         * configure.ac: Avoid compiler warnings about default return
165         type in function definitions and unused variables in tests.
166         * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
167         if this is #defined.
168
169 2006-10-12  Jim Meyering  <jim@meyering.net>
170
171         * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
172         Call gl_INIT directly, rather than through the above.
173
174 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
175
176         * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
177         variable was sometimes used without being initialized.  This
178         messed up the installation of the INSTALL file in some cases.
179
180 2006-10-11  Jim Meyering  <jim@meyering.net>
181
182         * src/ls.c (usage): Correct description of -s, --size.
183         It works even without -l.  Suggestion from Karl Berry.
184
185 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
186
187         * src/ls.c (quote_name): Use initializer rather than memset to
188         initialize an object to zero.  This is easier to read and is less
189         likely to introduce a runtime error due to a mixup.  It causes
190         gcc -W to issue a warning, but you can work around this by
191         appending -Wno-missing-field-initializers.
192         * src/pathchk.c (portable_chars_only): Likewise.
193         * src/shred.c (main): Likewise.
194         * src/stty.c (main): Likewise.
195         * src/tr.c (card_of_complement): Likewise.
196         * src/wc.c (wc): Likewise.
197
198 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
199
200         * src/sort.c (usage): Mention again that sort fields are origin 1.
201
202         * NEWS: Fix typo: iso-8602 -> iso-8601.  Problem reported by
203         Bob Proulx.
204
205         * bootstrap (usage, main program, symlink_to_gnulib): Add option
206         --copy.  Inspired by a suggestion from Bruno Haible.
207
208 2006-10-09  Jim Meyering  <jim@meyering.net>
209
210         Avoid a compiler warning.
211         * src/pathchk.c (portable_chars_only): Initialize variable of type
212         mbstate_t via memset, rather than via '{0}'.  Patch from Bruno Haible.
213
214 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
215
216         Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
217         wrong file name in some cases.  Lars Wendler reported a bug in
218         my original fix.
219         * src/install.c (make_ancestor): New arg COMPONENT.
220         * src/mkdir.c (make_ancestor): Likewise.
221         * tests/install/basic-1: Check for install -Dv bug.
222         * tests/mkdir/Makefile.am (TESTS): Add p-v.
223         * tests/mkdir/p-v: New file, to test this bug.
224
225 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
226
227         * src/chgrp.c: Don't include lchown.h; no longer needed.
228         * src/chown.c: Likewise.
229
230         * tests/ls/stat-dtype: Use a dynamic test to decide whether the
231         current file system has useful d_type info.
232
233         * src/dd.c (flags): noatime and nofollow now depend on
234         HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
235         (usage): Output info about noatime and nofollow only if
236         they are known to work.
237         * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
238         than O_NOFOLLOW, when testing whether it's possible to avoid a
239         race condition reliably.
240
241 2006-10-05  Jim Meyering  <jim@meyering.net>
242
243         * src/c99-to-c89.diff: Update to reflect new offsets.
244
245         * tests/install/basic-1: Skip the latter part of this test if the
246         just-built dd binary is not readable.  Otherwise, this test would fail
247         when binaries were created as root.  Reported by Bauke Jan Douma in
248         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
249
250 2006-10-03  Paul Eggert  <eggert@cs.ucla.edu>
251
252         * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
253         MiB, since XFS hosts can legitimately have large values of
254         st_blksize.  Problem reported by Tony Ernst in
255         <http://savannah.gnu.org/bugs/?17903>.
256
257 2006-10-04  Jim Meyering  <jim@meyering.net>
258
259         * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
260         Paul Eggert pointed out that the specified file may exist,
261         in spite of such an errno value.
262         * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
263         * tests/rm/ignore-name-too-long: Remove file.
264         * NEWS: Update here, too.
265
266 2006-10-03  Jim Meyering  <jim@meyering.net>
267
268         * tests/rm/fail-eperm: Report failure also if rm is terminated by
269         a signal.
270
271         * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
272         and one in shred.c -- that were added before coreutils-6.3.
273         Reported by Michael Deutschmann.
274
275         * src/c99-to-c89.diff: Update to reflect new offsets.
276
277         * src/remove.c (remove_entry): With -f, exit successfully in spite
278         of a missing file under some very unusual conditions (with errno
279         being any of ENOENT, ENOTDIR, ENAMETOOLONG).
280
281         With --force (-f), rm no longer fails for ENOTDIR.
282         * src/remove.c (ignorable_missing): New function.
283         Use it everywhere, rather than open-coding the test.
284         Andreas Schwab reported the ENOTDIR problem.
285         (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
286
287         * NEWS: Mention the bug fix.
288         * tests/rm/ignorable: New file.  Test for the ENOTDIR case.
289         * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
290         * tests/rm/Makefile.am (TESTS): Add the new file names.
291
292         * bootstrap: Undo last change to this file, since now gnulib-tool
293         sticks with the automake default in generating dependencies.
294
295         * NEWS: Add a line for 6.4-cvs.
296         * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
297
298 2006-09-30  Jim Meyering  <jim@meyering.net>
299
300         Version 6.3.
301         * NEWS: Record the 6.3 release date.
302         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
303
304         * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
305
306         * src/c99-to-c89.diff: Update offsets.
307
308 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
309
310         * tests/rm/readdir-bug: Don't use $(...) in a shell script,
311         as it doesn't work with Solaris /bin/sh.
312
313 2006-09-29  Jim Meyering  <jim@meyering.net>
314
315         * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
316         the pinky segfault.
317
318         * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
319         use .1 as the increment.  Actual output varies too much.
320         [eq-wid-3]: New, commented out test.
321
322         * src/shuf.c (read_input): Fix an off-by-one error that
323         would cause an infloop for piped input of 8KB or more.
324         * NEWS: Mention the fix.
325         * tests/misc/shuf: Test for the above fix.
326
327         Since any system may be affected by the Darwin readdir bug,
328         perform the extra rewinddir unconditionally.  The performance
329         impact of rewinding a directory is negligible.
330         * src/remove.c (NEED_REWIND): Define to use
331         CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
332
333         * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
334         increment translates to a slightly larger value.
335         This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
336         The final expected value wasn't being printed.
337
338         Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
339         and NFS, whereby rm would not remove all files in a directory.
340         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
341         (NEED_REWIND): New macro, so that we incur the cost of the work-around
342         rewinddir only on afflicted systems.
343         * NEWS: Clarify and correct.
344         * tests/rm/readdir-bug: New file.  Test for the above fix.
345         * tests/rm/Makefile.am (TESTS): Add it.
346         Prompted by testing and analysis from Bruno Haible:
347         http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
348
349 2006-09-28  Paul Eggert  <eggert@cs.ucla.edu>
350
351         * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
352         suggested for Debian stable, which uses Perl 5.8.4.
353
354 2006-09-28  Jim Meyering  <jim@meyering.net>
355
356         Automatically generated dependencies are important even
357         when all of the sources in a directory come from gnulib.
358         * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
359         option that gnulib-tool adds to what becomes our lib/gnulib.mk.
360
361         * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
362         Ensure that IFS is set properly and unset PATH.
363         Sanitize inputs.
364         Work properly even when the name of the selected file starts with "-".
365         Invoke rm via "../../src/rm", and adjust expected output.
366         Prompted by a patch from Tim Waugh.
367
368         * README-cvs: Add Bison to the list of required packages.
369
370 2006-09-26  Jim Meyering  <jim@meyering.net>
371
372         * src/c99-to-c89.diff: Update offsets.
373
374         * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
375         it from removing a directory containing 188 or more entries.
376         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
377         20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
378         Reported by Matthew Woehlke.
379
380 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
381
382         * NEWS: "groups user" no longer outputs "user :"; you need at least
383         two users.  "groups" now processes options like --help more compatibly.
384         * src/groups.sh: Implement the option-processing change.
385         Handle user and group names with special characters more robustly.
386         Report write errors instead of exiting silently with status 1.
387
388 2006-09-26  Jim Meyering  <jim@meyering.net>
389
390         * README: Warn not to run autoreconf manually.  Use bootstrap instead.
391
392         * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
393         Rewrite to avoid using temporary, $status.
394
395         * NEWS: Mention the bug fix.
396         * src/groups.sh: Don't hide a write failure.
397         Reported by Iain Calder <ic56@rogers.com>.
398
399 2006-09-25  Jim Meyering  <jim@meyering.net>
400
401         * src/chown.c (usage): Clarify --dereference description.
402         * src/chgrp.c (usage): Likewise.  Suggestion from Jamie McClelland.
403
404 2006-09-24  Jim Meyering  <jim@meyering.net>
405
406         * NEWS: Mention these fixes.
407         * src/copy.c (copy_reg): With --verbose (-v), print
408         "removed `file_name'" just after unlinking a file.
409         (copy_internal): Likewise, in three more places.
410         Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
411         * tests/mv/hard-verbose: New file.  Test for the above fix.
412         * tests/mv/Makefile.am (TESTS): Add hard-verbose.
413
414         * tests/help-version (sync_args): Don't call sync, since it spins up
415         disks that I've deliberately caused to spin down (but not unmounted).
416
417         * NEWS: Mention the improvement to sort.
418
419         * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
420         as well as existing.
421
422         * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
423         since that predated addition of d_type support.
424
425 2006-09-23  Jim Meyering  <jim@meyering.net>
426
427         * gl/modules/getloadavg.diff: New file.  Work around the way the latest
428         version of the getloadavg module interacts with our bootstrap script.
429         * bootstrap (gnulib_tool_options): Add "--local-dir gl".
430         * Makefile.am (EXTRA_DIST): Sort file names.
431         Add bootstrap and gl/modules/getloadavg.diff
432
433 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
434
435         * bootstrap: Add support for --force.
436         (usage): New function.  Describe usage less tersely.
437         (CVS_only_file): New var.
438
439         * NEWS: Document fix for cp -i and mv -i.
440         * src/copy.c (copy_internal): With -i, prompt even if the source
441         is a directory and the destination is not.  This is required by
442         POSIX and gives the user a chance to bail out before failing.
443         * tests/cp/Makefile.am (TESTS): Add cp-i.
444         * tests/cp/cp-i: New file.
445         * tests/mv/Makefile.am (TESTS): Add i-5.
446         * tests/mv/i-5: New file.
447
448 2006-09-20  Jim Meyering  <jim@meyering.net>
449
450         * NEWS: Mention the chmod bug fix.
451
452         * tests/chmod/inaccessible: New test, specifically for this bug.
453         Based on a test case from Paul Eggert.
454         * tests/chmod/Makefile.am (TESTS): Add inaccessible.
455
456         Fix the 2006-09-18 bug differently.
457         * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
458         tell fts_read to stat the file again, in case it has become
459         accessible since the initial fts_open call.
460         * src/chown-core.c (change_file_owner): Likewise.
461
462         * src/chmod.c: Revert last change.  There is a better way.
463         * src/chown-core.c: Likewise.
464
465 2006-09-19  Paul Eggert  <eggert@cs.ucla.edu>
466
467         * src/ln.c (target_directory_operand): Rewrite to avoid porting
468         problem on Tandem reported by Matthew Woehlke in
469         <https://savannah.gnu.org/bugs/?17172>.
470
471 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
472
473         Fix bug where chmod, chown, and chgrp did not process operands
474         left-to-right in some cases.
475         * src/chmod.c (wd_errno): New var.
476         (chmod_file): New function, with most of the contents of the
477         old prcess_file function.
478         (process_files): Use it.  This gives file names to fts one
479         at a time, so that they are processed left-to-right as POSIX
480         requires.
481         * src/chown-core.c (wd_errno, chown_files): Likewise.
482         (chown_file): New function.
483         * tests/install/basic-1: Redo test so as to not workaround
484         the chmod bug, thereby testing for it.
485
486         * src/shuf.c (main): Quote the entire range when reporting an
487         invalid one, rather than just the part that contained the error.
488
489         * tests/stty/row-col-1: Rewrite to avoid temporary file that is
490         sometimes left behind if the test is skipped or interrupted.
491
492         * bootstrap (symlink_to_gnulib): New function.
493         (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
494         to copies-of-gnulib.
495         (cp_mark_as_generated, slurp, gnulib_files):
496         Avoid making a copy if it's the same as the old version.
497         (gnulib_files): Add support for this variable (used by Bison).
498
499         * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
500         indicating flaw in kernel.  Reword to say that the flaw isn't
501         serious for coreutils, since the flaw does affect ls -i.
502
503         * tests/chgrp/basic: Fix bug in test case exposed by building on
504         Solaris 8 in a setgid directory.  The test case incorrectly
505         assumed that 'symlink' would be in group $g1.
506
507 2006-09-18  Jim Meyering  <jim@meyering.net>
508
509         * NEWS: Add a line for 6.3-cvs.
510         * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
511
512         Version 6.2.
513         * NEWS: Record the 6.2 release date.
514         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
515
516 2006-09-17  Jim Meyering  <jim@meyering.net>
517
518         * tests/chgrp/basic: On an OpenBSD system, rather than failing
519         due to a known problem, merely warn about it.
520         Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
521         Instead, use stat to test file system for desired results, directly.
522         * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
523
524         * tests/envvar-check: Add more variable names to the list of those
525         that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
526         QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
527
528 2006-09-16  Paul Eggert  <eggert@cs.ucla.edu>
529
530         * NEWS: Document that mkdir -p and install -d now fork on occasion.
531         * bootstrap.conf (gnulib_modules): Add savewd.
532         * src/install.c: Include savewd.h.
533         (process_dir): New function.
534         (main, install_file_in_file_parents): Use it, along with the new
535         savewd module, to avoid some race conditions.
536         * src/mkdir.c: Include savewd.h.
537         (struct mkdir_options): New members make_ancestor_function, mode,
538         mode_bits.
539         (make_ancestor): Return 1 if the resulting directory is not readable.
540         (process_dir): New function.
541         (main): Use it, along with new savewd module, to avoid some
542         race conditions.  Fill in new slots of struct mkdir_options, so
543         that callees get the values.
544         * tests/install/basic-1: Test for coreutils 5.97 bug that was
545         fixed in coreutils 6.0, and which should still be fixed with
546         this change.
547         * tests/mkdir/p-3: Likewise.
548
549 2006-09-15  Jim Meyering  <jim@meyering.net>
550
551         * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
552         The 2006-09-08 changes made it so "mv dir new-name/" would
553         fail on NetBSD 1.6.  This makes it work once again.
554
555 2006-09-14  Jim Meyering  <jim@meyering.net>
556
557         * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
558         Instead, since it's a little fragile, assert the condition.
559         (target_directory_operand): Update comment to reflect latest change.
560
561 2006-09-12  Paul Eggert  <eggert@cs.ucla.edu>
562
563         * src/who.c (print_user): Rewrite to avoid warning from
564         GCC 4.1.1 with -Wall.
565
566 2006-09-12  Jim Meyering  <jim@meyering.net>
567
568         * tests/mv/atomic: Check for specific strace output, rather than
569         simply nonempty.  RHEL AS 4 would fail this test due to strace
570         generating "[ Process PID=14434 runs in 32 bit mode. ]".
571         Reported by Nelson Beebe.
572
573 2006-09-11  Jim Meyering  <jim@meyering.net>
574
575         * src/remove.c (remove_dir): Move new cache_stat_init call onto
576         it's own line.
577         (rm_1): Move declaration of "st" and new cache_stat_init call
578         "down" to nearer where they're used.
579         * src/c99-to-c89.diff: Add another set of curly braces.
580
581 2006-09-10  Paul Eggert  <eggert@cs.ucla.edu>
582
583         * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
584         substr's last operand is very large.  Performance problem reported
585         by Sebastian Kreft.
586
587 2006-09-09  Jim Meyering  <jim@meyering.net>
588
589         * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
590         are no .m4 files.
591         (sc_require_config_h): Skip this test if there are no version-
592         controlled .c files.
593         (sc_prohibit_assert_without_use): Likewise.
594
595 2006-09-08  Jim Meyering  <jim@meyering.net>
596
597         * bootstrap: Export CVS_RSH separate from its assignment, to work
598         even with Solaris 10's /bin/sh.  Suggestion from Mark D. Baushke.
599
600 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
601
602         * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
603         no file operand is given, and standard input is any FIFO.
604         This is in response to Open Group XCU ERN 114.
605         * src/tail.c (main): Likewise.
606
607 2006-09-08  Jim Meyering  <jim@meyering.net>
608
609         mv and "cp -r" no longer fail when invoked with two arguments
610         where the first one names a directory and the second name ends in
611         a slash and doesn't exist.  E.g., "mv dir B/", for nonexistent B,
612         now succeeds, once more. This reverts part of the 2004-06-27
613         change for 5.3.0.
614         * NEWS: Say the above.
615         * src/mv.c (target_directory_operand): Don't require (here)
616         that the target operand "look like" a directory.  This change
617         pushes the test down to the rename syscall level, where a
618         "mv dir existing-non-dir/" will mistakenly succeed on older systems
619         that ignore trailing slashes in the rename destination argument.
620         * src/cp.c (target_directory_operand): Likewise, but for cp.
621         * tests/mv/trailing-slash: Exercise the above fixes.
622         * tests/cp/trailing-slash: New file.
623         * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
624
625         * bootstrap: Use the previously unused variable, $src,
626         to avoid repeating "$GNULIB_SRCDIR/$file".
627
628         * bootstrap (cp_mark_as_generated): Don't use "local", to
629         accommodate ancient "/bin/sh".  Suggested by Ralf Wildenhues.
630         Rename now-global "$src" and "$dst" to have cp_ prefix.
631         Safer, and avoids confusion.
632
633         * bootstrap (cp_mark_as_generated): New function.
634         (slurp): Use it to prepend editor hints and a warning that
635         the file we're copying is generated.
636         Suggestion from Bruce Korb.
637         (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
638         Fix last-minute typo.
639
640 2006-09-07  Jim Meyering  <jim@meyering.net>
641
642         * bootstrap: Revert last change.  There are less disruptive ways
643         to mark these generated files as read-only.
644
645         * src/c99-to-c89.diff: Update to have proper offsets.
646
647 2006-09-06  Jim Meyering  <jim@meyering.net>
648
649         Ensure that some gnulib-tool-generated files are read-only.
650         * bootstrap (slurp): Put the body of this function in a sub-shell,
651         with "umask a-w" so that all new files are read-only.  Remove each
652         file before we write to it, in case it's read-only.
653         Make po/Makevars and runtime-po/Makevars read-only, too.
654
655 2006-09-05  Jim Meyering  <jim@meyering.net>
656
657         * tests/cp/acl: Skip this test when cp lacks ACL support.
658         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
659
660         * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
661         context from change of 2006-09-02.
662
663 2006-09-04  Jim Meyering  <jim@meyering.net>
664
665         * README-cvs: Fix typo in update command.
666
667 2006-09-03  Jim Meyering  <jim@meyering.net>
668
669         * NEWS: Tweak the wording in the new change description so that
670         no one can think this change causes e.g., `rm -fr foo../' to fail.
671
672         * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
673         Use $CONFIG_HEADER, rather than hard-coding it.
674         * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
675
676 2006-09-02  Paul Eggert  <eggert@cs.ucla.edu>
677
678         * NEWS: rm now rejects attempts to remove /, ./, and ../.
679         * src/basename.c: Don't include dirname.h, since system.h does it now.
680         * src/chmod.c: Likewise.
681         * src/copy.c: Likewise.
682         * src/cp.c: Likewise.
683         * src/df.c: Likewise.
684         * src/dircolors.c: Likewise.
685         * src/dirname.c: Likewise.
686         * src/du.c: Likewise.
687         * src/install.c: Likewise.
688         * src/ln.c: Likewise.
689         * src/ls.c: Likewise.
690         * src/mkdir.c: Likewise.
691         * src/mv.c: Likewise.
692         * src/remove.c: Likewise.
693         * src/rm.c: Likewise.
694         * src/rmdir.c: Likewise.
695         * src/shred.c: Likewise.
696         * src/split.c: Likewise.
697         * src/su.c: Likewise.
698         * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
699         now.
700         (dot_or_dotdot): Succeed even if "." or ".." is followed by a
701         slash.
702         * src/rm.c (usage, main): --preserve-root is now the default.
703         * src/remove.h: Fix comment.
704         * src/remove.c (cache_fstatat, cache_stat_init): New functions.
705         (cache_statted, cache_stat_ok): New functions.
706         (write_protected_non_symlink): Remove struct stat ** buf_p arg,
707         which is no longer needed with the new functions.  All callers
708         changed.
709         (prompt, is_dir_lstat, remove_entry, remove_dir):
710         New struct stat * arg.  All callers changed.
711         (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
712         (remove_cwd_entries, remove_dir, rm_1):
713         Use and maintain the file status cache.
714         (prompt, remove_entry): Omit the first "directory" in the diagnostic
715         "Cannot remove directory `foo': is a directory".  This causes "rm"
716         to pass a test case that it would otherwise fail now that it
717         "knows" more about its argument.  I think the diagnostic is better
718         without the first "directory" anyway.
719         (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
720         (rm_1): Reject attempts to remove /, ./, or ../.
721         * tests/rm/Makefile.am (TESTS): Add r-4.
722         * tests/rm/r-4: New file.
723
724 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
725
726         * src/stat.c: Include <stddef.h>
727         (alignof): New macro.
728         (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
729         Remove.
730         (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
731         (FSID_VAL): Remove.
732         (print_statfs): If f_fsid isn't an integer, grab its words one
733         at a time in little-endian order.  This is a bit easier to configure
734         and should avoid a compilation failure on MacOS reported by Bruno
735         Haible.
736
737 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
738
739         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
740         work around a Mac OS X porting problem reported by Bruno Haible in
741         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
742         (print_statfs): Use them.
743
744         * bootstrap.conf (gnulib_modules): Add isapipe.
745         * src/tail.c: Include isapipe.h.
746         (IS_PIPE_LIKE_FILE_TYPE): Remove.
747         (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
748         tailable, since this seems to be portable.
749         (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
750         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
751
752         * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
753         it for us.
754
755 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
756
757         * src/copy.c (copy_internal): Don't test whether macros like
758         S_ISLNK are defined, since they're always defined now.
759         * src/cp.c (main): Likewise.
760         * src/ln.c (main): Likewise.
761         * src/ls.c (get_link_name, make_link_name): Likewise.
762         * src/mknod.c (main): Likewise.
763         * src/mkfifo.c (usage): Likewise.
764         * src/who.c (S_IWGRP): Likewise.
765
766         Adjust to recent gnulib changes for the gnulib module.
767         * bootstrap.conf (gnulib_modules): Add fcntl.
768         * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove.  Other code
769         is already assuming these macros are defined.
770         (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
771         (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
772         Remove; the fcntl module now handles these.
773
774         Adjust to recent gnulib changes for the inttypes module.
775         * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
776         (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
777
778         * src/system.h: Don't bother to include <stdint.h>, since we can
779         now assume inttypes.h does the equivalent of including stdint.h.
780
781 2006-08-27  Jim Meyering  <jim@meyering.net>
782
783         * src/copy.c (copy_internal): Don't make a backup if the last
784         component of the source name is "." or "..".
785         Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
786         * NEWS: Mention this.
787         * tests/cp/src-base-dot: New file.  Test for the above fix.
788         * tests/cp/Makefile.am (TESTS): Add src-base-dot.
789
790         * src/system.h (DOT_OR_DOTDOT): Remove macro.  Rewrite as a...
791         (dot_or_dotdot): ...new static inline function.
792         * src/remove.c (rm_1): Reflect this renaming.
793         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
794
795         * src/copy.c (copy_internal): Add comments.
796
797 2006-08-26  Paul Eggert  <eggert@cs.ucla.edu>
798
799         * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
800         since Automake supplies them for us.  It always did -I$(srcdir),
801         and with the recent change to AC_CONFIG_HEADERS in configure.ac it
802         is now also doing -I../lib.
803
804         * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
805         Fail if the first "echo" fails.  Suppress diagnostics from "ls po/*.po"
806         since there might not be any .po files.
807         (WGET_COMMAND): Set to empty if wget doesn't
808         seem to be available.
809
810 2006-08-26  Jim Meyering  <jim@meyering.net>
811
812         This test was failing in some environments.
813         * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
814         to set LS_COLORS in the environment.
815         * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
816         Reported by Bob Proulx.
817
818         * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
819
820         * Makefile.am (EXTRA_DIST): Remove these files here, too:
821         .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
822         .x-sc_two_space_separator_in_usage.
823
824         Fix "mv --verbose --backup" so its output includes the
825         " (backup: foo.~1~)" suffix also when backing up a directory.
826         * NEWS: Report this bug fix.
827         * src/copy.c (emit_verbose): New function, factored out of...
828         (copy_internal): ...here.  Use the new function.
829         * tests/mv/backup-dir: Test for the above fix.
830         * tests/mv/Makefile.am (TESTS): Add backup-dir.
831
832 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
833
834         * .x-sc_no_if_have_config_h: Remove; no longer needed.
835         * .x-sc_prohibit_assert_without_use: Remove; it was empty.
836         * .x-sc_two_space_separator_in_usage: Likewise.
837         * Makefile.maint (sc_no_have_config_h): Renamed from
838         sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
839         is absent everywhere.
840         * bootstrap.conf (gnulib_modules): Add config-h.
841         * src/shred.c: Include <config.h> unconditionally, since
842         we now assume config.h exists.
843         * src/dircolors.c: Likewise.
844
845 2006-08-26  Jim Meyering  <jim@meyering.net>
846
847         "ls --color" would highlight other-writable and sticky directories
848         no differently than regular directories on a file system with
849         dirent.d_type support.
850         * NEWS: Say the above.
851         * src/ls.c (gobble_file): With --color, also stat the file when
852         we know it is a directory.
853         Derived from an anonymous one-line fix and bug report:
854         <http://savannah.gnu.org/bugs/?15043>.
855         * tests/ls/color-dtype-dir: New file.  Test for the above fix.
856         * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
857
858 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
859
860         * .cvsignore: Remove stamp-h1.  Add coreutils-*, to ignore
861         tarballs.
862         * bootstrap.conf: Add configmake, verify.
863         * src/.cvsignore: Remove localedir.h.
864         * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
865         subsumed by configmake.
866         * src/system.h: Include configmake.h rather than localedir.h
867         (LOCALEDIR): New macro.
868
869         Rewrite to avoid some unnecessary casts, macros, literals.
870         * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
871         not macros.
872         (SECTOR_SIZE, SECTOR_MASK): New constants.
873         (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
874         and use the SECTOR_* constants when applicable.  Check for size <
875         0 rather than size == -1, since negative-size files are a sign of
876         trouble anyway.
877
878 2006-08-25  Bruno Haible  <bruno@clisp.org>
879
880         * src/shred.c (dopass): Assume a continuable error if EIO even
881         if the current position is not a multiple of 512.
882
883 2006-08-24  Jim Meyering  <jim@meyering.net>
884
885         * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
886
887 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
888
889         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define.  This
890         macro was being used without being defined.
891         (SB_F_NAMEMAX): Remove cast.
892         (f_fsid) [BeOS]: Likewise.
893         (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
894         All uses changed.
895         (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
896         functions.
897         (xstrcat): Remove.  All uses changed to use the above functions.
898         (print_statfs, print_stat): 2nd arg is now the prefix len, not the
899         buffer len.  All uses changed.  Output '?', not '*', for unknown
900         data or errors.  Do not assume signed values can be interchanged
901         with unsigned when printing.
902         (print_statfs): For %i, print the fsid as a single int, not as a
903         pair.
904         (print_it): Quote invalid format better.
905
906         * NEWS: printf supports the I flag.
907         * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
908
909 2006-08-23  Bruno Haible  <bruno@clisp.org>
910
911         * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
912         (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
913         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
914
915         * src/ls.c (SA_RESTART): Fallback define.
916
917 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
918
919         * src/system.h (EDQUOT): Define if not already defined.
920         Problem reported by Bruno Haible for BeOS.
921
922         * .cvsignore: Remove config.h, config.hin, as they are now
923         in lib.
924         * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
925         to lib.
926         * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
927
928         * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
929         to accommodate today's gnulib change.
930
931 2006-08-23  Jim Meyering  <jim@meyering.net>
932
933         * NEWS: Mention the sweeping infrastructure changes.
934
935 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
936
937         * bootstrap.conf (gnulib_modules): Add gnupload.
938         * Makefile.maint (emit_upload_commands): gnupload is now
939         in build-aux.
940         * gnupload: Remove from CVS, since it's now a gnulib module.
941
942         * bootstrap (bootstrap_conf_cleanup): Remove.
943         (excluded_files): New var.
944         * bootstrap.conf: Likewise.
945         * bootstrap (slurp): Exclude files early if they're in the
946         excluded_files list.  That way, their names don't get put into
947         .cvsignore.
948
949         * aclocal.m4, config.hin, configure:
950         Remove from CVS, since ./bootstrap generates them automatically.
951         * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
952         configure, *.cache, *.lineno, *.log.
953         Remove more-specific entries.  This catches files like configure.lineno.
954         * man/.cvsignore: Add Makefile.in.
955         * src/.cvsignore: Add Makefile.in.
956         Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
957
958         * tests/.cvsignore:
959         * tests/chgrp/.cvsignore:
960         * tests/chmod/.cvsignore:
961         * tests/chown/.cvsignore:
962         * tests/cp/.cvsignore:
963         * tests/cut/.cvsignore:
964         * tests/dd/.cvsignore:
965         * tests/dircolors/.cvsignore:
966         * tests/du/.cvsignore:
967         * tests/expr/.cvsignore:
968         * tests/factor/.cvsignore:
969         * tests/fmt/.cvsignore:
970         * tests/head/.cvsignore:
971         * tests/install/.cvsignore:
972         * tests/join/.cvsignore:
973         * tests/ln/.cvsignore:
974         * tests/ls/.cvsignore:
975         * tests/ls-2/.cvsignore:
976         * tests/md5sum/.cvsignore:
977         * tests/misc/.cvsignore:
978         * tests/mkdir/.cvsignore:
979         * tests/mv/.cvsignore:
980         * tests/od/.cvsignore:
981         * tests/pr/.cvsignore:
982         * tests/readlink/.cvsignore:
983         * tests/rm/.cvsignore:
984         * tests/rmdir/.cvsignore:
985         * tests/seq/.cvsignore:
986         * tests/sha1sum/.cvsignore:
987         * tests/shred/.cvsignore:
988         * tests/sort/.cvsignore:
989         * tests/stty/.cvsignore:
990         * tests/sum/.cvsignore:
991         * tests/tac/.cvsignore:
992         * tests/tail/.cvsignore:
993         * tests/tail-2/.cvsignore:
994         * tests/tee/.cvsignore:
995         * tests/test/.cvsignore:
996         * tests/touch/.cvsignore:
997         * tests/tr/.cvsignore:
998         * tests/tsort/.cvsignore:
999         * tests/unexpand/.cvsignore:
1000         * tests/uniq/.cvsignore:
1001         * tests/wc/.cvsignore:
1002         Add Makefile.in.  Sort entries if necessary.  Remove *.I, *.E,
1003         *.X, *.O, *-tests, build-script, mk-script if they're never
1004         created in this directory.
1005
1006 2006-08-22  Bruno Haible  <bruno@clisp.org>
1007
1008         BeOS portability.
1009         * src/uptime.c: Include OS.h if it exists.
1010         (print_uptime): On BeOS, use the get_system_info function (actually a
1011         macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
1012         (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
1013
1014 2006-08-22  Jim Meyering  <jim@meyering.net>
1015
1016         * .cvsignore: Add ABOUT-NLS.
1017
1018         Move the check-AUTHORS rule to be run as part of "make distcheck",
1019         rather than "make check".
1020         * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
1021         cause "make check" to fail on systems unable to build all binaries.
1022         * Makefile.maint (check-AUTHORS): New rule.
1023         (local-checks-available): Add it here.
1024         Reported by Bruno Haible.  Needed for BeOS.
1025
1026 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
1027
1028         * src/df.c (print_header, show_dev): Use a column width that
1029         depends on the block size of -P is specified and not autoscaling.
1030         Problem reported by Gustavo G. Rondina in:
1031         http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
1032
1033 2006-08-21  Jim Meyering  <jim@meyering.net>
1034
1035         * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
1036         when the shell variable, SHELL, is not set.
1037         Trigger the failure with "(unset SHELL; make check TESTS=simple)".
1038         Reported by Sven Joachim in <http://bugs.debian.org/355368>.
1039
1040         * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
1041         in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
1042         Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
1043         od: invalid type string `u8';
1044         this system doesn't provide a 8-byte integral type
1045         FIXME: add a test for this, but skip it when sizeof uintmax < 8.
1046
1047 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
1048
1049         Add a bootstrap procedure, so that the CVS version contains fewer
1050         files and we bootstrap the rest from gnulib, gettext, etc.
1051         * README-cvs: New file.
1052         * bootstrap: New file.
1053         * bootstrap.conf: New file.
1054         * .x-sc_trailing_blank: Remove config-log, .gdb-history.  Add .po.
1055         * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
1056         of gnulib-tool.
1057         (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
1058         (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
1059         (gl_EARLY): Add.
1060         (gl_MACROS): Call just after gl_EARLY, just for clarity.
1061         * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
1062         * src/kill.c (strtoimax): Remove decl.
1063         * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
1064         * src/wc.c: Likewise.
1065         * src/ls.c (sort_files): Rewrite to avoid need for C99-style
1066         declaration, so that we don't need to patch this file.
1067         * src/printf.c (strtoimax, strtoumax): Remove decls.
1068         * src/su.c: Include getpass.h.
1069         (getpass): remove.
1070         * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
1071         Include inttypes.h unconditionally.
1072         (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
1073         (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
1074         (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
1075         (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
1076         (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
1077
1078         * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
1079         * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
1080         * tests/chmod/Makefile.in, tests/chown/Makefile.in:
1081         * tests/cp/Makefile.in, tests/cut/Makefile.in:
1082         * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
1083         * tests/du/Makefile.in, tests/expr/Makefile.in:
1084         * tests/factor/Makefile.in, tests/fmt/Makefile.in:
1085         * tests/general/Makefile.in, tests/head/Makefile.in:
1086         * tests/install/Makefile.in, tests/join/Makefile.in:
1087         * tests/ln/Makefile.in, tests/ls/Makefile.in:
1088         * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
1089         * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
1090         * tests/mv/Makefile.in, tests/od/Makefile.in:
1091         * tests/pr/Makefile.in, tests/readlink/Makefile.in:
1092         * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
1093         * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
1094         * tests/shred/Makefile.in, tests/sort/Makefile.in:
1095         * tests/stty/Makefile.in, tests/sum/Makefile.in:
1096         * tests/tac/Makefile.in, tests/tail/Makefile.in:
1097         * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
1098         * tests/test/Makefile.in, tests/touch/Makefile.in:
1099         * tests/tr/Makefile.in, tests/tsort/Makefile.in:
1100         * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
1101         * tests/wc/Makefile.in:
1102         Remove from CVS, since ./bootstrap generates them automatically.
1103
1104 2006-08-20  Eric Blake  <ebb9@byu.net>
1105
1106         * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
1107         the patch from 2006-08-18 broke on cygwin.
1108
1109 2006-08-20  Jim Meyering  <jim@meyering.net>
1110
1111         * NEWS: Add a line for 6.2-cvs.
1112         * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
1113
1114 2006-08-19  Jim Meyering  <jim@meyering.net>
1115
1116         * Version 6.1.
1117         * NEWS: Record the 6.1 release date.
1118         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1119
1120         * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
1121
1122         Avoid test failure when `make check' is run through debuild.
1123         * tests/help-version: Ensure that $SHELL is set to some value
1124         and exported.  Patch from Sven Joachim.  For details, see
1125         <http://bugs.debian.org/355368>.
1126
1127         * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
1128
1129         * README: Describe potential "pre-C99 build failure", and work-around.
1130
1131         Some of my 2006-07-03 changes to tests/*/Makefile.am were being
1132         backed out due to updates provoked by the copyright changes.
1133         * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
1134         it propagates to the derived Makefile.am files.
1135         ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
1136         so we don't mistakenly edit them again.
1137         * tests/cut/Makefile.am: Regenerate.
1138         * tests/head/Makefile.am: Likewise.
1139         * tests/join/Makefile.am: Likewise.
1140         * tests/pr/Makefile.am: Likewise.
1141         * tests/sort/Makefile.am: Likewise.
1142         * tests/tac/Makefile.am: Likewise.
1143         * tests/tail/Makefile.am: Likewise.
1144         * tests/test/Makefile.am: Likewise.
1145         * tests/tr/Makefile.am: Likewise.
1146         * tests/uniq/Makefile.am: Likewise.
1147         * tests/wc/Makefile.am: Likewise.
1148
1149         * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
1150         when the file's apparent size is not a multiple of its block size.
1151         * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
1152         For some file sizes, writing that single byte would unnecessarily
1153         waste a few file blocks.  That write may have been necessary in the
1154         early days of Linux, but now, removing it should be safe.
1155         Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
1156         * tests/cp/sparse: New test for the above.
1157         * tests/cp/Makefile.am (TESTS): Add sparse.
1158
1159         * tests/sparse-file: New file, essence factored out of...
1160         * tests/du/8gb: ... here.  Use the new script.
1161
1162 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
1163
1164         * src/system.h (select_plural): Reduce by 1000000, not 1000, since
1165         the CVS gettext manual now suggests 1000000.
1166
1167 2006-08-18  Bruno Haible  <bruno@clisp.org>
1168
1169         Add support for NetBSD 3.0.
1170         * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
1171         f_fstypename.
1172         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
1173         has a field f_fstypename.
1174         This undoes the 2006-08-15 to src/stat.c.
1175
1176 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
1177
1178         Copyright notice fixes.
1179
1180         * COPYING: Upgrade to latest version from FSF.
1181
1182         * src/uname.c: Use (C) in copyright notice.
1183
1184         * .vg-suppressions: Add copyright notice.
1185         * ChangeLog: Likewise.
1186         * ChangeLog-2005: Likewise.
1187         * Makefile.am: Likewise.
1188         * NEWS: Likewise.
1189         * README: Likewise.
1190         * README-valgrind: Likewise.
1191         * TODO: Likewise.
1192         * announce-gen: Likewise.
1193         * man/Makefile.am: Likewise.
1194         * man/chmod.x: Likewise.
1195         * man/chown.x: Likewise.
1196         * man/df.x: Likewise.
1197         * man/du.x: Likewise.
1198         * man/rm.x: Likewise.
1199         * src/dircolors.hin: Likewise.
1200         * src/du-tests: Likewise.
1201         * src/extract-magic: Likewise.
1202         * src/tac-pipe.c: Likewise.
1203         * src/wheel-gen.pl: Likewise.
1204         * tests/Coreutils.pm: Likewise.
1205         * tests/Makefile.am.in: Likewise.
1206         * tests/acl: Likewise.
1207         * tests/envvar-check: Likewise.
1208         * tests/expensive: Likewise.
1209         * tests/group-names: Likewise.
1210         * tests/help-version: Likewise.
1211         * tests/mk-script: Likewise.
1212         * tests/priv-check: Likewise.
1213         * tests/rwx-to-mode: Likewise.
1214         * tests/sample-test: Likewise.
1215         * tests/setgid-check: Likewise.
1216         * tests/chgrp/basic: Likewise.
1217         * tests/chgrp/deref: Likewise.
1218         * tests/chgrp/no-x: Likewise.
1219         * tests/chgrp/posix-H: Likewise.
1220         * tests/chgrp/recurse: Likewise.
1221         * tests/chmod/c-option: Likewise.
1222         * tests/chmod/equal-x: Likewise.
1223         * tests/chmod/equals: Likewise.
1224         * tests/chmod/no-x: Likewise.
1225         * tests/chmod/octal: Likewise.
1226         * tests/chmod/setgid: Likewise.
1227         * tests/chmod/umask-x: Likewise.
1228         * tests/chmod/usage: Likewise.
1229         * tests/chown/basic: Likewise.
1230         * tests/chown/deref: Likewise.
1231         * tests/chown/separator: Likewise.
1232         * tests/cp/Makefile.am: Likewise.
1233         * tests/cp/acl: Likewise.
1234         * tests/cp/backup-1: Likewise.
1235         * tests/cp/backup-is-src: Likewise.
1236         * tests/cp/cp-HL: Likewise.
1237         * tests/cp/cp-deref: Likewise.
1238         * tests/cp/cp-mv-backup: Likewise.
1239         * tests/cp/cp-parents: Likewise.
1240         * tests/cp/deref-slink: Likewise.
1241         * tests/cp/dir-rm-dest: Likewise.
1242         * tests/cp/dir-slash: Likewise.
1243         * tests/cp/dir-vs-file: Likewise.
1244         * tests/cp/fail-perm: Likewise.
1245         * tests/cp/into-self: Likewise.
1246         * tests/cp/link: Likewise.
1247         * tests/cp/link-no-deref: Likewise.
1248         * tests/cp/link-preserve: Likewise.
1249         * tests/cp/no-deref-link1: Likewise.
1250         * tests/cp/no-deref-link2: Likewise.
1251         * tests/cp/no-deref-link3: Likewise.
1252         * tests/cp/perm: Likewise.
1253         * tests/cp/preserve-2: Likewise.
1254         * tests/cp/r-vs-symlink: Likewise.
1255         * tests/cp/same-file: Likewise.
1256         * tests/cp/slink-2-slink: Likewise.
1257         * tests/cp/special-bits: Likewise.
1258         * tests/cp/symlink-slash: Likewise.
1259         * tests/cut/Makefile.am: Likewise.
1260         * tests/cut/Test.pm: Likewise.
1261         * tests/dd/misc: Likewise.
1262         * tests/dd/not-rewound: Likewise.
1263         * tests/dd/skip-seek: Likewise.
1264         * tests/dd/skip-seek2: Likewise.
1265         * tests/dd/unblock-sync: Likewise.
1266         * tests/dircolors/simple: Likewise.
1267         * tests/du/2g: Likewise.
1268         * tests/du/8gb: Likewise.
1269         * tests/du/Makefile.am: Likewise.
1270         * tests/du/basic: Likewise.
1271         * tests/du/deref: Likewise.
1272         * tests/du/deref-args: Likewise.
1273         * tests/du/exclude: Likewise.
1274         * tests/du/fd-leak: Likewise.
1275         * tests/du/files0-from: Likewise.
1276         * tests/du/hard-link: Likewise.
1277         * tests/du/inaccessible-cwd: Likewise.
1278         * tests/du/long-from-unreadable: Likewise.
1279         * tests/du/long-sloop: Likewise.
1280         * tests/du/no-deref: Likewise.
1281         * tests/du/no-x: Likewise.
1282         * tests/du/restore-wd: Likewise.
1283         * tests/du/slash: Likewise.
1284         * tests/du/slink: Likewise.
1285         * tests/du/trailing-slash: Likewise.
1286         * tests/du/two-args: Likewise.
1287         * tests/expr/basic: Likewise.
1288         * tests/factor/basic: Likewise.
1289         * tests/fmt/basic: Likewise.
1290         * tests/fmt/long-line: Likewise.
1291         * tests/general/Makefile.am: Likewise.
1292         * tests/general/atgeneral.m4: Likewise.
1293         * tests/general/dd.at: Likewise.
1294         * tests/head/Makefile.am: Likewise.
1295         * tests/head/Test.pm: Likewise.
1296         * tests/install/basic-1: Likewise.
1297         * tests/install/create-leading: Likewise.
1298         * tests/install/d-slashdot: Likewise.
1299         * tests/install/trap: Likewise.
1300         * tests/join/Makefile.am: Likewise.
1301         * tests/join/Test.pm: Likewise.
1302         * tests/ln/backup-1: Likewise.
1303         * tests/ln/misc: Likewise.
1304         * tests/ln/sf-1: Likewise.
1305         * tests/ln/target-1: Likewise.
1306         * tests/ls/Makefile.am: Likewise.
1307         * tests/ls/Test.pm: Likewise.
1308         * tests/ls/dangle: Likewise.
1309         * tests/ls/dired: Likewise.
1310         * tests/ls/file-type: Likewise.
1311         * tests/ls/follow-slink: Likewise.
1312         * tests/ls/infloop: Likewise.
1313         * tests/ls/inode: Likewise.
1314         * tests/ls/m-option: Likewise.
1315         * tests/ls/no-arg: Likewise.
1316         * tests/ls/recursive: Likewise.
1317         * tests/ls/rt-1: Likewise.
1318         * tests/ls/stat-dtype: Likewise.
1319         * tests/ls/stat-failed: Likewise.
1320         * tests/ls/stat-vs-dirent: Likewise.
1321         * tests/ls/symlink-slash: Likewise.
1322         * tests/ls/time-1: Likewise.
1323         * tests/ls-2/tests: Likewise.
1324         * tests/md5sum/basic-1: Likewise.
1325         * tests/md5sum/newline-1: Likewise.
1326         * tests/misc/Makefile.am: Likewise.
1327         * tests/misc/base64: Likewise.
1328         * tests/misc/basename: Likewise.
1329         * tests/misc/cat-proc: Likewise.
1330         * tests/misc/close-stdout: Likewise.
1331         * tests/misc/csplit: Likewise.
1332         * tests/misc/date: Likewise.
1333         * tests/misc/date-sec: Likewise.
1334         * tests/misc/df: Likewise.
1335         * tests/misc/dirname: Likewise.
1336         * tests/misc/expand: Likewise.
1337         * tests/misc/false-status: Likewise.
1338         * tests/misc/fold: Likewise.
1339         * tests/misc/head-c: Likewise.
1340         * tests/misc/head-elide-tail: Likewise.
1341         * tests/misc/head-pos: Likewise.
1342         * tests/misc/mknod: Likewise.
1343         * tests/misc/nice: Likewise.
1344         * tests/misc/nl: Likewise.
1345         * tests/misc/nohup: Likewise.
1346         * tests/misc/paste-no-nl: Likewise.
1347         * tests/misc/pathchk1: Likewise.
1348         * tests/misc/printf: Likewise.
1349         * tests/misc/printf-hex: Likewise.
1350         * tests/misc/pwd-long: Likewise.
1351         * tests/misc/sha224sum: Likewise.
1352         * tests/misc/sha256sum: Likewise.
1353         * tests/misc/sha384sum: Likewise.
1354         * tests/misc/sha512sum: Likewise.
1355         * tests/misc/shuf: Likewise.
1356         * tests/misc/sort-merge: Likewise.
1357         * tests/misc/sort-rand: Likewise.
1358         * tests/misc/split-a: Likewise.
1359         * tests/misc/split-fail: Likewise.
1360         * tests/misc/split-l: Likewise.
1361         * tests/misc/stat-fmt: Likewise.
1362         * tests/misc/stat-printf: Likewise.
1363         * tests/misc/tac-continue: Likewise.
1364         * tests/misc/test-diag: Likewise.
1365         * tests/misc/tty-eof: Likewise.
1366         * tests/misc/wc-files0: Likewise.
1367         * tests/misc/wc-files0-from: Likewise.
1368         * tests/mkdir/concurrent-1: Likewise.
1369         * tests/mkdir/p-1: Likewise.
1370         * tests/mkdir/p-2: Likewise.
1371         * tests/mkdir/p-3: Likewise.
1372         * tests/mkdir/p-slashdot: Likewise.
1373         * tests/mkdir/p-thru-slink: Likewise.
1374         * tests/mkdir/parents: Likewise.
1375         * tests/mkdir/perm: Likewise.
1376         * tests/mkdir/special-1: Likewise.
1377         * tests/mkdir/t-slash: Likewise.
1378         * tests/mkdir/writable-under-readonly: Likewise.
1379         * tests/mv/Makefile.am: Likewise.
1380         * tests/mv/acl: Likewise.
1381         * tests/mv/atomic: Likewise.
1382         * tests/mv/backup-is-src: Likewise.
1383         * tests/mv/childproof: Likewise.
1384         * tests/mv/diag: Likewise.
1385         * tests/mv/dir-file: Likewise.
1386         * tests/mv/dir2dir: Likewise.
1387         * tests/mv/dup-source: Likewise.
1388         * tests/mv/force: Likewise.
1389         * tests/mv/hard-2: Likewise.
1390         * tests/mv/hard-3: Likewise.
1391         * tests/mv/hard-4: Likewise.
1392         * tests/mv/hard-link-1: Likewise.
1393         * tests/mv/i-1: Likewise.
1394         * tests/mv/i-2: Likewise.
1395         * tests/mv/i-3: Likewise.
1396         * tests/mv/i-4: Likewise.
1397         * tests/mv/i-link-no: Likewise.
1398         * tests/mv/into-self: Likewise.
1399         * tests/mv/into-self-2: Likewise.
1400         * tests/mv/into-self-3: Likewise.
1401         * tests/mv/into-self-4: Likewise.
1402         * tests/mv/leak-fd: Likewise.
1403         * tests/mv/mv-special-1: Likewise.
1404         * tests/mv/no-target-dir: Likewise.
1405         * tests/mv/part-fail: Likewise.
1406         * tests/mv/part-hardlink: Likewise.
1407         * tests/mv/part-rename: Likewise.
1408         * tests/mv/part-symlink: Likewise.
1409         * tests/mv/partition-perm: Likewise.
1410         * tests/mv/perm-1: Likewise.
1411         * tests/mv/reply-no: Likewise.
1412         * tests/mv/setup: Likewise.
1413         * tests/mv/to-symlink: Likewise.
1414         * tests/mv/trailing-slash: Likewise.
1415         * tests/mv/update: Likewise.
1416         * tests/mv/vfat: Likewise.
1417         * tests/od/od-N: Likewise.
1418         * tests/od/x8: Likewise.
1419         * tests/pr/Makefile.am: Likewise.
1420         * tests/pr/Test.pm: Likewise.
1421         * tests/readlink/can-e: Likewise.
1422         * tests/readlink/can-f: Likewise.
1423         * tests/readlink/can-m: Likewise.
1424         * tests/readlink/rl-1: Likewise.
1425         * tests/rm/Makefile.am: Likewise.
1426         * tests/rm/cycle: Likewise.
1427         * tests/rm/dangling-symlink: Likewise.
1428         * tests/rm/deep-1: Likewise.
1429         * tests/rm/dir-no-w: Likewise.
1430         * tests/rm/dir-nonrecur: Likewise.
1431         * tests/rm/dot-rel: Likewise.
1432         * tests/rm/empty-inacc: Likewise.
1433         * tests/rm/empty-name: Likewise.
1434         * tests/rm/f-1: Likewise.
1435         * tests/rm/fail-2eperm: Likewise.
1436         * tests/rm/fail-eperm: Likewise.
1437         * tests/rm/hash: Likewise.
1438         * tests/rm/i-1: Likewise.
1439         * tests/rm/i-no-r: Likewise.
1440         * tests/rm/inaccessible: Likewise.
1441         * tests/rm/interactive-always: Likewise.
1442         * tests/rm/interactive-once: Likewise.
1443         * tests/rm/ir-1: Likewise.
1444         * tests/rm/isatty: Likewise.
1445         * tests/rm/no-give-up: Likewise.
1446         * tests/rm/r-1: Likewise.
1447         * tests/rm/r-2: Likewise.
1448         * tests/rm/r-3: Likewise.
1449         * tests/rm/rm1: Likewise.
1450         * tests/rm/rm2: Likewise.
1451         * tests/rm/rm3: Likewise.
1452         * tests/rm/rm4: Likewise.
1453         * tests/rm/rm5: Likewise.
1454         * tests/rm/sunos-1: Likewise.
1455         * tests/rm/unread2: Likewise.
1456         * tests/rm/unread3: Likewise.
1457         * tests/rm/unreadable: Likewise.
1458         * tests/rmdir/fail-perm: Likewise.
1459         * tests/rmdir/ignore: Likewise.
1460         * tests/rmdir/t-slash: Likewise.
1461         * tests/seq/basic: Likewise.
1462         * tests/sha1sum/basic-1: Likewise.
1463         * tests/sha1sum/sample-vec: Likewise.
1464         * tests/shred/exact: Likewise.
1465         * tests/shred/remove: Likewise.
1466         * tests/sort/Makefile.am: Likewise.
1467         * tests/sort/Test.pm: Likewise.
1468         * tests/sort-time/Makefile: Likewise.
1469         * tests/sort-time/README: Likewise.
1470         * tests/sort-time/rand-gen: Likewise.
1471         * tests/stty/basic-1: Likewise.
1472         * tests/stty/row-col-1: Likewise.
1473         * tests/sum/basic-1: Likewise.
1474         * tests/sum/sysv: Likewise.
1475         * tests/tac/Makefile.am: Likewise.
1476         * tests/tac/Test.pm: Likewise.
1477         * tests/tail/Makefile.am: Likewise.
1478         * tests/tail/Test.pm: Likewise.
1479         * tests/tail-2/Makefile.am: Likewise.
1480         * tests/tail-2/append-only: Likewise.
1481         * tests/tail-2/assert: Likewise.
1482         * tests/tail-2/assert-2: Likewise.
1483         * tests/tail-2/big-4gb: Likewise.
1484         * tests/tail-2/fflush: Likewise.
1485         * tests/tail-2/infloop-1: Likewise.
1486         * tests/tail-2/proc-ksyms: Likewise.
1487         * tests/tail-2/start-middle: Likewise.
1488         * tests/tail-2/tail-n0f: Likewise.
1489         * tests/tee/basic: Likewise.
1490         * tests/tee/dash: Likewise.
1491         * tests/test/Makefile.am: Likewise.
1492         * tests/test/Test.pm: Likewise.
1493         * tests/touch/Makefile.am: Likewise.
1494         * tests/touch/dangling-symlink: Likewise.
1495         * tests/touch/empty-file: Likewise.
1496         * tests/touch/fail-diag: Likewise.
1497         * tests/touch/fifo: Likewise.
1498         * tests/touch/no-create-missing: Likewise.
1499         * tests/touch/no-rights: Likewise.
1500         * tests/touch/not-owner: Likewise.
1501         * tests/touch/obsolescent: Likewise.
1502         * tests/touch/read-only: Likewise.
1503         * tests/touch/relative: Likewise.
1504         * tests/tr/Makefile.am: Likewise.
1505         * tests/tr/Test.pm: Likewise.
1506         * tests/tr/failures: Likewise.
1507         * tests/tsort/basic-1: Likewise.
1508         * tests/unexpand/basic-1: Likewise.
1509         * tests/uniq/Makefile.am: Likewise.
1510         * tests/uniq/Test.pm: Likewise.
1511         * tests/wc/Makefile.am: Likewise.
1512         * tests/wc/Test.pm: Likewise.
1513
1514 2006-08-17  Jim Meyering  <jim@meyering.net>
1515
1516         ls -CF would misalign columns in some cases.
1517         * src/ls.c (get_type_indicator): New function.  extracted from...
1518         (print_type_indicator): ...here.  Use it.
1519         (length_of_file_name_and_frills): Use it here, too, rather than
1520         assuming stat.st_mode is valid.
1521         Reported by Andreas Schwab, here:
1522         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
1523         See the test for this above. FYI, I did ls -CF /proc and visually
1524         inspected the result.
1525
1526         * src/copy.c (copy_internal, same_file_ok): Adjust comments not
1527         to mention the now-removed cp_options.xstat member.
1528
1529         * Makefile.maint (patch-check): Adapt to work now that the patch
1530         modifies more than one file in src/.
1531
1532         With this patch, permit building with Solaris cc on Solaris 7.
1533         * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
1534         This integrates patches from Bruno Haible.
1535
1536 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
1537
1538         Fix some problems reported by Bruno Haible.
1539         * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
1540         Skip this test if "chmod g+s d" silently does nothing.
1541         * tests/ls-2/tests: Skip this test suite if we can't set up files
1542         properly for the setuid-etc test.  This simplifies some of the
1543         hacks we were using to work around porting problems.
1544
1545 2006-08-16  Jim Meyering  <jim@meyering.net>
1546
1547         * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
1548         * tests/cp/acl: Instead, skip the test if either setfacl
1549         or getfacl fails.
1550         Reported by Michael Stone.
1551
1552 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
1553
1554         * tests/lang-default (LC_ALL): Set to "C", so we get
1555         English-language diagnostics.  Unset the other variables; it
1556         should be portable to use 'unset' for this stuff nowadays.
1557         Problem reported by Bruno Haible.  Using "C" reverses the
1558         2000-10-22 change to fileutils in this area.
1559
1560         Fix bugs when printing plurals of numbers that are not
1561         unsigned long int values.
1562         * src/system.h (select_plural): New function.
1563         * src/md5sum.c (digest_check): Use select_plural to avoid bug.
1564         * src/uptime.c (print_uptime): Likewise.
1565         * src/dd.c (print_stats): Likewise.  Also, don't use ngettext to
1566         print a floating point number, as reducing to 0 or 1 doesn't work
1567         for some languages.  Instead, just use "s" for seconds since it
1568         doesn't need a plural form.
1569
1570 2006-08-16  Bruno Haible  <bruno@clisp.org>
1571
1572         Old versions of gzip would write --help output to stderr, and it
1573         would be annoying to see that in the output of every "make" command.
1574         * Makefile.maint (gzip_rsyncable): Throw away stderr output of
1575         "gzip --help".
1576
1577 2006-08-16  Andreas Schwab  <schwab@suse.de>
1578
1579         * tests/cp/acl: Don't use non-portable == operator for test.
1580
1581 2006-08-16  Jim Meyering  <jim@meyering.net>
1582
1583         * tests/ls/stat-dtype: Use stat to test file system type, rather
1584         than df -T, in case /etc/mtab lies.  Reported by Michael Stone.
1585
1586 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
1587
1588         * NEWS: Mention that df exits with nonzero status if it generates
1589         no output.  This change was in 6.0 but inadvertently unmentioned.
1590         * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
1591         a boolean.
1592         (show_dev): Don't set it until we actually output something.
1593         Print the header if this is the first output.
1594         (main): Don't print a header, as that is now show_dev's job.
1595         * tests/misc/Makefile.am (TESTS): Add df.
1596         * tests/misc/df: New file.
1597
1598 2006-08-15  Eric Blake  <ebb9@byu.net>
1599
1600         * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
1601         statvfs.f_type not present.  See
1602         <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
1603
1604 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
1605
1606         * src/dd.c (print_stats): Don't substitute "1" for number, as this
1607         causes confusion for the Hungarian translators.  Problem reported
1608         by Egmont Koblinger here:
1609         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
1610
1611 2006-08-15  Jim Meyering  <jim@meyering.net>
1612
1613         * .x-sc_require_config_h: Add lib/at-func.c.
1614
1615         * NEWS: Add a line for 6.1-cvs.
1616         * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
1617
1618 2006-08-15  Jim Meyering  <jim@meyering.net>
1619
1620         * Version 6.0.
1621         * NEWS: Record the 6.0 release date.
1622         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1623
1624         * TODO: Add an item (convert to use gnulib-tool), add to the plan
1625         for id-vs-getgrouplist, and remove a few completed items.
1626
1627         * Makefile.maint (alpha beta major): Fix syntax error.
1628
1629 2006-08-13  Jim Meyering  <jim@meyering.net>
1630
1631         * src/shred.c (usage): Don't indent the second line of an item.
1632         Otherwise, help2man would misformat the output.
1633         Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
1634
1635 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
1636
1637         * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
1638         Suggested by Eric Blake to avoid problems like
1639         <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
1640
1641 2006-08-11  Jim Meyering  <jim@meyering.net>
1642
1643         * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
1644         failure that this test checks for (stat/dirent inode mismatch at
1645         a mount point), so continue to give a diagnostic about the failure,
1646         but don't actually count it as a failure.
1647
1648 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
1649
1650         * ABOUT-NLS: Update from gettext 0.15.
1651         * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
1652
1653         * src/csplit.c (struct control): Remove fastmap member.
1654         (extract_regexp): Allocate fastmap separately, since otherwise
1655         it might move due to a realloc.  This fixes a bug that led
1656         to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
1657
1658 2006-08-10  Jim Meyering  <jim@meyering.net>
1659
1660         * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
1661         reports "Linux".  This avoids a failure on Solaris 10's tmpfs.
1662         Redirect both stdout and stderr of df invocations.
1663
1664         * src/dircolors.hin: Add a TERM directive for each of the following:
1665         ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
1666         rxvt-cygwin-native, screen.linux, xterm-256color.
1667         Sort the TERM directives.
1668         From Mike Frysinger.
1669
1670 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
1671
1672         * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
1673         See Debian bug 373736.
1674
1675         * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
1676         bug 317503.
1677
1678         * src/.cvsignore: Add shuf.
1679
1680         * Makefile.maint: Remove the po-update procedure; it doesn't
1681         work with the new repository on http://www.iro.umontreal.ca/.
1682         For now I guess we'll have to fix things by hand.
1683         (do-po-update, po-update): Remove.  All references removed.
1684
1685         * src/shuf.c (next_line): New function.
1686         (read_input): Use it, to avoid relying on GCC-specific behavior
1687         with void * arithmetic.  Problem reported by Bob Proulx.
1688         * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
1689         to detect this sort of problem automatically in the future.
1690
1691 2006-08-09  Jim Meyering  <jim@meyering.net>
1692
1693         * src/ls.c: Add a compile-time check to ensure that filetype
1694         and filetype_letter have the same number of elements.
1695
1696         * tests/misc/sort-rand: Remove use of --seed=S.
1697
1698 2006-08-08  Paul Eggert  <eggert@cs.ucla.edu>
1699
1700         Add a command 'shuf', and modify shred and sort to use the new
1701         random number generator library of 'shuf'.
1702
1703         * AUTHORS: Add shuf.
1704         * README: Likewise.
1705         * NEWS: Likewise.  Mention new --random-source option for shred
1706         and sort.  Move "sort +1 -2" notice to the appropriate section,
1707         and clarify its role with respect to POSIXLY_CORRECT.
1708         * man/.cvsignore: Add shuf.1.
1709         * man/Makefile.am (dist_man_MANS): Add shuf.1.
1710         (shuf.1): New dependency.
1711         * man/shuf.x: New file.
1712         * src/Makefile.am (bin_PROGRAMS): Add shuf.
1713         (EXTRA_DIST): Remove rand-isaac.c.
1714         (shuf_LDADD): New macro.
1715         * src/rand-isaac.c: Remove, moving most of its contents to
1716         lib/rand-isaac.c.
1717         * src/shuf.c: New file.
1718         * src/shred.c: Use new random-number interface rather than rand-isaac.c.
1719         Don't include rand-isaac.c; include randint.h and randread.h instead.
1720         (RANDOM_SOURCE_OPTION): New enum.
1721         (long_opts, usage, main): New option --random-source.
1722         * src/sort.c: Likewise.
1723         * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
1724         All callers changed to use randint interface.
1725         (fillrand): Remove.  All callers changed to use randread interface.
1726         (dopass): Remove dependency on ISAAC buffer size.
1727         (genpattern): Don't wipe the random state here.
1728         (randint_source): New static var.
1729         (clear_random_data): New function.
1730         (main): Allocate random source, and arrange to wipe it on exit.
1731         * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
1732         (longopts, usage, main): Remove undocumented --seed option;
1733         it's now replaced by --random-source.
1734         (rand_state, get_hash): Remove.
1735         (randread_source): New static var.
1736         (random_state, cmp_hashes, compare_random): New functions; they guarantee
1737         no collisions in the random hash function.
1738         (keycompare): Use compare_random for -R; don't fall back on comparing
1739         via memcoll, since compare_random does the right thing.
1740         * tests/misc/Makefile.am (TESTS): Add shuf.
1741         * tests/misc/shuf: New file.
1742
1743 2006-07-29  Paul Eggert  <eggert@cs.ucla.edu>
1744
1745         * src/copy.c (set_author): Preserve the st_author field via the
1746         file descriptor dest_desc.
1747
1748 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
1749
1750         * NEWS: chmod now preserves setuid and setgid bits on directories
1751         if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
1752
1753         Fix test case problems if working directory is setgid,
1754         reported by Bob Proulx.
1755         * tests/cp/fail-perm: Use symbolic mode so that we clear
1756         setgid bit more reliably on directories.
1757         * tests/mkdir/special-1 (set_mode_string): Likewise.
1758
1759 2006-07-27  Jim Meyering  <jim@meyering.net>
1760
1761         * src/chgrp.c (usage): Use correct grammar in description of the
1762         --reference option
1763         * src/chown.c (usage): Likewise.
1764
1765 2006-07-26  Thomas Schwinge  <tschwinge@gnu.org>  (tiny change)
1766
1767         * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
1768         Correctly access SRC_SB's element ST_AUTHOR.
1769
1770 2006-07-26  Jim Meyering  <jim@meyering.net>
1771
1772         * tests/ls/stat-failed: Adapt to match new expected output.
1773         From Paul Eggert.
1774
1775         * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
1776         than having the code test for all of the other types first.
1777         Hoist the set-uid/gid-testing code "up" into this new block.
1778         Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
1779         C_ORPHAN, not as C_FILE.
1780
1781 2006-07-26  Jim Meyering  <jim@meyering.net>
1782
1783         Checking in a change from Paul.
1784
1785         2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
1786
1787         * src/ls.c (DT_INIT): Remove.  All uses removed.
1788         (enum filetype): Use an ordinary enum rather than trying to keep
1789         the values in sync with DT_FIFO etc.  That way, we don't have
1790         to make special assumptions about them.  All uses changed.
1791         (whiteout): New constant member of enum filetype.
1792         (filetype_letter): New constant, for use with enum filetype.
1793         (FILETYPE_INDICATORS): New initializer list.
1794         (print_dir): Add case for DT_WHT.
1795         (gobble_file): If stat fails, don't discard information from
1796         readdir; instead, preserve it so it can be printed.
1797         (print_long_format): Fall back on readdir result if stat info
1798         is not available.  Use "?" to denote each unknown mode char,
1799         instead of an overall "?", since we now know some of the mode
1800         typically.
1801         (print_type_indicator): Now that MODE isn't necessarily
1802         useful, guard all uses.
1803         Now that two blocks in the type-checking tree can set "type = C_FILE",
1804         move the suffix-handling code out and down.
1805
1806 2006-07-26  Jim Meyering  <jim@meyering.net>
1807
1808         Prepare for the above change.
1809         * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
1810         and adjust uses.  From a patch by Paul Eggert.
1811
1812 2006-07-26  Jim Meyering  <jim@meyering.net>
1813
1814         * src/ls.c: Correct indentation/formatting in a few places.
1815
1816 2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
1817
1818         * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
1819         Problem report and fix from Bob Proulx.
1820         * NEWS: Clarify the "chmod 0500" news, and correct the vague
1821         statements about compatibility with BSD.
1822
1823 2006-07-25  Jim Meyering  <jim@meyering.net>
1824
1825         * src/ls.c (gobble_file): When handling a stat-failed entry,
1826         print the entry name not the absolute_name -- to be consistent
1827         with the usual case.
1828         * tests/ls/stat-failed: Update accordingly.
1829
1830         * src/ls.c: Add parens around the new uses of ?: ternary operator.
1831
1832         * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
1833         symlinks.
1834
1835         Get --dired offsets right when handling stat-failed entries.
1836         * src/ls.c (print_long_format): Be careful to increment P by the
1837         appropriate amount, even when inode_number_width and nlink_width
1838         are zero.
1839         * tests/ls/stat-failed: Test for the above.
1840
1841         * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
1842         have_acl member.  That would happen for a directory with both a
1843         non-stat'able entry and one with an ACL.
1844
1845         * src/ls.c (gobble_file): Make it so failure to stat a
1846         non-command-line file provokes an exit status of 1, not 0.
1847         Say "cannot access" rather than "cannot stat".
1848         * tests/ls/stat-failed: New file/test, for the above.
1849         * tests/ls/Makefile.am (TESTS): Add stat-failed.
1850         * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
1851         of "cannot access " to diagnostic.
1852
1853         * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
1854
1855         * src/ls.c [enum filetype] (command_line): Remove member.  Not needed.
1856         Replace all occurrences of "type == command_line" with the
1857         equivalent, "command_line_arg".
1858
1859         * src/ls.c: Apply the stat-failed parts of Red Hat's
1860         coreutils-selinux.patch.  From Ulrich Drepper.
1861         This makes it so files not mentioned on the command line (e.g.,
1862         names read from a directory that *is* mentioned on the command
1863         line) for which stat fails are still listed.  With --color,
1864         such files are colored just like ORPHANs (aka dangling symlinks).
1865
1866         * src/df.c (n_valid_args): Declare global to be static.
1867
1868 2006-07-24  Jim Meyering  <jim@meyering.net>
1869
1870         * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
1871         system lacks d_type support.
1872
1873 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
1874
1875         * man/chmod.x: Update to reflect recent changes to coreutils.texi.
1876
1877 2006-07-21  Jim Meyering  <jim@meyering.net>
1878
1879         * src/su.c (usage): Correct typo in --help output: s/commmand/command/
1880         Reported by Tim Waugh.
1881         Also remove the comment duplicating much of --help output.
1882
1883         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
1884         name so the list remains alphabetized.
1885
1886         Fix another bug: ls --indicator-style=file-type would call
1887         stat for a symlink, even though it wasn't always needed.
1888         In some cases, that unnecessary stat would cause ls to fail.
1889         * src/ls.c (gobble_file): Don't treat symlinks specially (in
1890         requiring a stat syscall).  Remove the offending exclusion.
1891
1892         * NEWS: Mention the fix.
1893
1894         * tests/ls/stat-dtype: New file/test, for the above fix.
1895         Also exercises the new df feature, below.
1896
1897         * src/df.c (main): Fail and don't print the headers if no
1898         file system is processed.  This makes it easy to test whether
1899         a specified directory is on a file system of a given type or types.
1900         Otherwise, applications would have had to parse df's output.
1901         E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
1902
1903         Fix a bug: ls --file-type worked like --indicator-style=slash,
1904         rather than like --indicator-style=file-type.
1905         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
1906         (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
1907         not to 'p'.
1908         (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
1909         * NEWS: Mention the fix.
1910         * tests/ls-2/tests (file-type): New test, for the above fix.
1911
1912 2006-07-19  Jim Meyering  <jim@meyering.net>
1913
1914         * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
1915
1916         * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
1917
1918 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
1919
1920         * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
1921         of directories alone unless you specify them explicitly.
1922         install and mkdir now implement X correctly.
1923         install now creates parent directories with mode 755, without
1924         changing their owner or group.
1925         * src/chmod.c (process_file): Adjust to mode_adjust API change.
1926         * src/install.c: Include mkancesdirs.h.
1927         (announce_mkdir, make_ancestor): New functions.
1928         (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
1929         (mode): Use it.
1930         (dir_mode, dir_mode_bits): New vars.
1931         (main): Set dir modes separately from nondir, so that the X
1932         op of -m works correctly.
1933         (main): Remove cwd_errno cruft, since make_dir_parents no longer
1934         affects cwd.  Adjust to new make_dir_parents API.
1935         (install_file_in_file_parents): 2nd arg is now char *, not char
1936         const *.  Use mkancesdirs instead of rolling our own code.
1937         (change_attributes): Don't worry about AFS, since that kludge
1938         should not be needed any more.
1939         * src/mkdir.c (struct mkdir_options): New struct.
1940         (announce_mkdir, make_ancestor): New functions.
1941         (main): Use them.  Adjust to mode_adjust API change.  Stick with
1942         umask 0.  Use make_dir_parents for all the work.
1943         * src/mkfifo.c (main): Adjust to new mode_adjust API.
1944         * src/mknod.c (main): Likewise.
1945         * tests/chmod/setgid: Do the setgid test instead of bailing.
1946         * tests/mkdir/p-3: Remove re_protect case that no longer applies.
1947         GNU chmod now behaves like other versions of chmod.
1948         * tests/mkdir/perm: Add a test for the X bug.
1949
1950 2006-07-14  Paul Eggert  <eggert@cs.ucla.edu>
1951
1952         * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
1953         This doesn't fix any bugs, since OUT always equals stdout, but it
1954         makes the code easier to understand.
1955
1956 2006-07-14  Jim Meyering  <jim@meyering.net>
1957
1958         * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
1959         rather than open-coding it.  Now supports mercurial, too.
1960         * .hgignore: New file.
1961         * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
1962         all generated files, including ones like configure and po/*.po
1963         that are currently version-controlled in cvs.
1964
1965         * Makefile.am (EXTRA_DIST): Add a few more .??* files.
1966         They've been in CVS, just haven't been distributed before this.
1967         Distribute ChangeLog-2005, too.
1968         (MAINTAINERCLEANFILES): Add THANKS-to-translators.
1969
1970 2006-07-11  Paul Eggert  <eggert@cs.ucla.edu>
1971
1972         * src/system.h: Assume <dirent.h> exists, since gnulib assumes
1973         this now as well.
1974
1975 2006-07-09  Jim Meyering  <jim@meyering.net>
1976
1977         * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
1978         That happens with Linux/tmpfs.
1979         * tests/mv/Makefile.am (TESTS): Add dir2dir.
1980
1981 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
1982
1983         Adjust to recent updates from gnulib.
1984         * src/dd.c (apply_translations): Use toupper rather than
1985         islower followed by toupper; it's simpler and typically
1986         faster now that we assume at least C89 semantics.  Similarly
1987         for tolower.
1988         * src/sort.c (inittables): Likewise.
1989         * src/expand.c (expand): Don't assume that isprint etc. return
1990         booleans (needed for pre-C99 hosts).
1991         * src/fmt.c (check_punctuation): Likewise.
1992         * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
1993         * src/tr.c (is_char_class_member): Likewise.
1994         * src/unexpand.c (unexpand): Likewise.
1995         * src/join.c (is_blank): Remove; no longer needed.  All uses
1996         replaced by isblank (to_uchar (...)).
1997         * src/pinky.c (create_fullname): Don't assume char is unsigned.
1998         * src/printf.c (print_esc): Likewise.
1999         * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
2000         (copy_unescaped_string): Likewise.
2001         * src/stat.c (print_it): Likewise.
2002         * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
2003         convenience on GNU systems.  All uses changed.  Don't bother
2004         looking for any dirent.h substitute other than ndir.h.
2005         (D_INO): Remove unnecessary parentheses.
2006         (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
2007         (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
2008         (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove.  All uses changed
2009         to ctype.h equivalents.
2010         (isblank): Renamed from ISBLANK.  Check for HAVE_DECL_ISBLANK too.
2011         All uses changed.
2012
2013 2006-07-08  Jim Meyering  <jim@meyering.net>
2014
2015         * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
2016
2017         * Makefile.maint (sc_the_the): New rule.
2018
2019         * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
2020         * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
2021         in a comment.
2022
2023 2006-07-07  Jim Meyering  <jim@meyering.net>
2024
2025         * NEWS: Mention that mv can now remove an empty destination directory,
2026         and give an example.  Prompted by a report from Florent Bayle.
2027
2028 2006-07-05  Jim Meyering  <jim@meyering.net>
2029
2030         * src/ls.c (usage): Correct the description of -G: it is useful
2031         only in a long listing.  Reported by Martin Pool in
2032         <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
2033
2034         * man/chmod.x: Correct the description of the sticky bit.  Reported
2035         by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
2036
2037         * src/copy.c (copy_internal): Don't work around old NFS clients like
2038         SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
2039         ENOTEMPTY upon failed rename.  Otherwise, we risk misinterpreting
2040         a banal failure as a recursive move-into-self failure.
2041         Reported by Florent Bayle in <http://bugs.debian.org/376749>.
2042
2043         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
2044
2045 2006-07-03  Jim Meyering  <jim@meyering.net>
2046
2047         Plug another unusual leak.
2048         (AD_mark_helper): Free malloc'd filename if hash_insert says
2049         that string is already in the hash table.
2050
2051         The dev/inode of the topmost directory in each hierarchy were not
2052         being recorded.
2053         * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
2054         (AD_push): Call it from here instead.
2055
2056         Fix two small leaks.
2057         * src/remove.c (AD_stack_clear): New function.
2058         (rm_1): Use it.
2059         (AD_pop_and_chdir): Free *prev_dir just before longjmp.
2060
2061         * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
2062         Add $VG_PATH_PREFIX as a prefix to $PATH
2063
2064         * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
2065         * tests/Makefile.am (evar-check): Remove rule.
2066         (EXTRA_DIST): Remove .env-warn.
2067         * tests/.env-warn: Remove file.  No longer used.
2068         Suggestion from Eric Blake.
2069
2070 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
2071
2072         * src/system.h: Include <stdint.h> unconditionally, since we
2073         now assume the stdint module.
2074
2075 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
2076
2077         * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
2078         only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
2079         * src/tail.c (main): Implement this.
2080         * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
2081         (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
2082
2083 2006-07-01  Jim Meyering  <jim@meyering.net>
2084
2085         * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
2086
2087         * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
2088         passes once again.
2089
2090 2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
2091
2092         * NEWS: seq now uses long double internally rather than double.
2093         It now defaults to a minimal fixed point format if possible.
2094         It lets you use %a, %A, %E, %F, %G.
2095         * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
2096         * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
2097         (isfinite) [!defined isfinite]: New macro.
2098         (separator, terminator): Now points to const.
2099         (first, step, last): Remove.
2100         (usage): Update to match new behavior.
2101         (struct operand, operand): New type.
2102         (scan_arg): Renamed from scan_double_arg, since we no longer use double.
2103         All uses changed.
2104         Compute and return a value of type operand, not double.
2105         (long_double_format): Renamed from valid_format, and now returns a
2106         new format with an "L" added if needed, if the original format was
2107         valid.  Allow %a, %A, %E, %F, and %G formats.
2108         (print_numbers): Take numeric values as args rather than from globals.
2109         Print long double, not double.
2110         (get_width_format): Remove.
2111         (get_default_format): New function.
2112         (main): Implement new way of calculating default format.
2113         Don't worry about locale's representation of the decimal point, since
2114         the arguments are always processed in the C locale.
2115         * tests/seq/basic (neg-2): Adjust to new default format.
2116         (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
2117         implementation should do the right thing.
2118
2119 2006-06-30  Jim Meyering  <jim@meyering.net>
2120
2121         * tests/stty/basic-1: Work around an intermittent test failure
2122         on HP-UX 11.11.  Report and analysis from Bob Proulx.
2123         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
2124
2125 2006-06-28  Paul Eggert  <eggert@cs.ucla.edu>
2126
2127         * NEWS: Support obsolete usages like "sort +1 -2" even when
2128         conforming to POSIX 1003.1-2001, since this is a pure extension to
2129         POSIX.  Problem reported by Christian in:
2130         http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
2131         * src/sort.c (main): Implement this.
2132
2133         * src/system.h (CLOSEDIR): Remove.  All uses changed to closedir.
2134         Autoconf 2.60 says this stuff was obsolete.
2135
2136 2006-06-28  Jim Meyering  <jim@meyering.net>
2137
2138         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
2139
2140 2006-06-28  Bob Proulx  <bob@proulx.com>  (tiny change)
2141
2142         * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
2143         (set -x when VERBOSE=yes) when stderr is redirected before stdout
2144         causing shell tracing of the stdout redirection to be written to
2145         the stderr file.  Avoid problem and test failure on HP-UX by
2146         redirecting stderr last.
2147         * tests/dd/unblock-sync: Order shell file redirections for
2148         stderr and stdout in the common style.
2149         tests/acl: Likewise.
2150
2151 2006-06-27  Jim Meyering  <jim@meyering.net>
2152
2153         * tests/misc/cat-proc: Try to avoid any spurious numeric
2154         differences in frequently-changing /proc/cpuinfo.
2155         Reported by Nelson Beebe.
2156
2157 2006-06-26  Jim Meyering  <jim@meyering.net>
2158
2159         Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
2160         fd_to_subdirp failure, not just when errno == EACCES.
2161         * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
2162         rmdir, here, even though rmdir may happen to be adequate.
2163
2164         * NEWS: rm no longer fails to remove an empty, unreadable directory
2165         * src/remove.c (remove_cwd_entries): If we can't open a directory,
2166         and the failure is not being ignored, try to remove the directory
2167         with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
2168         Problem report and test case from Paul Eggert in
2169         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
2170
2171         * tests/rm/empty-inacc: New test, for the above.
2172
2173         Avoid a segfault for wc --files0=- < /dev/null.
2174         * src/wc.c (compute_number_width): Return right away if nfiles == 0.
2175
2176 2006-06-25  Jim Meyering  <jim@meyering.net>
2177
2178         * NEWS: wc accepts a new option --files0-from=FILE, where FILE
2179         contains a list of NUL-separated file names.
2180
2181         * src/wc.c: Include "readtokens.h".
2182         (usage): Describe the new option, and adjust the `Usage':
2183         with this option, no FILE may be specified on the command line.
2184         (main): Handle the new option.
2185         * tests/misc/wc-files0: New tests, for the above.
2186         * tests/misc/wc-files0-from: Likewise.
2187         * tests/misc/Makefile.am (TESTS): Add wc-files0.
2188
2189 2006-06-24  Jim Meyering  <jim@meyering.net>
2190
2191         * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
2192
2193 2006-06-22  Jim Meyering  <jim@meyering.net>
2194
2195         * src/tee.c (tee_files): Rename from tee, to avoid conflict with
2196         the function in glibc's <fcntl.h>.  Reported by Andreas Schwab.
2197
2198 2006-06-19  Jim Meyering  <jim@meyering.net>
2199
2200         * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2201         so this check is not run as part of "make distcheck".
2202
2203 2006-06-18  Bob Proulx  <bob@proulx.com>  (tiny change)
2204
2205         * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
2206
2207 2006-06-18  Jim Meyering  <jim@meyering.net>
2208
2209         * tests/misc/pwd-long: Make error output a little clearer.
2210
2211 2006-06-17  Jim Meyering  <jim@meyering.net>
2212
2213         * tests/rm/inaccessible: Skip this test on systems without openat
2214         support.  Reported by Bob Proulx.
2215
2216 2006-06-15  Bob Proulx  <bob@proulx.com>  (tiny change)
2217
2218         * tests/misc/mknod: Improve permission checks to handle
2219         running mkdir test in set-gid directories.
2220
2221 2006-06-14  Jim Meyering  <jim@meyering.net>
2222
2223         * tests/du/basic: Revamp not to hard-code file system block sizes.
2224
2225 2006-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2226
2227         * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
2228         files0-from test.
2229
2230 2006-06-11  Jim Meyering  <jim@meyering.net>
2231
2232         * .gitignore: New file.
2233         * Makefile.am (EXTRA_DIST): Add .gitignore.
2234
2235         Setting TIME_STYLE=long-iso in the environment would make the
2236         cp/same-file test fail.
2237         * tests/envvar-check (vars): Add TIME_STYLE to the list.
2238         * tests/cp/same-file: Revert last change.
2239         Source the envvar-check script, to ensure that TIME_STYLE
2240         settings don't affect these tests.
2241
2242 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
2243
2244         * tests/cp/same-file: Execute 'ls' in the C locale, so that it
2245         uses POSIX time stamp formats.  Problem reported by John Nixon in
2246         <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
2247
2248 2006-06-10  Jim Meyering  <jim@meyering.net>
2249
2250         * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
2251
2252         Require a "Version N.M" line at the top of the ChangeLog
2253         file only when making the actual release, not when running
2254         "make distcheck".
2255         * Makefile.maint (maintainer-distcheck): Don't depend on
2256         changelog-check.
2257         (alpha beta major): Depend on it here, instead.
2258
2259 2006-06-08  Jim Meyering  <jim@meyering.net>
2260
2261         Ensure that cat works with any of the options, -A -v -e -E -T,
2262         when applied to files in /proc and /sys, even when the FIONREAD
2263         ioctl produces nonsensical results.  Before this change, cat would
2264         produce no output (or truncated output), for some linux kernels.
2265
2266         * src/cat.c (write_pending): New function, factored out of cat.
2267         (cat): Also interpret a negative ioctl/FIONREAD count as indicating
2268         that there are bytes to read.  Some versions of linux-2.6.16 do that.
2269         Write any pending output before returning.
2270         Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
2271         * NEWS: Mention this bug fix.
2272         * tests/misc/cat-proc: New file.  Test for the above.
2273         * tests/misc/Makefile.am (TESTS): Add cat-proc.
2274
2275 2006-06-07  Paul Eggert  <eggert@cs.ucla.edu>
2276
2277         * src/expr.c (eval4): Detect overflow properly when multiplying
2278         INTMAX_MIN * -1.
2279
2280 2006-06-06  Paul Eggert  <eggert@cs.ucla.edu>
2281
2282         * NEWS: The 'expr' command now detects and reports integer overflow.
2283         (It would be better to use extended precision instead, but that
2284         would be more work.)
2285         * src/expr.c (integer_overflow): New function.
2286         (eval4, eval3): Check for integer overflow.
2287
2288 2006-06-05  Paul Eggert  <eggert@cs.ucla.edu>
2289
2290         Fix problems when building with Solaris/SVR4/etc. make, which uses a
2291         different and somewhat bogus implementation of VPATH.  In the
2292         directory tests/misc, rename tests whose names might appear in the
2293         Automake-generated rules.  For example, we can't use a test named
2294         'test', since Automake generates a rule that contains the text
2295         "if test -f ./$$tst; ...", and this might expand to something like
2296         "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
2297         which executes the 'test' script rather than the 'test' command.
2298         * tests/misc/false-status: Renamed from tests/misc/false.
2299         * tests/misc/pwd-long: Renamed from tests/misc/pwd.
2300         * tests/misc/sort-merge: Renamed from tests/misc/sort.
2301         ($prog): Set to 'sort' rather than to $PROG.
2302         * tests/misc/test-diag: Renamed from tests/misc/test.
2303         * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
2304         in case Solaris make has prepended the directory.
2305         (TESTS): Adjust to above renamings.
2306         * tests/misc/expand: Don't assign to PROG; no longer needed
2307         now that Makefile.am sets PROG to the basename.
2308         * tests/misc/fold: Likewise.
2309
2310 2006-06-03  Jim Meyering  <jim@meyering.net>
2311
2312         Make `cp --link --no-dereference' work also on systems where the
2313         link system call cannot create a hard link to a symbolic link.
2314         * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
2315         the link syscall on a symlink when it would do the wrong thing.
2316         Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
2317         * tests/cp/link-no-deref: New file/test for the above.
2318         * tests/cp/Makefile.am (TESTS): Add link-no-deref.
2319         * NEWS: Mention the change (doesn't affect Linux).
2320
2321 2006-06-01  Paul Eggert  <eggert@cs.ucla.edu>
2322
2323         Fix some porting problems in the test cases reported by
2324         Ralf Wildenhues for HP-UX 11.23 in:
2325         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
2326         * tests/help-version: Don't assume that \< \> works in sed.
2327         * tests/misc/close-stdout: Don't assume that >&- works.
2328         Add a /dev/full test.
2329         * tests/touch/no-create-missing: Don't assume that >&- works.
2330
2331 2006-05-30  Jim Meyering  <jim@meyering.net>
2332
2333         * src/ls.c (usage): Add `v' to the list of sorting-related options.
2334         From Justin Pryzby.
2335
2336 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2337
2338         * tests/cp/fail-perm: source lang-default.
2339         * tests/rm/inaccessible: Likewise.
2340
2341 2006-05-28  Jim Meyering  <jim@meyering.net>
2342
2343         * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
2344         Recognize it, too.  Reported by Ralf Wildenhues, in
2345         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
2346
2347 2006-05-27  Jim Meyering  <jim@meyering.net>
2348
2349         * src/chgrp.c: Support new options: --preserve-root and
2350         --no-preserve-root.  Somehow this program was skipped when those
2351         options were added to chown, chmod, and rm.  Reported by
2352         vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
2353         * NEWS: Mention this.
2354
2355 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
2356
2357         * NEWS: Remove mention of --seed.  We'll replace it with something
2358         better, and don't want to indicate that it is supported.
2359         * src/sort.c (usage): Likewise.
2360
2361 2006-05-20  Jim Meyering  <jim@meyering.net>
2362
2363         * src/chmod.c (main): Use FTS_PHYSICAL here, too.
2364
2365         * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
2366         and arrange for -D to set fts' FTS_PHYSICAL bit as well as
2367         FTS_COMFOLLOW.  Spotted by Justin Pryzby.
2368
2369         * gnupload: Merge changes from automake, retaining the ""--to...
2370         kludge to placate overzealous `make distcheck' check.
2371
2372 2006-05-19  Jim Meyering  <jim@meyering.net>
2373
2374         * src/du.c (main): Don't let -D, -L, or -P turn off the internal
2375         FTS_TIGHT_CYCLE_CHECK directory traversal option.
2376         Reported by Justin Pryzby in http://bugs.debian.org/367691
2377
2378 2006-05-15  Jim Meyering  <jim@meyering.net>
2379
2380         * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
2381         From Tomas Pospisek.
2382
2383 2006-05-13  Jim Meyering  <jim@meyering.net>
2384
2385         * tests/mv/no-target-dir: Test two more cases.
2386
2387 2006-05-11  Jim Meyering  <jim@meyering.net>
2388
2389         mv -T DIR EMPTY_DIR no longer fails unconditionally
2390         * src/copy.c (copy_internal): Don't manually prohibit a move where
2391         the destination is an existing directory.  Sometimes doing that is
2392         valid.  Let the rename system call enforce the rules.  That is
2393         allowed only when the source is a directory and the destination
2394         directory (to be replaced) is empty.  Reported by Eric Blake.
2395         * tests/mv/no-target-dir: New file/test for this.
2396         * tests/mv/Makefile.am (TESTS): Add no-target-dir.
2397         * NEWS: Mention this.
2398
2399         * tests/mv/atomic: New file/test for yesterday's fix.
2400         * tests/mv/Makefile.am (TESTS): Add atomic.
2401
2402         * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
2403
2404 2006-05-10  Jim Meyering  <jim@meyering.net>
2405
2406         * src/copy.c (copy_internal): Don't explicitly unlink the destination
2407         when moving a symlink into the place of an existing non-directory.
2408         Reported by Joshua Hudson.
2409         * NEWS: mention this.
2410
2411 2006-05-07  Jim Meyering  <jim@meyering.net>
2412
2413         * Makefile.maint (patch-check): Fail if patch generates any output,
2414         even merely for changed offsets.
2415
2416         * src/c99-to-c89.diff: Adjust to reflect new offsets.
2417
2418         * NEWS: Mention changes affecting df, pwd, shred.
2419
2420 2006-05-06  Jim Meyering  <jim@meyering.net>
2421
2422         * tests/ls/stat-vs-dirent: New test, to detect the bogus file
2423         system condition where dirent.d_ino != stat.st_ino.
2424         * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
2425
2426 2006-05-06  Eric Blake  <ebb9@byu.net>
2427
2428         * tests/ls/inode: Expand to test inode from readdir case.
2429         * tests/ls/follow-slink: Expand to test broken links encountered
2430         implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
2431
2432 2006-05-06  Eric Blake  <ebb9@byu.net>
2433
2434         * tests/mv/leak-fd: Work even on case-insensitive file system.
2435
2436 2006-05-04  Jim Meyering  <jim@meyering.net>
2437
2438         * NEWS: Mention the 2006-03-19 pwd-related change that makes
2439         lib/getcwd.c work around inconsistent file system dirent.d_ino data.
2440
2441 2006-05-03  Jim Meyering  <jim@meyering.net>
2442
2443         * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
2444         Use better macro parameter names: s/basename/key_name/,
2445         s/basefunc/key_cmp_func.  Fix typo in comment.
2446
2447 2006-04-29  Eric Blake  <ebb9@byu.net>
2448
2449         * src/ls.c (main): On systems with d_type, directories_first only
2450         implies format_needs_type, not format_needs_stat.
2451
2452 2006-05-03  Jim Meyering  <jim@meyering.net>
2453
2454         * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
2455         after comma in arg list, from Eric Blake.
2456
2457 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
2458
2459         * tests/misc/date (relative-3): New test, derived from a bug
2460         report by John Thomas McDole.
2461
2462 2006-04-23  Francesco Montorsi  <fr_m@hotmail.com>
2463
2464         New option for ls: --group-directories-first.
2465         It makes ls list directories before files.
2466         * NEWS [New features]: Mention it.
2467         * src/ls.c (sort_type): Rearrange to use as an array index when
2468         choosing sort function; added new sort_numtypes member for
2469         compile-time check.
2470         (time_type): Add new time_numtypes member for compile-time check.
2471         (directories_first): New global variable.
2472         (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
2473         (long_options): Add --directories-first.
2474         (main): Support new option.
2475         (is_directory): New function.
2476         (extract_dirs_from_files): Use it.
2477         (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
2478         (LIST_SORTFUNCTION_VARIANTS): New macros.
2479         (sort_functions): New global variable.
2480         (sort_files): Use it.
2481         (usage): Document new option.
2482
2483 2006-04-18  Paul Eggert  <eggert@cs.ucla.edu>
2484
2485         * src/shred.c (fillrand): The assertion was way too weak, due to
2486         what must be a typo.  Strengthen it to its intended value.
2487         (dopass): Don't use alloca; it's not worth the aggravation here,
2488         since it's used only to get a page-aligned buffer, and page
2489         alignment doesn't buy us much here.  I'm suspicious that alloca
2490         causes problems on some hosts, due to a recent bug report by Adam
2491         Waltman: http://bugs.gentoo.org/130246.
2492
2493 2006-04-18  Jim Meyering  <jim@meyering.net>
2494
2495         * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
2496         sha384sum, sha512sum.
2497
2498 2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
2499
2500         * src/chmod.c (describe_change): Adjust to filemode changes.
2501         * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
2502         (print_long_format): Use (new) filemodestring rather than
2503         (old) mode_string, so that we get more file types right, at least
2504         in theory.  Adjust to filemode changes.
2505         * src/stat.c (human_access): Likewise.
2506
2507 2006-04-18  Jim Meyering  <jim@meyering.net>
2508
2509         * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
2510         ignore file.  This has never been enabled.  Reported by Eric Blake.
2511
2512 2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
2513
2514         * src/ln.c (linkfunc): Remove.  This method ran into a compiler/linker
2515         bug in Interix.  Just call symlink or link directly.  All uses changed.
2516         * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
2517         * src/stat.c (USE_STATVFS): New macro.
2518         Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
2519         (NAMEMAX_FORMAT): define a bit more clearly, now that the
2520         statvfs-using code is a bit more regular.
2521         * src/system.h (sync) [!HAVE_SYNC]: New macro.
2522
2523 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
2524
2525         * NEWS: csplit, nl, expr now conform to POSIX better, and are
2526         more-compatible with traditional Unix, with respect to regular
2527         expressions.
2528         * src/csplit.c (extract_regexp): Set re_syntax_options to a
2529         value that is compatible with what POSIX requires.
2530         * src/nl.c (build_type_arg): Likewise.
2531         * src/expr.c (docolon): Likewise.  Also, don't let anchors match
2532         newline; this fixes an incompatibility with tradition and with POSIX.
2533         Don't warn about leading ^.  POSIX says it is unspecified whether
2534         ^ is a special character, which means that implementations can
2535         either treat it as special or not, but either way a warning is not
2536         allowed (unless the regexp is otherwise invalid).  Instead, anchor
2537         the expression but treat ^ as an anchor; this is the traditional
2538         behavior (e.g., Solaris 10).
2539         (eval4, eval3, eval2): Treat non-numeric args, division by zero,
2540         and the like as invalid expressions (exit status 2), not as
2541         failure of 'expr' (exit status 3).  This is more consistent with
2542         how Solaris behaves.
2543         * tests/expr/basic (fail-a): Adjust exit status to match new expr
2544         behavior, for status 2 versus 3.
2545         (anchor): New test.
2546         (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
2547         (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
2548         (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
2549         (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
2550         (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
2551         (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
2552         (bre61, bre62): New tests.
2553         * tests/misc/csplit: Use \{...\} in test RE, to test that we're
2554         conforming to POSIX.
2555
2556         Port to Solaris 8.
2557         * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
2558         "if !".  Do not assume that 'sed' can handle long, newline-free input.
2559         * tests/du/long-sloop: Likewise.  Evaluate expr once, not $n times.
2560
2561 2006-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2562
2563         Adjust to new regex.h API (with new fastmap type), and clean
2564         up the regex storage allocation a bit.
2565
2566         * src/csplit.c (struct control): Put re_compiled member at the
2567         end, since it's large.  Change regexpr member from char * to bool;
2568         all uses changed.  Add new member fastmap.
2569         (extract_regexp): regexp arg is now char const *, not char *.
2570         Don't bother duplicating the regular expression; it's not needed.
2571         Set fastmap from new fastmap member.  Don't bother allocating
2572         a buffer, as the regexp code does a better job than we do.
2573         * src/expr.c (docolon): Allocate and use a fastmap.
2574         Don't bother allocating a buffer.
2575         * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
2576         New vars.
2577         (build_type_arg): New fastmap arg.  All uses changed.
2578         Don't bother allocating a buffer, but set a fastmap.
2579         * src/ptx.c (context_regex_string, word_regex_string): Remove.
2580         (context_regex, word_regex): New vars, replacing the above.
2581         All uses changed.
2582         (struct regex_data): New type.
2583         (compile_regex): Renamed from alloc_and_compile_regex, since
2584         we no longer allocate storage.  Arg is now a struct regex_data *,
2585         not a const char *.  All uses changed.  Don't allocate the fastmap;
2586         instead, take it from the caller.  Don't convert size_t to int,
2587         to avoid arithmetic overflow problems.  Don't bother freeing
2588         storage afterwards; it's not worth the aggravation.
2589         * src/tac.c (compiled_separator_fastmap): New ver.
2590         (main): Use it.  Don't bother allocating a buffer.
2591
2592 2006-03-30  Jim Meyering  <jim@meyering.net>
2593
2594         * src/dd.c (iwrite): Remove assignment without effect.
2595         Reported by Felix Rauch Valenti.
2596
2597 2006-03-22  Eric Blake  <ebb9@byu.net>
2598
2599         * src/ptx.c (usage): Remove mention of --copyright/-C.
2600         (main): Alias --copyright to --version plus a deprecation warning.
2601         * NEWS: Mention this.
2602
2603 2006-03-27  Jim Meyering  <jim@meyering.net>
2604
2605         * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
2606         use of strtod.  Tiny patch from Nickolai Zeldovich.
2607
2608 2006-03-11  Eric Blake  <ebb9@byu.net>
2609
2610         * tests/misc/dirname: New file.
2611         * tests/basename/Makefile.am: Delete.
2612         * tests/basename/basic: Move to...
2613         * tests/misc/basename: ... this new file.  Add some tests,
2614         including fixed behavior for //.
2615         * tests/misc/Makefile.am (TESTS): Sort.  Add basename, dirname.
2616         * tests/Makefile.am (SUBDIRS): Remove basename.
2617         * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
2618
2619         Improvements to dirname/basename handling on platforms like
2620         cygwin with distinct // and with drive letters.
2621         * NEWS: Document new behavior.
2622         * src/basename.c (main): Don't strip suffix from file system
2623         roots.
2624         * src/cp.c (target_directory_operand): Use new last_component.
2625         (ASSIGN_BASENAME_STRDUPA): Likewise.  Reduce time spent
2626         traversing the string.
2627         * src/dircolors.c (guess_shell_syntax): Use new last_component.
2628         * src/install.c (target_directory_operand, install_file_in_dir):
2629         Likewise.
2630         * src/ln.c (target_directory_operand, main): Likewise.
2631         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2632         * src/mv.c (target_directory_operand, movefile): Likewise.
2633         * src/remove.c (rm_1): Likewise.
2634         * src/shred.c (wipename): Likewise.
2635         * src/split.c (next_file_name): Likewise.
2636         * src/su.c (log_su, run_shell): Likewise.
2637
2638 2006-03-23  Paul Eggert  <eggert@cs.ucla.edu>
2639
2640         * NEWS: nohup diagnostics are now more precise, and nohup now
2641         redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2642         * src/nohup.c (main): Implement this.
2643         * tests/misc/nohup: Test the new behavior.
2644
2645 2006-03-12  Jim Meyering  <jim@meyering.net>
2646
2647         * src/copy.c (set_author): Rename function, from preserve_author.
2648
2649         * src/remove.c (AD_pop_and_chdir): Use new macro,
2650         CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
2651
2652         * src/system.h (SAME_INODE): Remove definition.
2653         Include "same-inode.h", instead.
2654
2655 2006-03-11  Eric Blake  <ebb9@byu.net>
2656
2657         * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
2658
2659 2006-03-10  Jim Meyering  <jim@meyering.net>
2660
2661         Fix a bug whereby a user with write access to a directory being removed
2662         could cause the removal of that directory to fail with an erroneous
2663         diagnostic about a directory cycle.  Reported by Vineet Chadha.
2664
2665         * NEWS: Mention this.
2666         * src/remove.c (AD_pop_and_chdir): If the directory we're about to
2667         leave (and try to rmdir) is the one whose dev_ino is being used to
2668         detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
2669
2670 2006-03-08  Paul Eggert  <eggert@cs.ucla.edu>
2671
2672         * NEWS: Document dd's new 'directory' and 'nolinks' flags.
2673         * src/dd.c (set_fd_flags): Handle file-creation flags on file
2674         descriptors, rather than ignoring them.
2675         * tests/dd/misc: Add test cases for append, nofollow, directory,
2676         and nolinks flags.  Simplify redirection to /dev/null in some cases.
2677
2678         * tests/dd/misc: iflags->iflag.  This fixes a typo that meant the
2679         noatime test never tested anything.
2680
2681 2006-03-05  Paul Eggert  <eggert@cs.ucla.edu>
2682
2683         * src/dd.c (flags, usage): New flags directory, nolinks.
2684         * src/system.h (O_NOLINKS): Define to 0 if not already defined.
2685
2686         * src/ls.c (usage): Mention that -f disables --color.
2687         Problem reported by Niels Möller.
2688
2689 2006-03-03  Justin Pryzby  <pryzbyj@justinpryzby.com>
2690
2691         * man/*.x: Add references to syscalls from utilities of the same name.
2692
2693 2006-03-05  Jim Meyering  <jim@meyering.net>
2694
2695         * tests/help-version: Set SHELL, if not already set, in order to
2696         avoid failure when `make check' is run through debuild;  dircolors
2697         would fail due to lack of $SHELL.  Reported by Sven Joachim.
2698
2699         Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
2700         * src/base64.c (wrap_write, do_encode, main): Change type of
2701         parameters and locals, wrap_column, form size_t to uintmax_t.
2702         (main): Adjust to use xstrtoumax, accordingly.
2703
2704 2006-03-03  Jim Meyering  <jim@meyering.net>
2705
2706         Don't fail when run from an environment with SHELL not a Bourne
2707         shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
2708         * tests/dircolors/simple: Invoke each non-failing test with -b.
2709         Reported by Michael Stone.
2710
2711 2006-02-27  Jim Meyering  <jim@meyering.net>
2712
2713         * tests/misc/base64: Derive --decode-using tests from the
2714         encode-based ones.
2715
2716         * tests/misc/base64: Factor out a long constant string.
2717         Split lines to stay within 80 columns.
2718
2719         * tests/misc/Makefile.am (TESTS): Add base64.
2720         * tests/misc/base64: Test base64.  From Simon Josefsson.
2721
2722         * src/base64.c (do_decode): Use correct type for parameter,
2723         ignore_garbage: s/size_t/bool/.
2724
2725         * src/base64.c: Don't include .h files already included by system.h:
2726         <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
2727         Include "system.h" before the other lib/*.h header files.
2728         Include <sys/types.h> before "system.h".
2729         (wrap_write): Remove declaration of unused local, initial_column.
2730         (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
2731
2732         * README: Add base64 to the list.
2733
2734 2006-02-17  Simon Josefsson  <jas@extundo.com>
2735
2736         New program: base64.
2737         * AUTHORS: Mention base64.
2738         * NEWS: Likewise.
2739         * man/Makefile.am: Build base64.1.
2740         * man/base64.x: New file.
2741         * src/Makefile.am (bin_PROGRAMS): Add base64.
2742         * src/base64.c: New file.
2743
2744 2006-02-25  Eric Blake  <ebb9@byu.net>
2745
2746         In ls, avoid calling stat for --inode (-i), when possible.
2747         * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
2748         * src/system.h: ... here, for use in ...
2749         * src/ls.c (main): ... here.  Prefer dirent.d_ino to stat when
2750         possible.
2751         (gobble_file): Add inode argument.
2752         (print_dir): Pass inode if available.
2753         (usage): Remove inaccuracy.
2754
2755 2006-02-23  Jim Meyering  <jim@meyering.net>
2756
2757         * TODO: Update/correct some obsolete entries.
2758
2759 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
2760
2761         * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
2762         * src/join.c (usage): Likewise.
2763         Documentation problem reported by Philip Kensche.
2764
2765 2006-02-20  Eric Blake  <ebb9@byu.net>
2766
2767         * man/rm.x: Update documentation to match previous patch.
2768
2769 2006-02-18  Eric Blake  <ebb9@byu.net>
2770
2771         New option for rm: --interactive=once (-I).
2772         * NEWS: Document it, along with change to rm --interactive.
2773         * TODO: Remove entry for implementing rm -I
2774         * src/rm.c (INTERACTIVE_OPTION): New enum value.
2775         (interactive_type): New enum.
2776         (long_opts): Let interactive take an optional argument.
2777         (interactive_args, interactive_types): New option arguments.
2778         (usage): Document -I, --interactive=WHEN.  Use program_name
2779         instead of a basename.
2780         (main): New -I option, new behavior to --interactive.
2781         * tests/rm/interactive-once: New tests.
2782         * tests/rm/interactive-always: Ditto.
2783         * tests/rm/Makefile.am (TESTS): Run them.
2784
2785 2006-02-18  Jim Meyering  <jim@meyering.net>
2786
2787         * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
2788         expression match more of the target lines, e.g., those that start with
2789         `-S,' (short option followed by a comma) or that include `=[...]'.
2790         Patch by Nicolas François.
2791         Fix the four offenders thus exposed:
2792         * src/join.c (usage): Use two spaces (not one) to separate the
2793         --first-only option string from its description, so help2man formats
2794         the derived man page properly.
2795         * src/pr.c (usage): Likewise.
2796         * src/uniq.c (usage): Likewise.
2797         * src/install.c (usage): Likewise.
2798
2799 2006-02-15  Jim Meyering  <jim@meyering.net>
2800
2801         * Makefile.maint (alpha beta major): For `make major', ensure that the
2802         version string is of the form N.N[.N]*, where N is one or more digits.
2803
2804 2006-02-14  Jim Meyering  <jim@meyering.net>
2805
2806         * INSTALL: Update from gnulib.
2807
2808 2006-02-13  Jim Meyering  <jim@meyering.net>
2809
2810         * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
2811
2812 2006-02-12  Jim Meyering  <jim@meyering.net>
2813
2814         * Makefile.maint (patch-check): New target.
2815         (local-checks-available): Add to the list.
2816
2817 2006-02-11  Jim Meyering  <jim@meyering.net>
2818
2819         * src/c99-to-c89.diff: New file.
2820         * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
2821
2822         * .x-po-check: New file, with exclusions so that `make distcheck'
2823         passes once again.
2824         * Makefile.am (EXTRA_DIST): Add .x-po-check.
2825
2826         rm -r must remove an empty directory, even if it is inaccessible.
2827         * src/remove.c (close_preserve_errno): New function.
2828         (fd_to_subdirp): Don't print a diagnostic in this function.
2829         Do it from the callers instead, unless rmdir succeeds.
2830         (remove_cwd_entries, remove_dir): Adjust callers.
2831         * tests/rm/empty-inacc: New test for the above.
2832         * tests/rm/Makefile.am (TESTS): Add empty-inacc.
2833         * NEWS: Mention this bug fix.
2834         * tests/rm/rm2: Adjust two expected diagnostics, now that they're
2835         a tiny bit less precise: cannot remove `a/1': ... instead of
2836         cannot open directory `a/1': ...
2837
2838         * Makefile.maint (syntax-check-rules): Automatically derive this
2839         list of sc_-prefixed rule names.
2840
2841 2006-02-10  Paul Eggert  <eggert@cs.ucla.edu>
2842
2843         * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
2844         (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
2845         Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
2846         (syntax-check-rules): Bring back sc_changelong.  (Hmm, why did it
2847         go away? was that an accident?)
2848         (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2849         (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
2850         (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
2851         (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
2852         (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
2853         (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
2854         (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
2855         (author_mark_check, makefile_path_separator_check):
2856         Output line numbers, to simplify navigation of Emacs *compilation*
2857         buffers.
2858         (sc_prohibit_atoi_atof, sc_file_system):
2859         Rework slightly so that Makefile.maint doesn't get reported as a
2860         violation of its own syntax rules.
2861         (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
2862         it at run-time (which didn't work with Bison).  Fix a makefile typo,
2863         caught by Makefile.maint itself: spaces where a tab should be.
2864         (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
2865         which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
2866         Ignore djgpp and man subdirectories, to avoid false matches with
2867         Bison and coreutils, respectively.  Use sort -u to remove the
2868         resulting duplicates.
2869         * gnupload: Rework slightly to avoid bogus warning from
2870         sc_two_space_separator_in_usage.
2871
2872 2006-02-10  Jim Meyering  <jim@meyering.net>
2873
2874         Use gzip's --rsyncable option only if it's available.
2875         * Makefile.maint (gzip_rsyncable): New variable.
2876         (GZIP_ENV): Use it.
2877
2878 2006-02-08  Jim Meyering  <jim@meyering.net>
2879
2880         * Makefile.maint (local-checks-available): Define in terms of
2881         the expansion, $(syntax-check-rules), rather than the single,
2882         top-level target `syntax-check', so that it's easier to exclude
2883         individual rules (via $(local-checks-to-skip)).
2884         (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
2885
2886 2006-02-07  Jim Meyering  <jim@meyering.net>
2887
2888         * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
2889         is on Tru64), define O_DIRECT to that.  Patch From James Lemley.
2890
2891         * tests/help-version (expected_failure_status_vdir):
2892         Redirect an expected disk-full diagnostic to /dev/null.
2893
2894 2006-02-06  Jim Meyering  <jim@meyering.net>
2895
2896         * src/unexpand.c (usage): Use two spaces (not one) to separate the
2897         --first-only option string from its description, so help2man formats
2898         the derived man page properly.
2899         * src/rm.c (usage): Likewise for --no-preserve-root.
2900         * src/chown.c (usage): Likewise.
2901         * src/chgrp.c (usage): Likewise.
2902
2903         Add a rule to ensure that the above doesn't happen again.
2904         * Makefile.maint (sc_two_space_separator_in_usage): New rule.
2905         (syntax-check-rules): Add it.
2906         * .x-sc_two_space_separator_in_usage: New empty file.
2907         * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
2908
2909 2006-02-06  Jim Meyering  <jim@meyering.net>
2910
2911         * src/cp.c (usage): Use two spaces (not one) to separate each
2912         option string from its description, so help2man formats the
2913         derived man page properly.
2914         * src/mv.c (usage): Likewise.
2915         Patch from Nicolas François in http://bugs.debian.org/351601.
2916
2917 2006-02-04  Jim Meyering  <jim@meyering.net>
2918
2919         * src/copy.c (copy_internal): cp -RL would fail when encountering
2920         the same directory more than once in the hierarchy beneath a single
2921         command-line argument.  That is legitimate, e.g. when there are
2922         two or more symbolic links, each pointing to some directory that
2923         would not otherwise be copied.  Reported by Christophe LYON.
2924         * tests/cp/cp-deref: New file.  Test for today's fix.
2925         * tests/cp/Makefile.am (TESTS): Add cp-deref.
2926         * NEWS: Document this.
2927
2928 2006-02-03  Jim Meyering  <jim@meyering.net>
2929
2930         * configure.ac: Require automake-1.9.6, not 1.8.3.
2931
2932 2006-02-01  Paul Eggert  <eggert@cs.ucla.edu>
2933
2934         * src/od.c (usage): Mention that -t a ignores high order bit.
2935         Documentation problem reported by Ed Avis.
2936
2937 2006-02-01  Jim Meyering  <jim@meyering.net>
2938
2939         * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
2940
2941 2006-01-30  Paul Eggert  <eggert@cs.ucla.edu>
2942
2943         * src/head.c (main): Use a better diagnostic when someone uses a
2944         trailing numeric option in an invalid way.  Problem reported by
2945         Karl Berry.
2946         * src/tail.c (parse_options): Likewise.
2947
2948 2006-01-30  Jim Meyering  <jim@meyering.net>
2949
2950         * man/wc.x: Include `count' keyword in man page synopsis,
2951         per suggestion from http://bugs.debian.org/181585.
2952
2953 2006-01-24  Paul Eggert  <eggert@cs.ucla.edu>
2954
2955         * src/df.c (show_dev): If the file system claims to have
2956         more available than total blocks, report the number of used
2957         blocks as being total - available (a negative number) rather
2958         than as garbage.  Problem reported by Toralf Foerster.
2959
2960 2006-01-24  Jim Meyering  <jim@meyering.net>
2961
2962         * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
2963         to put a regular file in O_NONBLOCK mode fails with EPERM.
2964         That happens on Linux (up to 2.6.15) when using tail -f on a file with
2965         the append-only attribute.  Reported by Dean Gaudet.  For details,
2966         see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
2967         * NEWS: Mention this fix.
2968         * tests/tail-2/append-only: New file.  Test for the above.
2969         * tests/tail-2/Makefile.am (TESTS): Add append-only.
2970         * tests/Makefile.am (check-root): Add tail-2/append-only
2971
2972 2006-01-21  Jim Meyering  <jim@meyering.net>
2973
2974         * NEWS: Mention fts-related improvements and bug fixes.
2975
2976 2006-01-19  Jim Meyering  <jim@meyering.net>
2977
2978         * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
2979         reported as http://bugs.debian.org/147577.  Forwarded by Thomas Hood.
2980
2981 2006-01-18  Jim Meyering  <jim@meyering.net>
2982
2983         * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
2984
2985 2006-01-17  Jim Meyering  <jim@meyering.net>
2986
2987         Now that fts no longer changes the current working directory, adjust
2988         its clients accordingly -- note that du.c uses fts but doesn't need
2989         any adjustment, since it doesn't operate on the actual files,
2990         but rather just uses the stat buffers provided by fts.
2991
2992         * src/chown-core.c: Include "openat.h".
2993         Don't include "lchown.h".
2994         (restricted_chown): Accept a new parameter, CWD_FD, and use it in
2995         calling openat, lchownat, chownat, rather than open, lchown, chown.
2996         Update caller.
2997         * src/chmod.c: Include "openat.h".
2998         (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
2999
3000         * tests/du/long-from-unreadable: New test, to exercise one small
3001         corner of fts.c.
3002
3003 2006-01-13  Jim Meyering  <jim@meyering.net>
3004
3005         * tests/Makefile.am (SUBDIRS): Add comments discouraging the
3006         addition of new directories under tests/.
3007
3008         * tests/acl: Redirect stdin to /dev/null.  Otherwise, FreeBSD 5.0's
3009         getfacl would hang.
3010
3011 2006-01-12  Jim Meyering  <jim@meyering.net>
3012
3013         * tests/du/long-sloop: Adjust not to hard-code the expected
3014         diagnostic corresponding to ELOOP.  Solaris' diagnostic differs
3015         from that of GNU libc.  Reported by Paul Eggert.
3016
3017         * tests/du/long-sloop: Create file at end of symlink chain.
3018
3019         * tests/misc/test: New file, with a test for one of the
3020         bugs fixed by yesterday's test.c changes.
3021         * tests/misc/Makefile.am (TESTS): Add test.
3022
3023 2006-01-11  Jim Meyering  <jim@meyering.net>
3024
3025         * tests/du/long-sloop: New file.  Test for today's fts.c bug fix.
3026         That bug could make du -L, chgrp -L, or chown -L fail to diagnose
3027         a very long sequence of symbolic links (not necessarily a loop).
3028         * tests/du/Makefile.am (TESTS): Add long-sloop.
3029
3030 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
3031
3032         * src/test.c (test_syntax_error): Append a newline.  All callers
3033         changed, except for the ones that didn't already append a newline.
3034         Bug reported by Eric Blake.
3035
3036 2006-01-11  Jim Meyering  <jim@meyering.net>
3037
3038         * src/system.h (X2NREALLOC): Now that verify_true is no longer
3039         void, cast its result to void, to avoid gcc's warning that
3040         ``left-hand operand of comma expression has no effect''.
3041         (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
3042
3043 2006-01-10  Jim Meyering  <jim@meyering.net>
3044
3045         * tests/chmod/no-x: Add a test for today's fts.c fix.
3046
3047 2006-01-10  Jim Meyering  <jim@meyering.net>  (tiny change)
3048
3049         * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
3050         This is necessary for Dragonfly.  Patch by Joerg Sonnenberger.
3051
3052 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
3053
3054         * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
3055         Use verify_true instead of verify_expr, to sync with gnulib.
3056
3057 2006-01-08  Jim Meyering  <jim@meyering.net>
3058
3059         * src/date.c (usage): Adjust the formatting of the entries for
3060         %::z and %:::z (separate with two spaces, not one) so that help2man
3061         formats them properly.  Reported by Philip Rowlands.
3062
3063 2006-01-06  Paul Eggert  <eggert@cs.ucla.edu>
3064
3065         * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
3066
3067 2006-01-06  Jim Meyering  <jim@meyering.net>
3068
3069         * Makefile.maint (copyright-check): Use date +%Y in place of
3070         hard-coded 2005.
3071
3072         * src/remove.c (rm_1): Remove `static' attribute on local `status'.
3073         First off, the attribute should have been `volatile' (not static)
3074         to avoid longjmp-related risk of clobber.  Secondly, now there is
3075         no longer any risk of a local variable being clobbered, so there's
3076         no need for any attribute at all.
3077
3078 2006-01-05  Jim Meyering  <jim@meyering.net>
3079
3080         * src/remove.c: Give a few functions the inline attribute.
3081         (AD_pop_and_chdir): Use gotos to avoid some duplication.
3082         (AD_push): Rewrite an assertion so that the entire computation
3083         goes away when assertions are turned off.
3084
3085         * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
3086         It's already defined in "system.h".
3087         * Makefile.maint: Add a FIXME comment.
3088
3089 2006-01-04  Jim Meyering  <jim@meyering.net>
3090
3091         * ChangeLog: Remove entries from 2005-10-22 and earlier.
3092         * ChangeLog-2005: New file, for entries up to version 5.92.
3093
3094 2006-01-03  Jim Meyering  <jim@meyering.net>
3095
3096         * tests/du/no-x: Also allow a slightly different diagnostic -- the
3097         one you get when using openat-enabled fts.c and du (coming soon).
3098         * tests/chmod/no-x: Likewise.
3099         * tests/chgrp/no-x: Likewise.
3100
3101         * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
3102
3103 2006-01-02  Paul Eggert  <eggert@cs.ucla.edu>
3104
3105         * src/chown-core.c (RC_do_ordinary_chown): New enum value.
3106         (restricted_chown): Return it, if the file cannot be accessed due
3107         to EPERM, or if no uid or gid are required, or if the file is
3108         neither a directory nor a regular file.  Rewrite to avoid gotos.
3109         (change_file_owner): Handle RC_do_ordinary_chown case.
3110         Rewrite to avoid gotos.
3111         * tests/chgrp/basic: Make sure we can change the group of
3112         inaccessible files.
3113
3114         * src/date.c (usage): Explain %g, %G, and %V a bit better.
3115
3116 2006-01-02  Jim Meyering  <jim@meyering.net>
3117
3118         * src/copy.c (set_owner): Correct a comment.
3119
3120         * src/tail.c (parse_options): Change warning to say that --retry
3121         is useful `mainly' (not `only') when following by name.
3122         Reported here: http://bugs.debian.org/273781
3123
3124 2006-01-01  Paul Eggert  <eggert@cs.ucla.edu>
3125
3126         * NEWS: Document that mkfifo and mknod -m no longer set special bits.
3127         * src/copy.c: Include lchmod.h.
3128         (copy_internal): Use lchmod rather than chmod.
3129         * src/cp.c: Include lchmod.h.
3130         (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
3131         * src/mkdir.c: Include lchmod.h.
3132         (usage): Clarify -m's operation.
3133         (main): Use lchmod rather than chmod.  Don't use lchmod unless the
3134         new mode contains bits outside the 777 range.
3135         * src/mkfifo.c (usage): Clarify -m's operation.
3136         (main): If -m is given, don't invoke chmod; use umask 0 instead.
3137         Report an error if -m asks for bits outside the 777 range.
3138         * src/mknod.c (usage, main): Likewise.
3139
3140         * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
3141
3142 2005-12-27  Jim Meyering  <jim@meyering.net>
3143
3144         * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
3145         (sc_prohibit_assert_without_use): New rule.
3146         (syntax-check-rules): Add it to the list.
3147         * .x-sc_prohibit_assert_without_use: New empty file.
3148         * Makefile.am (EXTRA_DIST): Add it.
3149
3150         * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
3151
3152         * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
3153         Don't include <assert.h>; it wasn't used.
3154
3155 2005-12-26  Paul Eggert  <eggert@cs.ucla.edu>
3156
3157         * src/chown-core.c (restricted_chown):
3158         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
3159         * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
3160         | O_NOFOLLOW too, for consistency with other dir-openers.
3161         Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
3162         (is_empty_dir): Likewise.
3163         * src/shred.c (wipename): Likewise.  Don't bother trying to open
3164         dir for writing, since POSIX prohibits it.
3165
3166 2005-12-22  Jim Meyering  <jim@meyering.net>
3167
3168         * tests/help-version: Redirect stderr to /dev/full, to suppress
3169         write error diagnostic.
3170
3171 2005-12-19  Jim Meyering  <jim@meyering.net>
3172
3173         * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
3174         Avoid a minor race condition when `-m MODE' is specified, by using
3175         open, fchown, and close rather than just chown.  To do that reliably --
3176         even with an overly restrictive umask -- ensure that each mkdir,
3177         mknod and mkfifo call uses a mode including at least owner-read access.
3178         * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
3179         the subsequent chown (or equivalent open,fchown,close) fails.
3180         * tests/misc/mknod: New tests.
3181         * tests/misc/Makefile.am (TESTS): Add mknod.
3182
3183 2005-12-17  Jim Meyering  <jim@meyering.net>
3184
3185         * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
3186         e.g., on a named pipe.
3187         (OPEN_NO_FOLLOW_SYMLINK): Remove definition.  Use O_NOFOLLOW in
3188         place of all uses, since it is guaranteed (system.h) to be defined.
3189
3190 2005-12-05  Andreas Gruenbacher  <agruen@suse.de>
3191
3192         Add POSIX ACL support
3193         * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
3194         is no requirement for ACL support; particularly, it does not exist
3195         on systems that have POSIX ACLs.
3196         * src/copy.h (cp_option_init) [umask_kill]: Remove member.
3197         * src/cp.c (umask_kill): With default acls, the umask is not to be
3198         applied.  Remove umask_kill, don't change the process umask, and let
3199         the kernel apply the umask where appropriate.
3200         * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
3201         * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
3202         umask_kill.
3203         (copy_reg, copy_internal): Use copy_acl and set_acl
3204         instead of fchown/chown. Fix the logic for POSIX ACLs.
3205         (chown_succeded): Remove; we now always copy acls and
3206         preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
3207         did a chown before or not.
3208         * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
3209         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
3210         mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
3211         to link with it via $(LIB_ACL), for the utilities that need it.
3212
3213 2005-12-16  Paul Eggert  <eggert@cs.ucla.edu>
3214
3215         * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
3216         (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
3217         (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
3218         value is now signified by whether cwd_errno is null.
3219         (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
3220         pointer-to-bool to pointer-to-errno-value.  All callers changed.
3221         (rm_1): Don't bother setting a local cwd failure flag and then
3222         ORing it into the caller's.  Just set the caller's.
3223         (rm): Use cwd failure errno value to print a slightly-better
3224         diagnostic.
3225
3226 2005-12-15  Jim Meyering  <jim@meyering.net>
3227
3228         * src/stat.c (print_it): Properly handle a backslash at the
3229         end of a --printf format string.  Reported by Paul Eggert.
3230         * tests/misc/stat-printf (end-bs): Add a test for the above.
3231
3232 2005-12-15  Paul Eggert  <eggert@cs.ucla.edu>
3233
3234         * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
3235         Don't assume /etc/passwd contains user names; use 'id' instead.
3236
3237 2005-12-15  Jim Meyering  <jim@meyering.net>
3238
3239         stat: revert behavior of --format=FMT (-c)
3240         stat: add new option: --printf=FMT
3241         * NEWS: Mention this.
3242         * src/stat.c (isodigit, octtobin, hextobin): Define.
3243         (PRINTF_OPTION): Define.
3244         (interpret_backslash_escapes, trailing_delim): New globals.
3245         (usage): Document them.  Alphabetize on long option names.
3246         (print_esc_char): New function.
3247         (print_it): Rewrite, in order to handle backslash escapes.
3248         (main): Handle new option.  Set globals for --format, too.
3249
3250         * tests/misc/stat-printf: Test --printf and --format.
3251         * tests/misc/Makefile.am (TESTS): Add stat-printf.
3252
3253 2005-12-14  Paul Eggert  <eggert@cs.ucla.edu>
3254
3255         * NEWS: sort now reports incompatible options.
3256         * src/sort.c (incompatible_options, check_ordering_compatibility):
3257         New functions.
3258         (main): Use them.  Don't bother with a usage message for
3259         "sort -c a b", for consistency with other error diagnostics.
3260         * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
3261         New tests.
3262
3263         * src/cat.c (main): Undo previous change.  close_stdout already
3264         does the check, so the previous change wasn't necessary.
3265
3266 2005-12-13  Paul Eggert  <eggert@cs.ucla.edu>
3267
3268         * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
3269
3270 2005-12-12  Paul Eggert  <eggert@cs.ucla.edu>
3271
3272         Install a more-conservative approach for sort -R.  It's the
3273         same basic idea as the existing code, except it uses the full ISAAC
3274         approach (called the "more kosher" approach in the existing comments).
3275         This makes "sort -R" quite a bit slower (about a factor of 2 on my
3276         little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
3277         better to be conservative here at first, and review any performance
3278         improvements carefully.
3279         * .x-sc_require_config_h: Add src/rand-isaac.c.
3280         * src/rand-isaac.h: Remove.  All uses now simply include rand-isaac.c.
3281         * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
3282         (shred_SOURCES, sort_SOURCES): Remove.
3283         (EXTRA_DIST): Add rand-isaac.c.
3284         * src/rand-isaac.c: Revert to what used to be in shred.c, without
3285         changing it to allow for varying numbers of words in the state.
3286         Alter so that we include rand-isaac.c directly rather than
3287         compiling it and linking to it.  Don't include config.h or
3288         system.h; that's the includer's responsibility.
3289         Omit functions that are specific to shred.
3290         (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
3291         (isaac_step, struct irand_state):
3292         Resurrect these, with the same defns that used to be in shred.c.
3293         (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
3294         (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
3295         static again.
3296         (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
3297         (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
3298         (irand_init, irand32, irand_mod):
3299         Number of words is constant again.
3300         (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
3301         * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
3302         * src/sort.c: Likewise.
3303         * src/shred.c (fillrand, dopass, main): Undo previous change.
3304         (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
3305         from rand-isaac.c.
3306         * src/sort.c: Don't include md5.h; it wasn't needed.
3307         (struct keyfield): Rename random_hash to random, for consistency
3308         with the other member names.  All uses changed.
3309         (usage): Tweak wording to mention STRING for --seed option.
3310         (short_options): Rorder for consistency with other programs.
3311         (rand_state): Now a struct, not a pointer to one.  All uses changed.
3312         (HASH_WORDS, HASH_SIZE): Remove.
3313         (get_hash): Remove comments around resbuf size, since we can assume C89.
3314         Use a "more-kosher" (but slower) approach of invoking isaac_refill.
3315         (keycompare): Adjust to the new get_hash.
3316         Add a FIXME.
3317         (badfieldspec): Omit recently-introduced comment; it isn't needed.
3318         (main): Don't set need_random simply because gkey has it set; that
3319         doesn't necessarily mean we'll need random numbers.
3320         Redo seeding to match new get_hash approach.
3321
3322 2005-12-10  Jim Meyering  <jim@meyering.net>
3323
3324         * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
3325
3326         Avoid shred segfault on 64-bit systems.
3327         * src/rand-isaac.c (isaac_refill): Don't try to negate a
3328         local of type uint32_t.  Make the local an `int' instead.
3329
3330         * NEWS: Mention sort's new options.
3331
3332         * src/rand-isaac.c (isaac_mix): Declare to be static.
3333         Mark all other functions as `extern' so the tight-scope
3334         part of `make distcheck' passes once again.
3335         * src/rand-isaac.h (isaac_mix): Remove declaration.
3336
3337         * src/sort.c (get_hash): Change position of `*' in parameter
3338         type to conform with convention.
3339         (main): Split a long line so it fits in 80 columns.
3340         (keycompare): Remove stray SPACE before TAB that was
3341         causing `make distcheck' to fail.
3342
3343         * src/shred.c: Don't include gethrxtime.h.  No longer needed.
3344
3345         * tests/misc/sort-rand: New file: basic tests for the new options.
3346         * tests/misc/Makefile.am (TESTS): Add sort-rand.
3347
3348 2005-12-10  Frederik Eaton  <frederik@ofb.net>
3349
3350         * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
3351         (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
3352         * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
3353         Make state size runtime-configurable.
3354         (isaac_new, isaac_copy): New functions.
3355         * src/rand-isaac.h: New file.
3356         * src/shred.c: Include rand-isaac.h.  Move ISAAC code to rand-isaac.c.
3357         (fillrand, main): Adjust to the fact that the state size is now
3358         runtime-configurable.
3359         * src/sort.c (short_options, long_options, WORDS, keycompare, main):
3360         (usage): Add options --random-sort and --seed to implement a random
3361         shuffle.
3362         Include md5.h and rand-isaac.h.
3363         (get_hash): New function.
3364         (rand_state): New var.
3365         (HASH_WORDS, HASH_SIZE): New macros.
3366
3367 2005-12-09  Paul Eggert  <eggert@cs.ucla.edu>
3368
3369         * tests/dd/misc: Add test for dd iflags=noatime.
3370
3371 2005-12-09  Jim Meyering  <jim@meyering.net>
3372
3373         * src/sort.c (usage): Mention white space vs -b and -t options.
3374         From The Wanderer.
3375
3376 2005-12-09  Eric Blake  <ebb9@byu.net>
3377
3378         * src/test.c (main): Fix misleading comment.
3379
3380 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
3381
3382         * NEWS: Mention dd's new noatime flag.
3383         * src/system.h (O_NOATIME): Define to 0 if not already defined.
3384         * src/dd.c (flags, usage): Add support for noatime flag.
3385
3386 2005-12-07  Jim Meyering  <jim@meyering.net>
3387
3388         Distribute the cvsu script, used only by `make syntax-check'.
3389         * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
3390         * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
3391         distribute a copy of this script.
3392         * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
3393
3394         * tests/mv/acl: exit-77 before the trap, not after, if we fail
3395         to create a temporary directory on another partition.
3396         From Andreas Gruenbacher.
3397
3398 2005-12-06  Tomas Pospisek  <tpo@sourcepole.ch>  (tiny change)
3399
3400         * man/basename.x: Cross-reference to dirname and readlink.
3401         * man/dirname.x: Cross-reference to basename and readlink.
3402
3403 2005-12-05  Andreas Gruenbacher
3404
3405         * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
3406         (set_owner, preserve_author): New functions, factored out of copy_reg.
3407         (copy_reg): Use them.
3408         (copy_internal): Use them here, too.
3409
3410 2005-12-04  Jim Meyering  <jim@meyering.net>
3411
3412         * src/sleep.c (usage): Say what happens with two or more arguments.
3413         Suggested by Justin Pryzby.
3414
3415         * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
3416         where it's used.
3417
3418 2005-12-03  Jim Meyering  <jim@meyering.net>
3419
3420         * src/rm.c (long_opts): Change the name of each undocumented, for-
3421         testing-only option to start with `-', so that it cannot render
3422         ambiguous any prefix it happens to share with some other option name.
3423         Problem reported by Eric Blake.
3424         * src/head.c (long_options): Likewise.
3425         * src/tail.c (long_options): Likewise.
3426
3427         * tests/misc/head-elide-tail: Update uses of undocumented, for-
3428         testing-only --presume* options to start with `---'.
3429         * tests/rm/dangling-symlink: Likewise.
3430         * tests/rm/dir-no-w: Likewise.
3431         * tests/rm/isatty: Likewise.
3432
3433 2005-11-30  Jim Meyering  <jim@meyering.net>
3434
3435         * Makefile.maint: Add a comment about cvsu.
3436
3437 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
3438
3439         * NEWS: df updates for "none", "proc", inaccessible file systems.
3440         * src/df.c (show_point): Ignore inaccessible file systems.
3441         (usage): -a includes dummy file systems, not size-0 file systems.
3442
3443         * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
3444         to avoid collision with POSIX name space.  All uses changed.
3445
3446 2005-11-24  Jim Meyering  <jim@meyering.net>
3447
3448         * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
3449         * tests/acl: Add `$0: ' prefix to diagnostics.
3450
3451         * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
3452
3453 2005-11-23  Paul Eggert  <eggert@cs.ucla.edu>
3454
3455         * src/copy.c: Improve performance a bit by optimizing away
3456         unnecessary system calls and going to a block size of at least
3457         8192 (on normal hosts, anyway).  This improved performance 5% on my
3458         Debian stable host (2.4.27 kernel, x86, copying from root
3459         ext3 file system to itself).
3460         Include "buffer-lcm.h".
3461         (copy_reg): Omit last argument.  All callers changed.
3462         Use xmalloc to allocate rather than trusting alloca
3463         (which is unwise with large block sizes).
3464         Declare locals more locally, if possible.
3465         Use uintptr_t words instead of int words, for a bit more speed
3466         when looking for null blocks on 64-bit hosts.
3467         Optimize away reads of zero bytes on regular files.
3468         In the typical case, insist on 8 KiB buffers, at least.
3469         Avoid unnecessary extra call to fstat when checking for sparse files.
3470         Avoid now-unnecessary cast to off_t, and "0L".
3471         Avoid unnecessary test of *new_dst when checking for same owner
3472         and group.
3473
3474 2005-11-22  Paul Eggert  <eggert@cs.ucla.edu>
3475
3476         * src/remove.c (rm): Don't assume C99 for-loop syntax.
3477
3478 2005-11-22  Jim Meyering  <jim@meyering.net>
3479
3480         * src/remove.c (AD_push): Remove debugging cruft.
3481
3482         * tests/rm/unread2 (rm): Change expected diagnostic,
3483         `cannot open directory' to `cannot remove', to align with
3484         new version of rm.
3485         * tests/rm/rm2: Ensure that rm now continues removing entries
3486         even after certain types of failure.
3487
3488         * src/remove.c: Rewrite.  Now, this module is reentrant on systems
3489         that provide openat (Solaris), and on systems like Linux+procfs
3490         where our openat emulation code is reentrant.  This also fixes a
3491         few low-probability leaks and eliminates some code that could,
3492         in very unusual circumstances, cause rm() (via a callee) to exit.
3493         * NEWS: Mention this.
3494
3495         * configure.ac: Put copyright dates all on one line so the
3496         emacs function that updates them works properly.
3497
3498 2005-11-18  Paul Eggert  <eggert@cs.ucla.edu>
3499
3500         * configure.ac (AM_PROG_CC_C_O): Add.  Needed for CVS Automake.
3501         Problem reported by Eric Blake.
3502         (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
3503         we get a standard-conforming compiler.  This relies on the new
3504         m4/c.m4 file.  Note that it's a bit tricky, since c.m4 doesn't
3505         define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
3506         m4/c.m4 can go away with Autoconf 2.60 comes out.
3507
3508 2005-11-17  Jim Meyering  <jim@meyering.net>
3509
3510         * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
3511         (AD_mark_current_as_unremovable): Likewise, but for a local.
3512         (rm_1): Likewise.
3513
3514         * tests/mv/acl: Let traps handle removing temporary directories.
3515
3516         Expect acl-related tests to fail, until the corresponding
3517         patches are committed.
3518         * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
3519         * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
3520
3521         ACL tests, from Andreas Gruenbacher.
3522         * tests/acl, tests/mv/acl, tests/cp/acl: New files.
3523         * tests/mv/Makefile.am (TESTS): Add acl.
3524         * tests/cp/Makefile.am (TESTS): Add acl.
3525
3526         * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
3527
3528 2005-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3529
3530         * NEWS: Improve quality of ln's diagnostics.
3531         * src/ln.c (do_link, usage): Likewise.
3532         (do_link): Don't use alloca on a buffer of unbounded size.
3533
3534 2005-11-16  Jim Meyering  <jim@meyering.net>
3535
3536         * tests/cp/fail-perm: Accommodate HPUX.  It appears to fail
3537         with EACCES rather than EPERM.  Reported by Peter O'Gorman here:
3538         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
3539         This also affects AIX 4.3.3, according to Ralf Wildenhues, in
3540         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3541
3542 2005-11-14  Jim Meyering  <jim@meyering.net>
3543
3544         * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
3545
3546 2005-11-13  Jim Meyering  <jim@meyering.net>
3547
3548         * announce-gen: Accept new option, --gpg-key-id=ID and
3549         emit a blurb telling how to use the .sig files.
3550         * Makefile.cfg (gpg_key_ID): Define.
3551         * Makefile.maint (announcement): Use new option and key.
3552
3553         Require that most .c files include <config.h>.
3554         * Makefile.maint (sc_require_config_h): New rule.
3555         (syntax-check-rules): Add it.
3556         * .x-sc_require_config_h: New file listing exceptions to the
3557         above rule.  Some are legit, others are simply grandfathered in.
3558         * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
3559
3560 2005-11-12  Jim Meyering  <jim@meyering.net>
3561
3562         * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
3563
3564 2005-11-11  Jim Meyering  <jim@meyering.net>
3565
3566         * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
3567         Mention new readlink options in 5.3.0's `New features' section.
3568         Spotted by Thomas Hood.
3569
3570 2005-11-08  Jim Meyering  <jim@meyering.net>
3571
3572         * NEWS: Merge in changes from b5_9x branch.
3573
3574 2005-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3575
3576         * NEWS: ls now defaults to --time-style='locale', which in turn acts
3577         like --time-style='posix-long-iso' if the locale settings are messed up.
3578         * src/ls.c (decode_switches): Implement this.
3579
3580 2005-11-08  Jim Meyering  <jim@meyering.net>
3581
3582         * tests/du/2g: s/expensive/very expensive/ in a comment.
3583         From Paul Townsend.
3584
3585 2005-10-17  Eric Blake  <ebb9@byu.net>
3586
3587         * src/ls.c (usage): Fix descriptions of --sort, --time.
3588         Reported by Vitaly A. Ostanin.
3589
3590 2005-11-04  Paul Eggert  <eggert@cs.ucla.edu>
3591
3592         * src/ln.c: Include filenamecat.c.
3593         (FILE_BASENAME_CONCAT): Remove.
3594         (do_link): Remove last arg DEST_IS_DIR.  All callers changed.
3595         (main): Use file_name_concat, base_name, and strip_trailing_slashes
3596         instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
3597         the use of alloca.
3598
3599 2005-11-04  Jim Meyering  <jim@meyering.net>
3600
3601         * src/du.c (process_file): Don't overflow for files of size >= 2^31
3602         on systems with stat.st_blocks of a signed 32-bit type.
3603         This bug causes trouble on some AIX 5.1 systems.
3604         Report and trivial patch from Paul Townsend:
3605         <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
3606         * NEWS: Mention this.
3607
3608         * tests/du/2g: New (very-expensive) test for the above-fixed bug.
3609         * tests/du/Makefile.am (TESTS): Add it here.
3610         * tests/very-expensive: New file.
3611         * tests/Makefile.am (EXTRA_DIST): Add it here.
3612         * tests/cp/perm: Mark this test as `very-expensive', too.
3613
3614 2005-11-02  Paul Eggert  <eggert@cs.ucla.edu>
3615
3616         * NEWS: Mention that rm -d and maybe ln -d are scheduled for
3617         removal in 2006.
3618         * src/remove.h (struct rm_options): Remove unlink_dirs.  All uses
3619         removed.
3620         * src/rm.c (usage): Don't mention rm -d.
3621
3622 2005-11-02  Jim Meyering  <jim@meyering.net>
3623
3624         * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
3625         From Andreas Schwab.
3626
3627         * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
3628         `M+N records in/out' lines don't pollute `make check' output.
3629
3630         * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
3631         fixed on 2005-10-31.  This test uses the new, IN_PIPE specifier.
3632         * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
3633         to indicate that the input file should be piped into the command
3634         under test (via `cat FILE | $prog ...').
3635
3636         * src/remove.c (remove_entry): Emit a better diagnostic when rm
3637         (without -r) fails to remove a directory on a non-Linux system.
3638         This change affects only newer Solaris systems (with priv_*
3639         functions like priv_allocset).  Reported by Keith Thompson.
3640
3641         * tests/rm/dir-nonrecur: New file/test for the above fix.
3642         * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
3643
3644 2005-11-01  Paul Eggert  <eggert@cs.ucla.edu>
3645
3646         * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
3647         POSIX 1002.1-2001 requires.
3648         * src/tail.c (parse_obsolete_option): Implement this.
3649         Problem reported by Vincent Lefevre.
3650         * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
3651         * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
3652         (test_vector): Add special cases for _POSIX2_VERSION, and
3653         regularize the old ones a bit.
3654         * tests/touch/obsolescent: Add y2000 test.
3655
3656 2005-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3657
3658         * src/dd.c (skip): Fix off-by-one error reported by
3659         Theodoros V. Kalamatianos.
3660
3661 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
3662
3663         * tests/mkdir/p-3: Require that the test be run as non-root.
3664         Problem and trivial fix reported by Theodoros V. Kalamatianos.
3665
3666 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
3667
3668         * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
3669         boundary between DEST and SOURCE in the result.
3670
3671 2005-10-26  Dmitry V. Levin  <ldv@altlinux.org>
3672
3673         * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
3674         back to text, to sync with documentation and for backwards
3675         compatibility.
3676
3677 2005-10-25  Jim Meyering  <jim@meyering.net>
3678
3679         * tests/dircolors/simple (other-wr): Add an explicit test for
3680         the dircolors bug (NULL-dereference) fixed yesterday.
3681
3682 2005-10-24  Jim Meyering  <jim@meyering.net>
3683
3684         * src/tac.c (tac_file): When determining whether a file is seekable,
3685         also test whether it is a tty.  Using only the lseek-based test would
3686         give a false positive on Solaris.  Reported by Peter Fales.
3687
3688 2005-10-24  Dmitry V. Levin  <ldv@altlinux.org>
3689
3690         * tests/install/d-slashdot: New test, for "install -d" failure.
3691         * tests/install/Makefile.am (TESTS): Add d-slashdot.
3692         * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
3693         * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
3694
3695 2005-10-24  Jim Meyering  <jim@meyering.net>
3696
3697         * src/dircolors.c (ls_codes): Add missing comma.
3698         Anonymous report and patch from
3699         http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
3700
3701         * src/dircolors.c: Add compile-time assertion that the slack_codes
3702         and ls_codes arrays have the same number of elements.  This would
3703         have prevented the above-fixed bug.
3704
3705         * src/expand.c (parse_tab_stops): Add a comment to make this function
3706         identical to the one in unexpand.c.
3707         * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
3708         identical to the one in expand.c.
3709
3710         * src/expand.c (next_file): Don't assume fopen cannot return stdin.
3711
3712 2005-10-23  Jim Meyering  <jim@meyering.net>
3713
3714         * src/md5sum.c (digest_check, main): Use ptr_align rather than
3715         a dangerous pointer-value-to-`unsigned' cast.
3716         * NEWS: mention the new sha* programs.
3717         * AUTHORS: Add new sha* programs.
3718
3719 2005-08-28  David Madore  <david.madore@ens.fr>
3720
3721         Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
3722         * README: Add their names to the list.
3723         * src/md5sum.c: Provide framework for computing sha-2 hashes.
3724         * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
3725         Rules for compiling sha-2 utilities
3726         (noinst_HEADERS): Remove checksum.h.
3727         * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
3728         New files.
3729         * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
3730         (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
3731         * tests/misc/sha224sum, tests/misc/sha256sum: New files.
3732         * tests/misc/sha384sum, tests/misc/sha512sum: New files.
3733         * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
3734         sha384sum, sha512sum test scripts here rather that each in its
3735         own directory.
3736
3737 2005-08-28  David Madore  <david.madore@ens.fr>
3738
3739         * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
3740         of the FIPS test vectors).
3741
3742 2005-10-23  Jim Meyering  <jim@meyering.net>
3743
3744         * configure.ac: Use 6.0-cvs as the version string.
3745         * NEWS: Adjust accordingly.
3746
3747
3748         -----
3749
3750         Copyright (C) 2005, 2006 Free Software Foundation, Inc.
3751
3752         Copying and distribution of this file, with or without
3753         modification, are permitted provided the copyright notice
3754         and this notice are preserved.