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