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