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