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