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