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