Move the sole test in tests/unexpand to tests/misc/unexpand.
[coreutils/ericb.git] / ChangeLog
blob3a499f3b8786e5133d1f4bd99f058c2b9d1f97da
1 2007-09-08  Jim Meyering  <jim@meyering.net>
3         Accommodate gnulib's renaming: __fpending.h -> fpending.h.
4         * lib/t-fpending.c: Include "fpending.h", not "__fpending.h".
6 2007-09-07  Jim Meyering  <jim@meyering.net>
8         chmod: don't ignore a dangling symlink
9         * NEWS: Mention the bug fix.
10         * src/chmod.c (process_file): Handle the case of FTS_SLNONE,
11         i.e., give a diagnostic saying we cannot operate on such a file.
12         * tests/chmod/thru-dangling: Compare new stderr output with expected.
14 2007-09-07  Bob Proulx  <bob@proulx.com>
16         Add a test: demonstrate that chmod ignores a dangling symlink
17         * tests/chmod/thru-dangling: New test.  Fails.
18         * tests/chmod/Makefile.am (TESTS): Add thru-dangling.
20 2007-09-05  Jim Meyering  <jim@meyering.net>
22         Adapt to new SELinux behavior: "?" vs. new "unlabeled"
23         * src/ls.c (gobble_file): Interpret the new "unlabeled" indicator
24         from getfilecon/lgetfilecon the same way we interpret a negative
25         return value: no security context.  So we don't print the "+".
26         * tests/selinux: Recognize that "unlabeled" means insufficient
27         support for SELinux, just like "?".
29 2007-09-03  Jim Meyering  <jim@meyering.net>
31         Invoke $(AUTOCONF) manually, if needed to get an updated version string.
32         * GNUmakefile: Don't actually touch configure.ac.
33         That would make git-version-gen always print "...-dirty".
35         Don't change '-'s to '.'s in the string from git-describe.
36         * build-aux/git-version-gen: Leave '-'s in the string from git-describe.
37         Otherwise, s/-/./g would make it too hard to distinguish the base
38         version number from the appended .DD suffixes.
40 2007-09-03  Jim Meyering  <jim@meyering.net>
42         * README-hacking: Require rsync, rather than wget.
44 2007-09-02  Jim Meyering  <jim@meyering.net>
46         * bootstrap (WGET_COMMAND): Remove code to set this variable.
48         Ensure that $(VERSION) is up to date for dist-related targets.
49         * GNUmakefile: Arrange to rerun autoconf, if the version reported by
50         git-version-gen doesn't match $(VERSION), but only for dist targets.
52         bootstrap: uses rsync to download the .po files
53         * bootstrap (po_download_command_format): New global.
54         (download_po_files): Use rsync.
55         (update_po_files): Don't remove .po files after download,
56         so future rsync runs can take advantage of the copies.
58 2007-09-01  Jim Meyering  <jim@meyering.net>
60         * bootstrap (gnulib_tool): Make sha1sum check quietly.
62         Ensure that snapshot version changes make it to groups, too.
63         * src/Makefile.am (groups): Depend on Makefile.
65         Make groups-version executable,
66         * tests/misc/groups-version: ... as it was in the patch.
68 2007-08-31  Eric Blake  <ebb9@byu.net>
70         Test yesterday's change to groups.
71         * tests/misc/groups-version: New test.
72         * tests/misc/Makefile.am (TESTS): Add groups-version.
74 2007-08-31  Jim Meyering  <jim@meyering.net>
76         Solve the unnecessary-.po-file-regeneration problem once and for all.
77         * bootstrap (download_po_files): New function, renamed from
78         get_translations.  Now, downloads, but doesn't update LINGUAS.
79         (update_po_files): New function.
81 2007-08-30  Jim Meyering  <jim@meyering.net>
83         Shorten the snapshot version string by removing the "g".
84         * build-aux/git-version-gen: Remove git-describe's "g" that would
85         always precede the abbreviated SHA1.  Suggestion from Dmitry V. Levin.
87         Perform the s,rm,/bin/rm, fix-up properly.  No more kludge.
88         * Makefile.am (EXTRA_DIST): Remove .kludge-stamp.
89         (.kludge-stamp): Remove rule.  Instead, ...
90         (dist-hook): Do the job here, operating on the file in $(distdir).
91         (rm_subst): Adjust regexp to match "rm -f rm$(EXEEXT)", not "rm -f rm".
92         (MAINTAINERCLEANFILES): s/+=/=/, now that this is the sole use.
93         (dist-hook): Remove the legacy-from-cvs install-sh is-executable check.
94         * .gitignore: Remove .kludge-stamp.
96         Make inter-release --version output more useful.
97         Now, each snapshot has a version "number" like 6.9-219-g58ddd,
98         which indicates that it is built using the 219th change set
99         (in _some_ repository) following the "v6.9" tag, and that 58ddd
100         is a prefix of the commit SHA1.
101         * build-aux/git-version-gen: New file.
102         * configure.ac: Run it to set the version.
103         * Makefile.am (dist-hook): Arrange so that .version appears only
104         in distribution tarballs, never in a checked-out repository.
105         * .gitignore: Add .version here, too.  Just in case.
107 2007-08-30  Eric Blake  <ebb9@byu.net>
109         * src/.gitignore: Ignore *.exe for platforms with non-empty $(EXEEXT).
111 2007-08-30  Eric Blake  <ebb9@byu.net>
113         Use PACKAGE_NAME instead of GNU_PACKAGE.
114         * src/Makefile.am (.sh, uninstall-local): Adjust all users of
115         hand-rolled GNU_PACKAGE to instead use autoconf-provided
116         PACKAGE_NAME.
117         * src/basename.c (main): Likewise.
118         * src/chroot.c (main): Likewise.
119         * src/dirname.c (main): Likewise.
120         * src/echo.c (main): Likewise.
121         * src/expr.c (main): Likewise.
122         * src/factor.c (main): Likewise.
123         * src/groups.sh (version): Likewise.  Also, reflect change in
124         --version output due to GPLv3.
125         * src/hostid.c (main): Likewise.
126         * src/hostname.c (main): Likewise.
127         * src/link.c (main): Likewise.
128         * src/logname.c (main): Likewise.
129         * src/nice.c (main): Likewise.
130         * src/nohup.c (main): Likewise.
131         * src/printenv.c (main): Likewise.
132         * src/printf.c (main): Likewise.
133         * src/pwd.c (main): Likewise.
134         * src/setuidgid.c (main): Likewise.
135         * src/sleep.c (main): Likewise.
136         * src/system.h (case_GETOPT_VERSION_CHAR): Likewise.
137         * src/test.c (main): Likewise.
138         * src/true.c (main): Likewise.
139         * src/unlink.c (main): Likewise.
140         * src/uptime.c (main): Likewise.
141         * src/users.c (main): Likewise.
142         * src/whoami.c (main): Likewise.
143         * src/yes.c (main): Likewise.
144         * configure.ac (AC_CHECK_DECLS): No need to check strtoimax,
145         strtoumax, since gnulib does this.
147 2007-08-30  Jim Meyering  <jim@meyering.net>
149         Ensure that TMPDIR is valid.  Otherwise, it would cause test failures.
150         * tests/misc/tty-eof: Set TMPDIR=.
151         * tests/misc/sort-compress: Likewise.
153         Use EXIT_FAILURE, not EXIT_FAIL, now that EXIT_FAILURE is always 1.
154         * src/system.h (EXIT_FAIL): Remove definition.
155         * src/chroot.c (main): EXIT_FAIL -> EXIT_FAILURE.
156         * src/env.c (main): Likewise.
157         * src/nice.c (main): Likewise.
158         * src/su.c (change_identity, main): Likewise.
159         * src/tty.c (main): Likewise.
160         Suggestion from Eric Blake.
162 2007-08-28  Jim Meyering  <jim@meyering.net>
164         * src/test.c (usage): Note that [ honors --help and --version,
165         but that test does not.  Suggestion from Dan Jacobson.
167         By default, do not install hostname anymore; no kidding, this time.
168         * src/Makefile.am (EXTRA_PROGRAMS): Remove hostname from this list,
169         now that it's no longer being installed by default.  This should
170         have been part of the 2007-08-21 change.
171         (check-duplicate-no-install): New rule to ensure this doesn't
172         happen again.
173         (check): Depend on it.
175         Reflect renaming: mreadlink-with-size -> areadlink-with-size.
176         * bootstrap.conf: Update module name.
177         * src/copy.c (copy_internal): Update header and function names.
178         * src/ls.c (get_link_name): Likewise.
179         * src/readlink.c (main): Likewise.
180         * src/stat.c (print_stat): Likewise.
182         Add file system type names and magic numbers from "man 2 statfs".
183         * src/stat.c (human_fstype): Also handle BEFS, BFS, BINFMT_MISC,
184         FUSECTL, HUGETLBFS, NFSD and OPENPROM.
186 2007-08-27  Jim Meyering  <jim@meyering.net>
188         Add some file system type names and magic numbers from glibc.
189         * src/stat.c (human_fstype): Add any file system names and values
190         present in glibc's linux_fsinfo.h but not in this list.
191         Alphabetize the S_* names and capitalize the hexadecimal constants.
193 2007-08-26  Jim Meyering  <jim@meyering.net>
195         * tests/misc/fold: Fix a typo: missing \ in a diagnostic
196         no one is likely ever to see.
198 2007-08-25  Jim Meyering  <jim@meyering.net>
200         * src/dircolors.hin: Add .dz and .svgz as archive suffixes.
202         Remove all .cvsignore files from version control.
204 2007-08-24  Jim Meyering  <jim@meyering.net>
206         bootstrap: Ignore more.
207         * bootstrap (symlink_to_dir): Add a directory name like
208         uniwidth to e.g., lib/.gitignore.
209         (slurp): Handle the sys_stat_.h -> sys mapping, too.
210         * .hgignore: Remove this file, too.
211         * Makefile.am (EXTRA_DIST): Remove .gitignore and .hgignore.
213         No longer version-control .???ignore files in lib/, m4/, and po/.
214         * .gitignore: Ignore a few files in lib/, m4/, and po/ that are not
215         picked up automatically.
216         * lib/.gitignore, lib/.cvsignore: Remove files.
217         * m4/.gitignore, m4/.cvsignore: Remove files.
218         * po/.gitignore, po/.cvsignore: Remove files.
220         bootstrap: when fetching .po files, do not remove .gmo files.
221         * bootstrap (get_translations): Don't remove *.gmo files!
222         They can be expensive to regenerate.
224         Create .gitignore and/or .cvsignore from scratch, if absent.
225         This is in preparation for my removing those files from version
226         control in the directories managed by gnulib-tool.
227         * bootstrap: New setting: vc_ignore.
228         (insert_sorted_if_absent): Create $file if absent.
229         Adapt to new, possibly empty, list: $vc_ignore.
231         * src/system.h (fseeko, ftello): Remove now-unneeded definitions.
232         * src/od.c (LDBL_DIG): Remove now-unneeded definition.
234         Arrange to use tag names like vM.N, rather than COREUTILS-M_N.
235         * Makefile.maint (this-vc-tag) [git]: Simply use v$(VERSION).
236         (this-vc-tag-regexp): New variable.
237         (vc-tag-check): Use it, rather than $(this-vc-tag).
239 2007-08-23  Jim Meyering  <jim@meyering.net>
241         * src/dircolors.hin: Add xterm-16color, xterm-88color and eterm-color.
242         Suggestion from Dan Nicolaescu.
244         Don't let ln be a party to destroying user data.
245         * src/ln.c: Include "file-set.h", "hash.h" and "hash-triple.h".
246         (dest_set, DEST_INFO_INITIAL_CAPACITY): New globals.
247         (do_link): Refuse to remove a just-created link.
248         Record a name,dev,ino triple for each link we create.
249         (main): Initialize dest_set, if needed.
250         * tests/mv/childproof: Test for the above fix.
251         * NEWS: Document this.
252         Reported by Eric Blake.
254         Move functions from copy.c into new modules, since ln needs them, too.
255         * bootstrap.conf (gnulib_modules): Add file-set.
256         * gl/lib/file-set.c (record_file, seen_file): Functions from copy.c.
257         * gl/lib/file-set.h: Add prototypes.
258         * gl/lib/hash-triple.c (triple_hash, triple_hash_no_name):
259         (triple_compare, triple_free): Functions from copy.c.
260         * gl/lib/hash-triple.h (struct F_triple): Define.  From copy.c.
261         Add prototypes.
262         * gl/modules/file-set: New module.
263         * gl/modules/hash-triple: New module.
264         * src/Makefile.am (copy_sources): New variable.
265         (ginstall_SOURCES, cp_SOURCES, mv_SOURCES): Use it.
266         * src/copy.c: Include hash-triple.h.
267         No longer include hash-pjw.h.
268         (copy_internal): Don't pass a NULL third argument to record_file,
269         since that function no longer accepts that.
270         (record_file): Move this function to file-set.c.
271         Along the way, remove the code to allow a NULL stat-buffer pointer.
272         Adjust sole caller.
273         (seen_file): Move this function to file-set.c.
274         (struct F_triple): Move declaration to hash-triple.h.
275         (triple_compare, triple_free, triple_hash, triple_hash_no_name):
276         Move these functions to hash-triple.c.
278         bootstrap: generate more ignorable names
279         * bootstrap (slurp): When generating ignorable names, also map
280         .sin to .sed, .gperf to .c, and .y to .c.
282         * Makefile.maint (patch-check): Don't remove temporaries upon failure.
284 2007-08-22  Jim Meyering  <jim@meyering.net>
286         * src/c99-to-c89.diff: Adjust offsets.
288         Change "rm --verbose -r a//" not to print extra slashes in a///b
289         * src/remove.c (push_dir): Don't copy trailing slashes onto the stack.
290         Reported by François Pinard.
291         * tests/rm/v-slash: New file.  Test for the above change.
292         * tests/rm/Makefile.am (TESTS): Add v-slash.
294         * src/date.c: Don't include "getline.h", now removed from gnulib;
295         its declarations are now in <stdio.h>.
296         * src/md5sum.c: Likewise.
297         * src/dircolors.c: Likewise.
299         * src/copy.c (DEST_INFO_INITIAL_CAPACITY): Correct a comment.
301 2007-08-21  Jim Meyering  <jim@meyering.net>
303         By default, do not install hostname anymore.
304         * configure.ac: Add "hostname" to the list of not-installed programs.
305         * src/Makefile.am (no_install__progs): Add "hostname" here, too.
306         * NEWS: Mention this.
308 2007-08-20  Bob Proulx  <bob@proulx.com>
310         Clarify touch documentation of file arguments.
311         * src/touch.c (usage): Improve wording of documentation regarding
312         file argument handling and special handling of - argument.
313         * doc/coreutils.texi (touch invocation): Likewise.
314         Documentation problem reported by Vincent Lefevre.
316 2007-08-20  Paul Eggert  <eggert@cs.ucla.edu>
318         * NEWS: The old cp -p bug affected coreutils releases before 6.0.
319         Problem reported by Soren Spies in
320         <http://lists.gnu.org/archive/html/bug-coreutils/2007-08/msg00106.html>.
321         To be conservative, just say the bug was in all versions through 6.6.
323 2007-08-19  Eric Blake  <ebb9@byu.net>
325         Avoid consuming too much seekable input when yesno is used.
326         * bootstrap.conf (gnulib_modules): Add closein.
327         * src/system.h (includes): Also include closein.h.
328         * src/mv.c (main): Use close_stdin, not close_stdout.
329         * src/cp.c (main): Likewise.
330         * src/ln.c (main): Likewise.
331         * src/rm.c (main): Likewise.
332         * src/install.c (main): Likewise.
333         * NEWS: Document the fix.
335 2007-08-20  Jim Meyering  <jim@meyering.net>
337         Parallel "make check" support.
338         * build-aux/check.mk: New file, from The Vaucanson Group.
339         * .x-sc_GPL_version: New file, to allow "version 2 or later"
340         in build-aux/check.mk.
341         * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
342         * tests/check.mk: New file.
343         * tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
345         Begin factoring "sample-test" out of test scripts.
346         * tests/test-lib.sh: New file, to be sourced by all tests that
347         were previously derived from the "sample-test" template.
348         * tests/mkdtemp: New file.
349         * tests/touch/dir-1: Use test-lib.sh.
350         * tests/touch/empty-file: Likewise.
351         * tests/touch/fail-diag: Likewise.
352         * tests/touch/fifo: Likewise.
353         * tests/touch/no-create-missing: Likewise.
354         * tests/touch/no-rights: Likewise.  Also, don't sleep.
355         * tests/touch/not-owner: Likewise.
356         * tests/touch/obsolescent: Likewise.
357         * tests/touch/read-only: Likewise.
358         * tests/touch/relative: Likewise.
359         * tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
360         to get the parallel-"make check" bits.
362 2007-08-18  Jim Meyering  <jim@meyering.net>
364         Use new "idcache.h" header.
365         * src/ls.c: Remove ancient declarations of getuser and getgroup.
366         Include "idcache.h", instead.
368         Run each Coreutils.pm-based test in its own subdirectory.
369         * tests/CuTmpdir.pm: New file.
370         * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm.
371         * tests/misc/od, tests/misc/base64, tests/misc/basename:
372         * tests/misc/cut, tests/misc/date, tests/misc/dirname:
373         * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail:
374         * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum:
375         * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum:
376         * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag:
377         * tests/misc/wc-files0-from, tests/misc/xstrtol:
378         * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from:
379         * tests/expr/basic, tests/factor/basic, tests/fmt/basic:
380         * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
381         * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
382         * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1:
383         * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it.
384         * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test",
385         not "../../src/test", so it works when run from a subdirectory.
386         * tests/ls-2/tests: Create temp files and dirs from within the perl
387         script, so that they're removed, when run from a subdirectory.
388         * tests/ls-2/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir,
389         so we can use "$ENV{abs_top_builddir}/src/test" in a test script.
391 2007-08-16  Jim Meyering  <jim@meyering.net>
393         Consolidate od tests.
394         * tests/misc/od: Perform od-zero-len's test here.
395         Include boilerplate code, so tests run in a subdirectory.
396         * tests/misc/od-zero-len: Remove this file.
398         * tests/ls/time-1: Include sample-test boilerplate code.
399         Remove the then-unnecessary, hard-coded envvar "unset" commands.
401 2007-08-15  Jim Meyering  <jim@meyering.net>
403         Move a slow test into tests/misc.
404         * tests/ls/time-1: Move this file to tests/misc/ls-time.
405         * tests/misc/ls-time: New file.  From tests/ls/time-1.
406         * tests/ls/Makefile.am (TESTS): Remove time-1.
407         * tests/misc/Makefile.am (TESTS): Add ls-time.
409         od --skip (-j) works even on files in /proc, when the kernel lies
410         * src/od.c (skip): Don't let kernel misinformation (nonempty files
411         in /proc with stat.st_size == 0) make "od -j N" misbehave.
412         Patch by Paul Eggert.
413         * NEWS: Document this work-around.
414         * tests/misc/od-zero-len: New file, test for the above.
416         * src/printf.c (usage): Adjust summary to also mention OPTIONs.
417         From Karl Berry.
419 2007-08-14  Jim Meyering  <jim@meyering.net>
421         od: fix a bug that arises when skipping exact length of file
422         * NEWS: Document the bug fix.
423         * src/od.c (skip): Call fseek even when n_skip is exactly the
424         same as the length of the current file.  Otherwise, the next
425         iteration would use unadjusted input stream pointer, thus ignoring
426         the desired "skip".  Report and patch by Paul GHALEB.
428         * tests/misc/od: New file, test for the above.
429         * tests/misc/Makefile.am (TESTS): Add od.
431 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
433         Accommodate more xstrtol changes.
434         * src/df.c (long_options): Don't bother prepending "--" to long
435         options that OPT_STR might decode, as that hack is no longer needed.
436         (main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR.
437         * src/du.c (long_options, main): Likewise.
438         * src/ls.c (decode_switches): Likewise.
439         * src/od.c (long_options, main): Likewise.
440         * src/pr.c (first_last_page, main): Likewise.
441         * src/sort.c (long_options, specify_sort_size): Likewise.
442         * src/pr.c (first_last_page): Accept option index and option char
443         instead of an assembled option string.  All callers changed.
444         * src/sort.c (specify_sort_size): Likewise.
445         * src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
446         Remove.
448 2007-08-05  Jim Meyering  <jim@meyering.net>
450         Encapsulate a static variable.
451         * src/system.h (opt_str_storage): Move static var into...
452         (short_opt_str): ... new static inline function.
453         (OPT_STR): Use the new function.
455 2007-08-04  Jim Meyering  <jim@meyering.net>
457         Exercise xstrtol's diagnostics via pr's --pages option.
458         * tests/misc/xstrtol: New file.
459         * tests/misc/Makefile.am (TESTS): Add xstrtol.
461 2007-08-04  Paul Eggert  <eggert@cs.ucla.edu>
463         Adapt to new human and xstrtol API.
464         * src/df.c (long_options): Prepend "--" to long options that
465         OPT_STR might decode.
466         * src/du.c (long_options): Likewise.
467         * src/od.c (long_options): Likewise.
468         * src/sort.c (long_options): Likewise.
469         * src/df.c (main): Adjust to new human and xstrtol API.
470         * src/du.c (main): Likewise.
471         * src/ls.c (decode_switches): Likewise.
472         * src/od.c (main): Likewise.
473         * src/pr.c (first_last_page): Likewise.  New argument OPTION.
474         All callers changed.
475         * src/sort.c (specify_sort_size): New arg OPTION.  All callers
476         changed.  Adjust to new xstrtol API.
477         * src/system.h (opt_str_storage): New static var.
478         (OPT_STR, LONG_OPT_STR, OPT_STR_INIT): New macros.
480 2007-08-02  Jim Meyering  <jim@meyering.net>
482         Adjust one more test to accommodate the recent fts change.
483         This matters only on systems with insufficient openat support.
484         * tests/du/inacc-dest: Adjust expected diagnostic.
486         Adjust the other two "no-x" tests and unify all three.
487         * tests/du/no-x: Factor out du-specific bits.
488         * tests/chmod/no-x: Use the same code.
489         * tests/chgrp/no-x: Use the same code.
491         Adapt du's no-x test not to fail on older Linux systems.
492         * tests/du/no-x: Accept a third variant of the diagnostic.
494 2007-07-31  Jim Meyering  <jim@meyering.net>
496         du: print size (probably incomplete) of each inaccessible directory
497         * src/du.c (process_file): Print what we know of the size of a
498         directory even when it is inaccessible.  What we print is just the
499         size of the directory itself, not counting any of its contents.
500         * tests/du/inacc-dir: Test for this.
501         * NEWS: Mention this change.
503         Add a test for du not counting size of inaccessible directories.
504         * tests/du/inacc-dir: New file. Test for fts.c bug fixed yesterday.
505         * tests/du/Makefile.am (TESTS): Add inacc-dir.
506         * NEWS: Mention the bug fix.
508 2007-07-28  Jim Meyering  <jim@meyering.net>
510         Attempt to copy a regular file, even if stat says it is empty.
511         * NEWS: Document this bug fix.
512         * src/copy.c (copy_reg): Read from a regular file, even if it
513         appears (stat.st_size == 0) to be empty.  This reverts an
514         optimization introduced on 2005-11-23 for coreutils-6.0.
515         Otherwise, "cp /proc/cpuinfo /tmp" creates an empty file,
516         on e.g., linux-2.6.20.
517         * tests/cp/proc-zero-len: New file.  Test for the above.
518         * tests/cp/Makefile.am (TESTS): Add proc-zero-len.
519         Reported by Dan Berrangé.
521 2007-07-26  Bob Proulx  <bob@proulx.com>
523         sort: Improve sort --random-sort test.
524         * tests/misc/sort-rand: If "locale" is available pick a random
525         non-C locale and check "sort --random-sort" behavior using it.
527 2007-07-24  Jim Meyering  <jim@meyering.net>
529         sort: add a test to exercise the affected code.
530         * tests/sort/Test.pm (realloc-buf): Exercise the code that changed
531         yesterday.  No other test in all of "make check" does this.
532         * NEWS: Mention the fix.
534 2007-07-23  Paul Eggert  <eggert@cs.ucla.edu>
536         sort: avoid unaligned access.
537         * src/sort.c (fillbuf): When enlarging the line buffer, ensure that
538         the new size is a multiple of "sizeof (struct line)".  This avoids
539         alignment problems when indexing from the end of the buffer.
540         Problem reported by Andreas Schwab in
541         <http://lists.gnu.org/archive/html/bug-coreutils/2007-07/msg00158.html>.
543 2007-07-23  Jim Meyering  <jim@meyering.net>
545         Update all copyright notices to use the newer form (e.g., remove
546         the postal address, and add the 'licenses' URL).
548         * COPYING: Update to Version 3.
550         Update c99/c89 patch for new, copyright-change-induced offsets.
551         * Makefile.maint (patch-check): Filter out '^Only in...' lines.
552         * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
554 2007-07-22  Jim Meyering  <jim@meyering.net>
556         * configure.ac: Arrange to rerun configure whenever src/Makefile.am
557         changes.  That file contains the list of program names that must be
558         substituted into files like man/Makefile.
559         Add quotes around AC_SUBST arguments.
561 2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
563         * bootstrap (slurp): Work even in environments where "ls" defaults
564         to "ls -A".  Put in a FIXME, though, since the current code does
565         not slurp files whose names start with ".", and this looks like
566         it might be a troublesome area.
568 2007-07-20  Jim Meyering  <jim@meyering.net>
570         Document and add a test for today's sort bug fix.
571         * NEWS: Describe the bug fix.
572         * tests/sort/Test.pm (obs-inval): Add a test for today's fix.
574 2007-07-20  Andreas Schwab  <schwab@suse.de>
576         * src/sort.c (main): Don't free a pointer to non-malloc'd memory.
578 2007-07-19  Jim Meyering  <jim@meyering.net>
580         Fix a portability bug in the new ls-color test.
581         * tests/ls/stat-free-symlinks: Don't rely on the ability of
582         a built-in printf to interpolate '\e'.  Use '\033' instead.
584 2007-07-18  Jim Meyering  <jim@meyering.net>
586         "cp -i --update older newer" no longer prompts; same for mv
587         * src/copy.c (copy_internal): Perform "update" check before the
588         possible interactive prompt.  Reported by zeno_AT_biyg_DOT_org
589         in <http://bugzilla.redhat.com/248591>
590         * tests/mv/update: Add tests for the above.
591         * NEWS: Mention the bug fix.
593 2007-07-15  Jim Meyering  <jim@meyering.net>
595         ls --color: Don't stat symlinks when neither ORPHAN nor MISSING
596         attribute has a color.
597         * src/ls.c (main): Don't set check_symlink_color when C_EXEC is
598         colored, unless ln=target (aka color_symlink_as_referent) is set.
599         (gobble_file): Set f->linkok = true also when !check_symlink_color.
600         http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10608/focus=10927
601         Reported by Jeremy Maitin-Shepard.
602         * tests/strace: New file, contents extracted from...
603         * tests/mv/atomic: ...here.  Source strace.
604         * tests/ls/stat-free-symlinks: New file.  Test for the above.
605         Use strace to ensure that in this corner case, ls does not call stat.
606         * tests/ls/Makefile.am (TESTS): Add stat-free-symlinks.
607         * tests/Makefile.am (EXTRA_DIST): Add strace.
609 2007-07-14  Jim Meyering  <jim@meyering.net>
611         Remove long-deprecated options.
612         * NEWS: Mention this.
613         * src/df.c, src/ls.c: Remove --kilobytes option.
614         * src/du.c: Remove --kilobytes and --megabytes options.
615         * src/who.c: Remove -i and --idle options.
616         * src/ptx.c: Remove --copyright option.
618         Change interface: make 2nd param _space_-separated, not comma-separated
619         * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now-
620         unnecessary use of tr.
621         Improve comments.
622         * configure.ac: Adjust caller, as well as the code that ensures the
623         2nd parameter stays in sync with the list in src/Makefile.am.
625 2007-07-14  Karel Zak  <kzak@redhat.com>
627         * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix typo: s/$2/$1/.
628         (gl_INCLUDE_EXCLUDE_PROG): Quote first use of $2 parameter.
629         Don't mix comma- and space-separated lists.
630         Patch from Karel Zak.
632 2007-07-13  Jim Meyering  <jim@meyering.net>
634         Warn about non-portable use of unescaped backslash at end of string,
635         and treat it as if it were escaped.
636         * src/tr.c (unquote): Considering that such usage would make GNU tr
637         from coreutils-5.2.1 and earlier *fail*, the least we can do now is
638         to warn about it.  Solaris' tr ignores it.
639         * NEWS: Mention this.
641         Use proper backslash-quoting inside backticks.
642         * configure.ac: Otherwise we run afoul of strict GNU tr:
643         a string ending in a lone backslash would provoke a failure.
645 2007-07-12  Jim Meyering  <jim@meyering.net>
647         Expand default-no-install prog list in ./configure --help output,
648         and fix some []-quoting bugs in sed expressions.
649         * configure.ac: Hard-code the list, "arch,su" here as well
650         as in src/Makefile.am, and ensure the two stay in sync.
651         * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Use $2,
652         rather than the nearly-equivalent shell variable.
653         Karel Zak reported that ./configure --help's output included
654         the literal string, $gl_no_install_progs_default.
656         Clean up include-exclude-prog.m4.
657         * m4/include-exclude-prog.m4 (gl_ADD_PROG): Don't modify MAN.
658         (gl_REMOVE_PROG): Likewise.
659         Add omitted "\>" in sed regexp.
660         Remove any leading or trailing spaces.
661         (gl_ADD_PROG): Remove any leading space.
662         * configure.ac: Instead, derive $MAN from $optional_bin_progs.
663         Append $(EXEEXT) to *all* names, not just the first one.
665 2007-07-11  Jim Meyering  <jim@meyering.net>
667         If there's a GPL vN copyright comment, require that N == 3.
668         * Makefile.maint (sc_GPL_version): New rule.
669         * tests/misc/arch: Fix the sole violation.
671 2007-07-10  Jim Meyering  <jim@meyering.net>
673         Skip "arch" test if it's not built.
674         * tests/misc/Makefile.am (built_programs): Define.
675         (TESTS_ENVIRONMENT): Add $(built_programs), for...
676         * tests/misc/arch: ...this: skip the test if arch is not built.
677         * src/Makefile.am (built_programs.list): New rule.
678         * tests/Makefile.am (built_programs): Rename from all_programs.
679         (TESTS_ENVIRONMENT): Use built_programs, not all_programs.
680         * tests/help-version: Likewise.
681         * NEWS: Mention that using --enable-no-install-program=X may
682         cause "make check" to fail.
684         Add support for enabling/disabling installation of specified programs.
685         * NEWS: Mention new configure-time options.
686         Mention that neither arch nor su is built/installed, by default.
687         * m4/include-exclude-prog.m4: New file.
688         * configure.ac: Use new macro, gl_ADD_PROG, rather than
689         manually appending to OPTIONAL_BIN_PROGS and MAN.
690         Move the code that adds "df" to the list of programs to build from
691         m4/jm-macros into this file.
692         Use gl_INCLUDE_EXCLUDE_PROG, then handle special cases: ginstall, [.
693         (NO_INSTALL_PROGS_DEFAULT): AC_SUBST it.  Used by man/Makefile.am.
694         * man/Makefile.am (dist_man_MANS): Remove from this list all man pages
695         corresponding to "bin" programs. Add $(MAN) instead.
696         (optional_mans): Remove all uses.
697         (check-x-vs-1): Adapt to work even though arch and su are typically
698         no longer built (and neither are their .1 files).
699         * src/Makefile.am (install_su): Rename from INSTALL_SU, now that
700         INSTALL_SU has a different meaning. Use the new $(INSTALL_SU) value.
702 2007-07-10  Karel Zak  <kzak@redhat.com>
704         New program: arch
705         * NEWS: Mention arch.
706         * README: Add arch to the list of programs.
707         * AUTHORS: Add arch.
708         * src/uname.c: Include "uname.h".
709         (PROGRAM_NAME): Handle arch, too.
710         (ARCH_AUTHORS): Define.
711         (uname_long_options, arch_long_options): Renamed and new globals.
712         (usage): Handle arch-mode as well as uname-mode.
713         (decode_switches): New function, extracted from main,
714         to handle arch-mode as well as uname-mode.
715         (main): Handle both modes.
716         * src/uname-arch.c: New program, alias for "uname -m".
717         * src/uname-uname.c: New file, default uname mode.
718         * src/uname.h: New file, uname modes.
719         * src/Makefile.am (EXTRA_PROGRAMS): Add arch.
720         (uname_SOURCES, arch_SOURCES): Define.
721         * man/arch.x: New file.
722         * man/Makefile.am (dist_man_MANS): Add arch.1.
723         (arch.1): New dependency.
724         * tests/misc/arch: New test, compare "arch" with "uname -m"
725         * configure.ac (OPTIONAL_BIN_PROGS): Add arch.
726         (MAN): Add arch.1.
727         * .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c
728         from the always-include-<config.h> rule.
730 2007-07-10  Jim Meyering  <jim@meyering.net>
732         Change "version 2" to "version 3" in all copyright notices.
734 2007-07-09  Jim Meyering  <jim@meyering.net>
736         Compensate for new c99'isms in seq.c.
737         * Makefile.maint (patch-check): Use -p1, not -p2, so a patch
738         generated via "make patch-check REGEN=1" actually works.
739         * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
741 2007-07-09  Pádraig Brady <P@draigBrady.com>
743         Fix the automatic number width formatting in seq.
744         * src/seq.c: Fix the -w logic. Ignore spaces and '+'
745         characters of input numbers when determining width.
746         Set format correctly for input numbers in scientific notation.
747         * tests/seq/basic: Add various number width tests.
748         Details: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10903>
750 2007-07-08  Jim Meyering  <jim@meyering.net>
752         Run the coreutils-specific code only if tests/Makefile.am.in exists.
753         * bootstrap (mam_template): Move definition out of loop.
755         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
756         * bootstrap (symlink_to_dir): Rename function from symlink_to_gnulib.
757         Add a directory parameter.  Update all callers.
758         (cp_mark_as_generated): Also check for -- and link to -- files in gl/.
760         * THANKS: Add Pádraig Brady.
762 2007-07-08  Jim Meyering  <jim@meyering.net>
764         Adapt to deeper hierarchy in gnulib.
765         * bootstrap (symlink_to_dir): If the destination directory doesn't
766         exist, create it. This is required at least for "lib/uniwidth/cjk.h".
768         Use <wchar.h>, not "wcwidth.h".
769         * src/wc.c: Now that gnulib provides the POSIX-specified <wchar.h>,
770         include it and <wctype.h>, rather than "wcwidth.h".
771         * src/ls.c: Include <wchar.h>, rather than "wcwidth.h".
773 2007-07-05  Jim Meyering  <jim@meyering.net>
775         setuidgid: set all groups, not just the primary one.
776         I wanted to use the xgetgroups function from id.c, so factored
777         it out and made it into a non-exiting function (hence the "m"
778         prefix rather than "x").
779         * src/setuidgid.c (main): Use mgetgroups.
780         Include "mgetgroups.h".
782         * src/id.c (xgetgroups): Remove function.
783         Include "mgetgroups.h".
784         (print_group_list): Use mgetgroups, not xgetgroups.
786         * gl/modules/mgetgroups: New module.
787         * gl/lib/mgetgroups.c: New file.  mgetgroups is derived from
788         id.c's xgetgroups function.
789         * bootstrap.conf (gnulib_modules): Add mgetgroups.
790         * gl/m4/mgetgroups.m4: New file.
791         * gl/lib/mgetgroups.h: New file.
793         * bootstrap: Merge in changes from gnulib.
795         * src/id.c: Include "getugroups.h" rather than declaring manually.
797 2007-07-04  Paul Eggert  <eggert@cs.ucla.edu>
799         * NEWS: pr -F no longer suppresses the footer or the first two blank
800         lines in the header.
801         * doc/coreutils.texi (pr invocation): Likewise.  Also, a too-short
802         page length implies -t, not -T.
803         * src/pr.c (lines_per_header, lines_per_footer): Now constants.
804         (init_parameters): Don't try to change them.
805         (print_header): Use the same header and footer format regardless of
806         wither form feeds are being used.
807         (usage): Adjust to above change when describing too-short page length.
808         Too-short page length impliesy -t, not -T.
809         * tests/pr/2-S_f-t_notab: Adjust to the fact that -F now affects
810         only formfeed handling; it does not change the header.
811         * tests/pr/2-Sf-t_notab: Likewise.
812         * tests/pr/2f-t_notab: Likewise.
813         * tests/pr/2s_f-t_notab: Likewise.
814         * tests/pr/2s_w60f-t_nota: Likewise.
815         * tests/pr/2sf-t_notab: Likewise.
816         * tests/pr/2sw60f-t_notab: Likewise.
817         * tests/pr/2w60f-t_notab: Likewise.
818         * tests/pr/3a3f-0F: Likewise.
819         * tests/pr/3b3f-0F: Likewise.
820         * tests/pr/3b3f-0FF: Likewise.
821         * tests/pr/3b3f-FF: Likewise.
822         * tests/pr/3f-0F: Likewise.
823         * tests/pr/3f-FF: Likewise.
824         * tests/pr/Test.pm: Likewise.
825         * tests/pr/a3f-0F: Likewise.
826         * tests/pr/a3f-0FF: Likewise.
827         * tests/pr/a3f-FF: Likewise.
828         * tests/pr/b3f-0F: Likewise.
829         * tests/pr/b3f-0FF: Likewise.
830         * tests/pr/b3f-FF: Likewise.
831         * tests/pr/3-5l17f-t: Remove, since it's been renamed to another
832         file whose name has a line count 7 larger,
833         reflecting the new line count needed for this behavior.
834         * tests/pr/3a3l8f-t: Likewise.
835         * tests/pr/3b3l8f-t: Likewise.
836         * tests/pr/3l17f-t: Likewise.
837         * tests/pr/3ml17f-t: Likewise.
838         * tests/pr/Ja3l17f-lm: Likewise.
839         * tests/pr/Jb3l17f-lm: Likewise.
840         * tests/pr/Jml17f-lm-lo: Likewise.
841         * tests/pr/W-72l17f-ll: Likewise.
842         * tests/pr/W20l17f-ll: Likewise.
843         * tests/pr/W26l17f-ll: Likewise.
844         * tests/pr/W27l17f-ll: Likewise.
845         * tests/pr/W28l17f-ll: Likewise.
846         * tests/pr/W35Ja3l17f-lm: Likewise.
847         * tests/pr/W35Jb3l17f-lm: Likewise.
848         * tests/pr/W35Jml17f-lmlo: Likewise.
849         * tests/pr/W35a3l17f-lm: Likewise.
850         * tests/pr/W35b3l17f-lm: Likewise.
851         * tests/pr/W35ml17f-lm-lo: Likewise.
852         * tests/pr/W72Jl17f-ll: Likewise.
853         * tests/pr/a3l17f-lm: Likewise.
854         * tests/pr/a3l8f-t: Likewise.
855         * tests/pr/b3l17f-lm: Likewise.
856         * tests/pr/b3l8f-t: Likewise.
857         * tests/pr/l17f-t: Likewise.
858         * tests/pr/ml17f-0F: Likewise.
859         * tests/pr/ml17f-lm-lo: Likewise.
860         * tests/pr/ml17f-t: Likewise.
861         * tests/pr/ml17f-t-0F: Likewise.
862         * tests/pr/n+2-5l17f-0FF: Likewise.
863         * tests/pr/n+2l17f-0FF: Likewise.
864         * tests/pr/n+2l17f-bl: Likewise.
865         * tests/pr/n+3l17f-0FF: Likewise.
866         * tests/pr/n+3l17f-bl: Likewise.
867         * tests/pr/n+3ml13f-bl-FF: Likewise.
868         * tests/pr/n+3ml17f-bl-tn: Likewise.
869         * tests/pr/n+3ml17f-tn-bl: Likewise.
870         * tests/pr/n+4b2l10f-0FF: Likewise.
871         * tests/pr/n+5-8b3l10f-FF: Likewise.
872         * tests/pr/n+5a3l6f-0FF: Likewise.
873         * tests/pr/n+6b3l6f-FF: Likewise.
874         * tests/pr/nJml17f-lmlmlo: Likewise.
875         * tests/pr/nJml17f-lmlolm: Likewise.
876         * tests/pr/nN1+3l17f-bl: Likewise.
877         * tests/pr/nN15l17f-bl: Likewise.
878         * tests/pr/nSml13-bl-FF: Likewise.
879         * tests/pr/nSml13-t-t-FF: Likewise.
880         * tests/pr/nSml13-t-tFFFF: Likewise.
881         * tests/pr/nSml17-bl-FF: Likewise.
882         * tests/pr/nSml17-t-t-FF: Likewise.
883         * tests/pr/nSml17-t-tFFFF: Likewise.
884         * tests/pr/nl17f-bl: Likewise.
885         * tests/pr/o3Jml17f-lm-lo: Likewise.
886         * tests/pr/o3a3Sl17f-tn: Likewise.
887         * tests/pr/o3a3Snl17f-tn: Likewise.
888         * tests/pr/o3a3l17f-tn: Likewise.
889         * tests/pr/o3b3Sl17f-tn: Likewise.
890         * tests/pr/o3b3Snl17f-tn: Likewise.
891         * tests/pr/o3b3l17f-tn: Likewise.
892         * tests/pr/o3mSl17f-bl-tn: Likewise.
893         * tests/pr/o3mSnl17fbltn: Likewise.
894         * tests/pr/o3ml17f-bl-tn: Likewise.
895         * tests/pr/w72l17f-ll: Likewise.
896         * tests/pr/3-5l24f-t: New file, containing the contents of the
897         file with the same name but with the line count smaller by 7,
898         reflecting the new behavior with -F.
899         * tests/pr/3a3l15f-t: Likewise.
900         * tests/pr/3b3l15f-t: Likewise.
901         * tests/pr/3l24f-t: Likewise.
902         * tests/pr/3ml24f-t: Likewise.
903         * tests/pr/Ja3l24f-lm: Likewise.
904         * tests/pr/Jb3l24f-lm: Likewise.
905         * tests/pr/Jml24f-lm-lo: Likewise.
906         * tests/pr/W-72l24f-ll: Likewise.
907         * tests/pr/W20l24f-ll: Likewise.
908         * tests/pr/W26l24f-ll: Likewise.
909         * tests/pr/W27l24f-ll: Likewise.
910         * tests/pr/W28l24f-ll: Likewise.
911         * tests/pr/W35Ja3l24f-lm: Likewise.
912         * tests/pr/W35Jb3l24f-lm: Likewise.
913         * tests/pr/W35Jml24f-lmlo: Likewise.
914         * tests/pr/W35a3l24f-lm: Likewise.
915         * tests/pr/W35b3l24f-lm: Likewise.
916         * tests/pr/W35ml24f-lm-lo: Likewise.
917         * tests/pr/W72Jl24f-ll: Likewise.
918         * tests/pr/a3l15f-t: Likewise.
919         * tests/pr/a3l24f-lm: Likewise.
920         * tests/pr/b3l15f-t: Likewise.
921         * tests/pr/b3l24f-lm: Likewise.
922         * tests/pr/l24f-t: Likewise.
923         * tests/pr/ml24f-0F: Likewise.
924         * tests/pr/ml24f-lm-lo: Likewise.
925         * tests/pr/ml24f-t: Likewise.
926         * tests/pr/ml24f-t-0F: Likewise.
927         * tests/pr/n+2-5l24f-0FF: Likewise.
928         * tests/pr/n+2l24f-0FF: Likewise.
929         * tests/pr/n+2l24f-bl: Likewise.
930         * tests/pr/n+3l24f-0FF: Likewise.
931         * tests/pr/n+3l24f-bl: Likewise.
932         * tests/pr/n+3ml20f-bl-FF: Likewise.
933         * tests/pr/n+3ml24f-bl-tn: Likewise.
934         * tests/pr/n+3ml24f-tn-bl: Likewise.
935         * tests/pr/n+4b2l17f-0FF: Likewise.
936         * tests/pr/n+5-8b3l17f-FF: Likewise.
937         * tests/pr/n+5a3l13f-0FF: Likewise.
938         * tests/pr/n+6b3l13f-FF: Likewise.
939         * tests/pr/nJml24f-lmlmlo: Likewise.
940         * tests/pr/nJml24f-lmlolm: Likewise.
941         * tests/pr/nN1+3l24f-bl: Likewise.
942         * tests/pr/nN15l24f-bl: Likewise.
943         * tests/pr/nSml20-bl-FF: Likewise.
944         * tests/pr/nSml20-t-t-FF: Likewise.
945         * tests/pr/nSml20-t-tFFFF: Likewise.
946         * tests/pr/nSml24-bl-FF: Likewise.
947         * tests/pr/nSml24-t-t-FF: Likewise.
948         * tests/pr/nSml24-t-tFFFF: Likewise.
949         * tests/pr/nl24f-bl: Likewise.
950         * tests/pr/o3Jml24f-lm-lo: Likewise.
951         * tests/pr/o3a3Sl24f-tn: Likewise.
952         * tests/pr/o3a3Snl24f-tn: Likewise.
953         * tests/pr/o3a3l24f-tn: Likewise.
954         * tests/pr/o3b3Sl24f-tn: Likewise.
955         * tests/pr/o3b3Snl24f-tn: Likewise.
956         * tests/pr/o3b3l24f-tn: Likewise.
957         * tests/pr/o3mSl24f-bl-tn: Likewise.
958         * tests/pr/o3mSnl24fbltn: Likewise.
959         * tests/pr/o3ml24f-bl-tn: Likewise.
960         * tests/pr/w72l24f-ll: Likewise.
962 2007-06-23  Jim Meyering  <jim@meyering.net>
964         Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
965         * src/base64.c (main): Likewise.
966         * src/install.c (setdefaultfilecon): Likewise.
967         * src/sort.c (main): Likewise.
968         * Makefile.maint (sc_prohibit_strcmp): New rule.
969         * .x-sc_prohibit_strcmp: New file, to list the few exceptions.
970         * Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
972 2007-06-22  Paul Eggert  <eggert@cs.ucla.edu>
974         * NEWS: seq no longer mishandles obvious cases like
975         "seq 0 0.000001 0.000003" by omitting the last output number.
976         * doc/coreutils.texi (seq invocation): Remove advice about workaround
977         for seq off-by-one problem, since the bug is fixed now.  Replace
978         it with more-generic advice about rounding errors.
979         * src/seq.c (long_double_format, print_numbers):
980         New arg NUMERIC_FORMAT.  All uses changed.
982 2007-06-22  Pádraig Brady  <P@draigBrady.com>  (trivial change)
984         * tests/seq/basic: Add test cases for seq off-by-one problem.
986 2007-06-22  Jim Meyering  <jim@meyering.net>
988         * src/stat.c (long_options): Add a FIXME comment to help ensure
989         that the deprecated and undocumented "--filesystem" option is
990         removed someday.
992 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
994         A few more symlink-related fixes.  Fix a bug triggered by cp
995         --parents and symlinks.  Close some race conditions possible when
996         the destination replaces a newly-created file with a symlink.
997         * NEWS: Document that 'cp --parents' no longer mishandles
998         symlinks in file name components of source.
999         * src/copy.c (HAVE_LCHOWN): Default to false.
1000         (lchown) [!defined HAVE_LCHOWN]: Define to chown, for convenience.
1001         * src/cp.c (lchown) [!HAVE_LCHOWN]: Likewise.
1002         * src/install.c (lchown [!HAVE_LCHOWN]: Likewise.
1003         * src/copy.c (set_owner): Use lchown instead of chown, for safety
1004         in case the file got replaced by a symlink in the meantime.
1005         * src/cp.c (re_protect): Likewise.
1006         * src/install.c (change_attributes): Likewise.
1007         * src/copy.c (copy_internal): Use ordinary C rather than an #if.
1008         * src/cp.c (lchown) [!HAVE_LCHOWN]: Define to chown, for convenience.
1009         (struct dir_attr): Cache the entire struct stat of the directory,
1010         rather than just its mode, so that we needn't stat the directory
1011         twice (which can lead to races).
1012         (re_protect): Don't use XSTAT as that's not appropriate in
1013         this context (symlinks should be followed here).  Instead, use
1014         the cached stat value.
1015         (make_dir_parents_private): Save dir's entire struct stat, not
1016         just its mode.
1017         * tests/cp/cp-parents: Add test to check against bug with
1018         cp --parents and symlinks.
1020 2007-06-18  Jim Meyering  <jim@meyering.net>
1022         Use mreadlink_with_size (doesn't exit), not xreadlink_with_size.
1023         * bootstrap.conf (gnulib_modules): Add readlink-with-size.
1024         Remove xreadlink and xreadlink-with-size.
1025         * src/copy.c (copy_internal): Use mreadlink_with_size,
1026         not xreadlink_with_size.
1027         * src/ls.c (get_link_name): Likewise.
1028         * src/readlink.c (main): Likewise.
1029         * src/stat.c (print_stat): Likewise.
1031         * README-hacking: Don't mention Gzip 1.2.4, now that 1.3.12 is out.
1033 2007-06-16  Jim Meyering  <jim@meyering.net>
1035         Make chgrp and chown diagnostics consistent.
1036         * src/chown.c (main): Emit the diagnostic before the file name,
1037         not after it, to be consistent with chgrp's diagnostic.
1038         * src/chgrp.c (parse_group): Emit a ":" between the diagnostic
1039         and the file name.
1040         Reported by Egmont Koblinger.
1041         * THANKS: Add Egmont Koblinger.
1043 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
1045         Correct cp's handling of destination symlinks in some cases.
1046         * NEWS: "cp" no longer considers a destination symlink to be the
1047         same as the referenced file when copying links or making backups.
1048         * src/copy.c (copy_reg): When following a symlink, use the
1049         followed name in later chown etc. requests, so that the created
1050         file is affected, rather than the symlink.  Use O_NOFOLLOW on
1051         source when not dereferencing symlinks; this avoids a race.
1052         Preserve errno correctly when doing multiple open attempts on the
1053         destination.
1054         (copy_internal): Follow destination symlinks only when copying a
1055         regular file and only when we don't intend to remove or rename the
1056         destination first, regardless of whether following source
1057         symlinks; this is because since POSIX and tradition (e.g.,
1058         FreeBSD) say we should ordinarily follow destination symlinks if
1059         the system calls would ordinarily do so.
1060         * src/copy.h (struct cp_options): Add comment that 'dereference'
1061         is only for source files.
1062         * src/cp.c (usage): Note that --derereference etc. are only for
1063         source files.
1064         (make_dir_parents_private): Follow symlinks, regardless of whether
1065         --dereference is specified, because these are destination symlinks.
1066         * tests/cp/same-file: Adjust tests to match revised behavior.
1067         Filter out perror output since it might vary from host to host.
1068         Use sed alone instead of also using echo.
1070         * doc/coreutils.texi (cp invocation): Document the behavior better when
1071         the destination is a symlink.  Clarify source versus destination
1072         symlinks.  Describe the new behavior for destination symlinks.
1074 2007-06-15  Jim Meyering  <jim@meyering.net>
1076         * src/copy.c: Include "canonicalize.h".
1077         (copy_reg): Use canonicalize_filename_mode to follow the symlink,
1078         so that we can always open with O_EXCL and avoid a race.
1080 2007-06-15  Jim Meyering  <jim@meyering.net>
1082         Don't include "quote.h" when it is not used.
1083         * src/md5sum.c: Remove unnecessary inclusion of "quote.h".
1084         * src/expr.c: Likewise.
1085         * src/shred.c: Likewise.
1086         * Makefile.maint (sc_prohibit_quote_without_use): New rule.
1087         * src/c99-to-c89.diff: Adjust offsets.
1089 2007-06-14  Paul Eggert  <eggert@cs.ucla.edu>
1091         Clarify what "cat" documentation means by "blank" lines.
1092         * doc/coreutils.texi (cat invocation): "Blank" lines actually mean
1093         empty lines.
1094         * src/cat.c (usage): Say that "nonblank" means nonempty.  Clarify
1095         --squeeze-blank.
1097 2007-06-13  Jim Meyering  <jim@meyering.net>
1099         rmdir: give better diagnostics
1100         * src/rmdir.c (remove_parents): Give a more descriptive/consistent
1101         diagnostic upon failure.
1102         (main): Likewise.
1103         Suggestion from Joey Hess.
1104         * THANKS: Add Joey Hess.
1106         Don't include "quotearg.h" when it is not used.
1107         * Makefile.maint (sc_prohibit_quotearg_without_use): New rule.
1108         * src/cp.c: Don't include "quotearg.h".  It wasn't used.
1110         * README-hacking: List Gperf as a build-requirement, too.
1111         Reported by Steve Ward.
1113 2007-06-11  Jim Meyering  <jim@meyering.net>
1115         * README: Mention README-hacking, for whose who start from
1116         cloned/checked-out sources rather than from a distribution tarball.
1117         Reported by Steve Ward.
1118         * THANKS: Add Steve Ward.
1120 2007-06-10  Jim Meyering  <jim@meyering.net>
1122         bug-fix: cp would fail to write through a dangling symlink
1123         * NEWS: Mention the bug fix.
1124         * src/copy.c (copy_reg): When open fails with EEXIST, the destination
1125         is lstat'able, and a symlink, call open again, but now without O_EXCL.
1126         * tests/cp/thru-dangling: New file, to test for the above fix.
1127         * tests/cp/Makefile.am (TESTS): Add thru-dangling.
1128         * THANKS: Add Michael McLagan.
1129         Bug report from Michael McLagan in <http://bugzilla.redhat.com/243588>.
1131 2007-06-04  Paul Eggert  <eggert@cs.ucla.edu>
1133         * doc/coreutils.texi (Common options): Mention that -h and
1134         --human-readable are equivalent to --block-size=human-readable.
1135         Documentation problem reported by Steve Ward in
1136         <http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00007.html>.
1137         (du invocation): Use optSi rather than duplicating the macro's
1138         contents (incorrectly, since we claimed a "B" was output).
1140 2007-05-31  Jim Meyering  <jim@meyering.net>
1142         Pull printf-related code from gnulib, rather than using forked copy.
1143         * bootstrap.conf (gnulib_modules): Don't avoid size_max and xsize
1144         modules.  While I dislike xsize-style overflow avoidance, maintaining
1145         a forked version of e.g., vasnprintf.c was too much work.
1147 2007-05-29  Jim Meyering  <jim@meyering.net>
1149         * src/dircolors.hin: Add screen-256color.
1150         Suggested by sdl.web@gmail.com in <http://bugzilla.redhat.com/239266>.
1152 2007-05-26  Jim Meyering  <jim@meyering.net>
1154         * TODO: Add an entry for comm --output-delimiter=STR
1156 2007-05-25  James Youngman  <jay@gnu.org>
1158         wc: ignore multibyte-character decoding errors
1159         * src/wc.c (wc): Don't issue an error message when mbrtowc
1160         indicates that we have seen an invalid byte sequence.  This
1161         makes "wc /bin/sh" bearable (though the word and line counts
1162         are likely not to be useful).
1163         * NEWS: Mention the change.
1165 2007-05-22  Jim Meyering  <jim@meyering.net>
1167         Check for an up-to-date copyright year in coreutils.texi.
1168         * Makefile.maint (copyright-check): Also check for an up-to-date
1169         copyright year in doc/$().texi, if that file exists.
1170         * doc/coreutils.texi: Add 2007 to list of Copyright years.
1171         Reported by Karl Berry.
1173         cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
1174         give a better diagnostic for a field-number/offset of 0.
1175         * NEWS: Mention the fix.
1176         * src/cut.c (ADD_RANGE_PAIR): Add an explicit check.
1177         Based on a patch from James Youngman.
1178         * tests/misc/cut: Add tests for the above.
1180         "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
1181         Also, diagnose the '-' in "cut -f -" as an invalid range, rather
1182         than interpreting it as the unlimited range, "1-".
1183         * NEWS: Mention these changes.
1184         * src/cut.c (set_fields): Don't interpret an accumulator "value"
1185         of 0 as an unspecified range endpoint.
1186         Give better diagnostics.
1187         Adjust a comment so that it is true also for 64-bit size_t.
1189         * tests/cut/Test.pm: Add tests for the above.
1191         stty: fix a harmless syntax nit
1192         * src/stty.c (visible): Use ";" as the statement terminator
1193         between two assignments, not ",".
1194         (integer_arg): Join an unnecessarily wrapped line.
1196 2007-05-20  Jim Meyering  <jim@meyering.net>
1198         stty: diagnose an invalid hex value in 35-colon commmand-line argument
1199         * NEWS: Mention this.
1200         * src/stty.c (strtoul_tcflag_t, strtoul_cc_t): New functions.
1201         (recover_mode): Use those functions (not sscanf), to parse the
1202         string robustly.
1203         * tests/stty/invalid: New file.  Test for the above.
1204         * tests/stty/Makefile.am (TESTS): Add invalid.
1205         * .x-sc_prohibit_atoi_atof: Don't exempt stty.c from this check.
1206         Add tests/stty/invalid so we don't have to obfuscate the comment
1207         about sscanf therein.
1208         * Makefile.maint (sc_prohibit_atoi_atof): Mention sscanf in the
1209         diagnostic, too.
1211         * TODO: Remove some now-completed or no longer relevant items.
1213 2007-05-19  Jim Meyering  <jim@meyering.net>
1215         Rename uses of futimens -> gl_futimens; glibc now declares the former.
1216         * src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens.
1217         * src/touch.c (touch): Likewise.
1219 2007-05-18  Jim Meyering  <jim@meyering.net>
1221         * Makefile.maint (my-distcheck): Remove -pedantic from $(CFLAGS)
1222         for now, to avoid c89-check failure due to use of #include_next.
1224 2007-05-15  Jim Meyering  <jim@meyering.net>
1226         Generate a dozen test-related Makefile.am files at bootstrap-time.
1227         * README-hacking: Build-from-checkout now require Perl, too.
1228         * bootstrap: Now that these generated Makefile.am files are no longer
1229         under version control, they must be created at bootstrap time.
1231 2007-05-14  Paul Eggert  <eggert@cs.ucla.edu>
1233         * man/chmod.x: Document chmod's behavior with setuid and setgid bits.
1234         Remove misleading implication about leading zero.  Problem
1235         reported by Jan Engelhardt in
1236         <http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00134.html>.
1238 2007-05-13  Jim Meyering  <jim@meyering.net>
1240         Remove the generated tests/*/Makefile.am files from version control.
1241         * tests/cut/Makefile.am: git-remove this generated file.
1242         * tests/head/Makefile.am: Likewise.
1243         * tests/join/Makefile.am: Likewise.
1244         * tests/pr/Makefile.am: Likewise.
1245         * tests/sort/Makefile.am: Likewise.
1246         * tests/tac/Makefile.am: Likewise.
1247         * tests/tail/Makefile.am: Likewise.
1248         * tests/test/Makefile.am: Likewise.
1249         * tests/tr/Makefile.am: Likewise.
1250         * tests/uniq/Makefile.am: Likewise.
1251         * tests/wc/Makefile.am: Likewise.
1252         * .cvsignore, .gitignore: Ignore these generated files.
1254         * src/.cvsignore, src/.gitignore: Add chcon here, ...
1255         * .cvsignore, .gitignore: ... not here.
1257         Test uniq's new --zero-terminated (-z) option.
1258         * tests/uniq/Test.pm: When possible, create a "-z"-testing variant
1259         of each existing test.
1260         (2z, 3z, 4z, 5z, 20z, 122, 123): New tests from James Youngman.
1262 2007-05-12  James Youngman  <jay@gnu.org>
1264         Add -z option to uniq.  Originally proposed by Egmont Koblinger.
1265         * NEWS: Mention uniq's new option: --zero-terminated (-z).
1266         * src/uniq.c: Add new option, --zero-terminated (-z), to make
1267         uniq use the NUL byte as separator/delimiter rather than newline.
1268         (check_file): Add a parameter: delimiter.  Update caller.
1269         Use readlinebuffer_delim in place of readlinebuffer everywhere.
1270         (main): Handle the new option.
1271         (usage): Describe new option the same way sort does.
1272         * doc/coreutils.texi (uniq invocation): Describe the new option.
1274 2007-05-07  Jim Meyering  <jim@meyering.net>
1276         * NEWS: Mention that last week's tr bug dates back to 1992.
1278 2007-05-04  Jim Meyering  <jim@meyering.net>
1280         Avoid test failure when run with an unusual umask.
1281         * tests/ls/color-dtype-dir: Set umask to 022.
1282         Suggestion from AIDA Shinra.
1284         Avoid failure of root-only test when run with a restrictive umask.
1285         * tests/rm/no-give-up: Ensure that non-root can access "d/" through
1286         root-owned ".".  Reported by AIDA Shinra.
1288         tr -c: don't abort when translating with S2 larger than complement of S1
1289         * src/tr.c (main): Remove invalid assertion triggered by e.g.,
1290         tr -c a '[b*256]'.  There's nothing wrong with having Set2 larger
1291         than Set1.  Reported by Guntram Blohm.
1292         * tests/tr/Test.pm (no-abort-1): Test for the above.
1293         * NEWS: Mention this bug fix.
1294         * THANKS: Add Guntram Blohm.
1296 2007-05-03  Jim Meyering  <jim@meyering.net>
1298         Avoid test failure when run with a permissive umask.
1299         * tests/rm/no-give-up: Set permissions of test directory properly,
1300         i.e., not depending on umask prohibiting go=w.
1301         Reported by AIDA Shinra.
1303 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
1305         The following commands and options now support the standard size
1306         suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
1307         head -c, head -n, od -j, od -N, od -S, split -b, split -C,
1308         tail -c, tail -n.
1309         * doc/coreutils.texi (od invocation, head invocation, tail invocation):
1310         Document support for new size suffixes.
1311         (head invocation, tail invocation):
1312         Document that -n uses the same suffixes as -c.
1313         (tail invocation): More-clearly document what leading "+" does.
1314         * src/head.c (usage, string_to_integer): Support new suffixes.
1315         * src/od.c (usage, main): Likewise.
1316         * src/split.c (usage, main): Likewise.
1317         * src/tail.c (usage, parse_options): Likewise.
1318         Prompted by a patch from Evan Hunt.
1320 2007-05-02  Jim Meyering  <jim@meyering.net>
1322         * src/du.c (usage): Tweak description of --dereference-args (-D) again.
1323         Prompted by another request for clarification from Justin Pryzby.
1325         Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
1326         * tests/rm/fail-2eperm: Patch from AIDA Shinra.
1327         Reported by Peter Dyballa.
1328         * THANKS: Add AIDA Shinra and Peter Dyballa.
1330 2007-04-28  Paul Eggert  <eggert@cs.ucla.edu>
1332         * src/nohup.c (usage): Describe how standard input and output
1333         are redirected.
1335 2007-04-25  Jim Meyering  <jim@meyering.net>
1337         * src/du.c (usage): Clarify description of --dereference-args (-D).
1338         Prompted by a report from Justin Pryzby.
1340         * bootstrap.conf (gnulib_modules): Add fseeko and ftello.
1341         (gnulib_modules): Add autobuild.
1343 2007-04-24  Jim Meyering  <jim@meyering.net>
1345         * THANKS: Add Andreas Frische.
1346         * NEWS: Mention today's ls --color fix.
1347         * tests/ls-2/tests (sl-dangle): Add a test for today's fix.
1349 2007-04-24  Eric Blake  <ebb9@byu.net>
1351         ls --color once again colors dangling symlinks correctly
1352         * src/ls.c (gobble_file): Much like the 2007-04-07 fix,
1353         add a term to the expression that decides whether we need
1354         stat and/or lstat calls.  Reported by Andreas Frische.
1356 2007-04-16  Jim Meyering  <jim@meyering.net>
1358         * src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
1359         Reported by Rudolf Kastl.
1360         * THANKS: Add Rudolf Kastl.
1362 2007-04-11  Paul Eggert  <eggert@cs.ucla.edu>
1364         split --line-bytes=N (-C N): don't create an empty file.
1365         * src/split.c (line_bytes_split): Don't create an empty line
1366         afterwards if the last buffer happens to be exactly full.
1367         * tests/misc/split-fail: Add a test case for this.
1368         * NEWS: mention this.
1370 2007-04-10  Jim Meyering  <jim@meyering.net>
1372         ls: don't form or compute the length of strings that won't be used.
1373         * src/ls.c (gobble_file): Form and compute length of strings for
1374         block size, owner, group, author, major+minor numbers and file size
1375         only if they'll actually be used.  I.e., don't form most of them
1376         when not producing long format output.
1378 2007-04-07  Jim Meyering  <jim@meyering.net>
1380         Add a test for, and document, today's fix.
1381         * NEWS: Mention today's ls --color fix.
1382         * tests/ls-2/tests (sl-target): Add a test for today's fix.
1383         * THANKS: Add Kirk Kelsey.
1385 2007-04-07  Eric Blake  <ebb9@byu.net>
1387         Fix a bug in how the LS_COLORS ln=target attribute is handled.
1388         * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
1389         ln=target attribute applies.  Reported by Kirk Kelsey.
1391 2007-04-02  Jim Meyering  <jim@meyering.net>
1393         * src/copy.c (copy_reg): Initialize local "con", before calling
1394         getfscreatecon, in case that function (or its inline stub) does
1395         not set it.
1397 2007-04-01  Paul Eggert  <eggert@cs.ucla.edu>
1399         * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
1400         ls -x DIR would sometimes output the wrong string in place of the
1401         first entry.
1402         * NEWS: Mention the bug fix.
1403         * tests/ls/x-option: New file.
1404         * tests/ls/Makefile.am (TESTS): Add x-option.
1406         gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
1407         * bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
1408         md5 to crypt/md5 and sha1 to crypt/sha1.
1410 2007-03-30  Jim Meyering  <jim@meyering.net>
1412         * NEWS: Mention these SELinux changes.
1414         * ChangeLog-selinux: Remove file.
1415         Move its contents into this file, removing old dates.
1417         * src/runcon.c (main): Don't reorder arguments.  Reported by
1418         Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
1419         * tests/misc/runcon-no-reorder: New file.  Test for the above.
1420         * tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
1422         * src/runcon.c (main): Remove "." at end of a diagnostic.
1424         * src/runcon.c: New program.
1425         * src/Makefile.am (bin_PROGRAMS): Add runcon.
1426         (runcon_LDADD): Define.
1427         * README: Add runcon to the list of programs.
1428         * AUTHORS: Add this: runcon: Russell Coker
1429         * tests/help-version: Add runcon as an exception.
1430         * man/Makefile.am (dist_man_MANS): Add runcon.1.
1431         (runcon.1): New dependency.
1433         mkfifo, mknod: Accept new "-Z, --context=C" option.
1434         * src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
1435         (main): Honor it.
1436         * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
1438         mkdir: Accept new "-Z, --context=C" option.
1439         * src/mkdir.c: Include <selinux/selinux.h>.
1440         (main): Honor it.
1441         * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
1443         * tests/cp/cp-a-selinux: New file.  Test for the bug reported in
1444         <http://bugzilla.redhat.com/219900>.
1445         * tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
1447         * tests/selinux: New file.
1448         * tests/Makefile.am (EXTRA_DIST): Add selinux.
1449         * tests/misc/selinux: Source the new script, rather than open coding it.
1451         Change how "cp -a" and "cp --preserve=context" work with SELinux.
1452         Now, cp -a attempts to preserve context, but failure to do so does
1453         not change cp's exit status.  However "cp --preserve=context" is
1454         similar, but failure *does* cause cp to exit with nonzero status.
1455         * src/copy.h (struct cp_options) [require_preserve_context]: New member.
1456         * src/copy.c (copy_reg, copy_internal): Implement the above.
1457         * src/mv.c (cp_option_init): Initialize the new member.
1458         * src/install.c (cp_option_init): Likewise.
1459         * src/cp.c (cp_option_init): Likewise.
1460         (decode_preserve_arg): Set it or reset it.
1462         cp, mv, install: add SELinux support, but unlike with the Red Hat
1463         patch, mv and cp do not provide the "-Z context" option.
1464         * src/copy.c: Include <selinux/selinux.h>.
1465         (restore_default_fscreatecon): New function.
1466         (copy_reg): Make cp --preserve=context work for existing destination.
1467         (copy_internal): Likewise for new destinations.
1468         * src/copy.h (cp_options) [preserve_security_context]: New member.
1469         * src/cp.c: Include <selinux/selinux.h>.
1470         (selinux_enabled): New global.
1471         (usage): Mention new --preserve=context option.
1472         (PRESERVE_CONTEXT): Define/use.
1473         (decode_preserve_arg): Handle PRESERVE_CONTEXT.
1474         (main): Remove an obsolete comment.
1475         If --preserve=context is specified on a system without SELinux
1476         enabled, give a diagnostic and fail.
1477         * src/mv.c: Include <selinux/selinux.h>.
1478         Set x->preserve_security_context if SELinux is enabled.
1479         * src/install.c: Accept new "-Z, --context=C" option.
1480         Accept --preserve-context option (but not -P option).
1481         Accept alternate spelling: --preserve_context, for now.
1482         Include <selinux/selinux.h> and "quotearg.h".
1483         (selinux_enabled, use_default_selinux_context): New globals.
1484         (PRESERVE_CONTEXT_OPTION): Define.
1485         (cp_option_init): Default: do not preserve security context.
1486         (setdefaultfilecon): New function.
1487         (main): Honor new options.
1488         * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
1489         Add $(LIB_SELINUX).
1490         * src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
1492         * tests/misc/selinux [VERBOSE]: Print version info for each
1493         of the tested tools, not just ls.
1495         * src/c99-to-c89.diff: Remove the ls.c patch, now that I've
1496         temporarily removed the offending c99'ism.
1498         * src/chcon.c (usage): Split a string literal that was longer than 509.
1500         * src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
1501         Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
1503         * src/c99-to-c89.diff: Adjust offsets.
1505         * AUTHORS: Add chcon.
1507         * src/c99-to-c89.diff: Remove trailing blanks.
1509         * src/chcon.c: Don't include "dirname.h".  system.h already includes it.
1511         * gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
1513         * src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
1515         * src/id.c (main): Tweak id -Z diagnostic.
1517         id: Add SELinux support: -Z option.
1518         * src/id.c (main): Apply patches from Fedora, with these changes:
1519         Remove #ifdef WITH_SELINUX.
1520         Use error (EXIT_FAILURE, not fprintf+exit(1).
1521         * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
1523         stat: Add support for SELinux in the form of a %C format directive.
1524         * src/stat.c (follow_links): Make this variable file-global.
1525         (out_file_context): New function.
1526         (print_statfs): Honor %C.
1527         (print_stat): Honor %C.
1528         (do_stat): Remove follow_links parameter.
1529         (usage): Document the two %C directives.
1530         (main): Accept -Z (though it's a no-op).
1531         * src/Makefile.am (stat_LDADD): Define.
1533         ls: Add support for SELinux and a slightly modified -Z option.
1534         I started with the patches from Red Hat.
1535         The entries below tell how the code evolved.
1537         * src/ls.c (print_long_format, print_file_name_and_frills): When
1538         there is no security context (due to getfilecon/lgetfilecon failing
1539         with e.g. ENOTSUP), print it as "?", not "".
1540         * src/ls.c (print_file_name_and_frills): Make -Z work without -l.
1541         (length_of_file_name_and_frills): Likewise.
1543         * src/ls.c: Remove the --lcontext and --scontext options.
1544         Change the way -Z, --context work so that it no longer implies -l.
1545         Thus, -Z -l will work like -lcontext and -Z without -l will work
1546         like --scontext.
1548         Adjust tests to reflect new 'ls -l' syntax -- affects only
1549         systems with SELinux when operating on a file with no ACL.
1550         These tests assumed that everything before the first space on
1551         each line is the 10-byte mode string.  But there may also be a "+"
1552         in the 11th column, just before the space.  However, note that this
1553         is not new.  The same thing would have happened even without the
1554         change below, when listing a file with an ACL.
1555         * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
1556         * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
1557         * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
1559         Don't make compilation depend on USE_ACL.  An SELinux security
1560         context counts as an "alternate access control method", so ls
1561         must output a "+" for each file with a security context.
1562         * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
1563         (FILE_HAS_ACL): Remove macro definition.  Use f->have_acl directly.
1564         (gobble_file): Record whether a file has a security context, and
1565         update the condition used to determine whether to print the "+".
1566         (gobble_file): Call getfilecon/lgetfilecon also when
1567         format == long_format, so that we get the "+".
1569         * src/ls.c (gobble_file): Add a comment explaining why (with a
1570         security context option) ls doesn't exit nonzero due to e.g.,
1571         getfilecon failing with errno == ENOTSUP.
1573         * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
1574         to ENOTSUP.
1576         * src/ls.c (gobble_file): Factor out three small blocks using
1577         getfilecon and lgetfilecon.
1578         Don't ignore return value from getfilecon and lgetfilecon.
1580         * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
1581         ternary operator).
1582         (print_scontext_format): Likewise.
1583         (print_scontext): Declare to be "bool", not int.  Adjust uses.
1585         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
1587         * tests/misc/chcon: New file.
1588         * tests/misc/chcon-fail: New file.
1589         * tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
1590         * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
1592         * tests/misc/Makefile.am (TESTS): Add selinux.
1593         * tests/misc/selinux: New file.
1594         * tests/help-version: Skip chcon.
1595         * man/chcon.x: New file.
1596         * man/Makefile.am: Build chcon.1.
1598         New program: chcon
1599         * gl/modules/selinux-at: New module.  Check for libselinux and set
1600         LIB_SELINUX here, unconditionally, rather than depending on
1601         the configure-time --enable-selinux option.
1602         * gl/modules/selinux-h: New module.
1603         * bootstrap.conf (gnulib_modules): Add selinux-at.
1604         * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
1605         * gl/lib/se-selinux_.h: New file.
1606         * gl/lib/se-context_.h: New file.
1607         * gl/m4/selinux-selinux-h.m4: New file.
1608         * gl/m4/selinux-context-h.m4: New file.
1609         * src/Makefile.am (bin_PROGRAMS): Add chcon.
1610         (chcon_LDADD): Define.
1611         * README: Add chcon to the list of programs.
1612         * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
1614 2007-03-29  Jim Meyering  <jim@meyering.net>
1616         * .vg-suppressions: Add libc-getpwuid-leak.
1618 2007-03-28  Jim Meyering  <jim@meyering.net>
1620         Help translators include translation team's web or email address.
1621         * src/system.h (emit_bug_reporting_address): New function.
1622         * src/base64.c: Use it rather than a literal printf.
1623         * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
1624         * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
1625         * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
1626         * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
1627         * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
1628         * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
1629         * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
1630         * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
1631         * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
1632         * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
1633         * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
1634         * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
1635         * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
1636         * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
1637         * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
1638         * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
1639         * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
1640         * src/who.c, src/whoami.c, src/yes.c: Likewise.
1642         * src/stty.c: Don't include "vasprintf.h", now that its
1643         declarations are guaranteed to be in gnulib's stdio.h.
1644         * src/who.c: Likewise.
1646 2007-03-27  Jim Meyering  <jim@meyering.net>
1648         * README: Use "install", not "ginstall" in the list of program names.
1649         * src/Makefile.am (check-README): Substitute s/ginstall/install/.
1651 2007-03-25  Jim Meyering  <jim@meyering.net>
1653         * src/c99-to-c89.diff: Regenerate.
1655 2007-03-25  Paul Eggert  <eggert@cs.ucla.edu>
1657         Avoid the need for euidaccess and/or lstat on every directory entry
1658         with 'rm -r dir' (without -f), if we are root, or if we are removing
1659         a directory tree that is full of symbolic links.
1660         * bootstrap.conf (gnulib_modules): Add write-any-file.
1661         * src/copy.c: Include write-any-file.h.
1662         (UNWRITABLE): Remove macro, replacing with....
1663         (writable_destination): New function, which uses can_write_any_file
1664         to avoid the need for euidaccess when we are privileged.
1665         (overwrite_prompt, abandon_move): Use it.
1666         * src/remove.c: Include write-any-file.h.
1667         (D_TYPE): New macro.
1668         (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
1669         (write_protected_non_symlink): Don't bother to stat if we can write
1670         any file.
1671         (prompt): New arg PDIRENT_TYPE.  All callers changed.
1672         Use readdir dirent type to avoid the need for 'lstat' on each directory
1673         entry in cases like 'rm -r dir', if we are root, or if the tree is
1674         full of symbolic links.
1675         (DT_IS_KNOWN, DT_MUST_BE): Remove.
1676         (remove_entry): New arg DIRENT_TYPE_ARG.  All callers changed.
1678 2007-03-24  Jim Meyering  <jim@meyering.net>
1680         If strace malfunctions, skip the test rather than failing it.
1681         * tests/mv/atomic: Required on a mips-unknown-linux-gnu system
1682         running the aging linux-2.4.27-mipscvs-20040814.
1684 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
1686         * src/pathchk.c: Don't include euidaccess.h, as we don't call
1687         euidaccess.
1689 2007-03-23  Jim Meyering  <jim@meyering.net>
1691         * README-package-renamed-to-coreutils: Add a URL for the FAQ,
1692         and a couple more archive links.
1694 2007-03-22  Jim Meyering  <jim@meyering.net>
1696         Post-release version change.
1697         * NEWS: Add a line for 6.9+.
1698         * configure.ac (AC_INIT): Set new version string.
1700         Version 6.9.
1701         * NEWS: Record release date and new version number.
1702         * configure.ac (AC_INIT): New version number.
1704         * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
1706 2007-03-22  Paul Eggert  <eggert@cs.ucla.edu>
1708         Improve a test script.
1709         * tests/mv/hard-3: Check for 'ls' failure, too.
1710         Generate more-useful debugging output when 'ls' fails.
1712 2007-03-21  Jim Meyering  <jim@meyering.net>
1714         Fix a test script not to claim an ext2 file system is of type xfs.
1715         * tests/du/slink: When using df --local and df --type=TYPE,
1716         test only the exit code.  Don't bother with stdout.
1717         Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
1719         * gl/lib/savewd.c: Remove this file, since the savewd_save change
1720         is now in gnulib.  The other wasn't useful.
1722 2007-03-20  Jim Meyering  <jim@meyering.net>
1724         * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
1726         Skip part of this test when "." is not a local file system.
1727         * tests/install/basic-1: Otherwise, it would fail on some NFS
1728         file systems.
1729         * tests/mkdir/p-3: Likewise.
1731 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1733         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
1734         Add $(LIB_ACL_TRIVIAL).
1736 2007-03-18  Jim Meyering  <jim@meyering.net>
1738         Fix a generic NFS-related test failure.
1739         * tests/mkdir/p-3: When setting up an unreadable "." in an
1740         inaccessible parent, make the parent inaccessible *after* making "."
1741         unreadable.  Otherwise, running "chmod a-r ." in an already-
1742         inaccessible parent would fail on NFS with "Stale NFS file handle".
1744         Fix a bug in how pr -m -s works.
1745         * NEWS: Describe how the fix affects pr.
1746         * src/pr.c (init_parameters): The --merge (-m) option does
1747         not imply --expand-tabs (-e), so don't set "untabify_input".
1748         Reported by Wis Macomson.
1749         * tests/misc/pr: New file.  Test for the above fix.
1750         * tests/misc/Makefile.am (TESTS): Add pr.
1751         * THANKS: Update.
1753 2007-03-17  Jim Meyering  <jim@meyering.net>
1755         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
1756         * bootstrap: Put ""s around use of $build_aux, in case
1757         someone uses a name containing shell meta-characters.
1758         Reported by Alfred M. Szmidt.
1759         * tests/misc/tty-eof: Add shuf to the list of tested commands.
1761         Avoid test failure on NFS-mounted Solaris ZFS file system.
1762         * tests/du/basic: Skip a test if "." is on a non-local file system.
1764         Avoid an obscure build failure, prefer waitpid over wait.
1765         * src/install.c (strip): Use waitpid, not wait.  It's equivalent,
1766         but feels less obsolescent.
1768         * bootstrap: Don't use \> in grep regexp.  For HP-UX.
1770 2007-03-16  Jim Meyering  <jim@meyering.net>
1772         Begin adding support for Solaris ZFS (4 entries per trivial ACL)
1773         * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
1774         (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
1775         (is_trivial_acl): New function.  Incomplete, for now.
1776         (file_has_acl, copy_acl): Use the new function, rather than
1777         counting the number of entries in an ACL.
1779         * bootstrap: Update from gnulib.
1781         * .x-sc_prohibit_atoi_atof: Add TODO here, too.
1783 2007-03-16  Paul Eggert  <eggert@cs.ucla.edu>
1785         * src/copy.c: Include filemode.h.
1786         (overwrite_prompt): Say "try to overwrite", not "overwrite", to
1787         make it clearer that the attempt may fail.  Problem reported by
1788         Dan Jacobson in:
1789         http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
1790         Output symbolic mode as well as numeric.
1791         * tests/mv/i-2 (fail): Adjust to new prompt format.
1793 2007-03-15  Jim Meyering  <jim@meyering.net>
1795         Enforce policy: don't use *scanf functions.
1796         * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
1797         * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
1798         * TODO: note that stty.c needs this small clean-up.
1800 2007-03-13  Jim Meyering  <jim@meyering.net>
1802         Prepare to work on ACL-related failure when using Solaris ZFS.
1803         * gl/lib/acl.c: New file, copied from gnulib.
1805         Work around a failing test due to an NFS-based race condition.
1806         * tests/cp/sparse: Accept a report that the copy is *smaller*.
1808 2007-03-12  Jim Meyering  <jim@meyering.net>
1810         Make bootstrap.conf a tiny bit more generic.
1811         * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
1812         files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
1814 2007-03-10  Jim Meyering  <jim@meyering.net>
1816         Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
1817         * gl/lib/savewd.c: Copy this file from gnulib, then change
1818         "errno != EACCES" to (errno != EACCES && errno != ESTALE).
1819         The symptom was this failure in tests/install/basic-1:
1820         ginstall: cannot create directory `rel/a': Stale NFS file handle
1822         The preceding change solved part of the problem.  Now ginstall fails.
1823         * tests/install/basic-1: Temporarily, don't redirect ginstall's
1824         stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
1825         is failing.
1827         * tests/install/basic-1: When setting up an unreadable "." in an
1828         inaccessible parent, make the parent inaccessible *after* making "."
1829         unreadable.  Otherwise, running "chmod a-r ." in an already-
1830         inaccessible parent would fail on NFS with "Stale NFS file handle".
1831         Reported by Bob Proulx.
1833         * Makefile.maint (po-check): Exclude c99-to-c89.diff.
1835 2007-03-09  Jim Meyering  <jim@meyering.net>
1837         Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
1838         * tests/chgrp/basic: Don't let failure by chgrp to set the
1839         group of a symlink make this test fail.  Do give a diagnostic.
1840         In the chgrp-no-change-ctime test, add darwin7.9.0 as another
1841         known-failing system.
1842         When failing on some other system, print $host_triplet, too.
1843         Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
1844         Reported by Peter Fales.
1846 2007-03-08  Jim Meyering  <jim@meyering.net>
1848         * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
1850 2007-03-08  Paul Eggert  <eggert@cs.ucla.edu>
1852         rm without -f: give a better diagnostic when euidaccess fails.
1853         * src/remove.c (write_protected_non_symlink): Return int, not bool,
1854         so that we can indicate failure too (as a postive error number).
1855         (prompt): If write_protected_non_symlink fails, report that error
1856         number and fail rather than charging ahead and removing the dubious
1857         entry.  Redo the logic of printing a diagnostic so that we need to
1858         invoke quote (full_filename (...)) only once.  More details at:
1859         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
1861 2007-03-08  Jim Meyering  <jim@meyering.net>
1863         Generalize a few more cvs-isms.
1864         * bootstrap (checkout_only_file): Rename from CVS_only_file.
1865         Change comments and diagnostics not to say "CVS".
1867         * bootstrap: Run libtool, if necessary.
1869         Make bootstrap a little more general.
1870         * bootstrap (build_aux): Factor out/use this definition.
1871         Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
1872         (insert_sorted_if_absent): Move function definition "up", to
1873         precede new first use.
1874         If $build_aux/ doesn't exist initially, create it, and
1875         mark it as ignored.
1877 2007-03-03  Andrew Church  <achurch@achurch.org>  (tiny change)
1878             Paul Eggert  <eggert@cs.ucla.edu>
1880         Fix a bug: cp -x would fail to set mount point permissions.
1881         * NEWS: mention cp -x bug fix
1882         * src/copy.c (copy_internal): Don't return immediately after
1883         copying a mount point that we do not intend to recurse under.
1884         Based on a patch by Andrew Church.
1886 2007-03-03  Jim Meyering  <jim@meyering.net>
1888         pwd-unreadable-parent: Skip test on ia64/Linux, too.
1889         * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
1890         Reported by Bob Proulx.
1892 2007-03-02  Jim Meyering  <jim@meyering.net>
1894         pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
1895         * tests/misc/pwd-unreadable-parent: Rather than trying to decide
1896         whether this test has a chance of succeeding, run it only when
1897         $(host_os) is linux-gnu.  It was failing on powerpc-apple-darwin8.8.0
1898         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
1900         * tests/misc/pwd-long: Also allow "+" in $PWD.
1902         Remove another coreutils-ism.  Formatting cleanup.
1903         * Makefile.maint (my-distcheck): Update an outdated comment.
1904         (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
1905         (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
1907 2007-03-01  Jim Meyering  <jim@meyering.net>
1909         * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
1910         (my-distcheck): Use the new variable, instead of too-long literal.
1912         Make "make syntax-check" rules less coreutils-specific.
1913         * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
1914         (sc_cast_of_alloca_return_value): Likewise.
1915         (sc_root_tests): Do nothing if there is no check-root target
1916         in tests/Makefile.am.
1918         Run the writable-files check only for release-building targets.
1919         * Makefile.maint (local-checks-available): Remove writable-files.
1920         (alpha beta major): Put it here, instead.
1922         "make syntax-check" now runs only Makefile.cfg-selected tests
1923         * Makefile.maint (syntax-check-rules): Hoist this definition so that
1924         it precedes the indirect use in the definition of $(local-check).
1925         (local-check): Use :=, not just "=".
1926         (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
1928 2007-02-28  Bruno Haible  <bruno@clisp.org>
1930         * bootstrap.conf (gnulib_modules): Replace xreadlink with
1931         xreadlink-with-size. Add xreadlink.
1932         * src/copy.c (copy_internal): Update.
1933         * src/ls.c (is_directory): Update.
1934         * src/stat.c (print_stat): Update.
1935         * src/readlink.c (main): Use the one-argument xreadlink function.
1937 2007-02-28  Paul Eggert  <eggert@cs.ucla.edu>
1939         * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
1940         Problem reported by Philip Rowlands in
1941         <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
1943 2007-02-28  Jim Meyering  <jim@meyering.net>
1945         * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
1946         list of exceptions, for the "make distcheck" sc_file_system rule.
1948         * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
1950 2007-02-27  Paul Eggert  <eggert@cs.ucla.edu>
1952         Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
1953         * NEWS: With -P, the default block size and output format is not
1954         affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
1955         * src/df.c (main): Implement this.
1957 2007-02-27  Jim Meyering  <jim@meyering.net>
1959         Add a test for the above.
1960         * tests/misc/df-P: New file.
1961         * tests/misc/Makefile.am (TESTS): Add df-P.
1963 2007-02-25  Jim Meyering  <jim@meyering.net>
1965         * Makefile.maint (announcement): Adjust so that it works with
1966         announce-gen's --gnulib-snapshot-time-stamp option.
1967         Indent one of the command lines using TAB, not 8 spaces.
1969         Post-release version change.
1970         * NEWS: Add a line for 6.8+.
1971         * configure.ac (AC_INIT): Set new version string.
1973 2007-02-24  Jim Meyering  <jim@meyering.net>
1975         Version 6.8.
1976         * NEWS: Record release date and new version number.
1977         * configure.ac (AC_INIT): New version number.
1979         Don't skip this test on new-enough Linux/GNU systems.
1980         * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
1981         rather than for __GETCWD_PREFIX in config.h (the latter is no
1982         longer defined, ever, due to gnulib changes).
1983         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
1985         Remove the "gnits" option; it prohibits my using "+" as a version
1986         string suffix, and all it does (beyond the default "gnu" option)
1987         is to _require_ the THANKS file.
1988         * configure.ac (AM_INIT_AUTOMAKE): Remove it.
1990         Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
1991         * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
1992         * tests/chown/Makefile.am, tests/cp/Makefile.am:
1993         * tests/du/Makefile.am, tests/expr/Makefile.am:
1994         * tests/factor/Makefile.am, tests/general/Makefile.am:
1995         * tests/install/Makefile.am, tests/ln/Makefile.am:
1996         * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
1997         * tests/mv/Makefile.am, tests/readlink/Makefile.am:
1998         * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
1999         * tests/seq/Makefile.am, tests/stty/Makefile.am:
2000         * tests/tee/Makefile.am, tests/touch/Makefile.am:
2002         * README: Document the OSF/1 4.0d build failure and work-around.
2003         Reported by Bruno Haible.
2005         * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
2006         Nicer connotations.
2007         * configure.ac: Use 6.7+, not 6.7-dirty.
2009 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
2011         * NEWS: sort no longer compresses temporaries by default.
2012         * bootstrap.conf: Remove findprog.
2013         * doc/coreutils.texi (sort invocation): The default is to not
2014         compress.  Don't treat "" specially.
2015         * src/sort.c: Don't include findprog.h.
2016         (create_temp): Compress only if the user specified --compress-program.
2017         * tests/misc/sort-compress: Adjusts tests to match new behavior.
2019 2007-02-24  Jim Meyering  <jim@meyering.net>
2021         Avoid a shell syntax error, when building with an inadequate Perl.
2022         * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
2023         it can expand to "/.../missing perl".
2025         * man/Makefile.am (.x.1): Warn when unable to update a man page.
2026         Suggestion from Bruno Haible.
2028 2007-02-23  Bruno Haible  <bruno@clisp.org>
2030         Handle better the combination of old Perl and a pre-c99 compiler.
2031         * man/Makefile.am (.x.1): If the autoconf test has determined that
2032         perl is missing or not a sufficient version, do nothing.
2034         * tests/readlink/can-e: Put the closing double-quote at the end of a
2035         backquoted word, not in the middle. Works around a bug in sh on
2036         OSF/1 4.0d.
2037         * tests/readlink/can-f: Likewise.
2038         * tests/readlink/can-m: Likewise.
2040         * tests/du/slink: Skip the test if executing on an nfsv3 file system.
2041         This avoids a test failure at least on OSF/1 4.0d.
2043 2007-02-23  Jim Meyering  <jim@meyering.net>
2045         * src/date.c (usage): Split a diagnostic that had grown to be
2046         longer than the C89 maximum of 509 bytes.
2048 2007-02-23  Ed Santiago <ed@edsantiago.com>
2050         * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
2051         for a separator.  Include sample RFC 2822 and 3339 output.
2053 2007-02-23  Jim Meyering  <jim@meyering.net>
2055         With -Dlint, make shuf free all heap-allocated storage.
2056         * src/shuf.c (main): Move declaration of input_lines to
2057         function scope, and initialize to NULL, so we can free it.
2058         [lint]: Free all malloc'd memory.
2059         * tests/misc/shuf: Also test shuf's -e and -i options.
2061 2007-02-22  Jim Meyering  <jim@meyering.net>
2063         Merge in a change from some other incarnation of this file (gzip?)
2064         * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
2066         Adjust preceding change not to perform an unaligned access.
2067         * src/copy.c (copy_reg): Undo previous change.  Instead, make
2068         it clearer that we're using a single-byte sentinel, and
2069         [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
2070         Reported by Andreas Schwab.
2072         Placate valgrind, wrt ./cp --sparse=always
2073         * src/copy.c (copy_reg): Place the sentinel by setting a
2074         full word's worth of bits, not just a single byte's worth.
2075         This avoids a harmless (but distracting) case of memory being
2076         used-uninitialized.
2078 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
2080         Honor dd's noatime flag if possible, even if not supported on build fs
2081         * doc/coreutils.texi (dd invocation): Warn that noatime might not be
2082         reliable.
2083         * src/dd.c (flags, usage): Look at O_NOATIME, not
2084         HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
2085         flag, so that dd attempts O_NOATIME even if the build file system
2086         does not support it.  Problem reported by Jim Meyering today in
2087         bug-coreutils.
2088         * tests/dd/misc: Generate a warning, not a failure, if noatime
2089         exists but fails.
2091 2007-02-21  Jim Meyering  <jim@meyering.net>
2093         * tests/misc/date: Remove vestigial use of Data::Dumper.
2095 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
2097         * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
2098         about out-of-range initializer with Sun C 5.8.
2100 2007-02-20  Jim Meyering  <jim@meyering.net>
2102         * bootstrap (CVS_only_file): Use README-hacking.
2104         Now that we use GIT, not cvs, rename README-cvs.
2105         * README-hacking: Renamed from...
2106         Update to reflect that we now use git.
2108         * README-cvs: ...this.
2110         * src/env.c (main): When invoked with no arguments (i.e. when printing
2111         the environment), use a local variable to iterate through the global
2112         "environ" array, rather than "environ" itself.  This is solely to
2113         avoid changing the environment for an LD_PRELOAD-substituted "puts"
2114         or "exit" function.  Tiny patch by Harvey Eneman.  See
2115         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
2116         * THANKS: Update.
2118         * bootstrap: Move definitions of temporary directory names and the
2119         new bt_regex "up" to precede all uses, so it's clearer what their
2120         scope is.  Also, use [.], rather than \\., since the former works
2121         even if eval'd.
2123         * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
2124         Based on the bison 2007-02-19 change by Joel E. Denny.
2126 2007-02-19  Paul Eggert  <eggert@cs.ucla.edu>
2128         * NEWS: sort now uses a --compress-program option rather than
2129         an environment variable.
2130         * doc/coreutils.texi (sort invocation): Document this.
2131         * src/sort.c (usage): Likewise.
2132         (COMPRESS_PROGRAM_OPTION): New const.
2133         (long_options, create_temp, main): Support new option.
2134         * tests/misc/sort-compress: Test it.
2136 2007-02-19  Jim Meyering  <jim@meyering.net>
2138         * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
2140 2007-02-18  Jim Meyering  <jim@meyering.net>
2142         * src/system.h: Don't include exit.h, now that it's subsumed
2143         by the gnulib-generated stdlib.h.
2145         * tests/rm/fail-eacces: Skip this test when running as root.
2146         Reported by Matthew Woehlke.
2148         * bootstrap: Use "._bootmp" as the temporary directory name,
2149         not ".#bootmp".  The latter's "#" caused trouble with the new,
2150         gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
2152 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
2154         * bootstrap.conf (gnulib_modules): Add c-strcase.  Remove strcase.
2155         * src/dircolors.c: Include c-strcase.h.
2156         (dc_parse_stream): Use c_strcasecmp rather than
2157         strcasecmp to avoid unreliable results in locales like Turkish
2158         where strcasecmp is incompatible with the C locale.
2160 2007-02-13  Jim Meyering  <jim@meyering.net>
2162         Also check for and print stderr output, in case a program fails.
2163         * tests/misc/tty-eof: Occasionally (not reproducible), this
2164         test would fail, with one or more programs exiting nonzero, e.g.,
2165         tty-eof: sha224sum exited with status 1 (expected 0)
2166         Now, maybe we'll get a clue, the next time that happens.
2168 2007-02-12  Jim Meyering  <jim@meyering.net>
2170         * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
2172         * tests/misc/pwd-unreadable-parent: Skip the test if we're
2173         definitely using the replacement.
2174         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
2176 2007-02-10  Jim Meyering  <jim@meyering.net>
2178         Remove excess leading spaces that would make help2man misbehave.
2179         * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
2180         * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
2181         * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
2182         * src/date.c (usage): Use two spaces after each optional flag, not one.
2183         Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
2185         * Makefile.maint (longopt_re): Relax the regexp, making square
2186         brackets optional, so it matches the newly reported violations, too.
2188         * src/csplit.c (usage): Use two spaces (not one) to separate
2189         each option string from its description, so help2man formats
2190         the derived man page properly.  Reported by Thomas Huriaux in
2191         <http://bugs.debian.org/410407>.
2192         * src/df.c (usage): Likewise.
2193         * src/du.c (usage): Likewise.
2194         * src/install.c (usage): Likewise.
2195         * src/ls.c (usage): Likewise.
2197 2007-02-03  Jim Meyering  <jim@meyering.net>
2199         Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
2200         * NEWS: Mention the bug fix.
2201         * tests/misc/pwd-unreadable-parent: New file.
2202         * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
2204 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
2206         * NEWS: Document fix for cp --preserve=mode.
2207         * src/copy.c (copy_internal): Omit the group- or other-writeable
2208         permissions when creating a directory, to avoid a race condition
2209         if the special mode bits aren't right just after the directory is
2210         created.
2211         * src/cp.c (make_dir_parents_private): Likewise.
2212         * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
2213         race fix in copy.c.
2215         * NEWS: Document fix for cp --parents.
2216         * src/cp.c (make_dir_parents_private): Report the error sooner with
2217         "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
2218         creating the directory, DEST/DIR.
2219         * tests/cp/cp-parents: Test for the non-race-condition bug fixed
2220         by the above change.
2222 2007-02-02  Jim Meyering  <jim@meyering.net>
2224         * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
2226         * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
2227         consistent, so this can be applied with patch -p0.
2228         Reported by Matthew Woehlke.
2230         Arrange for "make check-root" to run the new root-only test.
2231         * tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
2232         (all_t): Add t9.
2234         * Makefile.maint (patch-check): Use patch with its -p2 option,
2235         since that makes this check slightly more strict.
2237         Use a directory on a loopback device mounted with -o context=...
2238         * tests/cp/cp-a-selinux: Since this test now runs mount and umount,
2239         it is a root-only one.
2241 2007-01-29  Jim Meyering  <jim@meyering.net>
2243         Plug a leak in ls.
2244         * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
2245         determine dev/inode or upon detecting a symlink loop.
2247         * src/ls.c: Rename three global variables.
2248         (cwd_file): Rename from 'files'.
2249         (cwd_n_alloc): Rename from 'nfiles'.
2250         (cwd_n_used): Rename from 'files_index'.
2252         Shave 8 bytes off the size of "struct fileinfo".
2253         * src/ls.c (fileinfo): Put all members of type "bool" together.
2255 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
2257         Modify "ls" to sort its data faster, using the new gnulib mpsort
2258         module rather than qsort.  This is particularly a win in
2259         environments where strcoll is slow, since mpsort typically calls
2260         strcoll less often than qsort does.
2261         * bootstrap.conf (gnulib_modules): Add mpsort.
2262         * src/ls.c: Include mpsort.h.
2263         (sorted_file, sorted_file_alloc): New vars, for a new vector of
2264         pointers to the file info, for speed.
2265         (clear_files, extract_dirs_from_files, sort_files, print_current_files):
2266         (print_many_per_line, print_horizontal, print_with_commas):
2267         (calculate_columns): Set and use new vector.
2268         (initialize_ordering_vector): New function.
2270 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
2272         Adjust to today's change to gnulib, which added a module for
2273         string.h to replace the little include files like strcase.h.
2274         * src/dircolors.c: Don't include strcase.h.
2275         * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
2277 2007-01-26  Jim Meyering  <jim@meyering.net>
2279         * src/dd.c (advance_input_after_read_error): Change diagnostic to
2280         say "invalid file offset" rather than "screwy file offset".
2282         * .x-sc_cast_of_argument_to_free: Remove this file.
2283         * Makefile.am (EXTRA_DIST): Likewise.
2285 2007-01-25  Dan Hipschman  <dsh@linux.ucla.edu>
2287         * src/sort.c (create_temp): Remove superfluous access-X_OK
2288         check.  find_in_path does this for us.
2290 2007-01-24  Jim Meyering  <jim@meyering.net>
2292         Remove usually-skipped test.
2293         * tests/cp/open-perm-race: Remove this file.  It is subsumed
2294         by parent-perm-race.
2295         * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
2296         * tests/sort/Makefile.am: Regenerate.
2298         Pass "make distcheck" again.
2299         * src/sort.c (usage): Split a diagnostic that had grown to be
2300         longer than the C89 maximum of 509 bytes.
2301         * .x-sc_cast_of_argument_to_free: New file.  Allow a cast in sort.c.
2302         FIXME: this is just temporary, while we wait to remove the offending
2303         access-calling code.
2304         * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
2305         * Makefile.maint (sc_cast_of_argument_to_free): Use the
2306         canonical, $$($(CVS_LIST_EXCEPT)).
2307         * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
2309 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
2311         * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
2312         like it will be approved.  Also add --check=quiet, --check=silent
2313         as long aliases, and --check=diagnose-first as an alias for -c.
2314         * doc/coreutils.texi (sort invocation): Document this.
2315         Also, mention that sort -c can take at most one file.
2316         * src/sort.c: Implement this.
2317         Include argmatch.h.
2318         (usage): Document the change.
2319         (CHECK_OPTION): New constant.
2320         (long_options): --check now takes an optional argument, and is now
2321         treated differently from 'c'.
2322         (check_args, check_types): New constant arrays.
2323         (check): New arg CHECKONLY, which suppresses diagnostic if -C.
2324         (main): Parse the new options.
2325         * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
2326         New tests for -C.
2328 2007-01-24  Jim Meyering  <jim@meyering.net>
2330         Fix a typo.
2331         * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
2332         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
2334         Don't depend on "which".
2335         * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
2336         * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
2338 2007-01-24  Dan Hipschman  <dsh@linux.ucla.edu>
2340         Test sort compression.
2341         * tests/misc/Makefile.am: Add the test.
2342         * tests/misc/sort-compress: New file containing the tests.
2344 2007-01-24  Jim Meyering  <jim@meyering.net>
2346         * NEWS: sort temp file compression: tweak wording.
2347         * src/sort.c (struct sortfile) [name]: Declare member to be const.
2349 2007-01-21  Jim Meyering  <jim@meyering.net>
2351         * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
2352         In pipe_fork callers, use these named constants, not "2" and "8".
2353         (proctab, nprocs): Declare to be "static".
2354         (pipe_fork) [lint]: Initialize local, pid,
2355         to avoid unwarranted may-be-used-uninitialized warning.
2356         (create_temp): Use the active voice.  Describe parameters, too.
2358 2007-01-21  James Youngman  <jay@gnu.org>
2360         Centralize all the uses of sigprocmask().  Don't restore an invalid
2361         saved mask.
2362         * src/sort.c (enter_cs, leave_cs): New functions for protecting
2363         code sequences against signal delivery.
2364         * (exit_cleanup): Use enter_cs and leave_cs instead of
2365         calling sigprocmask directly.
2366         (create_temp_file, pipe_fork, zaptemp): Likewise
2368 2007-01-21  Dan Hipschman  <dsh@linux.ucla.edu>
2370         Add compression of temp files to sort.
2371         * NEWS: Mention this.
2372         * bootstrap.conf: Import findprog.
2373         * configure.ac: Add AC_FUNC_FORK.
2374         * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
2375         variable.
2376         * src/sort.c (compress_program): New global, holds the name of the
2377         external compression program.
2378         (struct sortfile): New type used by mergepfs and friends instead
2379         of filenames to hold PIDs of compressor processes.
2380         (proctab): New global, holds compressor PIDs on which to wait.
2381         (enum procstate, struct procnode): New types used by proctab.
2382         (proctab_hasher, proctab_comparator): New functions for proctab.
2383         (nprocs): New global, number of forked but unreaped children.
2384         (reap, reap_some): New function, wait for/cleanup forked processes.
2385         (register_proc, update_proc, wait_proc): New functions for adding,
2386         modifying and removing proctab entries.
2387         (create_temp_file): Change parameter type to pointer to file
2388         descriptor, and return type to pointer to struct tempnode.
2389         (dup2_or_die): New function used in create_temp and open_temp.
2390         (pipe_fork): New function, creates a pipe and child process.
2391         (create_temp): Creates a temp file and possibly a compression
2392         program to which we filter output.
2393         (open_temp): Opens a compressed temp file and creates a
2394         decompression process through which to filter the input.
2395         (mergefps): Change FILES parameter type to struct sortfile array
2396         and update access accordingly.  Use open_temp and reap_some.
2397         (avoid_trashing_input, merge): Change FILES parameter like
2398         mergefps and call create_temp instead of create_temp_file.
2399         (sort): Call create_temp instead of create_temp_file.
2400         Use reap_some.
2401         (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
2403         The idea of compressing sorts temporary files was first
2404         suggested/implemented by Jay Soffian in 1998, and again
2405         by Charles Randall in 2001.
2407 2007-01-20  Jim Meyering  <jim@meyering.net>
2409         * tests/misc/pwd-long: Work properly even when run from the
2410         wrong one of two or more bind-mounted sibling directories.
2411         Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
2413 2007-01-20  Paul Eggert  <eggert@cs.ucla.edu>
2415         Standardize on list of signals when an app catches signals.
2416         * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
2417         SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
2418         * src/ls.c (main): Likewise (except SIGPIPE was already caught).
2419         Note that ls.c is special, as it also catches SIGTSTP.
2420         * src/sort.c (main): Likewise.  Also catch SIGQUIT.  More details in
2421         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
2423 2007-01-19  Dan Hipschman  <dsh@linux.ucla.edu>
2424         and Paul Eggert  <eggert@cs.ucla.edu>
2426         * src/sort.c (cleanup): Clear temphead at the end.
2427         (exit_cleanup): New function.
2428         (main): Don't invoke atexit until we're ready.
2429         Invoke it with exit_cleanup, not with cleanup and close_stdout,
2430         to avoid a race condition with cleanup and signal handling.  More
2431         details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
2433 2007-01-18  Jim Meyering  <jim@meyering.net>
2435         * src/c99-to-c89.diff: Adjust remove.c offsets.
2437 2007-01-17  Jim Meyering  <jim@meyering.net>
2439         Make "rm --interactive=never ..." never prompt.
2440         * NEWS: Mention this.
2441         * src/remove.h (enum rm_interactive): New ternary type.
2442         (struct rm_options) [interactive]: Use it, here -- rather than bool.
2443         * src/remove.c (prompt): Reflect type change.
2444         * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
2445         * src/rm.c (main): Add a FIXME comment for '-d' option.
2446         Adapt to type change of rm_options.interactive.
2448         * tests/rm/i-never: New file.  Test for the above fix.
2449         * tests/rm/Makefile.am (TESTS): Add i-never.
2451 2007-01-15  Jim Meyering  <jim@meyering.net>
2453         * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
2454         emit foo.h, for each foo_.h.  This yields one false-positive, fts.h,
2455         but that's ok, since fts_.h will eventually be renamed.
2457         * src/remove.c (remove_dir): Don't use errno in diagnostic.
2458         Root-only test failure reported by Alex van Hout and Jon Grosshart in
2459         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
2461         * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
2462         s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
2464 2007-01-14  Bruno Haible  <bruno@clisp.org>
2466         Enable use of gnulib's new fchdir module.
2467         * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
2468         since we use canonicalize.
2469         (gnulib_modules): Add fchdir.
2470         * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
2472 2007-01-13  Jim Meyering  <jim@meyering.net>
2474         * tests/cp/open-perm-race: Remove gdb-based test.
2475         It would run only when compiled with -g, and besides is now
2476         subsumed by file-perm-race.
2477         * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
2479         * Transform all Makefile.am files so that when running "make check",
2480         CU_TEST_NAME is set to the name of the test.  This is so that when I
2481         run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
2482         on the entire package it is more convenient to map a leak or error
2483         found in a valgrind log file back to the offending test.
2484         Use this command:
2485         (echo tests/Makefile.am.in; find tests -name Makefile.am) \
2486          |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
2487            -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
2489 2007-01-11  Jim Meyering  <jim@meyering.net>
2491         Avoid a leak in expr's implementation of the ":" (match) operator.
2492         * src/expr.c (docolon): Free the regexp buffer using regfree, rather
2493         than doing it manually, being careful to set fastmap to NULL first.
2494         Free any re_regs.start and .end members, if necessary.
2496         * tests/misc/test-diag: Work also when libc's error function
2497         reports the entire program name ("../../src/test"), rather than
2498         just the final component.
2500 2007-01-10  Jim Meyering  <jim@meyering.net>
2502         Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
2503         * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
2504         (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
2505         directory.  Non-directory entries lack fts_statp data when using
2506         the FTS_NOSTAT option.
2508 2007-01-07  Jim Meyering  <jim@meyering.net>
2510         * tests/sample-test: Update copyright date to 2007.
2511         * Makefile.maint (copyright-check): Also check the copyright date
2512         in tests/sample-test.
2514 2007-01-06  Jim Meyering  <jim@meyering.net>
2516         * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
2517         based on examples from G.P. Halkes in
2518         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
2520 2007-01-06  G.P. Halkes  <buscom@ghalkes.nl>
2522         * src/fmt.c (copy_rest): Correct prefix handling.
2523         Don't elide a line with the prefix followed by only white space.
2524         (get_line): Move EOF-check to loop-termination condition.
2525         * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
2526         (pfx-2): Remove test; its premise was contrary to the documentation.
2528 2007-01-05  Jim Meyering  <jim@meyering.net>
2530         Avoid a used-uninitialized bug for invalid input, i.e., when the size
2531         of the input, not counting newlines, is 1 % 4.
2532         * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
2533         It may be smaller when flushing.
2535 2007-01-05  Mike Frysinger  <vapier@gentoo.org>
2537         * src/dircolors.hin: Add a TERM directive for cons25.
2539 2007-01-04  Jim Meyering  <jim@meyering.net>
2541         * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
2542         case you don't have convenient access to glibc info documentation.
2544         Use the release year, not the current year.
2545         * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
2546         * src/Makefile.am (RELEASE_YEAR): Define it.
2547         (.sh): Use it.
2548         Thanks to a prod from Eric Blake.
2550         Ensure that "group --version" always prints the current year.
2551         * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
2552         * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
2553         Suggestion from Eric Blake.
2555         When decoding, always allow newlines in input, with almost no
2556         performance impact.
2557         * src/base64.c (do_decode): Initialize decode context.
2558         Call base64_decode one more time, after all input is processed.
2559         (usage): When decoding, newlines are always accepted.
2561         * tests/misc/base64: Add a bunch of tests, for the above.
2562         * gl/lib/base64.c: Include <string.h>.
2563         (base64_decode_ctx_init, get_4, decode_4): New functions.
2564         (base64_decode): Efficiently handle interspersed newlines.
2565         (base64_decode_alloc): Update signature.
2566         * gl/lib/base64.h (struct base64_decode_context): Define.
2567         (base64_decode_ctx_init): Add prototype.
2568         (base64_decode, base64_decode_alloc): Update prototypes.
2570         * gl/lib/base64.c: Copied from gnulib.
2571         * gl/lib/base64.h: Likewise.
2573 2007-01-03  Jim Meyering  <jim@meyering.net>
2575         * THANKS: Add Evan Hunt.
2577 2007-01-03  Bruno Haible  <bruno@clisp.org>
2579         Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
2580         * tests/chown/deref: Apply lang-default.
2581         * tests/misc/split-a: Likewise.
2582         * tests/mv/reply-no: Likewise.
2584         * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
2585         Needed on MacOS X.
2587 2007-01-02  Paul Eggert  <eggert@cs.ucla.edu>
2589         Now, "ls -FRL" always follows symbolic links on Linux.
2590         * NEWS: Mention this bug fix.
2591         * src/ls.c (gobble_file): Fix bug reported by
2592         Nobuyuki Tsuchimura in
2593         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
2594         where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
2595         * tests/ls/follow-slink: Add a test for this case.
2597 2007-01-01  Jim Meyering  <jim@meyering.net>
2599         * tests/rm/fail-eperm: Revert last change.  The PATH=... setting
2600         is not honored at least on HP-UX 11.23 systems.
2601         Instead, simply transform the actual output diagnostic.
2602         Test failure reported by Bob Proulx.
2604 2006-12-30  Jim Meyering  <jim@meyering.net>
2606         * bootstrap (gnulib_extra_files): Remove announce-gen.
2607         * bootstrap.conf (gnulib_modules): Add it here instead, now that
2608         it's a module.
2610         * tests/misc/base64: Factor a long, repetitive string.
2612         * src/c99-to-c89.diff: Adjust remove.c offsets.
2614         Clean up after the change of 2006-12-28.
2615         * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
2616         now that this function never modifies the pointer.  Adjust comments
2617         and code accordingly.
2618         (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
2619         now that AD_pop_and_chdir no longer does that.
2621         * tests/rm/fail-eperm: Avoid spurious differences (the error function
2622         from latest glibc no longer prints the full program_name): so don't
2623         invoke rm via ../../src/rm.  Instead, invoke it via "PATH=../../src rm".
2625         * tests/mv/acl (skip): Skip this test also if the destination
2626         directory, which is on a different file system, lacks ACL support.
2628         * src/copy.c (copy_reg): Rewrite a comment that was rendered
2629         inaccurate by the 2006-10-18 change.
2631 2006-12-28  Jim Meyering  <jim@meyering.net>
2633         When moving "up" the hierarchy, be careful to remove a just-emptied
2634         directory before opening ".", to avoid trouble with file system
2635         implementations that cache readdir results at opendir-time.
2636         * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
2637         Don't update **DIRP.  Don't call fdopendir here.
2638         (remove_dir): Call fdopendir here instead.
2639         Report and patch from Mikulas Patocka:
2640         <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
2642 2006-12-27  Jim Meyering  <jim@meyering.net>
2644         * src/tail.c (usage): Mention +N for --bytes and --lines.
2645         Suggestion from Evan Hunt.
2647 2006-12-26  Jim Meyering  <jim@meyering.net>
2649         * configure.ac: Require autoconf-2.61 and automake-1.10.
2650         Without the former (even with autoconf-2.60), "make distcheck"
2651         would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
2652         due to an inttypes.h generated with CFLAGS including -pedantic.
2653         With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
2655         * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
2656         tag, using the release version number as the message.
2657         (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
2659 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2661         * NEWS: dd bs= operands now silently override later ibs= and obs=,
2662         as POSIX requires.
2663         * src/dd.c (scanargs): Implement it.
2664         * tests/dd/misc (outbytes): Test it.
2665         * doc/coreutils.texi (dd invocation): Specify that bs=N
2666         overrides later ibs and obs, undoing part of the
2667         previous change.  (The behavior was wrong.)
2669 2006-12-20  Jim Meyering  <jim@meyering.net>
2671         "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
2672         * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
2673         Don't let a non-directory get by with errno == EPERM, either.
2674         Check the file type directly (using cached stat value), rather
2675         than trying to guess it from errno values.
2676         Karl Berry reported that a cross-partition "mv /etc/issue ~"
2677         failed with the um,... suboptimal diagnostic,
2678         "mv: cannot remove `/etc/issue': Not a directory".
2679         * tests/rm/Makefile.am (TESTS): Add fail-eacces.
2680         * tests/rm/fail-eacces: New file.
2681         * NEWS: Mention that both mv and rm are affected.
2683         "cut -f 2- A B" no longer triggers a double-free bug
2684         * src/cut.c (cut_fields): Set file-scoped global to NULL after
2685         freeing it.  This avoids a double-free (and core dump on some systems)
2686         for this usage: "echo 1>a; echo 2>b; cut -f2- a b".  Reported by
2687         James Hunt in <http://bugzilla.redhat.com/220312>.
2688         * NEWS: List this bug fix.
2689         * THANKS: Mention him.
2690         * tests/misc/cut: New file.
2691         * tests/misc/Makefile.am (TESTS): Add cut.
2693 2006-12-15  Jim Meyering  <jim@meyering.net>
2695         * tests/cp/open-perm-race: Correct the gdb-existence check.
2696         Don't run either subsequent gdb command in a sub-shell.
2697         Reported by Thomas Schwinge.
2698         * THANKS: bring up to date.
2700 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2702         Make sure cp -p isn't too generous with file permissions.
2703         * tests/cp/Makefile.am (TESTS): Add file-perm-race.
2704         * tests/cp/file-perm-race: New file.
2706         Ensure cp -pR --parents isn't too generous with parent permissions.
2707         * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
2708         * tests/cp/parent-perm-race: New file.
2710 2006-12-14  Jim Meyering  <jim@meyering.net>
2712         * tests/chgrp/default-no-deref: Don't assume that files are created
2713         with the primary group by default.  That's not true in a directory
2714         with the set-GID bit set.
2716         Don't hang when there's no input tty.
2717         * tests/cp/open-perm-race: Skip this test if there is no
2718         controlling input `terminal'.
2720         Test for a hard-to-detect race fix, using gdb.
2721         * tests/cp/open-perm-race: New file, to test for the
2722         cp --preserve=ownership fix of 2006-12-06.
2724         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
2725         (TESTS): Add open-perm-race.
2727         * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
2728         * src/chown.c (main): Likewise.
2729         * src/chown-core.c (change_file_owner): Add to a comment.
2730         * tests/chown/preserve-root: Add tests.
2732         * NEWS: --preserve-root now works with chgrp, chmod, and chown.
2733         * src/chmod.c (process_file): Do honor the --preserve-root option.
2734         * src/chown-core.c (change_file_owner): Likewise, but here, also
2735         handle the case in which a traversal would go "through" a symlink
2736         to root.  Reported by Matthew M. Boedicker
2737         * tests/chown/preserve-root: Test for the above.
2738         * tests/chown/Makefile.am (TESTS): Add preserve-root.
2740         * NEWS: Mention the chmod fix induced by the 2006-12-11 change
2741         to gnulib's m4/openat.m4.
2743 2006-12-13  Andreas Schwab  <schwab@suse.de>
2745         Don't fail if mv/acl test succeeds.
2746         * tests/mv/acl (skip): Check for acl support in the file system.
2747         * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
2748         (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
2750 2006-12-13  Paul Eggert  <eggert@cs.ucla.edu>
2752         Remove some arbitrary restrictions on size fields, so that
2753         commands like "sort -k 18446744073709551616" no longer fail merely
2754         because 18446744073709551616 doesn't fit in uintmax_t.  The trick
2755         is that these fields can all be treated as effectively infinity;
2756         their exact values don't matter, since no internal buffer can be
2757         that long.
2758         * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
2759         ULONG_MAX if the code assumes this.  Silently truncate too-large
2760         values to SIZE_MAX, as the remaining code will do the right thing
2761         in this case.
2762         * src/sort.c (parse_field_count): Likewise.
2763         * src/uniq.c (size_opt, main): Likewise.
2764         * tests/join/Test.pm (bigfield): New test.
2765         * tests/sort/Test.pm (bigfield): New test.
2766         * tests/uniq/Test.pm (121): New test.
2768 2006-12-13  Jim Meyering  <jim@meyering.net>
2770         * tests/chgrp/default-no-deref: New test.
2771         * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
2773 2006-12-12  Jim Meyering  <jim@meyering.net>
2775         * src/system.h (SETVBUF): Remove definition, now that the
2776         autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
2777         * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
2778         * src/od.c (open_next_file): Likewise.
2780 2006-12-09  Jim Meyering  <jim@meyering.net>
2782         * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
2783         "source".  I.e. "GNU coreutils 6.7".
2785         * NEWS: With the change from "-pre" to "-dirty" suffix, also change
2786         from NEXT_VER-pre to CUR_VER-dirty.  So, this is 6.7-dirty.
2787         * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
2789         * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
2790         whenever uniq is expected to fail.  This should catch the other case
2791         [test #112] in which uniq emits "cat: write error: Broken pipe" on
2792         some systems.
2794 2006-12-08  Jim Meyering  <jim@meyering.net>
2796         Include bootstrap tool version info in the announcement form.
2797         * Makefile.maint (gnulib_snapshot_date): Define.
2798         (announcement): Use two new announce-gen options,
2799         --bootstrap-tools and --gnulib-snapshot-date.
2800         * Makefile.cfg (gnulib_dir): Set.
2802         Post-release version change.
2803         * NEWS: Add a line for 6.8-dirty.
2804         * configure.ac (AC_INIT): Set new version string.
2806 2006-12-07  Jim Meyering  jim@meyering.net
2808         Version 6.7.
2809         * NEWS: Record release date.  Remove '-pre' suffix.
2810         * configure.ac (AC_INIT): Remove version string suffix.
2812 2006-12-07  Jim Meyering  <jim@meyering.net>
2814         Make the output of "make check" more reproducible.
2815         * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
2816         evoke diagnostics like this when COLUMNS=0 in the environment:
2817         ls: ignoring invalid width in environment variable COLUMNS: 0
2818         * tests/touch/no-rights: Likewise.
2819         * tests/help-version: Likewise.
2820         * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
2821         118, since it emits "cat: write error: Broken pipe" on some systems.
2823 2006-12-06  Paul Eggert  <eggert@cs.ucla.edu>
2825         * NEWS: Document the cp -p fix for special bits.
2826         * src/copy.c (set_owner): Now returns a three-way result, so
2827         that the caller can clear the special bits.  All callers changed.
2828         (copy_reg): Don't set the special bits if chown failed.
2829         (copy_internal): Likewise.
2830         * tests/cp/special-bits: Test this fix.
2832 2006-12-06  Paul Eggert  <eggert@cs.ucla.edu>
2834         * NEWS: Document the cp --preserve=ownership fix.
2835         * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
2836         * src/copy.c (fchmod_or_lchmod): New function.
2837         (copy_reg): New arg OMITTED_PERMISSIONS.  All uses changed.
2838         Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
2839         When creating a file, use O_EXCL, so we're more likely to detect
2840         funny business by other processes.  At the end, if permissions
2841         were omitted, chmod them back in.
2842         (copy_internal): If the ownership might change, omit some permissions
2843         at first, then restore them after chowning the file.
2844         * src/cp.c (make_dir_parents_private): Likewise.
2845         * src/copy.c (cached_umask): New function.
2846         * src/copy.h (cached_umask): New decl.
2848 2006-12-06  Jim Meyering  <jim@meyering.net>
2850         Make the output of "make check" more reproducible.
2851         * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
2853 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2855         * src/install.c (install_file_in_file): Preserve time stamps
2856         before changing owner or file mode bits, for consistency with
2857         other coreutils programs.
2859 2006-12-03  Jim Meyering  <jim@meyering.net>
2861         * tests/misc/date-sec: Output a fixed string.
2863         * NEWS: du --one-file-system (-x) would skip subdirectories of any
2864         directory listed as second or subsequent command line argument.
2865         * tests/du/one-file-system: New file.  Test for today's fts.c fix.
2866         * tests/du/Makefile.am (TESTS): Add one-file-system.
2867         Reported by Mike Frysinger.
2869 2006-12-02  Jim Meyering  <jim@meyering.net>
2871         * tests/du/basic: Generate 4KB file simply using printf, rather than
2872         seq+head.  This avoids a spurious "Broken pipe" diagnostic from seq.
2874 2006-11-28  Jim Meyering  <jim@meyering.net>
2876         * tests/mv/no-target-dir: Detect a buggy rename syscall.  If found,
2877         skip this test.  This happens at least on ia64 linux-2.4.19 w/ext3.
2878         Reported by Matthew Woehlke.
2880         * tests/mv/dir2dir: Also accept EBUSY.
2881         Reported by Matthew Woehlke.
2883 2006-11-27  Jim Meyering  <jim@meyering.net>
2885         * Makefile.maint (patch-check): Rewrite to diagnose failure.
2886         * src/c99-to-c89.diff: Adjust shred.c offsets.
2888 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2890         Improve the check for departures from C89, and fix the departures
2891         I found.
2892         * Makefile.maint (my-distcheck): Also check for C89 compatibility
2893         as best we can with GCC.
2894         * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
2895         declaration; C89 doesn't allow this.
2896         * src/dcgen: Don't generate string literals longer than
2897         what C89 requires support for.
2898         * src/cut.c (usage): Don't use string literals longer than
2899         what C89 requires support for.
2900         * src/date.c (usage): Likewise.
2901         * src/dd.c (usage): Likewise.
2902         * src/du.c (usage): Likewise.
2903         * src/ls.c (usage): Likewise.
2904         * src/od.c (usage): Likewise.
2905         * src/readlink.c (usage): Likewise.
2906         * src/seq.c (usage): Likewise.
2907         * src/shred.c (usage): Likewise.
2909 2006-11-26  Mike Frysinger  <vapier@gentoo.org>
2911         Recognize new archive, audio and image formats.
2912         Give audio files a separate color.
2913         * src/dircolors.hin: Add comments for common .sh and .csh scripts.
2914         Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
2915         suffixes.  Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
2916         .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
2917         Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes.  Change
2918         audio color to 00;36 to differentiate from image/video color.
2920 2006-11-26  Jim Meyering  <jim@meyering.net>
2922         * Makefile.maint (patch-check): Compile patched sources with
2923         CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
2924         no violations remain.
2926         * src/c99-to-c89.diff: Remove 3 bogus hunks.
2928         * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
2929         Update callers.
2931         * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
2933         * src/rm.c (main): Remove unnecessary (assuming C99) braces.
2935 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2937         Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
2938         while trying to retain the readability of C99 as much as possible.
2939         * src/remove.c (rm_1): Remove decl of local, fd_cwd.
2940         Replace each of two uses with literal AT_FDCWD.
2941         (cache_stat_init): Return its argument, for convenience.
2942         Update the caller in remove_dir.
2943         (AD_pop_and_chdir): Return prev_dir rather than storing through
2944         a pointer argument.  All uses changed.
2945         (AD_ensure_initialized): New function.
2946         (AD_mark_helper): Use it, to avoid the need for declaration
2947         after statement.
2948         (rm): Move cycle_check_init call into callee...
2949         (rm_1): ...here.
2950         Use an else clause in place of a "continue" statement.
2951         (close_preserve_errno): Remove.
2952         (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
2954 2006-11-25  Jim Meyering  <jim@meyering.net>
2956         * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
2958 2006-11-24  Theodoros V. Kalamatianos  <thkala@softlab.ece.ntua.gr> (tiny change)
2960         * tests/du/inacc-dest: Skip this test when running as root.
2962 2006-11-23  Jim Meyering  <jim@meyering.net>
2964         * announce-gen: Remove file.  It's moving to gnulib.
2965         * bootstrap: Pull it from gnulib/build-aux instead.
2966         * Makefile.maint (announcement): Reflect move to ./build-aux.
2968         * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
2969         rather than a pipeline that would sometimes evoke a diagnostic
2970         like "seq: write error: Broken pipe".
2972         * tests/help-version: Suppress dd transfer rate output.
2974         * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
2976 2006-11-22  Jim Meyering  <jim@meyering.net>
2978         * announce-gen (print_news_deltas): Fix silly, but harmless typo:
2979         change "(:?..." to "(?:..." in regexps.
2981         Post-release version change.
2982         * NEWS: Add a line for 6.7-pre.
2983         * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
2985         Version 6.6.
2986         * NEWS: Record release date.  Remove "-pre" suffix.
2987         * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
2989         * announce-gen: Remove unused --release-archive-directory option.
2990         (print_news_deltas): Accept new adjective, "Noteworthy", in addition
2991         to the old "Major".
2992         Match version numbers in NEWS using tighter regular expressions.
2993         (main): Require the --gpg-key-id=ID option.
2994         * Makefile.maint (announcement): Don't use now-removed
2995         --release-archive-directory=... option.
2997         * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
2999 2006-11-21  Jim Meyering  <jim@meyering.net>
3001         * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
3002         skip the test rather than failing.  Reported by Michael Deutschmann.
3004         * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
3005         rather than just "exit N".
3007         Arrange for "make check-root" to run the new root-only test.
3008         * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
3009         (all_t): Add t7.
3011 2006-11-20  Jim Meyering  <jim@meyering.net>
3013         Add a root-only test for today's lib/idcache.c fix.
3014         * tests/ls/nameless-uid: New file.
3015         * tests/ls/Makefile.am (TESTS): Add nameless-uid.
3016         (TESTS_ENVIRONMENT): Add PERL to the list.
3018 2006-11-19  Jim Meyering  <jim@meyering.net>
3020         * tests/tail-2/assert-2: Mark as a very-expensive test, because I
3021         find the 7-second sleep annoyingly long.  Besides, this test is
3022         probably far too specific and timing sensitive ever to trigger again.
3023         * tests/tail-2/assert: Likewise.
3025         Post-release version change.
3026         * NEWS: Add a line for 6.6-pre.
3027         * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
3029         Version 6.5.
3030         * NEWS: Record release date.  Remove "-cvs" suffix.
3031         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3033 2006-11-18  Jim Meyering  <jim@meyering.net>
3035         "ln --backup f f" produces a misleading diagnostic:
3036         ln: creating hard link `f' => `f': No such file or directory
3037         * src/ln.c (do_link): Give a better diagnostic in this unusual case.
3038         (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
3039         * tests/ln/Makefile.am (TESTS): Add hard-backup.
3040         * tests/ln/hard-backup: New test for the above.
3041         * NEWS: Mention this fix.
3043 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3045         * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
3046         directly too.
3047         * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
3048         * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
3049         * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
3050         Omit unnecessary parenthesization of args.
3051         * src/od.c (EQUAL_BLOCKS): Likewise.
3052         * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
3054 2006-11-16  Jim Meyering  <jim@meyering.net>
3056         * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
3057         automake we're skipping this test), and give a diagnostic to tell
3058         the user the same thing.  Reported by Mike Grayson.
3060 2006-11-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3062         * man/Makefile.am (dist_man_MANS): Replace all optional manpages
3063         with `$(MAN)', computed at configure time; also, list them ...
3064         (optional_mans): ... in this new variable.
3065         (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
3067 2006-11-16  Jim Meyering  <jim@meyering.net>
3069         Help valgrind see that there is no leak in dd.c.
3070         * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
3071         so we need not free them at all.  This is easier than freeing
3072         both buffers at each of the early "return"s.
3074         * src/csplit.c (load_buffer): Plug an inconsequential leak.
3076 2006-11-15  Jim Meyering  <jim@meyering.net>
3078         * .x-po-check: Exclude gl/ files.  Otherwise, po-check would
3079         complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
3081 2006-11-14  Jim Meyering  <jim@meyering.net>
3083         * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
3084         remove the now-unnecessary use of AC_LIBSOURCES.
3086         Adapt to new version of gnulib-tool.
3087         * gl/modules/root-dev-ino: New file.
3088         * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
3089         * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
3090         * m4/root-dev-ino.m4: Move this file ...
3091         * gl/m4/root-dev-ino.m4: ... to here.
3093         * bootstrap.conf (gnulib_modules): Add root-dev-ino.
3095 2006-11-13  Jim Meyering  <jim@meyering.net>
3097         * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
3098         From Paul Eggert.
3100         Plug another technically-unimportant leak in sort.
3101         * src/sort.c (main): Don't allocate memory for each new key here.
3102         (insertkey): Allocate memory for each key here, instead.
3103         (key_init): Rename from new_key.  Don't allocate.
3105         * src/sort.c (main): Plug a tiny memory leak.
3106         Move declaration of local "minus" down to be nearer point of use.
3108 2006-11-12  Jim Meyering  <jim@meyering.net>
3110         du would exit early, when encountering an inaccessible directory
3111         Reported by Mike Frysinger, in
3112         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
3113         * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
3114         * tests/chgrp/no-x: Remove the "fts_read failed: ..."
3115         diagnostic from the expected output when using native fdopendir.
3116         * tests/chmod/no-x: Likewise.
3117         * tests/du/no-x: Likewise.
3118         * NEWS: Mention this bug fix.
3119         * tests/du/Makefile.am (TESTS): Add inacc-dest.
3121         * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
3122         for xalloc.h itself.
3124         Avoid false-positive when testing via valgrind.
3125         * tests/mv/atomic: Grep strace output for a more specific pattern
3126         than just "unlink", since that got a false positive when testing
3127         under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
3128         * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
3130 2006-10-28  Jim Meyering  <jim@meyering.net>
3132         * Makefile.maint (patch-check): Make it easier to regenerate
3133         the src/c99-to-c89.diff file.  E.g., I do this:
3134         make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
3136         * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
3138 2006-10-26  Jim Meyering  <jim@meyering.net>
3140         * src/system.h (ftello): Add a compile-time check for the highly
3141         unlikely condition of off_t narrower than long int, rather than
3142         handling it at run time.  Based on a patch from Paul Eggert.
3144 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3146         * tests/chmod/c-option: When double-quoting part of a word, prefer
3147         to double-quote the whole word.  This is a bit easier to read (at
3148         least for me), and in some cases it avoids a shell bug with Tru64
3149         4.0 sh reported by Nelson H. F. Beebe.  For example, instead of
3150         "$abs_srcdir"/../setgid-check we now write
3151         "$abs_srcdir/../setgid-check".
3152         * tests/cp/cp-parents: Likewise.
3153         * tests/du/inaccessible-cwd: Likewise.
3154         * tests/du/long-from-unreadable: Likewise.
3155         * tests/install/basic-1: Likewise.
3156         * tests/install/trap: Likewise.
3157         * tests/misc/close-stdout: Likewise.
3158         * tests/mkdir/concurrent-1: Likewise.
3159         * tests/mkdir/p-1: Likewise.
3160         * tests/mkdir/p-3: Likewise.
3161         * tests/mkdir/parents: Likewise.
3162         * tests/mkdir/perm: Likewise.
3163         * tests/readlink/can-e: Likewise.
3164         * tests/readlink/can-f: Likewise.
3165         * tests/readlink/can-m: Likewise.
3166         * tests/rm/inaccessible: Likewise.
3167         * tests/rm/unread3: Likewise.
3168         * tests/touch/no-create-missing: Likewise.
3170         * lib/.cvsignore: Add uinttostr.c.
3172 2006-10-25  Jim Meyering  <jim@meyering.net>
3174         Portability to Tru64 V4.0.
3175         * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
3176         Define inline replacement function.
3177         This (along with a yesterday's fix for autoconf's
3178         _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
3179         now builds once more on Tru64 V4.0.  Reported by Nelson Beebe.
3181 2006-10-25  Bruno Haible  <bruno@clisp.org>
3183         * src/cat.c (infile): Add "const" to declaration.
3184         * src/csplit.c (prefix): Likewise.
3185         * src/printf.c (cfcc_msg): Likewise.
3186         * src/tail.c (valid_file_spec): Likewise.
3187         * src/cut.c (cut_file): Likewise, for a parameter.
3188         * src/expr.c (str_value): Likewise.
3189         * src/fold.c (fold_file): Likewise.
3190         * src/pr.c (init_header): Likewise.
3191         * src/dircolors.c (dc_parse_stream): Likewise, for a local.
3192         * src/tr.c (make_printable_str): Likewise.
3193         * src/nl.c (body_type, header_type, footer_type, current_type):
3194         (separator_str, build_type_arg, nl_file): Likewise, for many.
3195         * src/paste.c (main): Don't assign a read-only string to 'optarg'.
3196         * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
3198 2006-10-25  Jim Meyering  <jim@meyering.net>
3200         * tests/sample-test: Update copyright year list to include only
3201         the current year, since this is what I'll want in any new test.
3203 2006-10-24  Jim Meyering  <jim@meyering.net>
3205         * src/c99-to-c89.diff: Update to reflect new offsets.
3207         * NEWS: new feature: rm accepts new option: --one-file-system
3208         Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
3209         * src/remove.h (struct rm_options) [one_file_system]: New member.
3210         * src/rm.c (rm_option_init): Initialize it.
3211         (usage): Document the option.
3212         * src/mv.c (rm_option_init): Likewise.
3213         * src/remove.c (remove_dir): With --one-file-system and --recursive,
3214         for each directory command line argument, do not affect a file system
3215         different from that of the starting directory.  And give a diagnostic.
3216         * src/rm.c (ONE_FILE_SYSTEM): New enum.
3217         (main): Handle new option.
3218         * tests/rm/one-file-system: Test the above.
3219         * tests/rm/Makefile.am (TESTS): Add one-file-system.
3220         * tests/Makefile.am (check-root): Add the rm/one-file-system
3221         test to the list.
3222         (EXTRA_DIST): Add other-fs-tmpdir.
3224         * tests/mv/setup: Removed.  Renamed to...
3225         * tests/other-fs-tmpdir: ...this new file.
3226         * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
3227         * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
3228         * tests/mv/backup-is-src: Likewise.
3229         * tests/mv/hard-link-1: Likewise.
3230         * tests/mv/leak-fd: Likewise.
3231         * tests/mv/mv-special-1: Likewise.
3232         * tests/mv/part-fail: Likewise.
3233         * tests/mv/part-hardlink: Likewise.
3234         * tests/mv/part-rename: Likewise.
3235         * tests/mv/part-symlink: Likewise.
3236         * tests/mv/partition-perm: Likewise.
3237         * tests/mv/to-symlink: Likewise.
3238         * tests/mv/into-self-2: Likewise.
3240         Don't let a failure in one test stop "make -k" from running the others.
3241         * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
3242         (check-root): Depend on them, rather than executing the five
3243         commands in a single rule.  Reported by Greg Schafer.
3245 2006-10-23  Bob Proulx  <bob@proulx.com>  (tiny change)
3247         * Makefile.maint (alpha beta major): Use a better log message for
3248         the automatic commit of .prev-version.
3250 2006-10-23  Jim Meyering  <jim@meyering.net>
3252         * tests/misc/pwd-long: Undo last change, since it made Perl invoke
3253         pwd via a shell.  Instead, ensure that the absolute name of the
3254         pwd binary consists solely of reasonable characters.
3255         Whoops.  Don't exec the perl script.  Otherwise, the sh-trap-based
3256         clean-up code isn't run.
3258         * NEWS: Add a line for 6.5-cvs.
3259         * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
3261 2006-10-22  Jim Meyering  <jim@meyering.net>
3263         Version 6.4.
3265         * NEWS: Record the 6.4 release date.
3266         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3268         * Makefile.maint: Complete the adaptation to function with a working
3269         directory that is using git (rather than cvs) for version control.
3271 2006-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3273         * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
3274         * tests/cp/cp-parents: Likewise.
3275         * tests/mkdir/parents: Likewise.
3276         * tests/mkdir/perm: Likewise.
3278         * tests/sample-test: Quote variables containing absolute build
3279         tree paths.  In the cleanup trap, make sure `cd' succeeds before
3280         `chmod'ing and `rm'ing the temporary files.
3281         * tests/chgrp/basic: Likewise.
3282         * tests/chgrp/deref: Likewise.
3283         * tests/chgrp/no-x: Likewise.
3284         * tests/chgrp/posix-H: Likewise.
3285         * tests/chgrp/recurse: Likewise.
3286         * tests/chmod/c-option: Likewise.
3287         * tests/chmod/equal-x: Likewise.
3288         * tests/chmod/equals: Likewise.
3289         * tests/chmod/inaccessible: Likewise.
3290         * tests/chmod/no-x: Likewise.
3291         * tests/chmod/octal: Likewise.
3292         * tests/chmod/setgid: Likewise.
3293         * tests/chmod/umask-x: Likewise.
3294         * tests/chmod/usage: Likewise.
3295         * tests/chown/basic: Likewise.
3296         * tests/chown/deref: Likewise.
3297         * tests/chown/separator: Likewise.
3298         * tests/cp/acl: Likewise.
3299         * tests/cp/backup-1: Likewise.
3300         * tests/cp/backup-dir: Likewise.
3301         * tests/cp/backup-is-src: Likewise.
3302         * tests/cp/cp-HL: Likewise.
3303         * tests/cp/cp-deref: Likewise.
3304         * tests/cp/cp-i: Likewise.
3305         * tests/cp/cp-mv-backup: Likewise.
3306         * tests/cp/cp-parents: Likewise.
3307         * tests/cp/deref-slink: Likewise.
3308         * tests/cp/dir-rm-dest: Likewise.
3309         * tests/cp/dir-slash: Likewise.
3310         * tests/cp/dir-vs-file: Likewise.
3311         * tests/cp/fail-perm: Likewise.
3312         * tests/cp/into-self: Likewise.
3313         * tests/cp/link: Likewise.
3314         * tests/cp/link-no-deref: Likewise.
3315         * tests/cp/link-preserve: Likewise.
3316         * tests/cp/no-deref-link1: Likewise.
3317         * tests/cp/no-deref-link2: Likewise.
3318         * tests/cp/no-deref-link3: Likewise.
3319         * tests/cp/perm: Likewise.
3320         * tests/cp/preserve-2: Likewise.
3321         * tests/cp/r-vs-symlink: Likewise.
3322         * tests/cp/same-file: Likewise.
3323         * tests/cp/slink-2-slink: Likewise.
3324         * tests/cp/sparse: Likewise.
3325         * tests/cp/special-bits: Likewise.
3326         * tests/cp/src-base-dot: Likewise.
3327         * tests/cp/symlink-slash: Likewise.
3328         * tests/dd/not-rewound: Likewise.
3329         * tests/dd/skip-seek2: Likewise.
3330         * tests/dd/unblock-sync: Likewise.
3331         * tests/du/2g: Likewise.
3332         * tests/du/8gb: Likewise.
3333         * tests/du/basic: Likewise.
3334         * tests/du/deref: Likewise.
3335         * tests/du/deref-args: Likewise.
3336         * tests/du/exclude: Likewise.
3337         * tests/du/fd-leak: Likewise.
3338         * tests/du/hard-link: Likewise.
3339         * tests/du/inaccessible-cwd: Likewise.
3340         * tests/du/long-from-unreadable: Likewise.
3341         * tests/du/long-sloop: Likewise.
3342         * tests/du/no-deref: Likewise.
3343         * tests/du/no-x: Likewise.
3344         * tests/du/restore-wd: Likewise.
3345         * tests/du/slash: Likewise.
3346         * tests/du/slink: Likewise.
3347         * tests/du/trailing-slash: Likewise.
3348         * tests/du/two-args: Likewise.
3349         * tests/fmt/long-line: Likewise.
3350         * tests/install/basic-1: Likewise.
3351         * tests/install/create-leading: Likewise.
3352         * tests/install/d-slashdot: Likewise.
3353         * tests/install/trap: Likewise.
3354         * tests/ln/misc: Likewise.
3355         * tests/ln/target-1: Likewise.
3356         * tests/ls/color-dtype-dir: Likewise.
3357         * tests/ls/dangle: Likewise.
3358         * tests/ls/dired: Likewise.
3359         * tests/ls/file-type: Likewise.
3360         * tests/ls/follow-slink: Likewise.
3361         * tests/ls/infloop: Likewise.
3362         * tests/ls/inode: Likewise.
3363         * tests/ls/m-option: Likewise.
3364         * tests/ls/no-arg: Likewise.
3365         * tests/ls/recursive: Likewise.
3366         * tests/ls/rt-1: Likewise.
3367         * tests/ls/stat-dtype: Likewise.
3368         * tests/ls/stat-failed: Likewise.
3369         * tests/ls/stat-vs-dirent: Likewise.
3370         * tests/misc/cat-proc: Likewise.
3371         * tests/misc/close-stdout: Likewise.
3372         * tests/misc/csplit: Likewise.
3373         * tests/misc/date-sec: Likewise.
3374         * tests/misc/false-status: Likewise.
3375         * tests/misc/head-c: Likewise.
3376         * tests/misc/head-pos: Likewise.
3377         * tests/misc/mknod: Likewise.
3378         * tests/misc/nl: Likewise.
3379         * tests/misc/nohup: Likewise.
3380         * tests/misc/pathchk1: Likewise.
3381         * tests/misc/printf: Likewise.
3382         * tests/misc/printf-hex: Likewise.
3383         * tests/misc/pwd-long: Likewise.
3384         * tests/misc/shuf: Likewise.
3385         * tests/misc/sort-rand: Likewise.
3386         * tests/misc/split-a: Likewise.
3387         * tests/misc/split-fail: Likewise.
3388         * tests/misc/split-l: Likewise.
3389         * tests/misc/stat-fmt: Likewise.
3390         * tests/misc/tac-continue: Likewise.
3391         * tests/misc/wc-files0: Likewise.
3392         * tests/mkdir/concurrent-1: Likewise.
3393         * tests/mkdir/p-1: Likewise.
3394         * tests/mkdir/p-2: Likewise.
3395         * tests/mkdir/p-3: Likewise.
3396         * tests/mkdir/p-slashdot: Likewise.
3397         * tests/mkdir/p-thru-slink: Likewise.
3398         * tests/mkdir/p-v: Likewise.
3399         * tests/mkdir/parents: Likewise.
3400         * tests/mkdir/perm: Likewise.
3401         * tests/mkdir/t-slash: Likewise.
3402         * tests/mv/acl: Likewise.
3403         * tests/mv/atomic: Likewise.
3404         * tests/mv/backup-dir: Likewise.
3405         * tests/mv/childproof: Likewise.
3406         * tests/mv/diag: Likewise.
3407         * tests/mv/dir-file: Likewise.
3408         * tests/mv/dir2dir: Likewise.
3409         * tests/mv/dup-source: Likewise.
3410         * tests/mv/hard-2: Likewise.
3411         * tests/mv/hard-3: Likewise.
3412         * tests/mv/hard-4: Likewise.
3413         * tests/mv/hard-link-1: Likewise.
3414         * tests/mv/hard-verbose: Likewise.
3415         * tests/mv/i-2: Likewise.
3416         * tests/mv/i-3: Likewise.
3417         * tests/mv/i-4: Likewise.
3418         * tests/mv/i-5: Likewise.
3419         * tests/mv/i-link-no: Likewise.
3420         * tests/mv/into-self-4: Likewise.
3421         * tests/mv/leak-fd: Likewise.
3422         * tests/mv/mv-special-1: Likewise.
3423         * tests/mv/no-target-dir: Likewise.
3424         * tests/mv/part-fail: Likewise.
3425         * tests/mv/part-hardlink: Likewise.
3426         * tests/mv/part-rename: Likewise.
3427         * tests/mv/part-symlink: Likewise.
3428         * tests/mv/partition-perm: Likewise.
3429         * tests/mv/perm-1: Likewise.
3430         * tests/mv/reply-no: Likewise.
3431         * tests/mv/trailing-slash: Likewise.
3432         * tests/mv/update: Likewise.
3433         * tests/od/od-N: Likewise.
3434         * tests/od/x8: Likewise.
3435         * tests/readlink/can-e: Likewise.
3436         * tests/readlink/can-f: Likewise.
3437         * tests/readlink/can-m: Likewise.
3438         * tests/readlink/rl-1: Likewise.
3439         * tests/rm/cycle: Likewise.
3440         * tests/rm/dangling-symlink: Likewise.
3441         * tests/rm/deep-1: Likewise.
3442         * tests/rm/dir-no-w: Likewise.
3443         * tests/rm/dir-nonrecur: Likewise.
3444         * tests/rm/dot-rel: Likewise.
3445         * tests/rm/empty-inacc: Likewise.
3446         * tests/rm/f-1: Likewise.
3447         * tests/rm/fail-2eperm: Likewise.
3448         * tests/rm/hash: Likewise.
3449         * tests/rm/i-1: Likewise.
3450         * tests/rm/i-no-r: Likewise.
3451         * tests/rm/ignorable: Likewise.
3452         * tests/rm/inaccessible: Likewise.
3453         * tests/rm/interactive-always: Likewise.
3454         * tests/rm/interactive-once: Likewise.
3455         * tests/rm/ir-1: Likewise.
3456         * tests/rm/isatty: Likewise.
3457         * tests/rm/no-give-up: Likewise.
3458         * tests/rm/r-1: Likewise.
3459         * tests/rm/r-2: Likewise.
3460         * tests/rm/r-3: Likewise.
3461         * tests/rm/r-4: Likewise.
3462         * tests/rm/readdir-bug: Likewise.
3463         * tests/rm/rm1: Likewise.
3464         * tests/rm/rm2: Likewise.
3465         * tests/rm/rm3: Likewise.
3466         * tests/rm/rm4: Likewise.
3467         * tests/rm/rm5: Likewise.
3468         * tests/rm/sunos-1: Likewise.
3469         * tests/rm/unread2: Likewise.
3470         * tests/rm/unread3: Likewise.
3471         * tests/rmdir/fail-perm: Likewise.
3472         * tests/rmdir/t-slash: Likewise.
3473         * tests/shred/exact: Likewise.
3474         * tests/shred/remove: Likewise.
3475         * tests/sum/sysv: Likewise.
3476         * tests/tail-2/append-only: Likewise.
3477         * tests/tail-2/assert: Likewise.
3478         * tests/tail-2/assert-2: Likewise.
3479         * tests/tail-2/big-4gb: Likewise.
3480         * tests/tail-2/fflush: Likewise.
3481         * tests/tail-2/infloop-1: Likewise.
3482         * tests/tail-2/proc-ksyms: Likewise.
3483         * tests/tail-2/start-middle: Likewise.
3484         * tests/tail-2/tail-n0f: Likewise.
3485         * tests/tee/basic: Likewise.
3486         * tests/tee/dash: Likewise.
3487         * tests/touch/fail-diag: Likewise.
3488         * tests/touch/no-create-missing: Likewise.
3489         * tests/touch/not-owner: Likewise.
3490         * tests/touch/obsolescent: Likewise.
3491         * tests/touch/read-only: Likewise.
3492         * tests/touch/relative: Likewise.
3494 2006-10-21  Jim Meyering  <jim@meyering.net>
3496         * NEWS: (cp --backup fix): Fix a typo.
3498         * .gitignore: Remove some references to files in subdirectories.
3499         * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
3500         * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
3502         * src/copy.c (copy_internal): Add a comment saying why we prefer
3503         mknod over mkfifo.
3505         Enable an fts optimization (call lstat only for directories,
3506         on some file system types) also with the --preserve-root option
3507         of chown or chgrp.
3508         * src/chown-core.c (change_file_owner): Compare fts_statp-based
3509         dev/ino against root dev/ino only for directories.
3510         (chown_files): Don't let the root_dev_ino setting influence whether
3511         we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
3513 2006-10-20  Jim Meyering  <jim@meyering.net>
3515         * src/od.c (usage): Change description of default to use "-w16",
3516         not the now-invalid "-w 16" syntax.  From Dan Jacobson.
3518 2006-10-19  Jim Meyering  <jim@meyering.net>
3520         * bootstrap: Add names to each .gitignore file (if it exists)
3521         as well as to .cvsignore.
3523         * Makefile.maint (po-check): This rule didn't detect the new use
3524         of "gettext" (as opposed to the use of "_" everywhere else) in
3525         lib/xstrtol.h.  Adjust the grep regexp so that now it does.
3527 2006-10-18  Paul Eggert  <eggert@cs.ucla.edu>
3529         * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
3530         when opening dst_name.
3531         (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
3532         (SYSCALL) to test for failure in a system call.
3534         * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
3535         a fifo.  This preserves the special mode bits on Solaris 10, which
3536         is compatible with what Solaris 10 cp -R does.
3538         * src/copy.c (copy_internal): Remove redundant and confusing local
3539         variable src_type.
3541         * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
3542         7777.  This matches historical 'cp' behavior and avoids some
3543         (though not all) implementation-defined behavior of mkdir.
3544         * src/cp.c (make_dir_parents_private): Likewise.
3545         * src/copy.c (copy_internal): Don't pass 'open' a mode greater
3546         than 777.  This is required by POSIX.  It doesn't make any difference
3547         in actual behavior on any host that I know of.
3549 2006-10-17  Jim Meyering  <jim@meyering.net>
3551         * src/dd.c (usage): Use two spaces (not one) to separate the
3552         "fdatasync" option string from its description, so help2man formats
3553         the derived man page properly.  Reported by Samuel Thibault
3554         in <http://bugs.debian.org/393649>.
3556 2006-10-16  Jim Meyering  <jim@meyering.net>
3558         * .x-sc_trailing_blank: Remove names of files that are no longer
3559         version-controlled.
3561 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3563         * src/groups.sh (version): Reword message to match the other programs.
3564         Problem reported by Eric Blake.
3566 2006-10-14  Jim Meyering  <jim@meyering.net>
3568         * Makefile.maint (headers_with_interesting_macro_defs): Define.
3569         (.re-defmac, sc_always_defined_macros): New rules.
3571         * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
3572         Instead, include "exit.h".  This hereby retires the work-around for
3573         "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
3575         * src/cksum.c (uint_fast32_t): Don't define.
3576         Instead, include <stdint.h>.
3578         * src/pinky.c (S_IWGRP): Don't define.
3579         It's already defined by "stat-macros.h" (included via system.h).
3581         * Makefile.cfg: Remove cruft that's now handled via bootstrap.
3582         * Makefile.maint: Likewise, remove these targets/rules/variables:
3583         (local_updates, update, cvs-update, wget_files, get-targets): Remove.
3584         (cvs_files, wget-update, automake_repo): Likewise.
3585         Move the comment about cvsu to build-aux/vc-list-files,
3586         where cvsu is actually used.
3588         * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
3590         Work also when the working directory (with e.g. coreutils sources)
3591         is version controlled with git, rather than CVS.
3592         * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3593         rather than CVS.
3594         In messages and comments, say e.g., "checked-out sources",
3595         rather than "CVS sources".
3596         (version_controlled_file): New function.  Work for git as well as
3597         for CVS.  Don't use grep's -q option.
3598         (slurp): Call it here, in place of CVS-specific code.
3600         * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
3601         to dir1/dir2~.
3602         * src/copy.c (copy_internal): Although we do create a backup of each
3603         destination directory when in move mode, don't do that when copying.
3604         Reported by Peter Breitenlohner, in
3605         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
3606         * tests/cp/backup-dir: New file.  Test for the above.
3607         * tests/cp/Makefile.am (TESTS): Add backup-dir.
3609 2006-10-13  Jim Meyering  <jim@meyering.net>
3611         More chown/chgrp dereferencing-related fixes.
3612         * src/chown-core.c (change_file_owner): Don't use fts_statp if
3613         we're dereferencing symlinks.
3614         Reverse conjuncts, so that we use dereference file_stats
3615         (aka ent->fts_statp) only *after* we've confirmed that
3616         chopt->affect_symlink_referent is true.  Otherwise, we might
3617         use ent->fts_statp uninitialized.
3618         Don't turn on FTS_NOSTAT when dereferencing symlinks.
3619         * tests/chown/deref: Update the expected diagnostic, now that
3620         this test case (trying to use "chown --dereference ..." on a
3621         dangling symlink) takes a different code path.
3623 2006-10-13  Paul Eggert  <eggert@cs.ucla.edu>
3625         Sync from Bison, as follows:
3627         2006-10-01  Paul Eggert  <eggert@cs.ucla.edu>
3629         Fix problems with translating English-language diagnostics.
3630         * bootstrap: Fix bug introduced in recent bootstrap changes, with
3631         respect to bison-runtime pot generation.  The YY_ stuff
3632         wasn't being captured.
3634 2006-10-13  Jim Meyering  <jim@meyering.net>
3636         * src/chown-core.c (change_file_owner): Use fstatat, not stat,
3637         now that we're using fts_open with FTS_CWDFD.
3638         * tests/chgrp/posix-H: Add --preserve-root to an invocation of
3639         chgrp, to exercise the above fix.
3640         * NEWS: Mention the above.
3642         * src/du-tests: Clean up a little, though it's still not portable.
3644         * .vg-suppressions: Add 3 more for debian unstable.
3646         * tests/ls/Test.pm: Remove long-unused file.
3647         * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
3648         Suggestions from Bruno Haible.
3650 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3652         * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
3653         (MAINTAINERCLEANFILES): Add .kludge-stamp.
3654         * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
3655         instead of $(man_MANS).
3657 2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3659         * configure.ac: Avoid compiler warnings about default return
3660         type in function definitions and unused variables in tests.
3661         * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
3662         if this is #defined.
3664 2006-10-12  Jim Meyering  <jim@meyering.net>
3666         * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
3667         Call gl_INIT directly, rather than through the above.
3669 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3671         * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3672         variable was sometimes used without being initialized.  This
3673         messed up the installation of the INSTALL file in some cases.
3675 2006-10-11  Jim Meyering  <jim@meyering.net>
3677         * src/ls.c (usage): Correct description of -s, --size.
3678         It works even without -l.  Suggestion from Karl Berry.
3680 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3682         * src/ls.c (quote_name): Use initializer rather than memset to
3683         initialize an object to zero.  This is easier to read and is less
3684         likely to introduce a runtime error due to a mixup.  It causes
3685         gcc -W to issue a warning, but you can work around this by
3686         appending -Wno-missing-field-initializers.
3687         * src/pathchk.c (portable_chars_only): Likewise.
3688         * src/shred.c (main): Likewise.
3689         * src/stty.c (main): Likewise.
3690         * src/tr.c (card_of_complement): Likewise.
3691         * src/wc.c (wc): Likewise.
3693 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3695         * src/sort.c (usage): Mention again that sort fields are origin 1.
3697         * NEWS: Fix typo: iso-8602 -> iso-8601.  Problem reported by
3698         Bob Proulx.
3700         * bootstrap (usage, main program, symlink_to_gnulib): Add option
3701         --copy.  Inspired by a suggestion from Bruno Haible.
3703 2006-10-09  Jim Meyering  <jim@meyering.net>
3705         Avoid a compiler warning.
3706         * src/pathchk.c (portable_chars_only): Initialize variable of type
3707         mbstate_t via memset, rather than via '{0}'.  Patch from Bruno Haible.
3709 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3711         Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
3712         wrong file name in some cases.  Lars Wendler reported a bug in
3713         my original fix.
3714         * src/install.c (make_ancestor): New arg COMPONENT.
3715         * src/mkdir.c (make_ancestor): Likewise.
3716         * tests/install/basic-1: Check for install -Dv bug.
3717         * tests/mkdir/Makefile.am (TESTS): Add p-v.
3718         * tests/mkdir/p-v: New file, to test this bug.
3720 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3722         * src/chgrp.c: Don't include lchown.h; no longer needed.
3723         * src/chown.c: Likewise.
3725         * tests/ls/stat-dtype: Use a dynamic test to decide whether the
3726         current file system has useful d_type info.
3728         * src/dd.c (flags): noatime and nofollow now depend on
3729         HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
3730         (usage): Output info about noatime and nofollow only if
3731         they are known to work.
3732         * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
3733         than O_NOFOLLOW, when testing whether it's possible to avoid a
3734         race condition reliably.
3736 2006-10-05  Jim Meyering  <jim@meyering.net>
3738         * src/c99-to-c89.diff: Update to reflect new offsets.
3740         * tests/install/basic-1: Skip the latter part of this test if the
3741         just-built dd binary is not readable.  Otherwise, this test would fail
3742         when binaries were created as root.  Reported by Bauke Jan Douma in
3743         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
3745 2006-10-03  Paul Eggert  <eggert@cs.ucla.edu>
3747         * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
3748         MiB, since XFS hosts can legitimately have large values of
3749         st_blksize.  Problem reported by Tony Ernst in
3750         <http://savannah.gnu.org/bugs/?17903>.
3752 2006-10-04  Jim Meyering  <jim@meyering.net>
3754         * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
3755         Paul Eggert pointed out that the specified file may exist,
3756         in spite of such an errno value.
3757         * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
3758         * tests/rm/ignore-name-too-long: Remove file.
3759         * NEWS: Update here, too.
3761 2006-10-03  Jim Meyering  <jim@meyering.net>
3763         * tests/rm/fail-eperm: Report failure also if rm is terminated by
3764         a signal.
3766         * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
3767         and one in shred.c -- that were added before coreutils-6.3.
3768         Reported by Michael Deutschmann.
3770         * src/c99-to-c89.diff: Update to reflect new offsets.
3772         * src/remove.c (remove_entry): With -f, exit successfully in spite
3773         of a missing file under some very unusual conditions (with errno
3774         being any of ENOENT, ENOTDIR, ENAMETOOLONG).
3776         With --force (-f), rm no longer fails for ENOTDIR.
3777         * src/remove.c (ignorable_missing): New function.
3778         Use it everywhere, rather than open-coding the test.
3779         Andreas Schwab reported the ENOTDIR problem.
3780         (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
3782         * NEWS: Mention the bug fix.
3783         * tests/rm/ignorable: New file.  Test for the ENOTDIR case.
3784         * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
3785         * tests/rm/Makefile.am (TESTS): Add the new file names.
3787         * bootstrap: Undo last change to this file, since now gnulib-tool
3788         sticks with the automake default in generating dependencies.
3790         * NEWS: Add a line for 6.4-cvs.
3791         * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
3793 2006-09-30  Jim Meyering  <jim@meyering.net>
3795         Version 6.3.
3796         * NEWS: Record the 6.3 release date.
3797         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3799         * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
3801         * src/c99-to-c89.diff: Update offsets.
3803 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3805         * tests/rm/readdir-bug: Don't use $(...) in a shell script,
3806         as it doesn't work with Solaris /bin/sh.
3808 2006-09-29  Jim Meyering  <jim@meyering.net>
3810         * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
3811         the pinky segfault.
3813         * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
3814         use .1 as the increment.  Actual output varies too much.
3815         [eq-wid-3]: New, commented out test.
3817         * src/shuf.c (read_input): Fix an off-by-one error that
3818         would cause an infloop for piped input of 8KB or more.
3819         * NEWS: Mention the fix.
3820         * tests/misc/shuf: Test for the above fix.
3822         Since any system may be affected by the Darwin readdir bug,
3823         perform the extra rewinddir unconditionally.  The performance
3824         impact of rewinding a directory is negligible.
3825         * src/remove.c (NEED_REWIND): Define to use
3826         CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
3828         * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
3829         increment translates to a slightly larger value.
3830         This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
3831         The final expected value wasn't being printed.
3833         Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
3834         and NFS, whereby rm would not remove all files in a directory.
3835         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
3836         (NEED_REWIND): New macro, so that we incur the cost of the work-around
3837         rewinddir only on afflicted systems.
3838         * NEWS: Clarify and correct.
3839         * tests/rm/readdir-bug: New file.  Test for the above fix.
3840         * tests/rm/Makefile.am (TESTS): Add it.
3841         Prompted by testing and analysis from Bruno Haible:
3842         http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
3844 2006-09-28  Paul Eggert  <eggert@cs.ucla.edu>
3846         * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
3847         suggested for Debian stable, which uses Perl 5.8.4.
3849 2006-09-28  Jim Meyering  <jim@meyering.net>
3851         Automatically generated dependencies are important even
3852         when all of the sources in a directory come from gnulib.
3853         * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3854         option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3856         * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
3857         Ensure that IFS is set properly and unset PATH.
3858         Sanitize inputs.
3859         Work properly even when the name of the selected file starts with "-".
3860         Invoke rm via "../../src/rm", and adjust expected output.
3861         Prompted by a patch from Tim Waugh.
3863         * README-cvs: Add Bison to the list of required packages.
3865 2006-09-26  Jim Meyering  <jim@meyering.net>
3867         * src/c99-to-c89.diff: Update offsets.
3869         * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
3870         it from removing a directory containing 188 or more entries.
3871         * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
3872         20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
3873         Reported by Matthew Woehlke.
3875 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3877         * NEWS: "groups user" no longer outputs "user :"; you need at least
3878         two users.  "groups" now processes options like --help more compatibly.
3879         * src/groups.sh: Implement the option-processing change.
3880         Handle user and group names with special characters more robustly.
3881         Report write errors instead of exiting silently with status 1.
3883 2006-09-26  Jim Meyering  <jim@meyering.net>
3885         * README: Warn not to run autoreconf manually.  Use bootstrap instead.
3887         * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
3888         Rewrite to avoid using temporary, $status.
3890         * NEWS: Mention the bug fix.
3891         * src/groups.sh: Don't hide a write failure.
3892         Reported by Iain Calder <ic56@rogers.com>.
3894 2006-09-25  Jim Meyering  <jim@meyering.net>
3896         * src/chown.c (usage): Clarify --dereference description.
3897         * src/chgrp.c (usage): Likewise.  Suggestion from Jamie McClelland.
3899 2006-09-24  Jim Meyering  <jim@meyering.net>
3901         * NEWS: Mention these fixes.
3902         * src/copy.c (copy_reg): With --verbose (-v), print
3903         "removed `file_name'" just after unlinking a file.
3904         (copy_internal): Likewise, in three more places.
3905         Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
3906         * tests/mv/hard-verbose: New file.  Test for the above fix.
3907         * tests/mv/Makefile.am (TESTS): Add hard-verbose.
3909         * tests/help-version (sync_args): Don't call sync, since it spins up
3910         disks that I've deliberately caused to spin down (but not unmounted).
3912         * NEWS: Mention the improvement to sort.
3914         * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
3915         as well as existing.
3917         * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
3918         since that predated addition of d_type support.
3920 2006-09-23  Jim Meyering  <jim@meyering.net>
3922         * gl/modules/getloadavg.diff: New file.  Work around the way the latest
3923         version of the getloadavg module interacts with our bootstrap script.
3924         * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3925         * Makefile.am (EXTRA_DIST): Sort file names.
3926         Add bootstrap and gl/modules/getloadavg.diff
3928 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
3930         * bootstrap: Add support for --force.
3931         (usage): New function.  Describe usage less tersely.
3932         (CVS_only_file): New var.
3934         * NEWS: Document fix for cp -i and mv -i.
3935         * src/copy.c (copy_internal): With -i, prompt even if the source
3936         is a directory and the destination is not.  This is required by
3937         POSIX and gives the user a chance to bail out before failing.
3938         * tests/cp/Makefile.am (TESTS): Add cp-i.
3939         * tests/cp/cp-i: New file.
3940         * tests/mv/Makefile.am (TESTS): Add i-5.
3941         * tests/mv/i-5: New file.
3943 2006-09-20  Jim Meyering  <jim@meyering.net>
3945         * NEWS: Mention the chmod bug fix.
3947         * tests/chmod/inaccessible: New test, specifically for this bug.
3948         Based on a test case from Paul Eggert.
3949         * tests/chmod/Makefile.am (TESTS): Add inaccessible.
3951         Fix the 2006-09-18 bug differently.
3952         * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
3953         tell fts_read to stat the file again, in case it has become
3954         accessible since the initial fts_open call.
3955         * src/chown-core.c (change_file_owner): Likewise.
3957         * src/chmod.c: Revert last change.  There is a better way.
3958         * src/chown-core.c: Likewise.
3960 2006-09-19  Paul Eggert  <eggert@cs.ucla.edu>
3962         * src/ln.c (target_directory_operand): Rewrite to avoid porting
3963         problem on Tandem reported by Matthew Woehlke in
3964         <https://savannah.gnu.org/bugs/?17172>.
3966 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3968         Fix bug where chmod, chown, and chgrp did not process operands
3969         left-to-right in some cases.
3970         * src/chmod.c (wd_errno): New var.
3971         (chmod_file): New function, with most of the contents of the
3972         old prcess_file function.
3973         (process_files): Use it.  This gives file names to fts one
3974         at a time, so that they are processed left-to-right as POSIX
3975         requires.
3976         * src/chown-core.c (wd_errno, chown_files): Likewise.
3977         (chown_file): New function.
3978         * tests/install/basic-1: Redo test so as to not workaround
3979         the chmod bug, thereby testing for it.
3981         * src/shuf.c (main): Quote the entire range when reporting an
3982         invalid one, rather than just the part that contained the error.
3984         * tests/stty/row-col-1: Rewrite to avoid temporary file that is
3985         sometimes left behind if the test is skipped or interrupted.
3987         * bootstrap (symlink_to_gnulib): New function.
3988         (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3989         to copies-of-gnulib.
3990         (cp_mark_as_generated, slurp, gnulib_files):
3991         Avoid making a copy if it's the same as the old version.
3992         (gnulib_files): Add support for this variable (used by Bison).
3994         * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
3995         indicating flaw in kernel.  Reword to say that the flaw isn't
3996         serious for coreutils, since the flaw does affect ls -i.
3998         * tests/chgrp/basic: Fix bug in test case exposed by building on
3999         Solaris 8 in a setgid directory.  The test case incorrectly
4000         assumed that 'symlink' would be in group $g1.
4002 2006-09-18  Jim Meyering  <jim@meyering.net>
4004         * NEWS: Add a line for 6.3-cvs.
4005         * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
4007         Version 6.2.
4008         * NEWS: Record the 6.2 release date.
4009         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4011 2006-09-17  Jim Meyering  <jim@meyering.net>
4013         * tests/chgrp/basic: On an OpenBSD system, rather than failing
4014         due to a known problem, merely warn about it.
4015         Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
4016         Instead, use stat to test file system for desired results, directly.
4017         * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
4019         * tests/envvar-check: Add more variable names to the list of those
4020         that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
4021         QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
4023 2006-09-16  Paul Eggert  <eggert@cs.ucla.edu>
4025         * NEWS: Document that mkdir -p and install -d now fork on occasion.
4026         * bootstrap.conf (gnulib_modules): Add savewd.
4027         * src/install.c: Include savewd.h.
4028         (process_dir): New function.
4029         (main, install_file_in_file_parents): Use it, along with the new
4030         savewd module, to avoid some race conditions.
4031         * src/mkdir.c: Include savewd.h.
4032         (struct mkdir_options): New members make_ancestor_function, mode,
4033         mode_bits.
4034         (make_ancestor): Return 1 if the resulting directory is not readable.
4035         (process_dir): New function.
4036         (main): Use it, along with new savewd module, to avoid some
4037         race conditions.  Fill in new slots of struct mkdir_options, so
4038         that callees get the values.
4039         * tests/install/basic-1: Test for coreutils 5.97 bug that was
4040         fixed in coreutils 6.0, and which should still be fixed with
4041         this change.
4042         * tests/mkdir/p-3: Likewise.
4044 2006-09-15  Jim Meyering  <jim@meyering.net>
4046         * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
4047         The 2006-09-08 changes made it so "mv dir new-name/" would
4048         fail on NetBSD 1.6.  This makes it work once again.
4050 2006-09-14  Jim Meyering  <jim@meyering.net>
4052         * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
4053         Instead, since it's a little fragile, assert the condition.
4054         (target_directory_operand): Update comment to reflect latest change.
4056 2006-09-12  Paul Eggert  <eggert@cs.ucla.edu>
4058         * src/who.c (print_user): Rewrite to avoid warning from
4059         GCC 4.1.1 with -Wall.
4061 2006-09-12  Jim Meyering  <jim@meyering.net>
4063         * tests/mv/atomic: Check for specific strace output, rather than
4064         simply nonempty.  RHEL AS 4 would fail this test due to strace
4065         generating "[ Process PID=14434 runs in 32 bit mode. ]".
4066         Reported by Nelson Beebe.
4068 2006-09-11  Jim Meyering  <jim@meyering.net>
4070         * src/remove.c (remove_dir): Move new cache_stat_init call onto
4071         it's own line.
4072         (rm_1): Move declaration of "st" and new cache_stat_init call
4073         "down" to nearer where they're used.
4074         * src/c99-to-c89.diff: Add another set of curly braces.
4076 2006-09-10  Paul Eggert  <eggert@cs.ucla.edu>
4078         * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
4079         substr's last operand is very large.  Performance problem reported
4080         by Sebastian Kreft.
4082 2006-09-09  Jim Meyering  <jim@meyering.net>
4084         * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
4085         are no .m4 files.
4086         (sc_require_config_h): Skip this test if there are no version-
4087         controlled .c files.
4088         (sc_prohibit_assert_without_use): Likewise.
4090 2006-09-08  Jim Meyering  <jim@meyering.net>
4092         * bootstrap: Export CVS_RSH separate from its assignment, to work
4093         even with Solaris 10's /bin/sh.  Suggestion from Mark D. Baushke.
4095 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4097         * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
4098         no file operand is given, and standard input is any FIFO.
4099         This is in response to Open Group XCU ERN 114.
4100         * src/tail.c (main): Likewise.
4102 2006-09-08  Jim Meyering  <jim@meyering.net>
4104         mv and "cp -r" no longer fail when invoked with two arguments
4105         where the first one names a directory and the second name ends in
4106         a slash and doesn't exist.  E.g., "mv dir B/", for nonexistent B,
4107         now succeeds, once more. This reverts part of the 2004-06-27
4108         change for 5.3.0.
4109         * NEWS: Say the above.
4110         * src/mv.c (target_directory_operand): Don't require (here)
4111         that the target operand "look like" a directory.  This change
4112         pushes the test down to the rename syscall level, where a
4113         "mv dir existing-non-dir/" will mistakenly succeed on older systems
4114         that ignore trailing slashes in the rename destination argument.
4115         * src/cp.c (target_directory_operand): Likewise, but for cp.
4116         * tests/mv/trailing-slash: Exercise the above fixes.
4117         * tests/cp/trailing-slash: New file.
4118         * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
4120         * bootstrap: Use the previously unused variable, $src,
4121         to avoid repeating "$GNULIB_SRCDIR/$file".
4123         * bootstrap (cp_mark_as_generated): Don't use "local", to
4124         accommodate ancient "/bin/sh".  Suggested by Ralf Wildenhues.
4125         Rename now-global "$src" and "$dst" to have cp_ prefix.
4126         Safer, and avoids confusion.
4128         * bootstrap (cp_mark_as_generated): New function.
4129         (slurp): Use it to prepend editor hints and a warning that
4130         the file we're copying is generated.
4131         Suggestion from Bruce Korb.
4132         (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
4133         Fix last-minute typo.
4135 2006-09-07  Jim Meyering  <jim@meyering.net>
4137         * bootstrap: Revert last change.  There are less disruptive ways
4138         to mark these generated files as read-only.
4140         * src/c99-to-c89.diff: Update to have proper offsets.
4142 2006-09-06  Jim Meyering  <jim@meyering.net>
4144         Ensure that some gnulib-tool-generated files are read-only.
4145         * bootstrap (slurp): Put the body of this function in a sub-shell,
4146         with "umask a-w" so that all new files are read-only.  Remove each
4147         file before we write to it, in case it's read-only.
4148         Make po/Makevars and runtime-po/Makevars read-only, too.
4150 2006-09-05  Jim Meyering  <jim@meyering.net>
4152         * tests/cp/acl: Skip this test when cp lacks ACL support.
4153         * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
4155         * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
4156         context from change of 2006-09-02.
4158 2006-09-04  Jim Meyering  <jim@meyering.net>
4160         * README-cvs: Fix typo in update command.
4162 2006-09-03  Jim Meyering  <jim@meyering.net>
4164         * NEWS: Tweak the wording in the new change description so that
4165         no one can think this change causes e.g., `rm -fr foo../' to fail.
4167         * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
4168         Use $CONFIG_HEADER, rather than hard-coding it.
4169         * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
4171 2006-09-02  Paul Eggert  <eggert@cs.ucla.edu>
4173         * NEWS: rm now rejects attempts to remove /, ./, and ../.
4174         * src/basename.c: Don't include dirname.h, since system.h does it now.
4175         * src/chmod.c: Likewise.
4176         * src/copy.c: Likewise.
4177         * src/cp.c: Likewise.
4178         * src/df.c: Likewise.
4179         * src/dircolors.c: Likewise.
4180         * src/dirname.c: Likewise.
4181         * src/du.c: Likewise.
4182         * src/install.c: Likewise.
4183         * src/ln.c: Likewise.
4184         * src/ls.c: Likewise.
4185         * src/mkdir.c: Likewise.
4186         * src/mv.c: Likewise.
4187         * src/remove.c: Likewise.
4188         * src/rm.c: Likewise.
4189         * src/rmdir.c: Likewise.
4190         * src/shred.c: Likewise.
4191         * src/split.c: Likewise.
4192         * src/su.c: Likewise.
4193         * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
4194         now.
4195         (dot_or_dotdot): Succeed even if "." or ".." is followed by a
4196         slash.
4197         * src/rm.c (usage, main): --preserve-root is now the default.
4198         * src/remove.h: Fix comment.
4199         * src/remove.c (cache_fstatat, cache_stat_init): New functions.
4200         (cache_statted, cache_stat_ok): New functions.
4201         (write_protected_non_symlink): Remove struct stat ** buf_p arg,
4202         which is no longer needed with the new functions.  All callers
4203         changed.
4204         (prompt, is_dir_lstat, remove_entry, remove_dir):
4205         New struct stat * arg.  All callers changed.
4206         (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
4207         (remove_cwd_entries, remove_dir, rm_1):
4208         Use and maintain the file status cache.
4209         (prompt, remove_entry): Omit the first "directory" in the diagnostic
4210         "Cannot remove directory `foo': is a directory".  This causes "rm"
4211         to pass a test case that it would otherwise fail now that it
4212         "knows" more about its argument.  I think the diagnostic is better
4213         without the first "directory" anyway.
4214         (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
4215         (rm_1): Reject attempts to remove /, ./, or ../.
4216         * tests/rm/Makefile.am (TESTS): Add r-4.
4217         * tests/rm/r-4: New file.
4219 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4221         * src/stat.c: Include <stddef.h>
4222         (alignof): New macro.
4223         (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
4224         Remove.
4225         (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
4226         (FSID_VAL): Remove.
4227         (print_statfs): If f_fsid isn't an integer, grab its words one
4228         at a time in little-endian order.  This is a bit easier to configure
4229         and should avoid a compilation failure on MacOS reported by Bruno
4230         Haible.
4232 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4234         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
4235         work around a Mac OS X porting problem reported by Bruno Haible in
4236         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
4237         (print_statfs): Use them.
4239         * bootstrap.conf (gnulib_modules): Add isapipe.
4240         * src/tail.c: Include isapipe.h.
4241         (IS_PIPE_LIKE_FILE_TYPE): Remove.
4242         (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
4243         tailable, since this seems to be portable.
4244         (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
4245         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
4247         * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
4248         it for us.
4250 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4252         * src/copy.c (copy_internal): Don't test whether macros like
4253         S_ISLNK are defined, since they're always defined now.
4254         * src/cp.c (main): Likewise.
4255         * src/ln.c (main): Likewise.
4256         * src/ls.c (get_link_name, make_link_name): Likewise.
4257         * src/mknod.c (main): Likewise.
4258         * src/mkfifo.c (usage): Likewise.
4259         * src/who.c (S_IWGRP): Likewise.
4261         Adjust to recent gnulib changes for the gnulib module.
4262         * bootstrap.conf (gnulib_modules): Add fcntl.
4263         * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove.  Other code
4264         is already assuming these macros are defined.
4265         (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
4266         (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
4267         Remove; the fcntl module now handles these.
4269         Adjust to recent gnulib changes for the inttypes module.
4270         * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
4271         (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
4273         * src/system.h: Don't bother to include <stdint.h>, since we can
4274         now assume inttypes.h does the equivalent of including stdint.h.
4276 2006-08-27  Jim Meyering  <jim@meyering.net>
4278         * src/copy.c (copy_internal): Don't make a backup if the last
4279         component of the source name is "." or "..".
4280         Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
4281         * NEWS: Mention this.
4282         * tests/cp/src-base-dot: New file.  Test for the above fix.
4283         * tests/cp/Makefile.am (TESTS): Add src-base-dot.
4285         * src/system.h (DOT_OR_DOTDOT): Remove macro.  Rewrite as a...
4286         (dot_or_dotdot): ...new static inline function.
4287         * src/remove.c (rm_1): Reflect this renaming.
4288         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
4290         * src/copy.c (copy_internal): Add comments.
4292 2006-08-26  Paul Eggert  <eggert@cs.ucla.edu>
4294         * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
4295         since Automake supplies them for us.  It always did -I$(srcdir),
4296         and with the recent change to AC_CONFIG_HEADERS in configure.ac it
4297         is now also doing -I../lib.
4299         * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
4300         Fail if the first "echo" fails.  Suppress diagnostics from "ls po/*.po"
4301         since there might not be any .po files.
4302         (WGET_COMMAND): Set to empty if wget doesn't
4303         seem to be available.
4305 2006-08-26  Jim Meyering  <jim@meyering.net>
4307         This test was failing in some environments.
4308         * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
4309         to set LS_COLORS in the environment.
4310         * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
4311         Reported by Bob Proulx.
4313         * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
4315         * Makefile.am (EXTRA_DIST): Remove these files here, too:
4316         .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
4317         .x-sc_two_space_separator_in_usage.
4319         Fix "mv --verbose --backup" so its output includes the
4320         " (backup: foo.~1~)" suffix also when backing up a directory.
4321         * NEWS: Report this bug fix.
4322         * src/copy.c (emit_verbose): New function, factored out of...
4323         (copy_internal): ...here.  Use the new function.
4324         * tests/mv/backup-dir: Test for the above fix.
4325         * tests/mv/Makefile.am (TESTS): Add backup-dir.
4327 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4329         * .x-sc_no_if_have_config_h: Remove; no longer needed.
4330         * .x-sc_prohibit_assert_without_use: Remove; it was empty.
4331         * .x-sc_two_space_separator_in_usage: Likewise.
4332         * Makefile.maint (sc_no_have_config_h): Renamed from
4333         sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
4334         is absent everywhere.
4335         * bootstrap.conf (gnulib_modules): Add config-h.
4336         * src/shred.c: Include <config.h> unconditionally, since
4337         we now assume config.h exists.
4338         * src/dircolors.c: Likewise.
4340 2006-08-26  Jim Meyering  <jim@meyering.net>
4342         "ls --color" would highlight other-writable and sticky directories
4343         no differently than regular directories on a file system with
4344         dirent.d_type support.
4345         * NEWS: Say the above.
4346         * src/ls.c (gobble_file): With --color, also stat the file when
4347         we know it is a directory.
4348         Derived from an anonymous one-line fix and bug report:
4349         <http://savannah.gnu.org/bugs/?15043>.
4350         * tests/ls/color-dtype-dir: New file.  Test for the above fix.
4351         * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
4353 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4355         * .cvsignore: Remove stamp-h1.  Add coreutils-*, to ignore
4356         tarballs.
4357         * bootstrap.conf: Add configmake, verify.
4358         * src/.cvsignore: Remove localedir.h.
4359         * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
4360         subsumed by configmake.
4361         * src/system.h: Include configmake.h rather than localedir.h
4362         (LOCALEDIR): New macro.
4364         Rewrite to avoid some unnecessary casts, macros, literals.
4365         * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
4366         not macros.
4367         (SECTOR_SIZE, SECTOR_MASK): New constants.
4368         (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
4369         and use the SECTOR_* constants when applicable.  Check for size <
4370         0 rather than size == -1, since negative-size files are a sign of
4371         trouble anyway.
4373 2006-08-25  Bruno Haible  <bruno@clisp.org>
4375         * src/shred.c (dopass): Assume a continuable error if EIO even
4376         if the current position is not a multiple of 512.
4378 2006-08-24  Jim Meyering  <jim@meyering.net>
4380         * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
4382 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4384         * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define.  This
4385         macro was being used without being defined.
4386         (SB_F_NAMEMAX): Remove cast.
4387         (f_fsid) [BeOS]: Likewise.
4388         (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
4389         All uses changed.
4390         (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
4391         functions.
4392         (xstrcat): Remove.  All uses changed to use the above functions.
4393         (print_statfs, print_stat): 2nd arg is now the prefix len, not the
4394         buffer len.  All uses changed.  Output '?', not '*', for unknown
4395         data or errors.  Do not assume signed values can be interchanged
4396         with unsigned when printing.
4397         (print_statfs): For %i, print the fsid as a single int, not as a
4398         pair.
4399         (print_it): Quote invalid format better.
4401         * NEWS: printf supports the I flag.
4402         * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
4404 2006-08-23  Bruno Haible  <bruno@clisp.org>
4406         * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
4407         (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
4408         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
4410         * src/ls.c (SA_RESTART): Fallback define.
4412 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4414         * src/system.h (EDQUOT): Define if not already defined.
4415         Problem reported by Bruno Haible for BeOS.
4417         * .cvsignore: Remove config.h, config.hin, as they are now
4418         in lib.
4419         * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
4420         to lib.
4421         * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
4423         * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
4424         to accommodate today's gnulib change.
4426 2006-08-23  Jim Meyering  <jim@meyering.net>
4428         * NEWS: Mention the sweeping infrastructure changes.
4430 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4432         * bootstrap.conf (gnulib_modules): Add gnupload.
4433         * Makefile.maint (emit_upload_commands): gnupload is now
4434         in build-aux.
4435         * gnupload: Remove from CVS, since it's now a gnulib module.
4437         * bootstrap (bootstrap_conf_cleanup): Remove.
4438         (excluded_files): New var.
4439         * bootstrap.conf: Likewise.
4440         * bootstrap (slurp): Exclude files early if they're in the
4441         excluded_files list.  That way, their names don't get put into
4442         .cvsignore.
4444         * aclocal.m4, config.hin, configure:
4445         Remove from CVS, since ./bootstrap generates them automatically.
4446         * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
4447         configure, *.cache, *.lineno, *.log.
4448         Remove more-specific entries.  This catches files like configure.lineno.
4449         * man/.cvsignore: Add Makefile.in.
4450         * src/.cvsignore: Add Makefile.in.
4451         Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
4453         * tests/.cvsignore:
4454         * tests/chgrp/.cvsignore:
4455         * tests/chmod/.cvsignore:
4456         * tests/chown/.cvsignore:
4457         * tests/cp/.cvsignore:
4458         * tests/cut/.cvsignore:
4459         * tests/dd/.cvsignore:
4460         * tests/dircolors/.cvsignore:
4461         * tests/du/.cvsignore:
4462         * tests/expr/.cvsignore:
4463         * tests/factor/.cvsignore:
4464         * tests/fmt/.cvsignore:
4465         * tests/head/.cvsignore:
4466         * tests/install/.cvsignore:
4467         * tests/join/.cvsignore:
4468         * tests/ln/.cvsignore:
4469         * tests/ls/.cvsignore:
4470         * tests/ls-2/.cvsignore:
4471         * tests/md5sum/.cvsignore:
4472         * tests/misc/.cvsignore:
4473         * tests/mkdir/.cvsignore:
4474         * tests/mv/.cvsignore:
4475         * tests/od/.cvsignore:
4476         * tests/pr/.cvsignore:
4477         * tests/readlink/.cvsignore:
4478         * tests/rm/.cvsignore:
4479         * tests/rmdir/.cvsignore:
4480         * tests/seq/.cvsignore:
4481         * tests/sha1sum/.cvsignore:
4482         * tests/shred/.cvsignore:
4483         * tests/sort/.cvsignore:
4484         * tests/stty/.cvsignore:
4485         * tests/sum/.cvsignore:
4486         * tests/tac/.cvsignore:
4487         * tests/tail/.cvsignore:
4488         * tests/tail-2/.cvsignore:
4489         * tests/tee/.cvsignore:
4490         * tests/test/.cvsignore:
4491         * tests/touch/.cvsignore:
4492         * tests/tr/.cvsignore:
4493         * tests/tsort/.cvsignore:
4494         * tests/unexpand/.cvsignore:
4495         * tests/uniq/.cvsignore:
4496         * tests/wc/.cvsignore:
4497         Add Makefile.in.  Sort entries if necessary.  Remove *.I, *.E,
4498         *.X, *.O, *-tests, build-script, mk-script if they're never
4499         created in this directory.
4501 2006-08-22  Bruno Haible  <bruno@clisp.org>
4503         BeOS portability.
4504         * src/uptime.c: Include OS.h if it exists.
4505         (print_uptime): On BeOS, use the get_system_info function (actually a
4506         macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
4507         (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
4509 2006-08-22  Jim Meyering  <jim@meyering.net>
4511         * .cvsignore: Add ABOUT-NLS.
4513         Move the check-AUTHORS rule to be run as part of "make distcheck",
4514         rather than "make check".
4515         * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
4516         cause "make check" to fail on systems unable to build all binaries.
4517         * Makefile.maint (check-AUTHORS): New rule.
4518         (local-checks-available): Add it here.
4519         Reported by Bruno Haible.  Needed for BeOS.
4521 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4523         * src/df.c (print_header, show_dev): Use a column width that
4524         depends on the block size of -P is specified and not autoscaling.
4525         Problem reported by Gustavo G. Rondina in:
4526         http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
4528 2006-08-21  Jim Meyering  <jim@meyering.net>
4530         * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
4531         when the shell variable, SHELL, is not set.
4532         Trigger the failure with "(unset SHELL; make check TESTS=simple)".
4533         Reported by Sven Joachim in <http://bugs.debian.org/355368>.
4535         * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
4536         in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
4537         Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
4538         od: invalid type string `u8';
4539         this system doesn't provide a 8-byte integral type
4540         FIXME: add a test for this, but skip it when sizeof uintmax < 8.
4542 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4544         Add a bootstrap procedure, so that the CVS version contains fewer
4545         files and we bootstrap the rest from gnulib, gettext, etc.
4546         * README-cvs: New file.
4547         * bootstrap: New file.
4548         * bootstrap.conf: New file.
4549         * .x-sc_trailing_blank: Remove config-log, .gdb-history.  Add .po.
4550         * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
4551         of gnulib-tool.
4552         (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
4553         (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
4554         (gl_EARLY): Add.
4555         (gl_MACROS): Call just after gl_EARLY, just for clarity.
4556         * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
4557         * src/kill.c (strtoimax): Remove decl.
4558         * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
4559         * src/wc.c: Likewise.
4560         * src/ls.c (sort_files): Rewrite to avoid need for C99-style
4561         declaration, so that we don't need to patch this file.
4562         * src/printf.c (strtoimax, strtoumax): Remove decls.
4563         * src/su.c: Include getpass.h.
4564         (getpass): remove.
4565         * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
4566         Include inttypes.h unconditionally.
4567         (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
4568         (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
4569         (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
4570         (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
4571         (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
4573         * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
4574         * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
4575         * tests/chmod/Makefile.in, tests/chown/Makefile.in:
4576         * tests/cp/Makefile.in, tests/cut/Makefile.in:
4577         * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
4578         * tests/du/Makefile.in, tests/expr/Makefile.in:
4579         * tests/factor/Makefile.in, tests/fmt/Makefile.in:
4580         * tests/general/Makefile.in, tests/head/Makefile.in:
4581         * tests/install/Makefile.in, tests/join/Makefile.in:
4582         * tests/ln/Makefile.in, tests/ls/Makefile.in:
4583         * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
4584         * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
4585         * tests/mv/Makefile.in, tests/od/Makefile.in:
4586         * tests/pr/Makefile.in, tests/readlink/Makefile.in:
4587         * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
4588         * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
4589         * tests/shred/Makefile.in, tests/sort/Makefile.in:
4590         * tests/stty/Makefile.in, tests/sum/Makefile.in:
4591         * tests/tac/Makefile.in, tests/tail/Makefile.in:
4592         * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
4593         * tests/test/Makefile.in, tests/touch/Makefile.in:
4594         * tests/tr/Makefile.in, tests/tsort/Makefile.in:
4595         * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
4596         * tests/wc/Makefile.in:
4597         Remove from CVS, since ./bootstrap generates them automatically.
4599 2006-08-20  Eric Blake  <ebb9@byu.net>
4601         * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
4602         the patch from 2006-08-18 broke on cygwin.
4604 2006-08-20  Jim Meyering  <jim@meyering.net>
4606         * NEWS: Add a line for 6.2-cvs.
4607         * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
4609 2006-08-19  Jim Meyering  <jim@meyering.net>
4611         * Version 6.1.
4612         * NEWS: Record the 6.1 release date.
4613         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4615         * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
4617         Avoid test failure when `make check' is run through debuild.
4618         * tests/help-version: Ensure that $SHELL is set to some value
4619         and exported.  Patch from Sven Joachim.  For details, see
4620         <http://bugs.debian.org/355368>.
4622         * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
4624         * README: Describe potential "pre-C99 build failure", and work-around.
4626         Some of my 2006-07-03 changes to tests/*/Makefile.am were being
4627         backed out due to updates provoked by the copyright changes.
4628         * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
4629         it propagates to the derived Makefile.am files.
4630         ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
4631         so we don't mistakenly edit them again.
4632         * tests/cut/Makefile.am: Regenerate.
4633         * tests/head/Makefile.am: Likewise.
4634         * tests/join/Makefile.am: Likewise.
4635         * tests/pr/Makefile.am: Likewise.
4636         * tests/sort/Makefile.am: Likewise.
4637         * tests/tac/Makefile.am: Likewise.
4638         * tests/tail/Makefile.am: Likewise.
4639         * tests/test/Makefile.am: Likewise.
4640         * tests/tr/Makefile.am: Likewise.
4641         * tests/uniq/Makefile.am: Likewise.
4642         * tests/wc/Makefile.am: Likewise.
4644         * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
4645         when the file's apparent size is not a multiple of its block size.
4646         * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
4647         For some file sizes, writing that single byte would unnecessarily
4648         waste a few file blocks.  That write may have been necessary in the
4649         early days of Linux, but now, removing it should be safe.
4650         Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
4651         * tests/cp/sparse: New test for the above.
4652         * tests/cp/Makefile.am (TESTS): Add sparse.
4654         * tests/sparse-file: New file, essence factored out of...
4655         * tests/du/8gb: ... here.  Use the new script.
4657 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
4659         * src/system.h (select_plural): Reduce by 1000000, not 1000, since
4660         the CVS gettext manual now suggests 1000000.
4662 2006-08-18  Bruno Haible  <bruno@clisp.org>
4664         Add support for NetBSD 3.0.
4665         * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
4666         f_fstypename.
4667         (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
4668         has a field f_fstypename.
4669         This undoes the 2006-08-15 to src/stat.c.
4671 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4673         Copyright notice fixes.
4675         * COPYING: Upgrade to latest version from FSF.
4677         * src/uname.c: Use (C) in copyright notice.
4679         * .vg-suppressions: Add copyright notice.
4680         * ChangeLog: Likewise.
4681         * ChangeLog-2005: Likewise.
4682         * Makefile.am: Likewise.
4683         * NEWS: Likewise.
4684         * README: Likewise.
4685         * README-valgrind: Likewise.
4686         * TODO: Likewise.
4687         * announce-gen: Likewise.
4688         * man/Makefile.am: Likewise.
4689         * man/chmod.x: Likewise.
4690         * man/chown.x: Likewise.
4691         * man/df.x: Likewise.
4692         * man/du.x: Likewise.
4693         * man/rm.x: Likewise.
4694         * src/dircolors.hin: Likewise.
4695         * src/du-tests: Likewise.
4696         * src/extract-magic: Likewise.
4697         * src/tac-pipe.c: Likewise.
4698         * src/wheel-gen.pl: Likewise.
4699         * tests/Coreutils.pm: Likewise.
4700         * tests/Makefile.am.in: Likewise.
4701         * tests/acl: Likewise.
4702         * tests/envvar-check: Likewise.
4703         * tests/expensive: Likewise.
4704         * tests/group-names: Likewise.
4705         * tests/help-version: Likewise.
4706         * tests/mk-script: Likewise.
4707         * tests/priv-check: Likewise.
4708         * tests/rwx-to-mode: Likewise.
4709         * tests/sample-test: Likewise.
4710         * tests/setgid-check: Likewise.
4711         * tests/chgrp/basic: Likewise.
4712         * tests/chgrp/deref: Likewise.
4713         * tests/chgrp/no-x: Likewise.
4714         * tests/chgrp/posix-H: Likewise.
4715         * tests/chgrp/recurse: Likewise.
4716         * tests/chmod/c-option: Likewise.
4717         * tests/chmod/equal-x: Likewise.
4718         * tests/chmod/equals: Likewise.
4719         * tests/chmod/no-x: Likewise.
4720         * tests/chmod/octal: Likewise.
4721         * tests/chmod/setgid: Likewise.
4722         * tests/chmod/umask-x: Likewise.
4723         * tests/chmod/usage: Likewise.
4724         * tests/chown/basic: Likewise.
4725         * tests/chown/deref: Likewise.
4726         * tests/chown/separator: Likewise.
4727         * tests/cp/Makefile.am: Likewise.
4728         * tests/cp/acl: Likewise.
4729         * tests/cp/backup-1: Likewise.
4730         * tests/cp/backup-is-src: Likewise.
4731         * tests/cp/cp-HL: Likewise.
4732         * tests/cp/cp-deref: Likewise.
4733         * tests/cp/cp-mv-backup: Likewise.
4734         * tests/cp/cp-parents: Likewise.
4735         * tests/cp/deref-slink: Likewise.
4736         * tests/cp/dir-rm-dest: Likewise.
4737         * tests/cp/dir-slash: Likewise.
4738         * tests/cp/dir-vs-file: Likewise.
4739         * tests/cp/fail-perm: Likewise.
4740         * tests/cp/into-self: Likewise.
4741         * tests/cp/link: Likewise.
4742         * tests/cp/link-no-deref: Likewise.
4743         * tests/cp/link-preserve: Likewise.
4744         * tests/cp/no-deref-link1: Likewise.
4745         * tests/cp/no-deref-link2: Likewise.
4746         * tests/cp/no-deref-link3: Likewise.
4747         * tests/cp/perm: Likewise.
4748         * tests/cp/preserve-2: Likewise.
4749         * tests/cp/r-vs-symlink: Likewise.
4750         * tests/cp/same-file: Likewise.
4751         * tests/cp/slink-2-slink: Likewise.
4752         * tests/cp/special-bits: Likewise.
4753         * tests/cp/symlink-slash: Likewise.
4754         * tests/cut/Makefile.am: Likewise.
4755         * tests/cut/Test.pm: Likewise.
4756         * tests/dd/misc: Likewise.
4757         * tests/dd/not-rewound: Likewise.
4758         * tests/dd/skip-seek: Likewise.
4759         * tests/dd/skip-seek2: Likewise.
4760         * tests/dd/unblock-sync: Likewise.
4761         * tests/dircolors/simple: Likewise.
4762         * tests/du/2g: Likewise.
4763         * tests/du/8gb: Likewise.
4764         * tests/du/Makefile.am: Likewise.
4765         * tests/du/basic: Likewise.
4766         * tests/du/deref: Likewise.
4767         * tests/du/deref-args: Likewise.
4768         * tests/du/exclude: Likewise.
4769         * tests/du/fd-leak: Likewise.
4770         * tests/du/files0-from: Likewise.
4771         * tests/du/hard-link: Likewise.
4772         * tests/du/inaccessible-cwd: Likewise.
4773         * tests/du/long-from-unreadable: Likewise.
4774         * tests/du/long-sloop: Likewise.
4775         * tests/du/no-deref: Likewise.
4776         * tests/du/no-x: Likewise.
4777         * tests/du/restore-wd: Likewise.
4778         * tests/du/slash: Likewise.
4779         * tests/du/slink: Likewise.
4780         * tests/du/trailing-slash: Likewise.
4781         * tests/du/two-args: Likewise.
4782         * tests/expr/basic: Likewise.
4783         * tests/factor/basic: Likewise.
4784         * tests/fmt/basic: Likewise.
4785         * tests/fmt/long-line: Likewise.
4786         * tests/general/Makefile.am: Likewise.
4787         * tests/general/atgeneral.m4: Likewise.
4788         * tests/general/dd.at: Likewise.
4789         * tests/head/Makefile.am: Likewise.
4790         * tests/head/Test.pm: Likewise.
4791         * tests/install/basic-1: Likewise.
4792         * tests/install/create-leading: Likewise.
4793         * tests/install/d-slashdot: Likewise.
4794         * tests/install/trap: Likewise.
4795         * tests/join/Makefile.am: Likewise.
4796         * tests/join/Test.pm: Likewise.
4797         * tests/ln/backup-1: Likewise.
4798         * tests/ln/misc: Likewise.
4799         * tests/ln/sf-1: Likewise.
4800         * tests/ln/target-1: Likewise.
4801         * tests/ls/Makefile.am: Likewise.
4802         * tests/ls/Test.pm: Likewise.
4803         * tests/ls/dangle: Likewise.
4804         * tests/ls/dired: Likewise.
4805         * tests/ls/file-type: Likewise.
4806         * tests/ls/follow-slink: Likewise.
4807         * tests/ls/infloop: Likewise.
4808         * tests/ls/inode: Likewise.
4809         * tests/ls/m-option: Likewise.
4810         * tests/ls/no-arg: Likewise.
4811         * tests/ls/recursive: Likewise.
4812         * tests/ls/rt-1: Likewise.
4813         * tests/ls/stat-dtype: Likewise.
4814         * tests/ls/stat-failed: Likewise.
4815         * tests/ls/stat-vs-dirent: Likewise.
4816         * tests/ls/symlink-slash: Likewise.
4817         * tests/ls/time-1: Likewise.
4818         * tests/ls-2/tests: Likewise.
4819         * tests/md5sum/basic-1: Likewise.
4820         * tests/md5sum/newline-1: Likewise.
4821         * tests/misc/Makefile.am: Likewise.
4822         * tests/misc/base64: Likewise.
4823         * tests/misc/basename: Likewise.
4824         * tests/misc/cat-proc: Likewise.
4825         * tests/misc/close-stdout: Likewise.
4826         * tests/misc/csplit: Likewise.
4827         * tests/misc/date: Likewise.
4828         * tests/misc/date-sec: Likewise.
4829         * tests/misc/df: Likewise.
4830         * tests/misc/dirname: Likewise.
4831         * tests/misc/expand: Likewise.
4832         * tests/misc/false-status: Likewise.
4833         * tests/misc/fold: Likewise.
4834         * tests/misc/head-c: Likewise.
4835         * tests/misc/head-elide-tail: Likewise.
4836         * tests/misc/head-pos: Likewise.
4837         * tests/misc/mknod: Likewise.
4838         * tests/misc/nice: Likewise.
4839         * tests/misc/nl: Likewise.
4840         * tests/misc/nohup: Likewise.
4841         * tests/misc/paste-no-nl: Likewise.
4842         * tests/misc/pathchk1: Likewise.
4843         * tests/misc/printf: Likewise.
4844         * tests/misc/printf-hex: Likewise.
4845         * tests/misc/pwd-long: Likewise.
4846         * tests/misc/sha224sum: Likewise.
4847         * tests/misc/sha256sum: Likewise.
4848         * tests/misc/sha384sum: Likewise.
4849         * tests/misc/sha512sum: Likewise.
4850         * tests/misc/shuf: Likewise.
4851         * tests/misc/sort-merge: Likewise.
4852         * tests/misc/sort-rand: Likewise.
4853         * tests/misc/split-a: Likewise.
4854         * tests/misc/split-fail: Likewise.
4855         * tests/misc/split-l: Likewise.
4856         * tests/misc/stat-fmt: Likewise.
4857         * tests/misc/stat-printf: Likewise.
4858         * tests/misc/tac-continue: Likewise.
4859         * tests/misc/test-diag: Likewise.
4860         * tests/misc/tty-eof: Likewise.
4861         * tests/misc/wc-files0: Likewise.
4862         * tests/misc/wc-files0-from: Likewise.
4863         * tests/mkdir/concurrent-1: Likewise.
4864         * tests/mkdir/p-1: Likewise.
4865         * tests/mkdir/p-2: Likewise.
4866         * tests/mkdir/p-3: Likewise.
4867         * tests/mkdir/p-slashdot: Likewise.
4868         * tests/mkdir/p-thru-slink: Likewise.
4869         * tests/mkdir/parents: Likewise.
4870         * tests/mkdir/perm: Likewise.
4871         * tests/mkdir/special-1: Likewise.
4872         * tests/mkdir/t-slash: Likewise.
4873         * tests/mkdir/writable-under-readonly: Likewise.
4874         * tests/mv/Makefile.am: Likewise.
4875         * tests/mv/acl: Likewise.
4876         * tests/mv/atomic: Likewise.
4877         * tests/mv/backup-is-src: Likewise.
4878         * tests/mv/childproof: Likewise.
4879         * tests/mv/diag: Likewise.
4880         * tests/mv/dir-file: Likewise.
4881         * tests/mv/dir2dir: Likewise.
4882         * tests/mv/dup-source: Likewise.
4883         * tests/mv/force: Likewise.
4884         * tests/mv/hard-2: Likewise.
4885         * tests/mv/hard-3: Likewise.
4886         * tests/mv/hard-4: Likewise.
4887         * tests/mv/hard-link-1: Likewise.
4888         * tests/mv/i-1: Likewise.
4889         * tests/mv/i-2: Likewise.
4890         * tests/mv/i-3: Likewise.
4891         * tests/mv/i-4: Likewise.
4892         * tests/mv/i-link-no: Likewise.
4893         * tests/mv/into-self: Likewise.
4894         * tests/mv/into-self-2: Likewise.
4895         * tests/mv/into-self-3: Likewise.
4896         * tests/mv/into-self-4: Likewise.
4897         * tests/mv/leak-fd: Likewise.
4898         * tests/mv/mv-special-1: Likewise.
4899         * tests/mv/no-target-dir: Likewise.
4900         * tests/mv/part-fail: Likewise.
4901         * tests/mv/part-hardlink: Likewise.
4902         * tests/mv/part-rename: Likewise.
4903         * tests/mv/part-symlink: Likewise.
4904         * tests/mv/partition-perm: Likewise.
4905         * tests/mv/perm-1: Likewise.
4906         * tests/mv/reply-no: Likewise.
4907         * tests/mv/setup: Likewise.
4908         * tests/mv/to-symlink: Likewise.
4909         * tests/mv/trailing-slash: Likewise.
4910         * tests/mv/update: Likewise.
4911         * tests/mv/vfat: Likewise.
4912         * tests/od/od-N: Likewise.
4913         * tests/od/x8: Likewise.
4914         * tests/pr/Makefile.am: Likewise.
4915         * tests/pr/Test.pm: Likewise.
4916         * tests/readlink/can-e: Likewise.
4917         * tests/readlink/can-f: Likewise.
4918         * tests/readlink/can-m: Likewise.
4919         * tests/readlink/rl-1: Likewise.
4920         * tests/rm/Makefile.am: Likewise.
4921         * tests/rm/cycle: Likewise.
4922         * tests/rm/dangling-symlink: Likewise.
4923         * tests/rm/deep-1: Likewise.
4924         * tests/rm/dir-no-w: Likewise.
4925         * tests/rm/dir-nonrecur: Likewise.
4926         * tests/rm/dot-rel: Likewise.
4927         * tests/rm/empty-inacc: Likewise.
4928         * tests/rm/empty-name: Likewise.
4929         * tests/rm/f-1: Likewise.
4930         * tests/rm/fail-2eperm: Likewise.
4931         * tests/rm/fail-eperm: Likewise.
4932         * tests/rm/hash: Likewise.
4933         * tests/rm/i-1: Likewise.
4934         * tests/rm/i-no-r: Likewise.
4935         * tests/rm/inaccessible: Likewise.
4936         * tests/rm/interactive-always: Likewise.
4937         * tests/rm/interactive-once: Likewise.
4938         * tests/rm/ir-1: Likewise.
4939         * tests/rm/isatty: Likewise.
4940         * tests/rm/no-give-up: Likewise.
4941         * tests/rm/r-1: Likewise.
4942         * tests/rm/r-2: Likewise.
4943         * tests/rm/r-3: Likewise.
4944         * tests/rm/rm1: Likewise.
4945         * tests/rm/rm2: Likewise.
4946         * tests/rm/rm3: Likewise.
4947         * tests/rm/rm4: Likewise.
4948         * tests/rm/rm5: Likewise.
4949         * tests/rm/sunos-1: Likewise.
4950         * tests/rm/unread2: Likewise.
4951         * tests/rm/unread3: Likewise.
4952         * tests/rm/unreadable: Likewise.
4953         * tests/rmdir/fail-perm: Likewise.
4954         * tests/rmdir/ignore: Likewise.
4955         * tests/rmdir/t-slash: Likewise.
4956         * tests/seq/basic: Likewise.
4957         * tests/sha1sum/basic-1: Likewise.
4958         * tests/sha1sum/sample-vec: Likewise.
4959         * tests/shred/exact: Likewise.
4960         * tests/shred/remove: Likewise.
4961         * tests/sort/Makefile.am: Likewise.
4962         * tests/sort/Test.pm: Likewise.
4963         * tests/sort-time/Makefile: Likewise.
4964         * tests/sort-time/README: Likewise.
4965         * tests/sort-time/rand-gen: Likewise.
4966         * tests/stty/basic-1: Likewise.
4967         * tests/stty/row-col-1: Likewise.
4968         * tests/sum/basic-1: Likewise.
4969         * tests/sum/sysv: Likewise.
4970         * tests/tac/Makefile.am: Likewise.
4971         * tests/tac/Test.pm: Likewise.
4972         * tests/tail/Makefile.am: Likewise.
4973         * tests/tail/Test.pm: Likewise.
4974         * tests/tail-2/Makefile.am: Likewise.
4975         * tests/tail-2/append-only: Likewise.
4976         * tests/tail-2/assert: Likewise.
4977         * tests/tail-2/assert-2: Likewise.
4978         * tests/tail-2/big-4gb: Likewise.
4979         * tests/tail-2/fflush: Likewise.
4980         * tests/tail-2/infloop-1: Likewise.
4981         * tests/tail-2/proc-ksyms: Likewise.
4982         * tests/tail-2/start-middle: Likewise.
4983         * tests/tail-2/tail-n0f: Likewise.
4984         * tests/tee/basic: Likewise.
4985         * tests/tee/dash: Likewise.
4986         * tests/test/Makefile.am: Likewise.
4987         * tests/test/Test.pm: Likewise.
4988         * tests/touch/Makefile.am: Likewise.
4989         * tests/touch/dangling-symlink: Likewise.
4990         * tests/touch/empty-file: Likewise.
4991         * tests/touch/fail-diag: Likewise.
4992         * tests/touch/fifo: Likewise.
4993         * tests/touch/no-create-missing: Likewise.
4994         * tests/touch/no-rights: Likewise.
4995         * tests/touch/not-owner: Likewise.
4996         * tests/touch/obsolescent: Likewise.
4997         * tests/touch/read-only: Likewise.
4998         * tests/touch/relative: Likewise.
4999         * tests/tr/Makefile.am: Likewise.
5000         * tests/tr/Test.pm: Likewise.
5001         * tests/tr/failures: Likewise.
5002         * tests/tsort/basic-1: Likewise.
5003         * tests/unexpand/basic-1: Likewise.
5004         * tests/uniq/Makefile.am: Likewise.
5005         * tests/uniq/Test.pm: Likewise.
5006         * tests/wc/Makefile.am: Likewise.
5007         * tests/wc/Test.pm: Likewise.
5009 2006-08-17  Jim Meyering  <jim@meyering.net>
5011         ls -CF would misalign columns in some cases.
5012         * src/ls.c (get_type_indicator): New function.  extracted from...
5013         (print_type_indicator): ...here.  Use it.
5014         (length_of_file_name_and_frills): Use it here, too, rather than
5015         assuming stat.st_mode is valid.
5016         Reported by Andreas Schwab, here:
5017         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
5018         See the test for this above. FYI, I did ls -CF /proc and visually
5019         inspected the result.
5021         * src/copy.c (copy_internal, same_file_ok): Adjust comments not
5022         to mention the now-removed cp_options.xstat member.
5024         * Makefile.maint (patch-check): Adapt to work now that the patch
5025         modifies more than one file in src/.
5027         With this patch, permit building with Solaris cc on Solaris 7.
5028         * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
5029         This integrates patches from Bruno Haible.
5031 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5033         Fix some problems reported by Bruno Haible.
5034         * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
5035         Skip this test if "chmod g+s d" silently does nothing.
5036         * tests/ls-2/tests: Skip this test suite if we can't set up files
5037         properly for the setuid-etc test.  This simplifies some of the
5038         hacks we were using to work around porting problems.
5040 2006-08-16  Jim Meyering  <jim@meyering.net>
5042         * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
5043         * tests/cp/acl: Instead, skip the test if either setfacl
5044         or getfacl fails.
5045         Reported by Michael Stone.
5047 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5049         * tests/lang-default (LC_ALL): Set to "C", so we get
5050         English-language diagnostics.  Unset the other variables; it
5051         should be portable to use 'unset' for this stuff nowadays.
5052         Problem reported by Bruno Haible.  Using "C" reverses the
5053         2000-10-22 change to fileutils in this area.
5055         Fix bugs when printing plurals of numbers that are not
5056         unsigned long int values.
5057         * src/system.h (select_plural): New function.
5058         * src/md5sum.c (digest_check): Use select_plural to avoid bug.
5059         * src/uptime.c (print_uptime): Likewise.
5060         * src/dd.c (print_stats): Likewise.  Also, don't use ngettext to
5061         print a floating point number, as reducing to 0 or 1 doesn't work
5062         for some languages.  Instead, just use "s" for seconds since it
5063         doesn't need a plural form.
5065 2006-08-16  Bruno Haible  <bruno@clisp.org>
5067         Old versions of gzip would write --help output to stderr, and it
5068         would be annoying to see that in the output of every "make" command.
5069         * Makefile.maint (gzip_rsyncable): Throw away stderr output of
5070         "gzip --help".
5072 2006-08-16  Andreas Schwab  <schwab@suse.de>
5074         * tests/cp/acl: Don't use non-portable == operator for test.
5076 2006-08-16  Jim Meyering  <jim@meyering.net>
5078         * tests/ls/stat-dtype: Use stat to test file system type, rather
5079         than df -T, in case /etc/mtab lies.  Reported by Michael Stone.
5081 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5083         * NEWS: Mention that df exits with nonzero status if it generates
5084         no output.  This change was in 6.0 but inadvertently unmentioned.
5085         * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
5086         a boolean.
5087         (show_dev): Don't set it until we actually output something.
5088         Print the header if this is the first output.
5089         (main): Don't print a header, as that is now show_dev's job.
5090         * tests/misc/Makefile.am (TESTS): Add df.
5091         * tests/misc/df: New file.
5093 2006-08-15  Eric Blake  <ebb9@byu.net>
5095         * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
5096         statvfs.f_type not present.  See
5097         <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
5099 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5101         * src/dd.c (print_stats): Don't substitute "1" for number, as this
5102         causes confusion for the Hungarian translators.  Problem reported
5103         by Egmont Koblinger here:
5104         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
5106 2006-08-15  Jim Meyering  <jim@meyering.net>
5108         * .x-sc_require_config_h: Add lib/at-func.c.
5110         * NEWS: Add a line for 6.1-cvs.
5111         * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
5113 2006-08-15  Jim Meyering  <jim@meyering.net>
5115         * Version 6.0.
5116         * NEWS: Record the 6.0 release date.
5117         * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
5119         * TODO: Add an item (convert to use gnulib-tool), add to the plan
5120         for id-vs-getgrouplist, and remove a few completed items.
5122         * Makefile.maint (alpha beta major): Fix syntax error.
5124 2006-08-13  Jim Meyering  <jim@meyering.net>
5126         * src/shred.c (usage): Don't indent the second line of an item.
5127         Otherwise, help2man would misformat the output.
5128         Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
5130 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5132         * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
5133         Suggested by Eric Blake to avoid problems like
5134         <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
5136 2006-08-11  Jim Meyering  <jim@meyering.net>
5138         * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
5139         failure that this test checks for (stat/dirent inode mismatch at
5140         a mount point), so continue to give a diagnostic about the failure,
5141         but don't actually count it as a failure.
5143 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5145         * ABOUT-NLS: Update from gettext 0.15.
5146         * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
5148         * src/csplit.c (struct control): Remove fastmap member.
5149         (extract_regexp): Allocate fastmap separately, since otherwise
5150         it might move due to a realloc.  This fixes a bug that led
5151         to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
5153 2006-08-10  Jim Meyering  <jim@meyering.net>
5155         * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
5156         reports "Linux".  This avoids a failure on Solaris 10's tmpfs.
5157         Redirect both stdout and stderr of df invocations.
5159         * src/dircolors.hin: Add a TERM directive for each of the following:
5160         ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
5161         rxvt-cygwin-native, screen.linux, xterm-256color.
5162         Sort the TERM directives.
5163         From Mike Frysinger.
5165 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5167         * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
5168         See Debian bug 373736.
5170         * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
5171         bug 317503.
5173         * src/.cvsignore: Add shuf.
5175         * Makefile.maint: Remove the po-update procedure; it doesn't
5176         work with the new repository on http://www.iro.umontreal.ca/.
5177         For now I guess we'll have to fix things by hand.
5178         (do-po-update, po-update): Remove.  All references removed.
5180         * src/shuf.c (next_line): New function.
5181         (read_input): Use it, to avoid relying on GCC-specific behavior
5182         with void * arithmetic.  Problem reported by Bob Proulx.
5183         * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
5184         to detect this sort of problem automatically in the future.
5186 2006-08-09  Jim Meyering  <jim@meyering.net>
5188         * src/ls.c: Add a compile-time check to ensure that filetype
5189         and filetype_letter have the same number of elements.
5191         * tests/misc/sort-rand: Remove use of --seed=S.
5193 2006-08-08  Paul Eggert  <eggert@cs.ucla.edu>
5195         Add a command 'shuf', and modify shred and sort to use the new
5196         random number generator library of 'shuf'.
5198         * AUTHORS: Add shuf.
5199         * README: Likewise.
5200         * NEWS: Likewise.  Mention new --random-source option for shred
5201         and sort.  Move "sort +1 -2" notice to the appropriate section,
5202         and clarify its role with respect to POSIXLY_CORRECT.
5203         * man/.cvsignore: Add shuf.1.
5204         * man/Makefile.am (dist_man_MANS): Add shuf.1.
5205         (shuf.1): New dependency.
5206         * man/shuf.x: New file.
5207         * src/Makefile.am (bin_PROGRAMS): Add shuf.
5208         (EXTRA_DIST): Remove rand-isaac.c.
5209         (shuf_LDADD): New macro.
5210         * src/rand-isaac.c: Remove, moving most of its contents to
5211         lib/rand-isaac.c.
5212         * src/shuf.c: New file.
5213         * src/shred.c: Use new random-number interface rather than rand-isaac.c.
5214         Don't include rand-isaac.c; include randint.h and randread.h instead.
5215         (RANDOM_SOURCE_OPTION): New enum.
5216         (long_opts, usage, main): New option --random-source.
5217         * src/sort.c: Likewise.
5218         * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
5219         All callers changed to use randint interface.
5220         (fillrand): Remove.  All callers changed to use randread interface.
5221         (dopass): Remove dependency on ISAAC buffer size.
5222         (genpattern): Don't wipe the random state here.
5223         (randint_source): New static var.
5224         (clear_random_data): New function.
5225         (main): Allocate random source, and arrange to wipe it on exit.
5226         * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
5227         (longopts, usage, main): Remove undocumented --seed option;
5228         it's now replaced by --random-source.
5229         (rand_state, get_hash): Remove.
5230         (randread_source): New static var.
5231         (random_state, cmp_hashes, compare_random): New functions; they guarantee
5232         no collisions in the random hash function.
5233         (keycompare): Use compare_random for -R; don't fall back on comparing
5234         via memcoll, since compare_random does the right thing.
5235         * tests/misc/Makefile.am (TESTS): Add shuf.
5236         * tests/misc/shuf: New file.
5238 2006-07-29  Paul Eggert  <eggert@cs.ucla.edu>
5240         * src/copy.c (set_author): Preserve the st_author field via the
5241         file descriptor dest_desc.
5243 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
5245         * NEWS: chmod now preserves setuid and setgid bits on directories
5246         if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
5248         Fix test case problems if working directory is setgid,
5249         reported by Bob Proulx.
5250         * tests/cp/fail-perm: Use symbolic mode so that we clear
5251         setgid bit more reliably on directories.
5252         * tests/mkdir/special-1 (set_mode_string): Likewise.
5254 2006-07-27  Jim Meyering  <jim@meyering.net>
5256         * src/chgrp.c (usage): Use correct grammar in description of the
5257         --reference option
5258         * src/chown.c (usage): Likewise.
5260 2006-07-26  Thomas Schwinge  <tschwinge@gnu.org>  (tiny change)
5262         * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
5263         Correctly access SRC_SB's element ST_AUTHOR.
5265 2006-07-26  Jim Meyering  <jim@meyering.net>
5267         * tests/ls/stat-failed: Adapt to match new expected output.
5268         From Paul Eggert.
5270         * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
5271         than having the code test for all of the other types first.
5272         Hoist the set-uid/gid-testing code "up" into this new block.
5273         Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
5274         C_ORPHAN, not as C_FILE.
5276 2006-07-26  Jim Meyering  <jim@meyering.net>
5278         Checking in a change from Paul.
5280         2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
5282         * src/ls.c (DT_INIT): Remove.  All uses removed.
5283         (enum filetype): Use an ordinary enum rather than trying to keep
5284         the values in sync with DT_FIFO etc.  That way, we don't have
5285         to make special assumptions about them.  All uses changed.
5286         (whiteout): New constant member of enum filetype.
5287         (filetype_letter): New constant, for use with enum filetype.
5288         (FILETYPE_INDICATORS): New initializer list.
5289         (print_dir): Add case for DT_WHT.
5290         (gobble_file): If stat fails, don't discard information from
5291         readdir; instead, preserve it so it can be printed.
5292         (print_long_format): Fall back on readdir result if stat info
5293         is not available.  Use "?" to denote each unknown mode char,
5294         instead of an overall "?", since we now know some of the mode
5295         typically.
5296         (print_type_indicator): Now that MODE isn't necessarily
5297         useful, guard all uses.
5298         Now that two blocks in the type-checking tree can set "type = C_FILE",
5299         move the suffix-handling code out and down.
5301 2006-07-26  Jim Meyering  <jim@meyering.net>
5303         Prepare for the above change.
5304         * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
5305         and adjust uses.  From a patch by Paul Eggert.
5307 2006-07-26  Jim Meyering  <jim@meyering.net>
5309         * src/ls.c: Correct indentation/formatting in a few places.
5311 2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>
5313         * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
5314         Problem report and fix from Bob Proulx.
5315         * NEWS: Clarify the "chmod 0500" news, and correct the vague
5316         statements about compatibility with BSD.
5318 2006-07-25  Jim Meyering  <jim@meyering.net>
5320         * src/ls.c (gobble_file): When handling a stat-failed entry,
5321         print the entry name not the absolute_name -- to be consistent
5322         with the usual case.
5323         * tests/ls/stat-failed: Update accordingly.
5325         * src/ls.c: Add parens around the new uses of ?: ternary operator.
5327         * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
5328         symlinks.
5330         Get --dired offsets right when handling stat-failed entries.
5331         * src/ls.c (print_long_format): Be careful to increment P by the
5332         appropriate amount, even when inode_number_width and nlink_width
5333         are zero.
5334         * tests/ls/stat-failed: Test for the above.
5336         * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
5337         have_acl member.  That would happen for a directory with both a
5338         non-stat'able entry and one with an ACL.
5340         * src/ls.c (gobble_file): Make it so failure to stat a
5341         non-command-line file provokes an exit status of 1, not 0.
5342         Say "cannot access" rather than "cannot stat".
5343         * tests/ls/stat-failed: New file/test, for the above.
5344         * tests/ls/Makefile.am (TESTS): Add stat-failed.
5345         * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
5346         of "cannot access " to diagnostic.
5348         * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
5350         * src/ls.c [enum filetype] (command_line): Remove member.  Not needed.
5351         Replace all occurrences of "type == command_line" with the
5352         equivalent, "command_line_arg".
5354         * src/ls.c: Apply the stat-failed parts of Red Hat's
5355         coreutils-selinux.patch.  From Ulrich Drepper.
5356         This makes it so files not mentioned on the command line (e.g.,
5357         names read from a directory that *is* mentioned on the command
5358         line) for which stat fails are still listed.  With --color,
5359         such files are colored just like ORPHANs (aka dangling symlinks).
5361         * src/df.c (n_valid_args): Declare global to be static.
5363 2006-07-24  Jim Meyering  <jim@meyering.net>
5365         * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
5366         system lacks d_type support.
5368 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5370         * man/chmod.x: Update to reflect recent changes to coreutils.texi.
5372 2006-07-21  Jim Meyering  <jim@meyering.net>
5374         * src/su.c (usage): Correct typo in --help output: s/commmand/command/
5375         Reported by Tim Waugh.
5376         Also remove the comment duplicating much of --help output.
5378         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
5379         name so the list remains alphabetized.
5381         Fix another bug: ls --indicator-style=file-type would call
5382         stat for a symlink, even though it wasn't always needed.
5383         In some cases, that unnecessary stat would cause ls to fail.
5384         * src/ls.c (gobble_file): Don't treat symlinks specially (in
5385         requiring a stat syscall).  Remove the offending exclusion.
5387         * NEWS: Mention the fix.
5389         * tests/ls/stat-dtype: New file/test, for the above fix.
5390         Also exercises the new df feature, below.
5392         * src/df.c (main): Fail and don't print the headers if no
5393         file system is processed.  This makes it easy to test whether
5394         a specified directory is on a file system of a given type or types.
5395         Otherwise, applications would have had to parse df's output.
5396         E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
5398         Fix a bug: ls --file-type worked like --indicator-style=slash,
5399         rather than like --indicator-style=file-type.
5400         * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
5401         (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
5402         not to 'p'.
5403         (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
5404         * NEWS: Mention the fix.
5405         * tests/ls-2/tests (file-type): New test, for the above fix.
5407 2006-07-19  Jim Meyering  <jim@meyering.net>
5409         * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
5411         * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
5413 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5415         * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
5416         of directories alone unless you specify them explicitly.
5417         install and mkdir now implement X correctly.
5418         install now creates parent directories with mode 755, without
5419         changing their owner or group.
5420         * src/chmod.c (process_file): Adjust to mode_adjust API change.
5421         * src/install.c: Include mkancesdirs.h.
5422         (announce_mkdir, make_ancestor): New functions.
5423         (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
5424         (mode): Use it.
5425         (dir_mode, dir_mode_bits): New vars.
5426         (main): Set dir modes separately from nondir, so that the X
5427         op of -m works correctly.
5428         (main): Remove cwd_errno cruft, since make_dir_parents no longer
5429         affects cwd.  Adjust to new make_dir_parents API.
5430         (install_file_in_file_parents): 2nd arg is now char *, not char
5431         const *.  Use mkancesdirs instead of rolling our own code.
5432         (change_attributes): Don't worry about AFS, since that kludge
5433         should not be needed any more.
5434         * src/mkdir.c (struct mkdir_options): New struct.
5435         (announce_mkdir, make_ancestor): New functions.
5436         (main): Use them.  Adjust to mode_adjust API change.  Stick with
5437         umask 0.  Use make_dir_parents for all the work.
5438         * src/mkfifo.c (main): Adjust to new mode_adjust API.
5439         * src/mknod.c (main): Likewise.
5440         * tests/chmod/setgid: Do the setgid test instead of bailing.
5441         * tests/mkdir/p-3: Remove re_protect case that no longer applies.
5442         GNU chmod now behaves like other versions of chmod.
5443         * tests/mkdir/perm: Add a test for the X bug.
5445 2006-07-14  Paul Eggert  <eggert@cs.ucla.edu>
5447         * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
5448         This doesn't fix any bugs, since OUT always equals stdout, but it
5449         makes the code easier to understand.
5451 2006-07-14  Jim Meyering  <jim@meyering.net>
5453         * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
5454         rather than open-coding it.  Now supports mercurial, too.
5455         * .hgignore: New file.
5456         * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
5457         all generated files, including ones like configure and po/*.po
5458         that are currently version-controlled in cvs.
5460         * Makefile.am (EXTRA_DIST): Add a few more .??* files.
5461         They've been in CVS, just haven't been distributed before this.
5462         Distribute ChangeLog-2005, too.
5463         (MAINTAINERCLEANFILES): Add THANKS-to-translators.
5465 2006-07-11  Paul Eggert  <eggert@cs.ucla.edu>
5467         * src/system.h: Assume <dirent.h> exists, since gnulib assumes
5468         this now as well.
5470 2006-07-09  Jim Meyering  <jim@meyering.net>
5472         * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
5473         That happens with Linux/tmpfs.
5474         * tests/mv/Makefile.am (TESTS): Add dir2dir.
5476 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5478         Adjust to recent updates from gnulib.
5479         * src/dd.c (apply_translations): Use toupper rather than
5480         islower followed by toupper; it's simpler and typically
5481         faster now that we assume at least C89 semantics.  Similarly
5482         for tolower.
5483         * src/sort.c (inittables): Likewise.
5484         * src/expand.c (expand): Don't assume that isprint etc. return
5485         booleans (needed for pre-C99 hosts).
5486         * src/fmt.c (check_punctuation): Likewise.
5487         * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
5488         * src/tr.c (is_char_class_member): Likewise.
5489         * src/unexpand.c (unexpand): Likewise.
5490         * src/join.c (is_blank): Remove; no longer needed.  All uses
5491         replaced by isblank (to_uchar (...)).
5492         * src/pinky.c (create_fullname): Don't assume char is unsigned.
5493         * src/printf.c (print_esc): Likewise.
5494         * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
5495         (copy_unescaped_string): Likewise.
5496         * src/stat.c (print_it): Likewise.
5497         * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
5498         convenience on GNU systems.  All uses changed.  Don't bother
5499         looking for any dirent.h substitute other than ndir.h.
5500         (D_INO): Remove unnecessary parentheses.
5501         (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
5502         (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
5503         (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove.  All uses changed
5504         to ctype.h equivalents.
5505         (isblank): Renamed from ISBLANK.  Check for HAVE_DECL_ISBLANK too.
5506         All uses changed.
5508 2006-07-08  Jim Meyering  <jim@meyering.net>
5510         * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
5512         * Makefile.maint (sc_the_the): New rule.
5514         * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
5515         * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
5516         in a comment.
5518 2006-07-07  Jim Meyering  <jim@meyering.net>
5520         * NEWS: Mention that mv can now remove an empty destination directory,
5521         and give an example.  Prompted by a report from Florent Bayle.
5523 2006-07-05  Jim Meyering  <jim@meyering.net>
5525         * src/ls.c (usage): Correct the description of -G: it is useful
5526         only in a long listing.  Reported by Martin Pool in
5527         <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
5529         * man/chmod.x: Correct the description of the sticky bit.  Reported
5530         by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
5532         * src/copy.c (copy_internal): Don't work around old NFS clients like
5533         SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
5534         ENOTEMPTY upon failed rename.  Otherwise, we risk misinterpreting
5535         a banal failure as a recursive move-into-self failure.
5536         Reported by Florent Bayle in <http://bugs.debian.org/376749>.
5538         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
5540 2006-07-03  Jim Meyering  <jim@meyering.net>
5542         Plug another unusual leak.
5543         (AD_mark_helper): Free malloc'd filename if hash_insert says
5544         that string is already in the hash table.
5546         The dev/inode of the topmost directory in each hierarchy were not
5547         being recorded.
5548         * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
5549         (AD_push): Call it from here instead.
5551         Fix two small leaks.
5552         * src/remove.c (AD_stack_clear): New function.
5553         (rm_1): Use it.
5554         (AD_pop_and_chdir): Free *prev_dir just before longjmp.
5556         * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
5557         Add $VG_PATH_PREFIX as a prefix to $PATH
5559         * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
5560         * tests/Makefile.am (evar-check): Remove rule.
5561         (EXTRA_DIST): Remove .env-warn.
5562         * tests/.env-warn: Remove file.  No longer used.
5563         Suggestion from Eric Blake.
5565 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5567         * src/system.h: Include <stdint.h> unconditionally, since we
5568         now assume the stdint module.
5570 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5572         * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
5573         only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
5574         * src/tail.c (main): Implement this.
5575         * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
5576         (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
5578 2006-07-01  Jim Meyering  <jim@meyering.net>
5580         * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
5582         * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
5583         passes once again.
5585 2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5587         * NEWS: seq now uses long double internally rather than double.
5588         It now defaults to a minimal fixed point format if possible.
5589         It lets you use %a, %A, %E, %F, %G.
5590         * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
5591         * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
5592         (isfinite) [!defined isfinite]: New macro.
5593         (separator, terminator): Now points to const.
5594         (first, step, last): Remove.
5595         (usage): Update to match new behavior.
5596         (struct operand, operand): New type.
5597         (scan_arg): Renamed from scan_double_arg, since we no longer use double.
5598         All uses changed.
5599         Compute and return a value of type operand, not double.
5600         (long_double_format): Renamed from valid_format, and now returns a
5601         new format with an "L" added if needed, if the original format was
5602         valid.  Allow %a, %A, %E, %F, and %G formats.
5603         (print_numbers): Take numeric values as args rather than from globals.
5604         Print long double, not double.
5605         (get_width_format): Remove.
5606         (get_default_format): New function.
5607         (main): Implement new way of calculating default format.
5608         Don't worry about locale's representation of the decimal point, since
5609         the arguments are always processed in the C locale.
5610         * tests/seq/basic (neg-2): Adjust to new default format.
5611         (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
5612         implementation should do the right thing.
5614 2006-06-30  Jim Meyering  <jim@meyering.net>
5616         * tests/stty/basic-1: Work around an intermittent test failure
5617         on HP-UX 11.11.  Report and analysis from Bob Proulx.
5618         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
5620 2006-06-28  Paul Eggert  <eggert@cs.ucla.edu>
5622         * NEWS: Support obsolete usages like "sort +1 -2" even when
5623         conforming to POSIX 1003.1-2001, since this is a pure extension to
5624         POSIX.  Problem reported by Christian in:
5625         http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
5626         * src/sort.c (main): Implement this.
5628         * src/system.h (CLOSEDIR): Remove.  All uses changed to closedir.
5629         Autoconf 2.60 says this stuff was obsolete.
5631 2006-06-28  Jim Meyering  <jim@meyering.net>
5633         * src/c99-to-c89.diff: Regenerate, to remove fuzz.
5635 2006-06-28  Bob Proulx  <bob@proulx.com>  (tiny change)
5637         * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
5638         (set -x when VERBOSE=yes) when stderr is redirected before stdout
5639         causing shell tracing of the stdout redirection to be written to
5640         the stderr file.  Avoid problem and test failure on HP-UX by
5641         redirecting stderr last.
5642         * tests/dd/unblock-sync: Order shell file redirections for
5643         stderr and stdout in the common style.
5644         tests/acl: Likewise.
5646 2006-06-27  Jim Meyering  <jim@meyering.net>
5648         * tests/misc/cat-proc: Try to avoid any spurious numeric
5649         differences in frequently-changing /proc/cpuinfo.
5650         Reported by Nelson Beebe.
5652 2006-06-26  Jim Meyering  <jim@meyering.net>
5654         Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
5655         fd_to_subdirp failure, not just when errno == EACCES.
5656         * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
5657         rmdir, here, even though rmdir may happen to be adequate.
5659         * NEWS: rm no longer fails to remove an empty, unreadable directory
5660         * src/remove.c (remove_cwd_entries): If we can't open a directory,
5661         and the failure is not being ignored, try to remove the directory
5662         with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
5663         Problem report and test case from Paul Eggert in
5664         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
5666         * tests/rm/empty-inacc: New test, for the above.
5668         Avoid a segfault for wc --files0=- < /dev/null.
5669         * src/wc.c (compute_number_width): Return right away if nfiles == 0.
5671 2006-06-25  Jim Meyering  <jim@meyering.net>
5673         * NEWS: wc accepts a new option --files0-from=FILE, where FILE
5674         contains a list of NUL-separated file names.
5676         * src/wc.c: Include "readtokens.h".
5677         (usage): Describe the new option, and adjust the `Usage':
5678         with this option, no FILE may be specified on the command line.
5679         (main): Handle the new option.
5680         * tests/misc/wc-files0: New tests, for the above.
5681         * tests/misc/wc-files0-from: Likewise.
5682         * tests/misc/Makefile.am (TESTS): Add wc-files0.
5684 2006-06-24  Jim Meyering  <jim@meyering.net>
5686         * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
5688 2006-06-22  Jim Meyering  <jim@meyering.net>
5690         * src/tee.c (tee_files): Rename from tee, to avoid conflict with
5691         the function in glibc's <fcntl.h>.  Reported by Andreas Schwab.
5693 2006-06-19  Jim Meyering  <jim@meyering.net>
5695         * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5696         so this check is not run as part of "make distcheck".
5698 2006-06-18  Bob Proulx  <bob@proulx.com>  (tiny change)
5700         * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
5702 2006-06-18  Jim Meyering  <jim@meyering.net>
5704         * tests/misc/pwd-long: Make error output a little clearer.
5706 2006-06-17  Jim Meyering  <jim@meyering.net>
5708         * tests/rm/inaccessible: Skip this test on systems without openat
5709         support.  Reported by Bob Proulx.
5711 2006-06-15  Bob Proulx  <bob@proulx.com>  (tiny change)
5713         * tests/misc/mknod: Improve permission checks to handle
5714         running mkdir test in set-gid directories.
5716 2006-06-14  Jim Meyering  <jim@meyering.net>
5718         * tests/du/basic: Revamp not to hard-code file system block sizes.
5720 2006-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5722         * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
5723         files0-from test.
5725 2006-06-11  Jim Meyering  <jim@meyering.net>
5727         * .gitignore: New file.
5728         * Makefile.am (EXTRA_DIST): Add .gitignore.
5730         Setting TIME_STYLE=long-iso in the environment would make the
5731         cp/same-file test fail.
5732         * tests/envvar-check (vars): Add TIME_STYLE to the list.
5733         * tests/cp/same-file: Revert last change.
5734         Source the envvar-check script, to ensure that TIME_STYLE
5735         settings don't affect these tests.
5737 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
5739         * tests/cp/same-file: Execute 'ls' in the C locale, so that it
5740         uses POSIX time stamp formats.  Problem reported by John Nixon in
5741         <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
5743 2006-06-10  Jim Meyering  <jim@meyering.net>
5745         * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
5747         Require a "Version N.M" line at the top of the ChangeLog
5748         file only when making the actual release, not when running
5749         "make distcheck".
5750         * Makefile.maint (maintainer-distcheck): Don't depend on
5751         changelog-check.
5752         (alpha beta major): Depend on it here, instead.
5754 2006-06-08  Jim Meyering  <jim@meyering.net>
5756         Ensure that cat works with any of the options, -A -v -e -E -T,
5757         when applied to files in /proc and /sys, even when the FIONREAD
5758         ioctl produces nonsensical results.  Before this change, cat would
5759         produce no output (or truncated output), for some linux kernels.
5761         * src/cat.c (write_pending): New function, factored out of cat.
5762         (cat): Also interpret a negative ioctl/FIONREAD count as indicating
5763         that there are bytes to read.  Some versions of linux-2.6.16 do that.
5764         Write any pending output before returning.
5765         Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
5766         * NEWS: Mention this bug fix.
5767         * tests/misc/cat-proc: New file.  Test for the above.
5768         * tests/misc/Makefile.am (TESTS): Add cat-proc.
5770 2006-06-07  Paul Eggert  <eggert@cs.ucla.edu>
5772         * src/expr.c (eval4): Detect overflow properly when multiplying
5773         INTMAX_MIN * -1.
5775 2006-06-06  Paul Eggert  <eggert@cs.ucla.edu>
5777         * NEWS: The 'expr' command now detects and reports integer overflow.
5778         (It would be better to use extended precision instead, but that
5779         would be more work.)
5780         * src/expr.c (integer_overflow): New function.
5781         (eval4, eval3): Check for integer overflow.
5783 2006-06-05  Paul Eggert  <eggert@cs.ucla.edu>
5785         Fix problems when building with Solaris/SVR4/etc. make, which uses a
5786         different and somewhat bogus implementation of VPATH.  In the
5787         directory tests/misc, rename tests whose names might appear in the
5788         Automake-generated rules.  For example, we can't use a test named
5789         'test', since Automake generates a rule that contains the text
5790         "if test -f ./$$tst; ...", and this might expand to something like
5791         "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
5792         which executes the 'test' script rather than the 'test' command.
5793         * tests/misc/false-status: Renamed from tests/misc/false.
5794         * tests/misc/pwd-long: Renamed from tests/misc/pwd.
5795         * tests/misc/sort-merge: Renamed from tests/misc/sort.
5796         ($prog): Set to 'sort' rather than to $PROG.
5797         * tests/misc/test-diag: Renamed from tests/misc/test.
5798         * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
5799         in case Solaris make has prepended the directory.
5800         (TESTS): Adjust to above renamings.
5801         * tests/misc/expand: Don't assign to PROG; no longer needed
5802         now that Makefile.am sets PROG to the basename.
5803         * tests/misc/fold: Likewise.
5805 2006-06-03  Jim Meyering  <jim@meyering.net>
5807         Make `cp --link --no-dereference' work also on systems where the
5808         link system call cannot create a hard link to a symbolic link.
5809         * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
5810         the link syscall on a symlink when it would do the wrong thing.
5811         Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
5812         * tests/cp/link-no-deref: New file/test for the above.
5813         * tests/cp/Makefile.am (TESTS): Add link-no-deref.
5814         * NEWS: Mention the change (doesn't affect Linux).
5816 2006-06-01  Paul Eggert  <eggert@cs.ucla.edu>
5818         Fix some porting problems in the test cases reported by
5819         Ralf Wildenhues for HP-UX 11.23 in:
5820         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
5821         * tests/help-version: Don't assume that \< \> works in sed.
5822         * tests/misc/close-stdout: Don't assume that >&- works.
5823         Add a /dev/full test.
5824         * tests/touch/no-create-missing: Don't assume that >&- works.
5826 2006-05-30  Jim Meyering  <jim@meyering.net>
5828         * src/ls.c (usage): Add `v' to the list of sorting-related options.
5829         From Justin Pryzby.
5831 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5833         * tests/cp/fail-perm: source lang-default.
5834         * tests/rm/inaccessible: Likewise.
5836 2006-05-28  Jim Meyering  <jim@meyering.net>
5838         * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
5839         Recognize it, too.  Reported by Ralf Wildenhues, in
5840         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
5842 2006-05-27  Jim Meyering  <jim@meyering.net>
5844         * src/chgrp.c: Support new options: --preserve-root and
5845         --no-preserve-root.  Somehow this program was skipped when those
5846         options were added to chown, chmod, and rm.  Reported by
5847         vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
5848         * NEWS: Mention this.
5850 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
5852         * NEWS: Remove mention of --seed.  We'll replace it with something
5853         better, and don't want to indicate that it is supported.
5854         * src/sort.c (usage): Likewise.
5856 2006-05-20  Jim Meyering  <jim@meyering.net>
5858         * src/chmod.c (main): Use FTS_PHYSICAL here, too.
5860         * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
5861         and arrange for -D to set fts' FTS_PHYSICAL bit as well as
5862         FTS_COMFOLLOW.  Spotted by Justin Pryzby.
5864         * gnupload: Merge changes from automake, retaining the ""--to...
5865         kludge to placate overzealous `make distcheck' check.
5867 2006-05-19  Jim Meyering  <jim@meyering.net>
5869         * src/du.c (main): Don't let -D, -L, or -P turn off the internal
5870         FTS_TIGHT_CYCLE_CHECK directory traversal option.
5871         Reported by Justin Pryzby in http://bugs.debian.org/367691
5873 2006-05-15  Jim Meyering  <jim@meyering.net>
5875         * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
5876         From Tomas Pospisek.
5878 2006-05-13  Jim Meyering  <jim@meyering.net>
5880         * tests/mv/no-target-dir: Test two more cases.
5882 2006-05-11  Jim Meyering  <jim@meyering.net>
5884         mv -T DIR EMPTY_DIR no longer fails unconditionally
5885         * src/copy.c (copy_internal): Don't manually prohibit a move where
5886         the destination is an existing directory.  Sometimes doing that is
5887         valid.  Let the rename system call enforce the rules.  That is
5888         allowed only when the source is a directory and the destination
5889         directory (to be replaced) is empty.  Reported by Eric Blake.
5890         * tests/mv/no-target-dir: New file/test for this.
5891         * tests/mv/Makefile.am (TESTS): Add no-target-dir.
5892         * NEWS: Mention this.
5894         * tests/mv/atomic: New file/test for yesterday's fix.
5895         * tests/mv/Makefile.am (TESTS): Add atomic.
5897         * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
5899 2006-05-10  Jim Meyering  <jim@meyering.net>
5901         * src/copy.c (copy_internal): Don't explicitly unlink the destination
5902         when moving a symlink into the place of an existing non-directory.
5903         Reported by Joshua Hudson.
5904         * NEWS: mention this.
5906 2006-05-07  Jim Meyering  <jim@meyering.net>
5908         * Makefile.maint (patch-check): Fail if patch generates any output,
5909         even merely for changed offsets.
5911         * src/c99-to-c89.diff: Adjust to reflect new offsets.
5913         * NEWS: Mention changes affecting df, pwd, shred.
5915 2006-05-06  Jim Meyering  <jim@meyering.net>
5917         * tests/ls/stat-vs-dirent: New test, to detect the bogus file
5918         system condition where dirent.d_ino != stat.st_ino.
5919         * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
5921 2006-05-06  Eric Blake  <ebb9@byu.net>
5923         * tests/ls/inode: Expand to test inode from readdir case.
5924         * tests/ls/follow-slink: Expand to test broken links encountered
5925         implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
5927 2006-05-06  Eric Blake  <ebb9@byu.net>
5929         * tests/mv/leak-fd: Work even on case-insensitive file system.
5931 2006-05-04  Jim Meyering  <jim@meyering.net>
5933         * NEWS: Mention the 2006-03-19 pwd-related change that makes
5934         lib/getcwd.c work around inconsistent file system dirent.d_ino data.
5936 2006-05-03  Jim Meyering  <jim@meyering.net>
5938         * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
5939         Use better macro parameter names: s/basename/key_name/,
5940         s/basefunc/key_cmp_func.  Fix typo in comment.
5942 2006-04-29  Eric Blake  <ebb9@byu.net>
5944         * src/ls.c (main): On systems with d_type, directories_first only
5945         implies format_needs_type, not format_needs_stat.
5947 2006-05-03  Jim Meyering  <jim@meyering.net>
5949         * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
5950         after comma in arg list, from Eric Blake.
5952 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
5954         * tests/misc/date (relative-3): New test, derived from a bug
5955         report by John Thomas McDole.
5957 2006-04-23  Francesco Montorsi  <fr_m@hotmail.com>
5959         New option for ls: --group-directories-first.
5960         It makes ls list directories before files.
5961         * NEWS [New features]: Mention it.
5962         * src/ls.c (sort_type): Rearrange to use as an array index when
5963         choosing sort function; added new sort_numtypes member for
5964         compile-time check.
5965         (time_type): Add new time_numtypes member for compile-time check.
5966         (directories_first): New global variable.
5967         (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
5968         (long_options): Add --directories-first.
5969         (main): Support new option.
5970         (is_directory): New function.
5971         (extract_dirs_from_files): Use it.
5972         (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
5973         (LIST_SORTFUNCTION_VARIANTS): New macros.
5974         (sort_functions): New global variable.
5975         (sort_files): Use it.
5976         (usage): Document new option.
5978 2006-04-18  Paul Eggert  <eggert@cs.ucla.edu>
5980         * src/shred.c (fillrand): The assertion was way too weak, due to
5981         what must be a typo.  Strengthen it to its intended value.
5982         (dopass): Don't use alloca; it's not worth the aggravation here,
5983         since it's used only to get a page-aligned buffer, and page
5984         alignment doesn't buy us much here.  I'm suspicious that alloca
5985         causes problems on some hosts, due to a recent bug report by Adam
5986         Waltman: http://bugs.gentoo.org/130246.
5988 2006-04-18  Jim Meyering  <jim@meyering.net>
5990         * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
5991         sha384sum, sha512sum.
5993 2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5995         * src/chmod.c (describe_change): Adjust to filemode changes.
5996         * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
5997         (print_long_format): Use (new) filemodestring rather than
5998         (old) mode_string, so that we get more file types right, at least
5999         in theory.  Adjust to filemode changes.
6000         * src/stat.c (human_access): Likewise.
6002 2006-04-18  Jim Meyering  <jim@meyering.net>
6004         * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
6005         ignore file.  This has never been enabled.  Reported by Eric Blake.
6007 2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
6009         * src/ln.c (linkfunc): Remove.  This method ran into a compiler/linker
6010         bug in Interix.  Just call symlink or link directly.  All uses changed.
6011         * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
6012         * src/stat.c (USE_STATVFS): New macro.
6013         Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
6014         (NAMEMAX_FORMAT): define a bit more clearly, now that the
6015         statvfs-using code is a bit more regular.
6016         * src/system.h (sync) [!HAVE_SYNC]: New macro.
6018 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
6020         * NEWS: csplit, nl, expr now conform to POSIX better, and are
6021         more-compatible with traditional Unix, with respect to regular
6022         expressions.
6023         * src/csplit.c (extract_regexp): Set re_syntax_options to a
6024         value that is compatible with what POSIX requires.
6025         * src/nl.c (build_type_arg): Likewise.
6026         * src/expr.c (docolon): Likewise.  Also, don't let anchors match
6027         newline; this fixes an incompatibility with tradition and with POSIX.
6028         Don't warn about leading ^.  POSIX says it is unspecified whether
6029         ^ is a special character, which means that implementations can
6030         either treat it as special or not, but either way a warning is not
6031         allowed (unless the regexp is otherwise invalid).  Instead, anchor
6032         the expression but treat ^ as an anchor; this is the traditional
6033         behavior (e.g., Solaris 10).
6034         (eval4, eval3, eval2): Treat non-numeric args, division by zero,
6035         and the like as invalid expressions (exit status 2), not as
6036         failure of 'expr' (exit status 3).  This is more consistent with
6037         how Solaris behaves.
6038         * tests/expr/basic (fail-a): Adjust exit status to match new expr
6039         behavior, for status 2 versus 3.
6040         (anchor): New test.
6041         (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
6042         (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
6043         (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
6044         (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
6045         (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
6046         (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
6047         (bre61, bre62): New tests.
6048         * tests/misc/csplit: Use \{...\} in test RE, to test that we're
6049         conforming to POSIX.
6051         Port to Solaris 8.
6052         * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
6053         "if !".  Do not assume that 'sed' can handle long, newline-free input.
6054         * tests/du/long-sloop: Likewise.  Evaluate expr once, not $n times.
6056 2006-04-10  Paul Eggert  <eggert@cs.ucla.edu>
6058         Adjust to new regex.h API (with new fastmap type), and clean
6059         up the regex storage allocation a bit.
6061         * src/csplit.c (struct control): Put re_compiled member at the
6062         end, since it's large.  Change regexpr member from char * to bool;
6063         all uses changed.  Add new member fastmap.
6064         (extract_regexp): regexp arg is now char const *, not char *.
6065         Don't bother duplicating the regular expression; it's not needed.
6066         Set fastmap from new fastmap member.  Don't bother allocating
6067         a buffer, as the regexp code does a better job than we do.
6068         * src/expr.c (docolon): Allocate and use a fastmap.
6069         Don't bother allocating a buffer.
6070         * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
6071         New vars.
6072         (build_type_arg): New fastmap arg.  All uses changed.
6073         Don't bother allocating a buffer, but set a fastmap.
6074         * src/ptx.c (context_regex_string, word_regex_string): Remove.
6075         (context_regex, word_regex): New vars, replacing the above.
6076         All uses changed.
6077         (struct regex_data): New type.
6078         (compile_regex): Renamed from alloc_and_compile_regex, since
6079         we no longer allocate storage.  Arg is now a struct regex_data *,
6080         not a const char *.  All uses changed.  Don't allocate the fastmap;
6081         instead, take it from the caller.  Don't convert size_t to int,
6082         to avoid arithmetic overflow problems.  Don't bother freeing
6083         storage afterwards; it's not worth the aggravation.
6084         * src/tac.c (compiled_separator_fastmap): New ver.
6085         (main): Use it.  Don't bother allocating a buffer.
6087 2006-03-30  Jim Meyering  <jim@meyering.net>
6089         * src/dd.c (iwrite): Remove assignment without effect.
6090         Reported by Felix Rauch Valenti.
6092 2006-03-22  Eric Blake  <ebb9@byu.net>
6094         * src/ptx.c (usage): Remove mention of --copyright/-C.
6095         (main): Alias --copyright to --version plus a deprecation warning.
6096         * NEWS: Mention this.
6098 2006-03-27  Jim Meyering  <jim@meyering.net>
6100         * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
6101         use of strtod.  Tiny patch from Nickolai Zeldovich.
6103 2006-03-11  Eric Blake  <ebb9@byu.net>
6105         * tests/misc/dirname: New file.
6106         * tests/basename/Makefile.am: Delete.
6107         * tests/basename/basic: Move to...
6108         * tests/misc/basename: ... this new file.  Add some tests,
6109         including fixed behavior for //.
6110         * tests/misc/Makefile.am (TESTS): Sort.  Add basename, dirname.
6111         * tests/Makefile.am (SUBDIRS): Remove basename.
6112         * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
6114         Improvements to dirname/basename handling on platforms like
6115         cygwin with distinct // and with drive letters.
6116         * NEWS: Document new behavior.
6117         * src/basename.c (main): Don't strip suffix from file system
6118         roots.
6119         * src/cp.c (target_directory_operand): Use new last_component.
6120         (ASSIGN_BASENAME_STRDUPA): Likewise.  Reduce time spent
6121         traversing the string.
6122         * src/dircolors.c (guess_shell_syntax): Use new last_component.
6123         * src/install.c (target_directory_operand, install_file_in_dir):
6124         Likewise.
6125         * src/ln.c (target_directory_operand, main): Likewise.
6126         * src/ls.c (basename_is_dot_or_dotdot): Likewise.
6127         * src/mv.c (target_directory_operand, movefile): Likewise.
6128         * src/remove.c (rm_1): Likewise.
6129         * src/shred.c (wipename): Likewise.
6130         * src/split.c (next_file_name): Likewise.
6131         * src/su.c (log_su, run_shell): Likewise.
6133 2006-03-23  Paul Eggert  <eggert@cs.ucla.edu>
6135         * NEWS: nohup diagnostics are now more precise, and nohup now
6136         redirects stderr to nohup.out if stdout is closed and stderr is a tty.
6137         * src/nohup.c (main): Implement this.
6138         * tests/misc/nohup: Test the new behavior.
6140 2006-03-12  Jim Meyering  <jim@meyering.net>
6142         * src/copy.c (set_author): Rename function, from preserve_author.
6144         * src/remove.c (AD_pop_and_chdir): Use new macro,
6145         CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
6147         * src/system.h (SAME_INODE): Remove definition.
6148         Include "same-inode.h", instead.
6150 2006-03-11  Eric Blake  <ebb9@byu.net>
6152         * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
6154 2006-03-10  Jim Meyering  <jim@meyering.net>
6156         Fix a bug whereby a user with write access to a directory being removed
6157         could cause the removal of that directory to fail with an erroneous
6158         diagnostic about a directory cycle.  Reported by Vineet Chadha.
6160         * NEWS: Mention this.
6161         * src/remove.c (AD_pop_and_chdir): If the directory we're about to
6162         leave (and try to rmdir) is the one whose dev_ino is being used to
6163         detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
6165 2006-03-08  Paul Eggert  <eggert@cs.ucla.edu>
6167         * NEWS: Document dd's new 'directory' and 'nolinks' flags.
6168         * src/dd.c (set_fd_flags): Handle file-creation flags on file
6169         descriptors, rather than ignoring them.
6170         * tests/dd/misc: Add test cases for append, nofollow, directory,
6171         and nolinks flags.  Simplify redirection to /dev/null in some cases.
6173         * tests/dd/misc: iflags->iflag.  This fixes a typo that meant the
6174         noatime test never tested anything.
6176 2006-03-05  Paul Eggert  <eggert@cs.ucla.edu>
6178         * src/dd.c (flags, usage): New flags directory, nolinks.
6179         * src/system.h (O_NOLINKS): Define to 0 if not already defined.
6181         * src/ls.c (usage): Mention that -f disables --color.
6182         Problem reported by Niels Möller.
6184 2006-03-03  Justin Pryzby  <pryzbyj@justinpryzby.com>
6186         * man/*.x: Add references to syscalls from utilities of the same name.
6188 2006-03-05  Jim Meyering  <jim@meyering.net>
6190         * tests/help-version: Set SHELL, if not already set, in order to
6191         avoid failure when `make check' is run through debuild;  dircolors
6192         would fail due to lack of $SHELL.  Reported by Sven Joachim.
6194         Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
6195         * src/base64.c (wrap_write, do_encode, main): Change type of
6196         parameters and locals, wrap_column, form size_t to uintmax_t.
6197         (main): Adjust to use xstrtoumax, accordingly.
6199 2006-03-03  Jim Meyering  <jim@meyering.net>
6201         Don't fail when run from an environment with SHELL not a Bourne
6202         shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
6203         * tests/dircolors/simple: Invoke each non-failing test with -b.
6204         Reported by Michael Stone.
6206 2006-02-27  Jim Meyering  <jim@meyering.net>
6208         * tests/misc/base64: Derive --decode-using tests from the
6209         encode-based ones.
6211         * tests/misc/base64: Factor out a long constant string.
6212         Split lines to stay within 80 columns.
6214         * tests/misc/Makefile.am (TESTS): Add base64.
6215         * tests/misc/base64: Test base64.  From Simon Josefsson.
6217         * src/base64.c (do_decode): Use correct type for parameter,
6218         ignore_garbage: s/size_t/bool/.
6220         * src/base64.c: Don't include .h files already included by system.h:
6221         <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
6222         Include "system.h" before the other lib/*.h header files.
6223         Include <sys/types.h> before "system.h".
6224         (wrap_write): Remove declaration of unused local, initial_column.
6225         (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
6227         * README: Add base64 to the list.
6229 2006-02-17  Simon Josefsson  <jas@extundo.com>
6231         New program: base64.
6232         * AUTHORS: Mention base64.
6233         * NEWS: Likewise.
6234         * man/Makefile.am: Build base64.1.
6235         * man/base64.x: New file.
6236         * src/Makefile.am (bin_PROGRAMS): Add base64.
6237         * src/base64.c: New file.
6239 2006-02-25  Eric Blake  <ebb9@byu.net>
6241         In ls, avoid calling stat for --inode (-i), when possible.
6242         * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
6243         * src/system.h: ... here, for use in ...
6244         * src/ls.c (main): ... here.  Prefer dirent.d_ino to stat when
6245         possible.
6246         (gobble_file): Add inode argument.
6247         (print_dir): Pass inode if available.
6248         (usage): Remove inaccuracy.
6250 2006-02-23  Jim Meyering  <jim@meyering.net>
6252         * TODO: Update/correct some obsolete entries.
6254 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
6256         * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
6257         * src/join.c (usage): Likewise.
6258         Documentation problem reported by Philip Kensche.
6260 2006-02-20  Eric Blake  <ebb9@byu.net>
6262         * man/rm.x: Update documentation to match previous patch.
6264 2006-02-18  Eric Blake  <ebb9@byu.net>
6266         New option for rm: --interactive=once (-I).
6267         * NEWS: Document it, along with change to rm --interactive.
6268         * TODO: Remove entry for implementing rm -I
6269         * src/rm.c (INTERACTIVE_OPTION): New enum value.
6270         (interactive_type): New enum.
6271         (long_opts): Let interactive take an optional argument.
6272         (interactive_args, interactive_types): New option arguments.
6273         (usage): Document -I, --interactive=WHEN.  Use program_name
6274         instead of a basename.
6275         (main): New -I option, new behavior to --interactive.
6276         * tests/rm/interactive-once: New tests.
6277         * tests/rm/interactive-always: Ditto.
6278         * tests/rm/Makefile.am (TESTS): Run them.
6280 2006-02-18  Jim Meyering  <jim@meyering.net>
6282         * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
6283         expression match more of the target lines, e.g., those that start with
6284         `-S,' (short option followed by a comma) or that include `=[...]'.
6285         Patch by Nicolas François.
6286         Fix the four offenders thus exposed:
6287         * src/join.c (usage): Use two spaces (not one) to separate the
6288         --first-only option string from its description, so help2man formats
6289         the derived man page properly.
6290         * src/pr.c (usage): Likewise.
6291         * src/uniq.c (usage): Likewise.
6292         * src/install.c (usage): Likewise.
6294 2006-02-15  Jim Meyering  <jim@meyering.net>
6296         * Makefile.maint (alpha beta major): For `make major', ensure that the
6297         version string is of the form N.N[.N]*, where N is one or more digits.
6299 2006-02-14  Jim Meyering  <jim@meyering.net>
6301         * INSTALL: Update from gnulib.
6303 2006-02-13  Jim Meyering  <jim@meyering.net>
6305         * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
6307 2006-02-12  Jim Meyering  <jim@meyering.net>
6309         * Makefile.maint (patch-check): New target.
6310         (local-checks-available): Add to the list.
6312 2006-02-11  Jim Meyering  <jim@meyering.net>
6314         * src/c99-to-c89.diff: New file.
6315         * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
6317         * .x-po-check: New file, with exclusions so that `make distcheck'
6318         passes once again.
6319         * Makefile.am (EXTRA_DIST): Add .x-po-check.
6321         rm -r must remove an empty directory, even if it is inaccessible.
6322         * src/remove.c (close_preserve_errno): New function.
6323         (fd_to_subdirp): Don't print a diagnostic in this function.
6324         Do it from the callers instead, unless rmdir succeeds.
6325         (remove_cwd_entries, remove_dir): Adjust callers.
6326         * tests/rm/empty-inacc: New test for the above.
6327         * tests/rm/Makefile.am (TESTS): Add empty-inacc.
6328         * NEWS: Mention this bug fix.
6329         * tests/rm/rm2: Adjust two expected diagnostics, now that they're
6330         a tiny bit less precise: cannot remove `a/1': ... instead of
6331         cannot open directory `a/1': ...
6333         * Makefile.maint (syntax-check-rules): Automatically derive this
6334         list of sc_-prefixed rule names.
6336 2006-02-10  Paul Eggert  <eggert@cs.ucla.edu>
6338         * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
6339         (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
6340         Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
6341         (syntax-check-rules): Bring back sc_changelong.  (Hmm, why did it
6342         go away? was that an accident?)
6343         (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6344         (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
6345         (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
6346         (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
6347         (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
6348         (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
6349         (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
6350         (author_mark_check, makefile_path_separator_check):
6351         Output line numbers, to simplify navigation of Emacs *compilation*
6352         buffers.
6353         (sc_prohibit_atoi_atof, sc_file_system):
6354         Rework slightly so that Makefile.maint doesn't get reported as a
6355         violation of its own syntax rules.
6356         (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
6357         it at run-time (which didn't work with Bison).  Fix a makefile typo,
6358         caught by Makefile.maint itself: spaces where a tab should be.
6359         (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
6360         which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
6361         Ignore djgpp and man subdirectories, to avoid false matches with
6362         Bison and coreutils, respectively.  Use sort -u to remove the
6363         resulting duplicates.
6364         * gnupload: Rework slightly to avoid bogus warning from
6365         sc_two_space_separator_in_usage.
6367 2006-02-10  Jim Meyering  <jim@meyering.net>
6369         Use gzip's --rsyncable option only if it's available.
6370         * Makefile.maint (gzip_rsyncable): New variable.
6371         (GZIP_ENV): Use it.
6373 2006-02-08  Jim Meyering  <jim@meyering.net>
6375         * Makefile.maint (local-checks-available): Define in terms of
6376         the expansion, $(syntax-check-rules), rather than the single,
6377         top-level target `syntax-check', so that it's easier to exclude
6378         individual rules (via $(local-checks-to-skip)).
6379         (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
6381 2006-02-07  Jim Meyering  <jim@meyering.net>
6383         * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
6384         is on Tru64), define O_DIRECT to that.  Patch From James Lemley.
6386         * tests/help-version (expected_failure_status_vdir):
6387         Redirect an expected disk-full diagnostic to /dev/null.
6389 2006-02-06  Jim Meyering  <jim@meyering.net>
6391         * src/unexpand.c (usage): Use two spaces (not one) to separate the
6392         --first-only option string from its description, so help2man formats
6393         the derived man page properly.
6394         * src/rm.c (usage): Likewise for --no-preserve-root.
6395         * src/chown.c (usage): Likewise.
6396         * src/chgrp.c (usage): Likewise.
6398         Add a rule to ensure that the above doesn't happen again.
6399         * Makefile.maint (sc_two_space_separator_in_usage): New rule.
6400         (syntax-check-rules): Add it.
6401         * .x-sc_two_space_separator_in_usage: New empty file.
6402         * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
6404 2006-02-06  Jim Meyering  <jim@meyering.net>
6406         * src/cp.c (usage): Use two spaces (not one) to separate each
6407         option string from its description, so help2man formats the
6408         derived man page properly.
6409         * src/mv.c (usage): Likewise.
6410         Patch from Nicolas François in http://bugs.debian.org/351601.
6412 2006-02-04  Jim Meyering  <jim@meyering.net>
6414         * src/copy.c (copy_internal): cp -RL would fail when encountering
6415         the same directory more than once in the hierarchy beneath a single
6416         command-line argument.  That is legitimate, e.g. when there are
6417         two or more symbolic links, each pointing to some directory that
6418         would not otherwise be copied.  Reported by Christophe LYON.
6419         * tests/cp/cp-deref: New file.  Test for today's fix.
6420         * tests/cp/Makefile.am (TESTS): Add cp-deref.
6421         * NEWS: Document this.
6423 2006-02-03  Jim Meyering  <jim@meyering.net>
6425         * configure.ac: Require automake-1.9.6, not 1.8.3.
6427 2006-02-01  Paul Eggert  <eggert@cs.ucla.edu>
6429         * src/od.c (usage): Mention that -t a ignores high order bit.
6430         Documentation problem reported by Ed Avis.
6432 2006-02-01  Jim Meyering  <jim@meyering.net>
6434         * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
6436 2006-01-30  Paul Eggert  <eggert@cs.ucla.edu>
6438         * src/head.c (main): Use a better diagnostic when someone uses a
6439         trailing numeric option in an invalid way.  Problem reported by
6440         Karl Berry.
6441         * src/tail.c (parse_options): Likewise.
6443 2006-01-30  Jim Meyering  <jim@meyering.net>
6445         * man/wc.x: Include `count' keyword in man page synopsis,
6446         per suggestion from http://bugs.debian.org/181585.
6448 2006-01-24  Paul Eggert  <eggert@cs.ucla.edu>
6450         * src/df.c (show_dev): If the file system claims to have
6451         more available than total blocks, report the number of used
6452         blocks as being total - available (a negative number) rather
6453         than as garbage.  Problem reported by Toralf Foerster.
6455 2006-01-24  Jim Meyering  <jim@meyering.net>
6457         * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
6458         to put a regular file in O_NONBLOCK mode fails with EPERM.
6459         That happens on Linux (up to 2.6.15) when using tail -f on a file with
6460         the append-only attribute.  Reported by Dean Gaudet.  For details,
6461         see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
6462         * NEWS: Mention this fix.
6463         * tests/tail-2/append-only: New file.  Test for the above.
6464         * tests/tail-2/Makefile.am (TESTS): Add append-only.
6465         * tests/Makefile.am (check-root): Add tail-2/append-only
6467 2006-01-21  Jim Meyering  <jim@meyering.net>
6469         * NEWS: Mention fts-related improvements and bug fixes.
6471 2006-01-19  Jim Meyering  <jim@meyering.net>
6473         * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
6474         reported as http://bugs.debian.org/147577.  Forwarded by Thomas Hood.
6476 2006-01-18  Jim Meyering  <jim@meyering.net>
6478         * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
6480 2006-01-17  Jim Meyering  <jim@meyering.net>
6482         Now that fts no longer changes the current working directory, adjust
6483         its clients accordingly -- note that du.c uses fts but doesn't need
6484         any adjustment, since it doesn't operate on the actual files,
6485         but rather just uses the stat buffers provided by fts.
6487         * src/chown-core.c: Include "openat.h".
6488         Don't include "lchown.h".
6489         (restricted_chown): Accept a new parameter, CWD_FD, and use it in
6490         calling openat, lchownat, chownat, rather than open, lchown, chown.
6491         Update caller.
6492         * src/chmod.c: Include "openat.h".
6493         (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
6495         * tests/du/long-from-unreadable: New test, to exercise one small
6496         corner of fts.c.
6498 2006-01-13  Jim Meyering  <jim@meyering.net>
6500         * tests/Makefile.am (SUBDIRS): Add comments discouraging the
6501         addition of new directories under tests/.
6503         * tests/acl: Redirect stdin to /dev/null.  Otherwise, FreeBSD 5.0's
6504         getfacl would hang.
6506 2006-01-12  Jim Meyering  <jim@meyering.net>
6508         * tests/du/long-sloop: Adjust not to hard-code the expected
6509         diagnostic corresponding to ELOOP.  Solaris' diagnostic differs
6510         from that of GNU libc.  Reported by Paul Eggert.
6512         * tests/du/long-sloop: Create file at end of symlink chain.
6514         * tests/misc/test: New file, with a test for one of the
6515         bugs fixed by yesterday's test.c changes.
6516         * tests/misc/Makefile.am (TESTS): Add test.
6518 2006-01-11  Jim Meyering  <jim@meyering.net>
6520         * tests/du/long-sloop: New file.  Test for today's fts.c bug fix.
6521         That bug could make du -L, chgrp -L, or chown -L fail to diagnose
6522         a very long sequence of symbolic links (not necessarily a loop).
6523         * tests/du/Makefile.am (TESTS): Add long-sloop.
6525 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
6527         * src/test.c (test_syntax_error): Append a newline.  All callers
6528         changed, except for the ones that didn't already append a newline.
6529         Bug reported by Eric Blake.
6531 2006-01-11  Jim Meyering  <jim@meyering.net>
6533         * src/system.h (X2NREALLOC): Now that verify_true is no longer
6534         void, cast its result to void, to avoid gcc's warning that
6535         ``left-hand operand of comma expression has no effect''.
6536         (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
6538 2006-01-10  Jim Meyering  <jim@meyering.net>
6540         * tests/chmod/no-x: Add a test for today's fts.c fix.
6542 2006-01-10  Jim Meyering  <jim@meyering.net>  (tiny change)
6544         * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
6545         This is necessary for Dragonfly.  Patch by Joerg Sonnenberger.
6547 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6549         * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
6550         Use verify_true instead of verify_expr, to sync with gnulib.
6552 2006-01-08  Jim Meyering  <jim@meyering.net>
6554         * src/date.c (usage): Adjust the formatting of the entries for
6555         %::z and %:::z (separate with two spaces, not one) so that help2man
6556         formats them properly.  Reported by Philip Rowlands.
6558 2006-01-06  Paul Eggert  <eggert@cs.ucla.edu>
6560         * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
6562 2006-01-06  Jim Meyering  <jim@meyering.net>
6564         * Makefile.maint (copyright-check): Use date +%Y in place of
6565         hard-coded 2005.
6567         * src/remove.c (rm_1): Remove `static' attribute on local `status'.
6568         First off, the attribute should have been `volatile' (not static)
6569         to avoid longjmp-related risk of clobber.  Secondly, now there is
6570         no longer any risk of a local variable being clobbered, so there's
6571         no need for any attribute at all.
6573 2006-01-05  Jim Meyering  <jim@meyering.net>
6575         * src/remove.c: Give a few functions the inline attribute.
6576         (AD_pop_and_chdir): Use gotos to avoid some duplication.
6577         (AD_push): Rewrite an assertion so that the entire computation
6578         goes away when assertions are turned off.
6580         * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
6581         It's already defined in "system.h".
6582         * Makefile.maint: Add a FIXME comment.
6584 2006-01-04  Jim Meyering  <jim@meyering.net>
6586         * ChangeLog: Remove entries from 2005-10-22 and earlier.
6587         * ChangeLog-2005: New file, for entries up to version 5.92.
6589 2006-01-03  Jim Meyering  <jim@meyering.net>
6591         * tests/du/no-x: Also allow a slightly different diagnostic -- the
6592         one you get when using openat-enabled fts.c and du (coming soon).
6593         * tests/chmod/no-x: Likewise.
6594         * tests/chgrp/no-x: Likewise.
6596         * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
6598 2006-01-02  Paul Eggert  <eggert@cs.ucla.edu>
6600         * src/chown-core.c (RC_do_ordinary_chown): New enum value.
6601         (restricted_chown): Return it, if the file cannot be accessed due
6602         to EPERM, or if no uid or gid are required, or if the file is
6603         neither a directory nor a regular file.  Rewrite to avoid gotos.
6604         (change_file_owner): Handle RC_do_ordinary_chown case.
6605         Rewrite to avoid gotos.
6606         * tests/chgrp/basic: Make sure we can change the group of
6607         inaccessible files.
6609         * src/date.c (usage): Explain %g, %G, and %V a bit better.
6611 2006-01-02  Jim Meyering  <jim@meyering.net>
6613         * src/copy.c (set_owner): Correct a comment.
6615         * src/tail.c (parse_options): Change warning to say that --retry
6616         is useful `mainly' (not `only') when following by name.
6617         Reported here: http://bugs.debian.org/273781
6619 2006-01-01  Paul Eggert  <eggert@cs.ucla.edu>
6621         * NEWS: Document that mkfifo and mknod -m no longer set special bits.
6622         * src/copy.c: Include lchmod.h.
6623         (copy_internal): Use lchmod rather than chmod.
6624         * src/cp.c: Include lchmod.h.
6625         (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
6626         * src/mkdir.c: Include lchmod.h.
6627         (usage): Clarify -m's operation.
6628         (main): Use lchmod rather than chmod.  Don't use lchmod unless the
6629         new mode contains bits outside the 777 range.
6630         * src/mkfifo.c (usage): Clarify -m's operation.
6631         (main): If -m is given, don't invoke chmod; use umask 0 instead.
6632         Report an error if -m asks for bits outside the 777 range.
6633         * src/mknod.c (usage, main): Likewise.
6635         * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
6637 2005-12-27  Jim Meyering  <jim@meyering.net>
6639         * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
6640         (sc_prohibit_assert_without_use): New rule.
6641         (syntax-check-rules): Add it to the list.
6642         * .x-sc_prohibit_assert_without_use: New empty file.
6643         * Makefile.am (EXTRA_DIST): Add it.
6645         * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
6647         * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
6648         Don't include <assert.h>; it wasn't used.
6650 2005-12-26  Paul Eggert  <eggert@cs.ucla.edu>
6652         * src/chown-core.c (restricted_chown):
6653         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
6654         * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
6655         | O_NOFOLLOW too, for consistency with other dir-openers.
6656         Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
6657         (is_empty_dir): Likewise.
6658         * src/shred.c (wipename): Likewise.  Don't bother trying to open
6659         dir for writing, since POSIX prohibits it.
6661 2005-12-22  Jim Meyering  <jim@meyering.net>
6663         * tests/help-version: Redirect stderr to /dev/full, to suppress
6664         write error diagnostic.
6666 2005-12-19  Jim Meyering  <jim@meyering.net>
6668         * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
6669         Avoid a minor race condition when `-m MODE' is specified, by using
6670         open, fchown, and close rather than just chown.  To do that reliably --
6671         even with an overly restrictive umask -- ensure that each mkdir,
6672         mknod and mkfifo call uses a mode including at least owner-read access.
6673         * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
6674         the subsequent chown (or equivalent open,fchown,close) fails.
6675         * tests/misc/mknod: New tests.
6676         * tests/misc/Makefile.am (TESTS): Add mknod.
6678 2005-12-17  Jim Meyering  <jim@meyering.net>
6680         * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
6681         e.g., on a named pipe.
6682         (OPEN_NO_FOLLOW_SYMLINK): Remove definition.  Use O_NOFOLLOW in
6683         place of all uses, since it is guaranteed (system.h) to be defined.
6685 2005-12-05  Andreas Gruenbacher  <agruen@suse.de>
6687         Add POSIX ACL support
6688         * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
6689         is no requirement for ACL support; particularly, it does not exist
6690         on systems that have POSIX ACLs.
6691         * src/copy.h (cp_option_init) [umask_kill]: Remove member.
6692         * src/cp.c (umask_kill): With default acls, the umask is not to be
6693         applied.  Remove umask_kill, don't change the process umask, and let
6694         the kernel apply the umask where appropriate.
6695         * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
6696         * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
6697         umask_kill.
6698         (copy_reg, copy_internal): Use copy_acl and set_acl
6699         instead of fchown/chown. Fix the logic for POSIX ACLs.
6700         (chown_succeded): Remove; we now always copy acls and
6701         preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
6702         did a chown before or not.
6703         * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
6704         * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
6705         mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
6706         to link with it via $(LIB_ACL), for the utilities that need it.
6708 2005-12-16  Paul Eggert  <eggert@cs.ucla.edu>
6710         * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
6711         (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
6712         (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
6713         value is now signified by whether cwd_errno is null.
6714         (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
6715         pointer-to-bool to pointer-to-errno-value.  All callers changed.
6716         (rm_1): Don't bother setting a local cwd failure flag and then
6717         ORing it into the caller's.  Just set the caller's.
6718         (rm): Use cwd failure errno value to print a slightly-better
6719         diagnostic.
6721 2005-12-15  Jim Meyering  <jim@meyering.net>
6723         * src/stat.c (print_it): Properly handle a backslash at the
6724         end of a --printf format string.  Reported by Paul Eggert.
6725         * tests/misc/stat-printf (end-bs): Add a test for the above.
6727 2005-12-15  Paul Eggert  <eggert@cs.ucla.edu>
6729         * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
6730         Don't assume /etc/passwd contains user names; use 'id' instead.
6732 2005-12-15  Jim Meyering  <jim@meyering.net>
6734         stat: revert behavior of --format=FMT (-c)
6735         stat: add new option: --printf=FMT
6736         * NEWS: Mention this.
6737         * src/stat.c (isodigit, octtobin, hextobin): Define.
6738         (PRINTF_OPTION): Define.
6739         (interpret_backslash_escapes, trailing_delim): New globals.
6740         (usage): Document them.  Alphabetize on long option names.
6741         (print_esc_char): New function.
6742         (print_it): Rewrite, in order to handle backslash escapes.
6743         (main): Handle new option.  Set globals for --format, too.
6745         * tests/misc/stat-printf: Test --printf and --format.
6746         * tests/misc/Makefile.am (TESTS): Add stat-printf.
6748 2005-12-14  Paul Eggert  <eggert@cs.ucla.edu>
6750         * NEWS: sort now reports incompatible options.
6751         * src/sort.c (incompatible_options, check_ordering_compatibility):
6752         New functions.
6753         (main): Use them.  Don't bother with a usage message for
6754         "sort -c a b", for consistency with other error diagnostics.
6755         * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
6756         New tests.
6758         * src/cat.c (main): Undo previous change.  close_stdout already
6759         does the check, so the previous change wasn't necessary.
6761 2005-12-13  Paul Eggert  <eggert@cs.ucla.edu>
6763         * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
6765 2005-12-12  Paul Eggert  <eggert@cs.ucla.edu>
6767         Install a more-conservative approach for sort -R.  It's the
6768         same basic idea as the existing code, except it uses the full ISAAC
6769         approach (called the "more kosher" approach in the existing comments).
6770         This makes "sort -R" quite a bit slower (about a factor of 2 on my
6771         little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
6772         better to be conservative here at first, and review any performance
6773         improvements carefully.
6774         * .x-sc_require_config_h: Add src/rand-isaac.c.
6775         * src/rand-isaac.h: Remove.  All uses now simply include rand-isaac.c.
6776         * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
6777         (shred_SOURCES, sort_SOURCES): Remove.
6778         (EXTRA_DIST): Add rand-isaac.c.
6779         * src/rand-isaac.c: Revert to what used to be in shred.c, without
6780         changing it to allow for varying numbers of words in the state.
6781         Alter so that we include rand-isaac.c directly rather than
6782         compiling it and linking to it.  Don't include config.h or
6783         system.h; that's the includer's responsibility.
6784         Omit functions that are specific to shred.
6785         (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
6786         (isaac_step, struct irand_state):
6787         Resurrect these, with the same defns that used to be in shred.c.
6788         (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
6789         (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
6790         static again.
6791         (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
6792         (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
6793         (irand_init, irand32, irand_mod):
6794         Number of words is constant again.
6795         (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
6796         * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
6797         * src/sort.c: Likewise.
6798         * src/shred.c (fillrand, dopass, main): Undo previous change.
6799         (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
6800         from rand-isaac.c.
6801         * src/sort.c: Don't include md5.h; it wasn't needed.
6802         (struct keyfield): Rename random_hash to random, for consistency
6803         with the other member names.  All uses changed.
6804         (usage): Tweak wording to mention STRING for --seed option.
6805         (short_options): Rorder for consistency with other programs.
6806         (rand_state): Now a struct, not a pointer to one.  All uses changed.
6807         (HASH_WORDS, HASH_SIZE): Remove.
6808         (get_hash): Remove comments around resbuf size, since we can assume C89.
6809         Use a "more-kosher" (but slower) approach of invoking isaac_refill.
6810         (keycompare): Adjust to the new get_hash.
6811         Add a FIXME.
6812         (badfieldspec): Omit recently-introduced comment; it isn't needed.
6813         (main): Don't set need_random simply because gkey has it set; that
6814         doesn't necessarily mean we'll need random numbers.
6815         Redo seeding to match new get_hash approach.
6817 2005-12-10  Jim Meyering  <jim@meyering.net>
6819         * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
6821         Avoid shred segfault on 64-bit systems.
6822         * src/rand-isaac.c (isaac_refill): Don't try to negate a
6823         local of type uint32_t.  Make the local an `int' instead.
6825         * NEWS: Mention sort's new options.
6827         * src/rand-isaac.c (isaac_mix): Declare to be static.
6828         Mark all other functions as `extern' so the tight-scope
6829         part of `make distcheck' passes once again.
6830         * src/rand-isaac.h (isaac_mix): Remove declaration.
6832         * src/sort.c (get_hash): Change position of `*' in parameter
6833         type to conform with convention.
6834         (main): Split a long line so it fits in 80 columns.
6835         (keycompare): Remove stray SPACE before TAB that was
6836         causing `make distcheck' to fail.
6838         * src/shred.c: Don't include gethrxtime.h.  No longer needed.
6840         * tests/misc/sort-rand: New file: basic tests for the new options.
6841         * tests/misc/Makefile.am (TESTS): Add sort-rand.
6843 2005-12-10  Frederik Eaton  <frederik@ofb.net>
6845         * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
6846         (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
6847         * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
6848         Make state size runtime-configurable.
6849         (isaac_new, isaac_copy): New functions.
6850         * src/rand-isaac.h: New file.
6851         * src/shred.c: Include rand-isaac.h.  Move ISAAC code to rand-isaac.c.
6852         (fillrand, main): Adjust to the fact that the state size is now
6853         runtime-configurable.
6854         * src/sort.c (short_options, long_options, WORDS, keycompare, main):
6855         (usage): Add options --random-sort and --seed to implement a random
6856         shuffle.
6857         Include md5.h and rand-isaac.h.
6858         (get_hash): New function.
6859         (rand_state): New var.
6860         (HASH_WORDS, HASH_SIZE): New macros.
6862 2005-12-09  Paul Eggert  <eggert@cs.ucla.edu>
6864         * tests/dd/misc: Add test for dd iflags=noatime.
6866 2005-12-09  Jim Meyering  <jim@meyering.net>
6868         * src/sort.c (usage): Mention white space vs -b and -t options.
6869         From The Wanderer.
6871 2005-12-09  Eric Blake  <ebb9@byu.net>
6873         * src/test.c (main): Fix misleading comment.
6875 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
6877         * NEWS: Mention dd's new noatime flag.
6878         * src/system.h (O_NOATIME): Define to 0 if not already defined.
6879         * src/dd.c (flags, usage): Add support for noatime flag.
6881 2005-12-07  Jim Meyering  <jim@meyering.net>
6883         Distribute the cvsu script, used only by `make syntax-check'.
6884         * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
6885         * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
6886         distribute a copy of this script.
6887         * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
6889         * tests/mv/acl: exit-77 before the trap, not after, if we fail
6890         to create a temporary directory on another partition.
6891         From Andreas Gruenbacher.
6893 2005-12-06  Tomas Pospisek  <tpo@sourcepole.ch>  (tiny change)
6895         * man/basename.x: Cross-reference to dirname and readlink.
6896         * man/dirname.x: Cross-reference to basename and readlink.
6898 2005-12-05  Andreas Gruenbacher
6900         * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
6901         (set_owner, preserve_author): New functions, factored out of copy_reg.
6902         (copy_reg): Use them.
6903         (copy_internal): Use them here, too.
6905 2005-12-04  Jim Meyering  <jim@meyering.net>
6907         * src/sleep.c (usage): Say what happens with two or more arguments.
6908         Suggested by Justin Pryzby.
6910         * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
6911         where it's used.
6913 2005-12-03  Jim Meyering  <jim@meyering.net>
6915         * src/rm.c (long_opts): Change the name of each undocumented, for-
6916         testing-only option to start with `-', so that it cannot render
6917         ambiguous any prefix it happens to share with some other option name.
6918         Problem reported by Eric Blake.
6919         * src/head.c (long_options): Likewise.
6920         * src/tail.c (long_options): Likewise.
6922         * tests/misc/head-elide-tail: Update uses of undocumented, for-
6923         testing-only --presume* options to start with `---'.
6924         * tests/rm/dangling-symlink: Likewise.
6925         * tests/rm/dir-no-w: Likewise.
6926         * tests/rm/isatty: Likewise.
6928 2005-11-30  Jim Meyering  <jim@meyering.net>
6930         * Makefile.maint: Add a comment about cvsu.
6932 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
6934         * NEWS: df updates for "none", "proc", inaccessible file systems.
6935         * src/df.c (show_point): Ignore inaccessible file systems.
6936         (usage): -a includes dummy file systems, not size-0 file systems.
6938         * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
6939         to avoid collision with POSIX name space.  All uses changed.
6941 2005-11-24  Jim Meyering  <jim@meyering.net>
6943         * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
6944         * tests/acl: Add `$0: ' prefix to diagnostics.
6946         * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
6948 2005-11-23  Paul Eggert  <eggert@cs.ucla.edu>
6950         * src/copy.c: Improve performance a bit by optimizing away
6951         unnecessary system calls and going to a block size of at least
6952         8192 (on normal hosts, anyway).  This improved performance 5% on my
6953         Debian stable host (2.4.27 kernel, x86, copying from root
6954         ext3 file system to itself).
6955         Include "buffer-lcm.h".
6956         (copy_reg): Omit last argument.  All callers changed.
6957         Use xmalloc to allocate rather than trusting alloca
6958         (which is unwise with large block sizes).
6959         Declare locals more locally, if possible.
6960         Use uintptr_t words instead of int words, for a bit more speed
6961         when looking for null blocks on 64-bit hosts.
6962         Optimize away reads of zero bytes on regular files.
6963         In the typical case, insist on 8 KiB buffers, at least.
6964         Avoid unnecessary extra call to fstat when checking for sparse files.
6965         Avoid now-unnecessary cast to off_t, and "0L".
6966         Avoid unnecessary test of *new_dst when checking for same owner
6967         and group.
6969 2005-11-22  Paul Eggert  <eggert@cs.ucla.edu>
6971         * src/remove.c (rm): Don't assume C99 for-loop syntax.
6973 2005-11-22  Jim Meyering  <jim@meyering.net>
6975         * src/remove.c (AD_push): Remove debugging cruft.
6977         * tests/rm/unread2 (rm): Change expected diagnostic,
6978         `cannot open directory' to `cannot remove', to align with
6979         new version of rm.
6980         * tests/rm/rm2: Ensure that rm now continues removing entries
6981         even after certain types of failure.
6983         * src/remove.c: Rewrite.  Now, this module is reentrant on systems
6984         that provide openat (Solaris), and on systems like Linux+procfs
6985         where our openat emulation code is reentrant.  This also fixes a
6986         few low-probability leaks and eliminates some code that could,
6987         in very unusual circumstances, cause rm() (via a callee) to exit.
6988         * NEWS: Mention this.
6990         * configure.ac: Put copyright dates all on one line so the
6991         emacs function that updates them works properly.
6993 2005-11-18  Paul Eggert  <eggert@cs.ucla.edu>
6995         * configure.ac (AM_PROG_CC_C_O): Add.  Needed for CVS Automake.
6996         Problem reported by Eric Blake.
6997         (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
6998         we get a standard-conforming compiler.  This relies on the new
6999         m4/c.m4 file.  Note that it's a bit tricky, since c.m4 doesn't
7000         define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
7001         m4/c.m4 can go away with Autoconf 2.60 comes out.
7003 2005-11-17  Jim Meyering  <jim@meyering.net>
7005         * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
7006         (AD_mark_current_as_unremovable): Likewise, but for a local.
7007         (rm_1): Likewise.
7009         * tests/mv/acl: Let traps handle removing temporary directories.
7011         Expect acl-related tests to fail, until the corresponding
7012         patches are committed.
7013         * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
7014         * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
7016         ACL tests, from Andreas Gruenbacher.
7017         * tests/acl, tests/mv/acl, tests/cp/acl: New files.
7018         * tests/mv/Makefile.am (TESTS): Add acl.
7019         * tests/cp/Makefile.am (TESTS): Add acl.
7021         * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
7023 2005-11-16  Paul Eggert  <eggert@cs.ucla.edu>
7025         * NEWS: Improve quality of ln's diagnostics.
7026         * src/ln.c (do_link, usage): Likewise.
7027         (do_link): Don't use alloca on a buffer of unbounded size.
7029 2005-11-16  Jim Meyering  <jim@meyering.net>
7031         * tests/cp/fail-perm: Accommodate HPUX.  It appears to fail
7032         with EACCES rather than EPERM.  Reported by Peter O'Gorman here:
7033         http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
7034         This also affects AIX 4.3.3, according to Ralf Wildenhues, in
7035         http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
7037 2005-11-14  Jim Meyering  <jim@meyering.net>
7039         * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
7041 2005-11-13  Jim Meyering  <jim@meyering.net>
7043         * announce-gen: Accept new option, --gpg-key-id=ID and
7044         emit a blurb telling how to use the .sig files.
7045         * Makefile.cfg (gpg_key_ID): Define.
7046         * Makefile.maint (announcement): Use new option and key.
7048         Require that most .c files include <config.h>.
7049         * Makefile.maint (sc_require_config_h): New rule.
7050         (syntax-check-rules): Add it.
7051         * .x-sc_require_config_h: New file listing exceptions to the
7052         above rule.  Some are legit, others are simply grandfathered in.
7053         * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
7055 2005-11-12  Jim Meyering  <jim@meyering.net>
7057         * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
7059 2005-11-11  Jim Meyering  <jim@meyering.net>
7061         * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
7062         Mention new readlink options in 5.3.0's `New features' section.
7063         Spotted by Thomas Hood.
7065 2005-11-08  Jim Meyering  <jim@meyering.net>
7067         * NEWS: Merge in changes from b5_9x branch.
7069 2005-11-08  Paul Eggert  <eggert@cs.ucla.edu>
7071         * NEWS: ls now defaults to --time-style='locale', which in turn acts
7072         like --time-style='posix-long-iso' if the locale settings are messed up.
7073         * src/ls.c (decode_switches): Implement this.
7075 2005-11-08  Jim Meyering  <jim@meyering.net>
7077         * tests/du/2g: s/expensive/very expensive/ in a comment.
7078         From Paul Townsend.
7080 2005-10-17  Eric Blake  <ebb9@byu.net>
7082         * src/ls.c (usage): Fix descriptions of --sort, --time.
7083         Reported by Vitaly A. Ostanin.
7085 2005-11-04  Paul Eggert  <eggert@cs.ucla.edu>
7087         * src/ln.c: Include filenamecat.c.
7088         (FILE_BASENAME_CONCAT): Remove.
7089         (do_link): Remove last arg DEST_IS_DIR.  All callers changed.
7090         (main): Use file_name_concat, base_name, and strip_trailing_slashes
7091         instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
7092         the use of alloca.
7094 2005-11-04  Jim Meyering  <jim@meyering.net>
7096         * src/du.c (process_file): Don't overflow for files of size >= 2^31
7097         on systems with stat.st_blocks of a signed 32-bit type.
7098         This bug causes trouble on some AIX 5.1 systems.
7099         Report and trivial patch from Paul Townsend:
7100         <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
7101         * NEWS: Mention this.
7103         * tests/du/2g: New (very-expensive) test for the above-fixed bug.
7104         * tests/du/Makefile.am (TESTS): Add it here.
7105         * tests/very-expensive: New file.
7106         * tests/Makefile.am (EXTRA_DIST): Add it here.
7107         * tests/cp/perm: Mark this test as `very-expensive', too.
7109 2005-11-02  Paul Eggert  <eggert@cs.ucla.edu>
7111         * NEWS: Mention that rm -d and maybe ln -d are scheduled for
7112         removal in 2006.
7113         * src/remove.h (struct rm_options): Remove unlink_dirs.  All uses
7114         removed.
7115         * src/rm.c (usage): Don't mention rm -d.
7117 2005-11-02  Jim Meyering  <jim@meyering.net>
7119         * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
7120         From Andreas Schwab.
7122         * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
7123         `M+N records in/out' lines don't pollute `make check' output.
7125         * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
7126         fixed on 2005-10-31.  This test uses the new, IN_PIPE specifier.
7127         * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
7128         to indicate that the input file should be piped into the command
7129         under test (via `cat FILE | $prog ...').
7131         * src/remove.c (remove_entry): Emit a better diagnostic when rm
7132         (without -r) fails to remove a directory on a non-Linux system.
7133         This change affects only newer Solaris systems (with priv_*
7134         functions like priv_allocset).  Reported by Keith Thompson.
7136         * tests/rm/dir-nonrecur: New file/test for the above fix.
7137         * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
7139 2005-11-01  Paul Eggert  <eggert@cs.ucla.edu>
7141         * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
7142         POSIX 1002.1-2001 requires.
7143         * src/tail.c (parse_obsolete_option): Implement this.
7144         Problem reported by Vincent Lefevre.
7145         * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
7146         * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
7147         (test_vector): Add special cases for _POSIX2_VERSION, and
7148         regularize the old ones a bit.
7149         * tests/touch/obsolescent: Add y2000 test.
7151 2005-10-31  Paul Eggert  <eggert@cs.ucla.edu>
7153         * src/dd.c (skip): Fix off-by-one error reported by
7154         Theodoros V. Kalamatianos.
7156 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
7158         * tests/mkdir/p-3: Require that the test be run as non-root.
7159         Problem and trivial fix reported by Theodoros V. Kalamatianos.
7161 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
7163         * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
7164         boundary between DEST and SOURCE in the result.
7166 2005-10-26  Dmitry V. Levin  <ldv@altlinux.org>
7168         * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
7169         back to text, to sync with documentation and for backwards
7170         compatibility.
7172 2005-10-25  Jim Meyering  <jim@meyering.net>
7174         * tests/dircolors/simple (other-wr): Add an explicit test for
7175         the dircolors bug (NULL-dereference) fixed yesterday.
7177 2005-10-24  Jim Meyering  <jim@meyering.net>
7179         * src/tac.c (tac_file): When determining whether a file is seekable,
7180         also test whether it is a tty.  Using only the lseek-based test would
7181         give a false positive on Solaris.  Reported by Peter Fales.
7183 2005-10-24  Dmitry V. Levin  <ldv@altlinux.org>
7185         * tests/install/d-slashdot: New test, for "install -d" failure.
7186         * tests/install/Makefile.am (TESTS): Add d-slashdot.
7187         * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
7188         * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
7190 2005-10-24  Jim Meyering  <jim@meyering.net>
7192         * src/dircolors.c (ls_codes): Add missing comma.
7193         Anonymous report and patch from
7194         http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
7196         * src/dircolors.c: Add compile-time assertion that the slack_codes
7197         and ls_codes arrays have the same number of elements.  This would
7198         have prevented the above-fixed bug.
7200         * src/expand.c (parse_tab_stops): Add a comment to make this function
7201         identical to the one in unexpand.c.
7202         * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
7203         identical to the one in expand.c.
7205         * src/expand.c (next_file): Don't assume fopen cannot return stdin.
7207 2005-10-23  Jim Meyering  <jim@meyering.net>
7209         * src/md5sum.c (digest_check, main): Use ptr_align rather than
7210         a dangerous pointer-value-to-`unsigned' cast.
7211         * NEWS: mention the new sha* programs.
7212         * AUTHORS: Add new sha* programs.
7214 2005-08-28  David Madore  <david.madore@ens.fr>
7216         Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
7217         * README: Add their names to the list.
7218         * src/md5sum.c: Provide framework for computing sha-2 hashes.
7219         * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
7220         Rules for compiling sha-2 utilities
7221         (noinst_HEADERS): Remove checksum.h.
7222         * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
7223         New files.
7224         * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
7225         (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
7226         * tests/misc/sha224sum, tests/misc/sha256sum: New files.
7227         * tests/misc/sha384sum, tests/misc/sha512sum: New files.
7228         * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
7229         sha384sum, sha512sum test scripts here rather that each in its
7230         own directory.
7232 2005-08-28  David Madore  <david.madore@ens.fr>
7234         * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
7235         of the FIPS test vectors).
7237 2005-10-23  Jim Meyering  <jim@meyering.net>
7239         * configure.ac: Use 6.0-cvs as the version string.
7240         * NEWS: Adjust accordingly.
7243         -----
7245         Copyright (C) 2005, 2006 Free Software Foundation, Inc.
7247         Copying and distribution of this file, with or without
7248         modification, are permitted provided the copyright notice
7249         and this notice are preserved.