1 2006-10-25 Bruno Haible <bruno@clisp.org>
3 * src/cat.c (infile): Add "const" to declaration.
4 * src/csplit.c (prefix): Likewise.
5 * src/printf.c (cfcc_msg): Likewise.
6 * src/tail.c (valid_file_spec): Likewise.
7 * src/cut.c (cut_file): Likewise, for a parameter.
8 * src/expr.c (str_value): Likewise.
9 * src/fold.c (fold_file): Likewise.
10 * src/pr.c (init_header): Likewise.
11 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
12 * src/tr.c (make_printable_str): Likewise.
13 * src/nl.c (body_type, header_type, footer_type, current_type):
14 (separator_str, build_type_arg, nl_file): Likewise, for many.
15 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
16 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
18 2006-10-25 Jim Meyering <jim@meyering.net>
20 * tests/sample-test: Update copyright year list to include only
21 the current year, since this is what I'll want in any new test.
23 2006-10-24 Jim Meyering <jim@meyering.net>
25 * src/c99-to-c89.diff: Update to reflect new offsets.
27 * NEWS: new feature: rm accepts new option: --one-file-system
28 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
29 * src/remove.h (struct rm_options) [one_file_system]: New member.
30 * src/rm.c (rm_option_init): Initialize it.
31 (usage): Document the option.
32 * src/mv.c (rm_option_init): Likewise.
33 * src/remove.c (remove_dir): With --one-file-system and --recursive,
34 for each directory command line argument, do not affect a file system
35 different from that of the starting directory. And give a diagnostic.
36 * src/rm.c (ONE_FILE_SYSTEM): New enum.
37 (main): Handle new option.
38 * tests/rm/one-file-system: Test the above.
39 * tests/rm/Makefile.am (TESTS): Add one-file-system.
40 * tests/Makefile.am (check-root): Add the rm/one-file-system
42 (EXTRA_DIST): Add other-fs-tmpdir.
44 * tests/mv/setup: Removed. Renamed to...
45 * tests/other-fs-tmpdir: ...this new file.
46 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
47 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
48 * tests/mv/backup-is-src: Likewise.
49 * tests/mv/hard-link-1: Likewise.
50 * tests/mv/leak-fd: Likewise.
51 * tests/mv/mv-special-1: Likewise.
52 * tests/mv/part-fail: Likewise.
53 * tests/mv/part-hardlink: Likewise.
54 * tests/mv/part-rename: Likewise.
55 * tests/mv/part-symlink: Likewise.
56 * tests/mv/partition-perm: Likewise.
57 * tests/mv/to-symlink: Likewise.
58 * tests/mv/into-self-2: Likewise.
60 Don't let a failure in one test stop "make -k" from running the others.
61 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
62 (check-root): Depend on them, rather than executing the five
63 commands in a single rule. Reported by Greg Schafer.
65 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
67 * Makefile.maint (alpha beta major): Use a better log message for
68 the automatic commit of .prev-version.
70 2006-10-23 Jim Meyering <jim@meyering.net>
72 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
73 pwd via a shell. Instead, ensure that the absolute name of the
74 pwd binary consists solely of reasonable characters.
75 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
76 clean-up code isn't run.
78 * NEWS: Add a line for 6.5-cvs.
79 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
81 2006-10-22 Jim Meyering <jim@meyering.net>
85 * NEWS: Record the 6.4 release date.
86 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
88 * Makefile.maint: Complete the adaptation to function with a working
89 directory that is using git (rather than cvs) for version control.
91 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
93 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
94 * tests/cp/cp-parents: Likewise.
95 * tests/mkdir/parents: Likewise.
96 * tests/mkdir/perm: Likewise.
98 * tests/sample-test: Quote variables containing absolute build
99 tree paths. In the cleanup trap, make sure `cd' succeeds before
100 `chmod'ing and `rm'ing the temporary files.
101 * tests/chgrp/basic: Likewise.
102 * tests/chgrp/deref: Likewise.
103 * tests/chgrp/no-x: Likewise.
104 * tests/chgrp/posix-H: Likewise.
105 * tests/chgrp/recurse: Likewise.
106 * tests/chmod/c-option: Likewise.
107 * tests/chmod/equal-x: Likewise.
108 * tests/chmod/equals: Likewise.
109 * tests/chmod/inaccessible: Likewise.
110 * tests/chmod/no-x: Likewise.
111 * tests/chmod/octal: Likewise.
112 * tests/chmod/setgid: Likewise.
113 * tests/chmod/umask-x: Likewise.
114 * tests/chmod/usage: Likewise.
115 * tests/chown/basic: Likewise.
116 * tests/chown/deref: Likewise.
117 * tests/chown/separator: Likewise.
118 * tests/cp/acl: Likewise.
119 * tests/cp/backup-1: Likewise.
120 * tests/cp/backup-dir: Likewise.
121 * tests/cp/backup-is-src: Likewise.
122 * tests/cp/cp-HL: Likewise.
123 * tests/cp/cp-deref: Likewise.
124 * tests/cp/cp-i: Likewise.
125 * tests/cp/cp-mv-backup: Likewise.
126 * tests/cp/cp-parents: Likewise.
127 * tests/cp/deref-slink: Likewise.
128 * tests/cp/dir-rm-dest: Likewise.
129 * tests/cp/dir-slash: Likewise.
130 * tests/cp/dir-vs-file: Likewise.
131 * tests/cp/fail-perm: Likewise.
132 * tests/cp/into-self: Likewise.
133 * tests/cp/link: Likewise.
134 * tests/cp/link-no-deref: Likewise.
135 * tests/cp/link-preserve: Likewise.
136 * tests/cp/no-deref-link1: Likewise.
137 * tests/cp/no-deref-link2: Likewise.
138 * tests/cp/no-deref-link3: Likewise.
139 * tests/cp/perm: Likewise.
140 * tests/cp/preserve-2: Likewise.
141 * tests/cp/r-vs-symlink: Likewise.
142 * tests/cp/same-file: Likewise.
143 * tests/cp/slink-2-slink: Likewise.
144 * tests/cp/sparse: Likewise.
145 * tests/cp/special-bits: Likewise.
146 * tests/cp/src-base-dot: Likewise.
147 * tests/cp/symlink-slash: Likewise.
148 * tests/dd/not-rewound: Likewise.
149 * tests/dd/skip-seek2: Likewise.
150 * tests/dd/unblock-sync: Likewise.
151 * tests/du/2g: Likewise.
152 * tests/du/8gb: Likewise.
153 * tests/du/basic: Likewise.
154 * tests/du/deref: Likewise.
155 * tests/du/deref-args: Likewise.
156 * tests/du/exclude: Likewise.
157 * tests/du/fd-leak: Likewise.
158 * tests/du/hard-link: Likewise.
159 * tests/du/inaccessible-cwd: Likewise.
160 * tests/du/long-from-unreadable: Likewise.
161 * tests/du/long-sloop: Likewise.
162 * tests/du/no-deref: Likewise.
163 * tests/du/no-x: Likewise.
164 * tests/du/restore-wd: Likewise.
165 * tests/du/slash: Likewise.
166 * tests/du/slink: Likewise.
167 * tests/du/trailing-slash: Likewise.
168 * tests/du/two-args: Likewise.
169 * tests/fmt/long-line: Likewise.
170 * tests/install/basic-1: Likewise.
171 * tests/install/create-leading: Likewise.
172 * tests/install/d-slashdot: Likewise.
173 * tests/install/trap: Likewise.
174 * tests/ln/misc: Likewise.
175 * tests/ln/target-1: Likewise.
176 * tests/ls/color-dtype-dir: Likewise.
177 * tests/ls/dangle: Likewise.
178 * tests/ls/dired: Likewise.
179 * tests/ls/file-type: Likewise.
180 * tests/ls/follow-slink: Likewise.
181 * tests/ls/infloop: Likewise.
182 * tests/ls/inode: Likewise.
183 * tests/ls/m-option: Likewise.
184 * tests/ls/no-arg: Likewise.
185 * tests/ls/recursive: Likewise.
186 * tests/ls/rt-1: Likewise.
187 * tests/ls/stat-dtype: Likewise.
188 * tests/ls/stat-failed: Likewise.
189 * tests/ls/stat-vs-dirent: Likewise.
190 * tests/misc/cat-proc: Likewise.
191 * tests/misc/close-stdout: Likewise.
192 * tests/misc/csplit: Likewise.
193 * tests/misc/date-sec: Likewise.
194 * tests/misc/false-status: Likewise.
195 * tests/misc/head-c: Likewise.
196 * tests/misc/head-pos: Likewise.
197 * tests/misc/mknod: Likewise.
198 * tests/misc/nl: Likewise.
199 * tests/misc/nohup: Likewise.
200 * tests/misc/pathchk1: Likewise.
201 * tests/misc/printf: Likewise.
202 * tests/misc/printf-hex: Likewise.
203 * tests/misc/pwd-long: Likewise.
204 * tests/misc/shuf: Likewise.
205 * tests/misc/sort-rand: Likewise.
206 * tests/misc/split-a: Likewise.
207 * tests/misc/split-fail: Likewise.
208 * tests/misc/split-l: Likewise.
209 * tests/misc/stat-fmt: Likewise.
210 * tests/misc/tac-continue: Likewise.
211 * tests/misc/wc-files0: Likewise.
212 * tests/mkdir/concurrent-1: Likewise.
213 * tests/mkdir/p-1: Likewise.
214 * tests/mkdir/p-2: Likewise.
215 * tests/mkdir/p-3: Likewise.
216 * tests/mkdir/p-slashdot: Likewise.
217 * tests/mkdir/p-thru-slink: Likewise.
218 * tests/mkdir/p-v: Likewise.
219 * tests/mkdir/parents: Likewise.
220 * tests/mkdir/perm: Likewise.
221 * tests/mkdir/t-slash: Likewise.
222 * tests/mv/acl: Likewise.
223 * tests/mv/atomic: Likewise.
224 * tests/mv/backup-dir: Likewise.
225 * tests/mv/childproof: Likewise.
226 * tests/mv/diag: Likewise.
227 * tests/mv/dir-file: Likewise.
228 * tests/mv/dir2dir: Likewise.
229 * tests/mv/dup-source: Likewise.
230 * tests/mv/hard-2: Likewise.
231 * tests/mv/hard-3: Likewise.
232 * tests/mv/hard-4: Likewise.
233 * tests/mv/hard-link-1: Likewise.
234 * tests/mv/hard-verbose: Likewise.
235 * tests/mv/i-2: Likewise.
236 * tests/mv/i-3: Likewise.
237 * tests/mv/i-4: Likewise.
238 * tests/mv/i-5: Likewise.
239 * tests/mv/i-link-no: Likewise.
240 * tests/mv/into-self-4: Likewise.
241 * tests/mv/leak-fd: Likewise.
242 * tests/mv/mv-special-1: Likewise.
243 * tests/mv/no-target-dir: Likewise.
244 * tests/mv/part-fail: Likewise.
245 * tests/mv/part-hardlink: Likewise.
246 * tests/mv/part-rename: Likewise.
247 * tests/mv/part-symlink: Likewise.
248 * tests/mv/partition-perm: Likewise.
249 * tests/mv/perm-1: Likewise.
250 * tests/mv/reply-no: Likewise.
251 * tests/mv/trailing-slash: Likewise.
252 * tests/mv/update: Likewise.
253 * tests/od/od-N: Likewise.
254 * tests/od/x8: Likewise.
255 * tests/readlink/can-e: Likewise.
256 * tests/readlink/can-f: Likewise.
257 * tests/readlink/can-m: Likewise.
258 * tests/readlink/rl-1: Likewise.
259 * tests/rm/cycle: Likewise.
260 * tests/rm/dangling-symlink: Likewise.
261 * tests/rm/deep-1: Likewise.
262 * tests/rm/dir-no-w: Likewise.
263 * tests/rm/dir-nonrecur: Likewise.
264 * tests/rm/dot-rel: Likewise.
265 * tests/rm/empty-inacc: Likewise.
266 * tests/rm/f-1: Likewise.
267 * tests/rm/fail-2eperm: Likewise.
268 * tests/rm/hash: Likewise.
269 * tests/rm/i-1: Likewise.
270 * tests/rm/i-no-r: Likewise.
271 * tests/rm/ignorable: Likewise.
272 * tests/rm/inaccessible: Likewise.
273 * tests/rm/interactive-always: Likewise.
274 * tests/rm/interactive-once: Likewise.
275 * tests/rm/ir-1: Likewise.
276 * tests/rm/isatty: Likewise.
277 * tests/rm/no-give-up: Likewise.
278 * tests/rm/r-1: Likewise.
279 * tests/rm/r-2: Likewise.
280 * tests/rm/r-3: Likewise.
281 * tests/rm/r-4: Likewise.
282 * tests/rm/readdir-bug: Likewise.
283 * tests/rm/rm1: Likewise.
284 * tests/rm/rm2: Likewise.
285 * tests/rm/rm3: Likewise.
286 * tests/rm/rm4: Likewise.
287 * tests/rm/rm5: Likewise.
288 * tests/rm/sunos-1: Likewise.
289 * tests/rm/unread2: Likewise.
290 * tests/rm/unread3: Likewise.
291 * tests/rmdir/fail-perm: Likewise.
292 * tests/rmdir/t-slash: Likewise.
293 * tests/shred/exact: Likewise.
294 * tests/shred/remove: Likewise.
295 * tests/sum/sysv: Likewise.
296 * tests/tail-2/append-only: Likewise.
297 * tests/tail-2/assert: Likewise.
298 * tests/tail-2/assert-2: Likewise.
299 * tests/tail-2/big-4gb: Likewise.
300 * tests/tail-2/fflush: Likewise.
301 * tests/tail-2/infloop-1: Likewise.
302 * tests/tail-2/proc-ksyms: Likewise.
303 * tests/tail-2/start-middle: Likewise.
304 * tests/tail-2/tail-n0f: Likewise.
305 * tests/tee/basic: Likewise.
306 * tests/tee/dash: Likewise.
307 * tests/touch/fail-diag: Likewise.
308 * tests/touch/no-create-missing: Likewise.
309 * tests/touch/not-owner: Likewise.
310 * tests/touch/obsolescent: Likewise.
311 * tests/touch/read-only: Likewise.
312 * tests/touch/relative: Likewise.
314 2006-10-21 Jim Meyering <jim@meyering.net>
316 * NEWS: (cp --backup fix): Fix a typo.
318 * .gitignore: Remove some references to files in subdirectories.
319 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
320 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
322 * src/copy.c (copy_internal): Add a comment saying why we prefer
325 Enable an fts optimization (call lstat only for directories,
326 on some file system types) also with the --preserve-root option
328 * src/chown-core.c (change_file_owner): Compare fts_statp-based
329 dev/ino against root dev/ino only for directories.
330 (chown_files): Don't let the root_dev_ino setting influence whether
331 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
333 2006-10-20 Jim Meyering <jim@meyering.net>
335 * src/od.c (usage): Change description of default to use "-w16",
336 not the now-invalid "-w 16" syntax. From Dan Jacobson.
338 2006-10-19 Jim Meyering <jim@meyering.net>
340 * bootstrap: Add names to each .gitignore file (if it exists)
341 as well as to .cvsignore.
343 * Makefile.maint (po-check): This rule didn't detect the new use
344 of "gettext" (as opposed to the use of "_" everywhere else) in
345 lib/xstrtol.h. Adjust the grep regexp so that now it does.
347 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
349 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
350 when opening dst_name.
351 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
352 (SYSCALL) to test for failure in a system call.
354 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
355 a fifo. This preserves the special mode bits on Solaris 10, which
356 is compatible with what Solaris 10 cp -R does.
358 * src/copy.c (copy_internal): Remove redundant and confusing local
361 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
362 7777. This matches historical 'cp' behavior and avoids some
363 (though not all) implementation-defined behavior of mkdir.
364 * src/cp.c (make_dir_parents_private): Likewise.
365 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
366 than 777. This is required by POSIX. It doesn't make any difference
367 in actual behavior on any host that I know of.
369 2006-10-17 Jim Meyering <jim@meyering.net>
371 * src/dd.c (usage): Use two spaces (not one) to separate the
372 "fdatasync" option string from its description, so help2man formats
373 the derived man page properly. Reported by Samuel Thibault
374 in <http://bugs.debian.org/393649>.
376 2006-10-16 Jim Meyering <jim@meyering.net>
378 * .x-sc_trailing_blank: Remove names of files that are no longer
381 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
383 * src/groups.sh (version): Reword message to match the other programs.
384 Problem reported by Eric Blake.
386 2006-10-14 Jim Meyering <jim@meyering.net>
388 * Makefile.maint (headers_with_interesting_macro_defs): Define.
389 (.re-defmac, sc_always_defined_macros): New rules.
391 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
392 Instead, include "exit.h". This hereby retires the work-around for
393 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
395 * src/cksum.c (uint_fast32_t): Don't define.
396 Instead, include <stdint.h>.
398 * src/pinky.c (S_IWGRP): Don't define.
399 It's already defined by "stat-macros.h" (included via system.h).
401 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
402 * Makefile.maint: Likewise, remove these targets/rules/variables:
403 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
404 (cvs_files, wget-update, automake_repo): Likewise.
405 Move the comment about cvsu to build-aux/vc-list-files,
406 where cvsu is actually used.
408 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
410 Work also when the working directory (with e.g. coreutils sources)
411 is version controlled with git, rather than CVS.
412 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
414 In messages and comments, say e.g., "checked-out sources",
415 rather than "CVS sources".
416 (version_controlled_file): New function. Work for git as well as
417 for CVS. Don't use grep's -q option.
418 (slurp): Call it here, in place of CVS-specific code.
420 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
422 * src/copy.c (copy_internal): Although we do create a backup of each
423 destination directory when in move mode, don't do that when copying.
424 Reported by Peter Breitenlohner, in
425 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
426 * tests/cp/backup-dir: New file. Test for the above.
427 * tests/cp/Makefile.am (TESTS): Add backup-dir.
429 2006-10-13 Jim Meyering <jim@meyering.net>
431 More chown/chgrp dereferencing-related fixes.
432 * src/chown-core.c (change_file_owner): Don't use fts_statp if
433 we're dereferencing symlinks.
434 Reverse conjuncts, so that we use dereference file_stats
435 (aka ent->fts_statp) only *after* we've confirmed that
436 chopt->affect_symlink_referent is true. Otherwise, we might
437 use ent->fts_statp uninitialized.
438 Don't turn on FTS_NOSTAT when dereferencing symlinks.
439 * tests/chown/deref: Update the expected diagnostic, now that
440 this test case (trying to use "chown --dereference ..." on a
441 dangling symlink) takes a different code path.
443 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
445 Sync from Bison, as follows:
447 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
449 Fix problems with translating English-language diagnostics.
450 * bootstrap: Fix bug introduced in recent bootstrap changes, with
451 respect to bison-runtime pot generation. The YY_ stuff
452 wasn't being captured.
454 2006-10-13 Jim Meyering <jim@meyering.net>
456 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
457 now that we're using fts_open with FTS_CWDFD.
458 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
459 chgrp, to exercise the above fix.
460 * NEWS: Mention the above.
462 * src/du-tests: Clean up a little, though it's still not portable.
464 * .vg-suppressions: Add 3 more for debian unstable.
466 * tests/ls/Test.pm: Remove long-unused file.
467 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
468 Suggestions from Bruno Haible.
470 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
472 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
473 (MAINTAINERCLEANFILES): Add .kludge-stamp.
474 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
475 instead of $(man_MANS).
477 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
479 * configure.ac: Avoid compiler warnings about default return
480 type in function definitions and unused variables in tests.
481 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
484 2006-10-12 Jim Meyering <jim@meyering.net>
486 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
487 Call gl_INIT directly, rather than through the above.
489 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
491 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
492 variable was sometimes used without being initialized. This
493 messed up the installation of the INSTALL file in some cases.
495 2006-10-11 Jim Meyering <jim@meyering.net>
497 * src/ls.c (usage): Correct description of -s, --size.
498 It works even without -l. Suggestion from Karl Berry.
500 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
502 * src/ls.c (quote_name): Use initializer rather than memset to
503 initialize an object to zero. This is easier to read and is less
504 likely to introduce a runtime error due to a mixup. It causes
505 gcc -W to issue a warning, but you can work around this by
506 appending -Wno-missing-field-initializers.
507 * src/pathchk.c (portable_chars_only): Likewise.
508 * src/shred.c (main): Likewise.
509 * src/stty.c (main): Likewise.
510 * src/tr.c (card_of_complement): Likewise.
511 * src/wc.c (wc): Likewise.
513 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
515 * src/sort.c (usage): Mention again that sort fields are origin 1.
517 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
520 * bootstrap (usage, main program, symlink_to_gnulib): Add option
521 --copy. Inspired by a suggestion from Bruno Haible.
523 2006-10-09 Jim Meyering <jim@meyering.net>
525 Avoid a compiler warning.
526 * src/pathchk.c (portable_chars_only): Initialize variable of type
527 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
529 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
531 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
532 wrong file name in some cases. Lars Wendler reported a bug in
534 * src/install.c (make_ancestor): New arg COMPONENT.
535 * src/mkdir.c (make_ancestor): Likewise.
536 * tests/install/basic-1: Check for install -Dv bug.
537 * tests/mkdir/Makefile.am (TESTS): Add p-v.
538 * tests/mkdir/p-v: New file, to test this bug.
540 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
542 * src/chgrp.c: Don't include lchown.h; no longer needed.
543 * src/chown.c: Likewise.
545 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
546 current file system has useful d_type info.
548 * src/dd.c (flags): noatime and nofollow now depend on
549 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
550 (usage): Output info about noatime and nofollow only if
551 they are known to work.
552 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
553 than O_NOFOLLOW, when testing whether it's possible to avoid a
554 race condition reliably.
556 2006-10-05 Jim Meyering <jim@meyering.net>
558 * src/c99-to-c89.diff: Update to reflect new offsets.
560 * tests/install/basic-1: Skip the latter part of this test if the
561 just-built dd binary is not readable. Otherwise, this test would fail
562 when binaries were created as root. Reported by Bauke Jan Douma in
563 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
565 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
567 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
568 MiB, since XFS hosts can legitimately have large values of
569 st_blksize. Problem reported by Tony Ernst in
570 <http://savannah.gnu.org/bugs/?17903>.
572 2006-10-04 Jim Meyering <jim@meyering.net>
574 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
575 Paul Eggert pointed out that the specified file may exist,
576 in spite of such an errno value.
577 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
578 * tests/rm/ignore-name-too-long: Remove file.
579 * NEWS: Update here, too.
581 2006-10-03 Jim Meyering <jim@meyering.net>
583 * tests/rm/fail-eperm: Report failure also if rm is terminated by
586 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
587 and one in shred.c -- that were added before coreutils-6.3.
588 Reported by Michael Deutschmann.
590 * src/c99-to-c89.diff: Update to reflect new offsets.
592 * src/remove.c (remove_entry): With -f, exit successfully in spite
593 of a missing file under some very unusual conditions (with errno
594 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
596 With --force (-f), rm no longer fails for ENOTDIR.
597 * src/remove.c (ignorable_missing): New function.
598 Use it everywhere, rather than open-coding the test.
599 Andreas Schwab reported the ENOTDIR problem.
600 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
602 * NEWS: Mention the bug fix.
603 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
604 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
605 * tests/rm/Makefile.am (TESTS): Add the new file names.
607 * bootstrap: Undo last change to this file, since now gnulib-tool
608 sticks with the automake default in generating dependencies.
610 * NEWS: Add a line for 6.4-cvs.
611 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
613 2006-09-30 Jim Meyering <jim@meyering.net>
616 * NEWS: Record the 6.3 release date.
617 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
619 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
621 * src/c99-to-c89.diff: Update offsets.
623 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
625 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
626 as it doesn't work with Solaris /bin/sh.
628 2006-09-29 Jim Meyering <jim@meyering.net>
630 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
633 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
634 use .1 as the increment. Actual output varies too much.
635 [eq-wid-3]: New, commented out test.
637 * src/shuf.c (read_input): Fix an off-by-one error that
638 would cause an infloop for piped input of 8KB or more.
639 * NEWS: Mention the fix.
640 * tests/misc/shuf: Test for the above fix.
642 Since any system may be affected by the Darwin readdir bug,
643 perform the extra rewinddir unconditionally. The performance
644 impact of rewinding a directory is negligible.
645 * src/remove.c (NEED_REWIND): Define to use
646 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
648 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
649 increment translates to a slightly larger value.
650 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
651 The final expected value wasn't being printed.
653 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
654 and NFS, whereby rm would not remove all files in a directory.
655 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
656 (NEED_REWIND): New macro, so that we incur the cost of the work-around
657 rewinddir only on afflicted systems.
658 * NEWS: Clarify and correct.
659 * tests/rm/readdir-bug: New file. Test for the above fix.
660 * tests/rm/Makefile.am (TESTS): Add it.
661 Prompted by testing and analysis from Bruno Haible:
662 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
664 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
666 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
667 suggested for Debian stable, which uses Perl 5.8.4.
669 2006-09-28 Jim Meyering <jim@meyering.net>
671 Automatically generated dependencies are important even
672 when all of the sources in a directory come from gnulib.
673 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
674 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
676 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
677 Ensure that IFS is set properly and unset PATH.
679 Work properly even when the name of the selected file starts with "-".
680 Invoke rm via "../../src/rm", and adjust expected output.
681 Prompted by a patch from Tim Waugh.
683 * README-cvs: Add Bison to the list of required packages.
685 2006-09-26 Jim Meyering <jim@meyering.net>
687 * src/c99-to-c89.diff: Update offsets.
689 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
690 it from removing a directory containing 188 or more entries.
691 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
692 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
693 Reported by Matthew Woehlke.
695 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
697 * NEWS: "groups user" no longer outputs "user :"; you need at least
698 two users. "groups" now processes options like --help more compatibly.
699 * src/groups.sh: Implement the option-processing change.
700 Handle user and group names with special characters more robustly.
701 Report write errors instead of exiting silently with status 1.
703 2006-09-26 Jim Meyering <jim@meyering.net>
705 * README: Warn not to run autoreconf manually. Use bootstrap instead.
707 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
708 Rewrite to avoid using temporary, $status.
710 * NEWS: Mention the bug fix.
711 * src/groups.sh: Don't hide a write failure.
712 Reported by Iain Calder <ic56@rogers.com>.
714 2006-09-25 Jim Meyering <jim@meyering.net>
716 * src/chown.c (usage): Clarify --dereference description.
717 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
719 2006-09-24 Jim Meyering <jim@meyering.net>
721 * NEWS: Mention these fixes.
722 * src/copy.c (copy_reg): With --verbose (-v), print
723 "removed `file_name'" just after unlinking a file.
724 (copy_internal): Likewise, in three more places.
725 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
726 * tests/mv/hard-verbose: New file. Test for the above fix.
727 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
729 * tests/help-version (sync_args): Don't call sync, since it spins up
730 disks that I've deliberately caused to spin down (but not unmounted).
732 * NEWS: Mention the improvement to sort.
734 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
737 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
738 since that predated addition of d_type support.
740 2006-09-23 Jim Meyering <jim@meyering.net>
742 * gl/modules/getloadavg.diff: New file. Work around the way the latest
743 version of the getloadavg module interacts with our bootstrap script.
744 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
745 * Makefile.am (EXTRA_DIST): Sort file names.
746 Add bootstrap and gl/modules/getloadavg.diff
748 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
750 * bootstrap: Add support for --force.
751 (usage): New function. Describe usage less tersely.
752 (CVS_only_file): New var.
754 * NEWS: Document fix for cp -i and mv -i.
755 * src/copy.c (copy_internal): With -i, prompt even if the source
756 is a directory and the destination is not. This is required by
757 POSIX and gives the user a chance to bail out before failing.
758 * tests/cp/Makefile.am (TESTS): Add cp-i.
759 * tests/cp/cp-i: New file.
760 * tests/mv/Makefile.am (TESTS): Add i-5.
761 * tests/mv/i-5: New file.
763 2006-09-20 Jim Meyering <jim@meyering.net>
765 * NEWS: Mention the chmod bug fix.
767 * tests/chmod/inaccessible: New test, specifically for this bug.
768 Based on a test case from Paul Eggert.
769 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
771 Fix the 2006-09-18 bug differently.
772 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
773 tell fts_read to stat the file again, in case it has become
774 accessible since the initial fts_open call.
775 * src/chown-core.c (change_file_owner): Likewise.
777 * src/chmod.c: Revert last change. There is a better way.
778 * src/chown-core.c: Likewise.
780 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
782 * src/ln.c (target_directory_operand): Rewrite to avoid porting
783 problem on Tandem reported by Matthew Woehlke in
784 <https://savannah.gnu.org/bugs/?17172>.
786 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
788 Fix bug where chmod, chown, and chgrp did not process operands
789 left-to-right in some cases.
790 * src/chmod.c (wd_errno): New var.
791 (chmod_file): New function, with most of the contents of the
792 old prcess_file function.
793 (process_files): Use it. This gives file names to fts one
794 at a time, so that they are processed left-to-right as POSIX
796 * src/chown-core.c (wd_errno, chown_files): Likewise.
797 (chown_file): New function.
798 * tests/install/basic-1: Redo test so as to not workaround
799 the chmod bug, thereby testing for it.
801 * src/shuf.c (main): Quote the entire range when reporting an
802 invalid one, rather than just the part that contained the error.
804 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
805 sometimes left behind if the test is skipped or interrupted.
807 * bootstrap (symlink_to_gnulib): New function.
808 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
810 (cp_mark_as_generated, slurp, gnulib_files):
811 Avoid making a copy if it's the same as the old version.
812 (gnulib_files): Add support for this variable (used by Bison).
814 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
815 indicating flaw in kernel. Reword to say that the flaw isn't
816 serious for coreutils, since the flaw does affect ls -i.
818 * tests/chgrp/basic: Fix bug in test case exposed by building on
819 Solaris 8 in a setgid directory. The test case incorrectly
820 assumed that 'symlink' would be in group $g1.
822 2006-09-18 Jim Meyering <jim@meyering.net>
824 * NEWS: Add a line for 6.3-cvs.
825 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
828 * NEWS: Record the 6.2 release date.
829 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
831 2006-09-17 Jim Meyering <jim@meyering.net>
833 * tests/chgrp/basic: On an OpenBSD system, rather than failing
834 due to a known problem, merely warn about it.
835 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
836 Instead, use stat to test file system for desired results, directly.
837 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
839 * tests/envvar-check: Add more variable names to the list of those
840 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
841 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
843 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
845 * NEWS: Document that mkdir -p and install -d now fork on occasion.
846 * bootstrap.conf (gnulib_modules): Add savewd.
847 * src/install.c: Include savewd.h.
848 (process_dir): New function.
849 (main, install_file_in_file_parents): Use it, along with the new
850 savewd module, to avoid some race conditions.
851 * src/mkdir.c: Include savewd.h.
852 (struct mkdir_options): New members make_ancestor_function, mode,
854 (make_ancestor): Return 1 if the resulting directory is not readable.
855 (process_dir): New function.
856 (main): Use it, along with new savewd module, to avoid some
857 race conditions. Fill in new slots of struct mkdir_options, so
858 that callees get the values.
859 * tests/install/basic-1: Test for coreutils 5.97 bug that was
860 fixed in coreutils 6.0, and which should still be fixed with
862 * tests/mkdir/p-3: Likewise.
864 2006-09-15 Jim Meyering <jim@meyering.net>
866 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
867 The 2006-09-08 changes made it so "mv dir new-name/" would
868 fail on NetBSD 1.6. This makes it work once again.
870 2006-09-14 Jim Meyering <jim@meyering.net>
872 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
873 Instead, since it's a little fragile, assert the condition.
874 (target_directory_operand): Update comment to reflect latest change.
876 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
878 * src/who.c (print_user): Rewrite to avoid warning from
879 GCC 4.1.1 with -Wall.
881 2006-09-12 Jim Meyering <jim@meyering.net>
883 * tests/mv/atomic: Check for specific strace output, rather than
884 simply nonempty. RHEL AS 4 would fail this test due to strace
885 generating "[ Process PID=14434 runs in 32 bit mode. ]".
886 Reported by Nelson Beebe.
888 2006-09-11 Jim Meyering <jim@meyering.net>
890 * src/remove.c (remove_dir): Move new cache_stat_init call onto
892 (rm_1): Move declaration of "st" and new cache_stat_init call
893 "down" to nearer where they're used.
894 * src/c99-to-c89.diff: Add another set of curly braces.
896 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
898 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
899 substr's last operand is very large. Performance problem reported
902 2006-09-09 Jim Meyering <jim@meyering.net>
904 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
906 (sc_require_config_h): Skip this test if there are no version-
908 (sc_prohibit_assert_without_use): Likewise.
910 2006-09-08 Jim Meyering <jim@meyering.net>
912 * bootstrap: Export CVS_RSH separate from its assignment, to work
913 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
915 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
917 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
918 no file operand is given, and standard input is any FIFO.
919 This is in response to Open Group XCU ERN 114.
920 * src/tail.c (main): Likewise.
922 2006-09-08 Jim Meyering <jim@meyering.net>
924 mv and "cp -r" no longer fail when invoked with two arguments
925 where the first one names a directory and the second name ends in
926 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
927 now succeeds, once more. This reverts part of the 2004-06-27
929 * NEWS: Say the above.
930 * src/mv.c (target_directory_operand): Don't require (here)
931 that the target operand "look like" a directory. This change
932 pushes the test down to the rename syscall level, where a
933 "mv dir existing-non-dir/" will mistakenly succeed on older systems
934 that ignore trailing slashes in the rename destination argument.
935 * src/cp.c (target_directory_operand): Likewise, but for cp.
936 * tests/mv/trailing-slash: Exercise the above fixes.
937 * tests/cp/trailing-slash: New file.
938 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
940 * bootstrap: Use the previously unused variable, $src,
941 to avoid repeating "$GNULIB_SRCDIR/$file".
943 * bootstrap (cp_mark_as_generated): Don't use "local", to
944 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
945 Rename now-global "$src" and "$dst" to have cp_ prefix.
946 Safer, and avoids confusion.
948 * bootstrap (cp_mark_as_generated): New function.
949 (slurp): Use it to prepend editor hints and a warning that
950 the file we're copying is generated.
951 Suggestion from Bruce Korb.
952 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
953 Fix last-minute typo.
955 2006-09-07 Jim Meyering <jim@meyering.net>
957 * bootstrap: Revert last change. There are less disruptive ways
958 to mark these generated files as read-only.
960 * src/c99-to-c89.diff: Update to have proper offsets.
962 2006-09-06 Jim Meyering <jim@meyering.net>
964 Ensure that some gnulib-tool-generated files are read-only.
965 * bootstrap (slurp): Put the body of this function in a sub-shell,
966 with "umask a-w" so that all new files are read-only. Remove each
967 file before we write to it, in case it's read-only.
968 Make po/Makevars and runtime-po/Makevars read-only, too.
970 2006-09-05 Jim Meyering <jim@meyering.net>
972 * tests/cp/acl: Skip this test when cp lacks ACL support.
973 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
975 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
976 context from change of 2006-09-02.
978 2006-09-04 Jim Meyering <jim@meyering.net>
980 * README-cvs: Fix typo in update command.
982 2006-09-03 Jim Meyering <jim@meyering.net>
984 * NEWS: Tweak the wording in the new change description so that
985 no one can think this change causes e.g., `rm -fr foo../' to fail.
987 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
988 Use $CONFIG_HEADER, rather than hard-coding it.
989 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
991 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
993 * NEWS: rm now rejects attempts to remove /, ./, and ../.
994 * src/basename.c: Don't include dirname.h, since system.h does it now.
995 * src/chmod.c: Likewise.
996 * src/copy.c: Likewise.
997 * src/cp.c: Likewise.
998 * src/df.c: Likewise.
999 * src/dircolors.c: Likewise.
1000 * src/dirname.c: Likewise.
1001 * src/du.c: Likewise.
1002 * src/install.c: Likewise.
1003 * src/ln.c: Likewise.
1004 * src/ls.c: Likewise.
1005 * src/mkdir.c: Likewise.
1006 * src/mv.c: Likewise.
1007 * src/remove.c: Likewise.
1008 * src/rm.c: Likewise.
1009 * src/rmdir.c: Likewise.
1010 * src/shred.c: Likewise.
1011 * src/split.c: Likewise.
1012 * src/su.c: Likewise.
1013 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
1015 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
1017 * src/rm.c (usage, main): --preserve-root is now the default.
1018 * src/remove.h: Fix comment.
1019 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
1020 (cache_statted, cache_stat_ok): New functions.
1021 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
1022 which is no longer needed with the new functions. All callers
1024 (prompt, is_dir_lstat, remove_entry, remove_dir):
1025 New struct stat * arg. All callers changed.
1026 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
1027 (remove_cwd_entries, remove_dir, rm_1):
1028 Use and maintain the file status cache.
1029 (prompt, remove_entry): Omit the first "directory" in the diagnostic
1030 "Cannot remove directory `foo': is a directory". This causes "rm"
1031 to pass a test case that it would otherwise fail now that it
1032 "knows" more about its argument. I think the diagnostic is better
1033 without the first "directory" anyway.
1034 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
1035 (rm_1): Reject attempts to remove /, ./, or ../.
1036 * tests/rm/Makefile.am (TESTS): Add r-4.
1037 * tests/rm/r-4: New file.
1039 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
1041 * src/stat.c: Include <stddef.h>
1042 (alignof): New macro.
1043 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
1045 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
1047 (print_statfs): If f_fsid isn't an integer, grab its words one
1048 at a time in little-endian order. This is a bit easier to configure
1049 and should avoid a compilation failure on MacOS reported by Bruno
1052 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
1054 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
1055 work around a Mac OS X porting problem reported by Bruno Haible in
1056 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
1057 (print_statfs): Use them.
1059 * bootstrap.conf (gnulib_modules): Add isapipe.
1060 * src/tail.c: Include isapipe.h.
1061 (IS_PIPE_LIKE_FILE_TYPE): Remove.
1062 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
1063 tailable, since this seems to be portable.
1064 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
1065 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
1067 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
1070 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
1072 * src/copy.c (copy_internal): Don't test whether macros like
1073 S_ISLNK are defined, since they're always defined now.
1074 * src/cp.c (main): Likewise.
1075 * src/ln.c (main): Likewise.
1076 * src/ls.c (get_link_name, make_link_name): Likewise.
1077 * src/mknod.c (main): Likewise.
1078 * src/mkfifo.c (usage): Likewise.
1079 * src/who.c (S_IWGRP): Likewise.
1081 Adjust to recent gnulib changes for the gnulib module.
1082 * bootstrap.conf (gnulib_modules): Add fcntl.
1083 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
1084 is already assuming these macros are defined.
1085 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
1086 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
1087 Remove; the fcntl module now handles these.
1089 Adjust to recent gnulib changes for the inttypes module.
1090 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
1091 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
1093 * src/system.h: Don't bother to include <stdint.h>, since we can
1094 now assume inttypes.h does the equivalent of including stdint.h.
1096 2006-08-27 Jim Meyering <jim@meyering.net>
1098 * src/copy.c (copy_internal): Don't make a backup if the last
1099 component of the source name is "." or "..".
1100 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
1101 * NEWS: Mention this.
1102 * tests/cp/src-base-dot: New file. Test for the above fix.
1103 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
1105 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
1106 (dot_or_dotdot): ...new static inline function.
1107 * src/remove.c (rm_1): Reflect this renaming.
1108 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
1110 * src/copy.c (copy_internal): Add comments.
1112 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
1114 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
1115 since Automake supplies them for us. It always did -I$(srcdir),
1116 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
1117 is now also doing -I../lib.
1119 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
1120 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
1121 since there might not be any .po files.
1122 (WGET_COMMAND): Set to empty if wget doesn't
1123 seem to be available.
1125 2006-08-26 Jim Meyering <jim@meyering.net>
1127 This test was failing in some environments.
1128 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
1129 to set LS_COLORS in the environment.
1130 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
1131 Reported by Bob Proulx.
1133 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
1135 * Makefile.am (EXTRA_DIST): Remove these files here, too:
1136 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
1137 .x-sc_two_space_separator_in_usage.
1139 Fix "mv --verbose --backup" so its output includes the
1140 " (backup: foo.~1~)" suffix also when backing up a directory.
1141 * NEWS: Report this bug fix.
1142 * src/copy.c (emit_verbose): New function, factored out of...
1143 (copy_internal): ...here. Use the new function.
1144 * tests/mv/backup-dir: Test for the above fix.
1145 * tests/mv/Makefile.am (TESTS): Add backup-dir.
1147 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
1149 * .x-sc_no_if_have_config_h: Remove; no longer needed.
1150 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
1151 * .x-sc_two_space_separator_in_usage: Likewise.
1152 * Makefile.maint (sc_no_have_config_h): Renamed from
1153 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
1154 is absent everywhere.
1155 * bootstrap.conf (gnulib_modules): Add config-h.
1156 * src/shred.c: Include <config.h> unconditionally, since
1157 we now assume config.h exists.
1158 * src/dircolors.c: Likewise.
1160 2006-08-26 Jim Meyering <jim@meyering.net>
1162 "ls --color" would highlight other-writable and sticky directories
1163 no differently than regular directories on a file system with
1164 dirent.d_type support.
1165 * NEWS: Say the above.
1166 * src/ls.c (gobble_file): With --color, also stat the file when
1167 we know it is a directory.
1168 Derived from an anonymous one-line fix and bug report:
1169 <http://savannah.gnu.org/bugs/?15043>.
1170 * tests/ls/color-dtype-dir: New file. Test for the above fix.
1171 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
1173 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
1175 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
1177 * bootstrap.conf: Add configmake, verify.
1178 * src/.cvsignore: Remove localedir.h.
1179 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
1180 subsumed by configmake.
1181 * src/system.h: Include configmake.h rather than localedir.h
1182 (LOCALEDIR): New macro.
1184 Rewrite to avoid some unnecessary casts, macros, literals.
1185 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
1187 (SECTOR_SIZE, SECTOR_MASK): New constants.
1188 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
1189 and use the SECTOR_* constants when applicable. Check for size <
1190 0 rather than size == -1, since negative-size files are a sign of
1193 2006-08-25 Bruno Haible <bruno@clisp.org>
1195 * src/shred.c (dopass): Assume a continuable error if EIO even
1196 if the current position is not a multiple of 512.
1198 2006-08-24 Jim Meyering <jim@meyering.net>
1200 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
1202 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
1204 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
1205 macro was being used without being defined.
1206 (SB_F_NAMEMAX): Remove cast.
1207 (f_fsid) [BeOS]: Likewise.
1208 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
1210 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
1212 (xstrcat): Remove. All uses changed to use the above functions.
1213 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
1214 buffer len. All uses changed. Output '?', not '*', for unknown
1215 data or errors. Do not assume signed values can be interchanged
1216 with unsigned when printing.
1217 (print_statfs): For %i, print the fsid as a single int, not as a
1219 (print_it): Quote invalid format better.
1221 * NEWS: printf supports the I flag.
1222 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
1224 2006-08-23 Bruno Haible <bruno@clisp.org>
1226 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
1227 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
1228 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
1230 * src/ls.c (SA_RESTART): Fallback define.
1232 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
1234 * src/system.h (EDQUOT): Define if not already defined.
1235 Problem reported by Bruno Haible for BeOS.
1237 * .cvsignore: Remove config.h, config.hin, as they are now
1239 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
1241 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
1243 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
1244 to accommodate today's gnulib change.
1246 2006-08-23 Jim Meyering <jim@meyering.net>
1248 * NEWS: Mention the sweeping infrastructure changes.
1250 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
1252 * bootstrap.conf (gnulib_modules): Add gnupload.
1253 * Makefile.maint (emit_upload_commands): gnupload is now
1255 * gnupload: Remove from CVS, since it's now a gnulib module.
1257 * bootstrap (bootstrap_conf_cleanup): Remove.
1258 (excluded_files): New var.
1259 * bootstrap.conf: Likewise.
1260 * bootstrap (slurp): Exclude files early if they're in the
1261 excluded_files list. That way, their names don't get put into
1264 * aclocal.m4, config.hin, configure:
1265 Remove from CVS, since ./bootstrap generates them automatically.
1266 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
1267 configure, *.cache, *.lineno, *.log.
1268 Remove more-specific entries. This catches files like configure.lineno.
1269 * man/.cvsignore: Add Makefile.in.
1270 * src/.cvsignore: Add Makefile.in.
1271 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
1274 * tests/chgrp/.cvsignore:
1275 * tests/chmod/.cvsignore:
1276 * tests/chown/.cvsignore:
1277 * tests/cp/.cvsignore:
1278 * tests/cut/.cvsignore:
1279 * tests/dd/.cvsignore:
1280 * tests/dircolors/.cvsignore:
1281 * tests/du/.cvsignore:
1282 * tests/expr/.cvsignore:
1283 * tests/factor/.cvsignore:
1284 * tests/fmt/.cvsignore:
1285 * tests/head/.cvsignore:
1286 * tests/install/.cvsignore:
1287 * tests/join/.cvsignore:
1288 * tests/ln/.cvsignore:
1289 * tests/ls/.cvsignore:
1290 * tests/ls-2/.cvsignore:
1291 * tests/md5sum/.cvsignore:
1292 * tests/misc/.cvsignore:
1293 * tests/mkdir/.cvsignore:
1294 * tests/mv/.cvsignore:
1295 * tests/od/.cvsignore:
1296 * tests/pr/.cvsignore:
1297 * tests/readlink/.cvsignore:
1298 * tests/rm/.cvsignore:
1299 * tests/rmdir/.cvsignore:
1300 * tests/seq/.cvsignore:
1301 * tests/sha1sum/.cvsignore:
1302 * tests/shred/.cvsignore:
1303 * tests/sort/.cvsignore:
1304 * tests/stty/.cvsignore:
1305 * tests/sum/.cvsignore:
1306 * tests/tac/.cvsignore:
1307 * tests/tail/.cvsignore:
1308 * tests/tail-2/.cvsignore:
1309 * tests/tee/.cvsignore:
1310 * tests/test/.cvsignore:
1311 * tests/touch/.cvsignore:
1312 * tests/tr/.cvsignore:
1313 * tests/tsort/.cvsignore:
1314 * tests/unexpand/.cvsignore:
1315 * tests/uniq/.cvsignore:
1316 * tests/wc/.cvsignore:
1317 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
1318 *.X, *.O, *-tests, build-script, mk-script if they're never
1319 created in this directory.
1321 2006-08-22 Bruno Haible <bruno@clisp.org>
1324 * src/uptime.c: Include OS.h if it exists.
1325 (print_uptime): On BeOS, use the get_system_info function (actually a
1326 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
1327 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
1329 2006-08-22 Jim Meyering <jim@meyering.net>
1331 * .cvsignore: Add ABOUT-NLS.
1333 Move the check-AUTHORS rule to be run as part of "make distcheck",
1334 rather than "make check".
1335 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
1336 cause "make check" to fail on systems unable to build all binaries.
1337 * Makefile.maint (check-AUTHORS): New rule.
1338 (local-checks-available): Add it here.
1339 Reported by Bruno Haible. Needed for BeOS.
1341 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
1343 * src/df.c (print_header, show_dev): Use a column width that
1344 depends on the block size of -P is specified and not autoscaling.
1345 Problem reported by Gustavo G. Rondina in:
1346 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
1348 2006-08-21 Jim Meyering <jim@meyering.net>
1350 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
1351 when the shell variable, SHELL, is not set.
1352 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
1353 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
1355 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
1356 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
1357 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
1358 od: invalid type string `u8';
1359 this system doesn't provide a 8-byte integral type
1360 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
1362 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
1364 Add a bootstrap procedure, so that the CVS version contains fewer
1365 files and we bootstrap the rest from gnulib, gettext, etc.
1366 * README-cvs: New file.
1367 * bootstrap: New file.
1368 * bootstrap.conf: New file.
1369 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
1370 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
1372 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
1373 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
1375 (gl_MACROS): Call just after gl_EARLY, just for clarity.
1376 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
1377 * src/kill.c (strtoimax): Remove decl.
1378 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
1379 * src/wc.c: Likewise.
1380 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
1381 declaration, so that we don't need to patch this file.
1382 * src/printf.c (strtoimax, strtoumax): Remove decls.
1383 * src/su.c: Include getpass.h.
1385 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
1386 Include inttypes.h unconditionally.
1387 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
1388 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
1389 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
1390 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
1391 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
1393 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
1394 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
1395 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
1396 * tests/cp/Makefile.in, tests/cut/Makefile.in:
1397 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
1398 * tests/du/Makefile.in, tests/expr/Makefile.in:
1399 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
1400 * tests/general/Makefile.in, tests/head/Makefile.in:
1401 * tests/install/Makefile.in, tests/join/Makefile.in:
1402 * tests/ln/Makefile.in, tests/ls/Makefile.in:
1403 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
1404 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
1405 * tests/mv/Makefile.in, tests/od/Makefile.in:
1406 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
1407 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
1408 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
1409 * tests/shred/Makefile.in, tests/sort/Makefile.in:
1410 * tests/stty/Makefile.in, tests/sum/Makefile.in:
1411 * tests/tac/Makefile.in, tests/tail/Makefile.in:
1412 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
1413 * tests/test/Makefile.in, tests/touch/Makefile.in:
1414 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
1415 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
1416 * tests/wc/Makefile.in:
1417 Remove from CVS, since ./bootstrap generates them automatically.
1419 2006-08-20 Eric Blake <ebb9@byu.net>
1421 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
1422 the patch from 2006-08-18 broke on cygwin.
1424 2006-08-20 Jim Meyering <jim@meyering.net>
1426 * NEWS: Add a line for 6.2-cvs.
1427 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
1429 2006-08-19 Jim Meyering <jim@meyering.net>
1432 * NEWS: Record the 6.1 release date.
1433 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1435 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
1437 Avoid test failure when `make check' is run through debuild.
1438 * tests/help-version: Ensure that $SHELL is set to some value
1439 and exported. Patch from Sven Joachim. For details, see
1440 <http://bugs.debian.org/355368>.
1442 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
1444 * README: Describe potential "pre-C99 build failure", and work-around.
1446 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
1447 backed out due to updates provoked by the copyright changes.
1448 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
1449 it propagates to the derived Makefile.am files.
1450 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
1451 so we don't mistakenly edit them again.
1452 * tests/cut/Makefile.am: Regenerate.
1453 * tests/head/Makefile.am: Likewise.
1454 * tests/join/Makefile.am: Likewise.
1455 * tests/pr/Makefile.am: Likewise.
1456 * tests/sort/Makefile.am: Likewise.
1457 * tests/tac/Makefile.am: Likewise.
1458 * tests/tail/Makefile.am: Likewise.
1459 * tests/test/Makefile.am: Likewise.
1460 * tests/tr/Makefile.am: Likewise.
1461 * tests/uniq/Makefile.am: Likewise.
1462 * tests/wc/Makefile.am: Likewise.
1464 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
1465 when the file's apparent size is not a multiple of its block size.
1466 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
1467 For some file sizes, writing that single byte would unnecessarily
1468 waste a few file blocks. That write may have been necessary in the
1469 early days of Linux, but now, removing it should be safe.
1470 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
1471 * tests/cp/sparse: New test for the above.
1472 * tests/cp/Makefile.am (TESTS): Add sparse.
1474 * tests/sparse-file: New file, essence factored out of...
1475 * tests/du/8gb: ... here. Use the new script.
1477 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
1479 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
1480 the CVS gettext manual now suggests 1000000.
1482 2006-08-18 Bruno Haible <bruno@clisp.org>
1484 Add support for NetBSD 3.0.
1485 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
1487 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
1488 has a field f_fstypename.
1489 This undoes the 2006-08-15 to src/stat.c.
1491 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
1493 Copyright notice fixes.
1495 * COPYING: Upgrade to latest version from FSF.
1497 * src/uname.c: Use (C) in copyright notice.
1499 * .vg-suppressions: Add copyright notice.
1500 * ChangeLog: Likewise.
1501 * ChangeLog-2005: Likewise.
1502 * Makefile.am: Likewise.
1505 * README-valgrind: Likewise.
1507 * announce-gen: Likewise.
1508 * man/Makefile.am: Likewise.
1509 * man/chmod.x: Likewise.
1510 * man/chown.x: Likewise.
1511 * man/df.x: Likewise.
1512 * man/du.x: Likewise.
1513 * man/rm.x: Likewise.
1514 * src/dircolors.hin: Likewise.
1515 * src/du-tests: Likewise.
1516 * src/extract-magic: Likewise.
1517 * src/tac-pipe.c: Likewise.
1518 * src/wheel-gen.pl: Likewise.
1519 * tests/Coreutils.pm: Likewise.
1520 * tests/Makefile.am.in: Likewise.
1521 * tests/acl: Likewise.
1522 * tests/envvar-check: Likewise.
1523 * tests/expensive: Likewise.
1524 * tests/group-names: Likewise.
1525 * tests/help-version: Likewise.
1526 * tests/mk-script: Likewise.
1527 * tests/priv-check: Likewise.
1528 * tests/rwx-to-mode: Likewise.
1529 * tests/sample-test: Likewise.
1530 * tests/setgid-check: Likewise.
1531 * tests/chgrp/basic: Likewise.
1532 * tests/chgrp/deref: Likewise.
1533 * tests/chgrp/no-x: Likewise.
1534 * tests/chgrp/posix-H: Likewise.
1535 * tests/chgrp/recurse: Likewise.
1536 * tests/chmod/c-option: Likewise.
1537 * tests/chmod/equal-x: Likewise.
1538 * tests/chmod/equals: Likewise.
1539 * tests/chmod/no-x: Likewise.
1540 * tests/chmod/octal: Likewise.
1541 * tests/chmod/setgid: Likewise.
1542 * tests/chmod/umask-x: Likewise.
1543 * tests/chmod/usage: Likewise.
1544 * tests/chown/basic: Likewise.
1545 * tests/chown/deref: Likewise.
1546 * tests/chown/separator: Likewise.
1547 * tests/cp/Makefile.am: Likewise.
1548 * tests/cp/acl: Likewise.
1549 * tests/cp/backup-1: Likewise.
1550 * tests/cp/backup-is-src: Likewise.
1551 * tests/cp/cp-HL: Likewise.
1552 * tests/cp/cp-deref: Likewise.
1553 * tests/cp/cp-mv-backup: Likewise.
1554 * tests/cp/cp-parents: Likewise.
1555 * tests/cp/deref-slink: Likewise.
1556 * tests/cp/dir-rm-dest: Likewise.
1557 * tests/cp/dir-slash: Likewise.
1558 * tests/cp/dir-vs-file: Likewise.
1559 * tests/cp/fail-perm: Likewise.
1560 * tests/cp/into-self: Likewise.
1561 * tests/cp/link: Likewise.
1562 * tests/cp/link-no-deref: Likewise.
1563 * tests/cp/link-preserve: Likewise.
1564 * tests/cp/no-deref-link1: Likewise.
1565 * tests/cp/no-deref-link2: Likewise.
1566 * tests/cp/no-deref-link3: Likewise.
1567 * tests/cp/perm: Likewise.
1568 * tests/cp/preserve-2: Likewise.
1569 * tests/cp/r-vs-symlink: Likewise.
1570 * tests/cp/same-file: Likewise.
1571 * tests/cp/slink-2-slink: Likewise.
1572 * tests/cp/special-bits: Likewise.
1573 * tests/cp/symlink-slash: Likewise.
1574 * tests/cut/Makefile.am: Likewise.
1575 * tests/cut/Test.pm: Likewise.
1576 * tests/dd/misc: Likewise.
1577 * tests/dd/not-rewound: Likewise.
1578 * tests/dd/skip-seek: Likewise.
1579 * tests/dd/skip-seek2: Likewise.
1580 * tests/dd/unblock-sync: Likewise.
1581 * tests/dircolors/simple: Likewise.
1582 * tests/du/2g: Likewise.
1583 * tests/du/8gb: Likewise.
1584 * tests/du/Makefile.am: Likewise.
1585 * tests/du/basic: Likewise.
1586 * tests/du/deref: Likewise.
1587 * tests/du/deref-args: Likewise.
1588 * tests/du/exclude: Likewise.
1589 * tests/du/fd-leak: Likewise.
1590 * tests/du/files0-from: Likewise.
1591 * tests/du/hard-link: Likewise.
1592 * tests/du/inaccessible-cwd: Likewise.
1593 * tests/du/long-from-unreadable: Likewise.
1594 * tests/du/long-sloop: Likewise.
1595 * tests/du/no-deref: Likewise.
1596 * tests/du/no-x: Likewise.
1597 * tests/du/restore-wd: Likewise.
1598 * tests/du/slash: Likewise.
1599 * tests/du/slink: Likewise.
1600 * tests/du/trailing-slash: Likewise.
1601 * tests/du/two-args: Likewise.
1602 * tests/expr/basic: Likewise.
1603 * tests/factor/basic: Likewise.
1604 * tests/fmt/basic: Likewise.
1605 * tests/fmt/long-line: Likewise.
1606 * tests/general/Makefile.am: Likewise.
1607 * tests/general/atgeneral.m4: Likewise.
1608 * tests/general/dd.at: Likewise.
1609 * tests/head/Makefile.am: Likewise.
1610 * tests/head/Test.pm: Likewise.
1611 * tests/install/basic-1: Likewise.
1612 * tests/install/create-leading: Likewise.
1613 * tests/install/d-slashdot: Likewise.
1614 * tests/install/trap: Likewise.
1615 * tests/join/Makefile.am: Likewise.
1616 * tests/join/Test.pm: Likewise.
1617 * tests/ln/backup-1: Likewise.
1618 * tests/ln/misc: Likewise.
1619 * tests/ln/sf-1: Likewise.
1620 * tests/ln/target-1: Likewise.
1621 * tests/ls/Makefile.am: Likewise.
1622 * tests/ls/Test.pm: Likewise.
1623 * tests/ls/dangle: Likewise.
1624 * tests/ls/dired: Likewise.
1625 * tests/ls/file-type: Likewise.
1626 * tests/ls/follow-slink: Likewise.
1627 * tests/ls/infloop: Likewise.
1628 * tests/ls/inode: Likewise.
1629 * tests/ls/m-option: Likewise.
1630 * tests/ls/no-arg: Likewise.
1631 * tests/ls/recursive: Likewise.
1632 * tests/ls/rt-1: Likewise.
1633 * tests/ls/stat-dtype: Likewise.
1634 * tests/ls/stat-failed: Likewise.
1635 * tests/ls/stat-vs-dirent: Likewise.
1636 * tests/ls/symlink-slash: Likewise.
1637 * tests/ls/time-1: Likewise.
1638 * tests/ls-2/tests: Likewise.
1639 * tests/md5sum/basic-1: Likewise.
1640 * tests/md5sum/newline-1: Likewise.
1641 * tests/misc/Makefile.am: Likewise.
1642 * tests/misc/base64: Likewise.
1643 * tests/misc/basename: Likewise.
1644 * tests/misc/cat-proc: Likewise.
1645 * tests/misc/close-stdout: Likewise.
1646 * tests/misc/csplit: Likewise.
1647 * tests/misc/date: Likewise.
1648 * tests/misc/date-sec: Likewise.
1649 * tests/misc/df: Likewise.
1650 * tests/misc/dirname: Likewise.
1651 * tests/misc/expand: Likewise.
1652 * tests/misc/false-status: Likewise.
1653 * tests/misc/fold: Likewise.
1654 * tests/misc/head-c: Likewise.
1655 * tests/misc/head-elide-tail: Likewise.
1656 * tests/misc/head-pos: Likewise.
1657 * tests/misc/mknod: Likewise.
1658 * tests/misc/nice: Likewise.
1659 * tests/misc/nl: Likewise.
1660 * tests/misc/nohup: Likewise.
1661 * tests/misc/paste-no-nl: Likewise.
1662 * tests/misc/pathchk1: Likewise.
1663 * tests/misc/printf: Likewise.
1664 * tests/misc/printf-hex: Likewise.
1665 * tests/misc/pwd-long: Likewise.
1666 * tests/misc/sha224sum: Likewise.
1667 * tests/misc/sha256sum: Likewise.
1668 * tests/misc/sha384sum: Likewise.
1669 * tests/misc/sha512sum: Likewise.
1670 * tests/misc/shuf: Likewise.
1671 * tests/misc/sort-merge: Likewise.
1672 * tests/misc/sort-rand: Likewise.
1673 * tests/misc/split-a: Likewise.
1674 * tests/misc/split-fail: Likewise.
1675 * tests/misc/split-l: Likewise.
1676 * tests/misc/stat-fmt: Likewise.
1677 * tests/misc/stat-printf: Likewise.
1678 * tests/misc/tac-continue: Likewise.
1679 * tests/misc/test-diag: Likewise.
1680 * tests/misc/tty-eof: Likewise.
1681 * tests/misc/wc-files0: Likewise.
1682 * tests/misc/wc-files0-from: Likewise.
1683 * tests/mkdir/concurrent-1: Likewise.
1684 * tests/mkdir/p-1: Likewise.
1685 * tests/mkdir/p-2: Likewise.
1686 * tests/mkdir/p-3: Likewise.
1687 * tests/mkdir/p-slashdot: Likewise.
1688 * tests/mkdir/p-thru-slink: Likewise.
1689 * tests/mkdir/parents: Likewise.
1690 * tests/mkdir/perm: Likewise.
1691 * tests/mkdir/special-1: Likewise.
1692 * tests/mkdir/t-slash: Likewise.
1693 * tests/mkdir/writable-under-readonly: Likewise.
1694 * tests/mv/Makefile.am: Likewise.
1695 * tests/mv/acl: Likewise.
1696 * tests/mv/atomic: Likewise.
1697 * tests/mv/backup-is-src: Likewise.
1698 * tests/mv/childproof: Likewise.
1699 * tests/mv/diag: Likewise.
1700 * tests/mv/dir-file: Likewise.
1701 * tests/mv/dir2dir: Likewise.
1702 * tests/mv/dup-source: Likewise.
1703 * tests/mv/force: Likewise.
1704 * tests/mv/hard-2: Likewise.
1705 * tests/mv/hard-3: Likewise.
1706 * tests/mv/hard-4: Likewise.
1707 * tests/mv/hard-link-1: Likewise.
1708 * tests/mv/i-1: Likewise.
1709 * tests/mv/i-2: Likewise.
1710 * tests/mv/i-3: Likewise.
1711 * tests/mv/i-4: Likewise.
1712 * tests/mv/i-link-no: Likewise.
1713 * tests/mv/into-self: Likewise.
1714 * tests/mv/into-self-2: Likewise.
1715 * tests/mv/into-self-3: Likewise.
1716 * tests/mv/into-self-4: Likewise.
1717 * tests/mv/leak-fd: Likewise.
1718 * tests/mv/mv-special-1: Likewise.
1719 * tests/mv/no-target-dir: Likewise.
1720 * tests/mv/part-fail: Likewise.
1721 * tests/mv/part-hardlink: Likewise.
1722 * tests/mv/part-rename: Likewise.
1723 * tests/mv/part-symlink: Likewise.
1724 * tests/mv/partition-perm: Likewise.
1725 * tests/mv/perm-1: Likewise.
1726 * tests/mv/reply-no: Likewise.
1727 * tests/mv/setup: Likewise.
1728 * tests/mv/to-symlink: Likewise.
1729 * tests/mv/trailing-slash: Likewise.
1730 * tests/mv/update: Likewise.
1731 * tests/mv/vfat: Likewise.
1732 * tests/od/od-N: Likewise.
1733 * tests/od/x8: Likewise.
1734 * tests/pr/Makefile.am: Likewise.
1735 * tests/pr/Test.pm: Likewise.
1736 * tests/readlink/can-e: Likewise.
1737 * tests/readlink/can-f: Likewise.
1738 * tests/readlink/can-m: Likewise.
1739 * tests/readlink/rl-1: Likewise.
1740 * tests/rm/Makefile.am: Likewise.
1741 * tests/rm/cycle: Likewise.
1742 * tests/rm/dangling-symlink: Likewise.
1743 * tests/rm/deep-1: Likewise.
1744 * tests/rm/dir-no-w: Likewise.
1745 * tests/rm/dir-nonrecur: Likewise.
1746 * tests/rm/dot-rel: Likewise.
1747 * tests/rm/empty-inacc: Likewise.
1748 * tests/rm/empty-name: Likewise.
1749 * tests/rm/f-1: Likewise.
1750 * tests/rm/fail-2eperm: Likewise.
1751 * tests/rm/fail-eperm: Likewise.
1752 * tests/rm/hash: Likewise.
1753 * tests/rm/i-1: Likewise.
1754 * tests/rm/i-no-r: Likewise.
1755 * tests/rm/inaccessible: Likewise.
1756 * tests/rm/interactive-always: Likewise.
1757 * tests/rm/interactive-once: Likewise.
1758 * tests/rm/ir-1: Likewise.
1759 * tests/rm/isatty: Likewise.
1760 * tests/rm/no-give-up: Likewise.
1761 * tests/rm/r-1: Likewise.
1762 * tests/rm/r-2: Likewise.
1763 * tests/rm/r-3: Likewise.
1764 * tests/rm/rm1: Likewise.
1765 * tests/rm/rm2: Likewise.
1766 * tests/rm/rm3: Likewise.
1767 * tests/rm/rm4: Likewise.
1768 * tests/rm/rm5: Likewise.
1769 * tests/rm/sunos-1: Likewise.
1770 * tests/rm/unread2: Likewise.
1771 * tests/rm/unread3: Likewise.
1772 * tests/rm/unreadable: Likewise.
1773 * tests/rmdir/fail-perm: Likewise.
1774 * tests/rmdir/ignore: Likewise.
1775 * tests/rmdir/t-slash: Likewise.
1776 * tests/seq/basic: Likewise.
1777 * tests/sha1sum/basic-1: Likewise.
1778 * tests/sha1sum/sample-vec: Likewise.
1779 * tests/shred/exact: Likewise.
1780 * tests/shred/remove: Likewise.
1781 * tests/sort/Makefile.am: Likewise.
1782 * tests/sort/Test.pm: Likewise.
1783 * tests/sort-time/Makefile: Likewise.
1784 * tests/sort-time/README: Likewise.
1785 * tests/sort-time/rand-gen: Likewise.
1786 * tests/stty/basic-1: Likewise.
1787 * tests/stty/row-col-1: Likewise.
1788 * tests/sum/basic-1: Likewise.
1789 * tests/sum/sysv: Likewise.
1790 * tests/tac/Makefile.am: Likewise.
1791 * tests/tac/Test.pm: Likewise.
1792 * tests/tail/Makefile.am: Likewise.
1793 * tests/tail/Test.pm: Likewise.
1794 * tests/tail-2/Makefile.am: Likewise.
1795 * tests/tail-2/append-only: Likewise.
1796 * tests/tail-2/assert: Likewise.
1797 * tests/tail-2/assert-2: Likewise.
1798 * tests/tail-2/big-4gb: Likewise.
1799 * tests/tail-2/fflush: Likewise.
1800 * tests/tail-2/infloop-1: Likewise.
1801 * tests/tail-2/proc-ksyms: Likewise.
1802 * tests/tail-2/start-middle: Likewise.
1803 * tests/tail-2/tail-n0f: Likewise.
1804 * tests/tee/basic: Likewise.
1805 * tests/tee/dash: Likewise.
1806 * tests/test/Makefile.am: Likewise.
1807 * tests/test/Test.pm: Likewise.
1808 * tests/touch/Makefile.am: Likewise.
1809 * tests/touch/dangling-symlink: Likewise.
1810 * tests/touch/empty-file: Likewise.
1811 * tests/touch/fail-diag: Likewise.
1812 * tests/touch/fifo: Likewise.
1813 * tests/touch/no-create-missing: Likewise.
1814 * tests/touch/no-rights: Likewise.
1815 * tests/touch/not-owner: Likewise.
1816 * tests/touch/obsolescent: Likewise.
1817 * tests/touch/read-only: Likewise.
1818 * tests/touch/relative: Likewise.
1819 * tests/tr/Makefile.am: Likewise.
1820 * tests/tr/Test.pm: Likewise.
1821 * tests/tr/failures: Likewise.
1822 * tests/tsort/basic-1: Likewise.
1823 * tests/unexpand/basic-1: Likewise.
1824 * tests/uniq/Makefile.am: Likewise.
1825 * tests/uniq/Test.pm: Likewise.
1826 * tests/wc/Makefile.am: Likewise.
1827 * tests/wc/Test.pm: Likewise.
1829 2006-08-17 Jim Meyering <jim@meyering.net>
1831 ls -CF would misalign columns in some cases.
1832 * src/ls.c (get_type_indicator): New function. extracted from...
1833 (print_type_indicator): ...here. Use it.
1834 (length_of_file_name_and_frills): Use it here, too, rather than
1835 assuming stat.st_mode is valid.
1836 Reported by Andreas Schwab, here:
1837 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
1838 See the test for this above. FYI, I did ls -CF /proc and visually
1839 inspected the result.
1841 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
1842 to mention the now-removed cp_options.xstat member.
1844 * Makefile.maint (patch-check): Adapt to work now that the patch
1845 modifies more than one file in src/.
1847 With this patch, permit building with Solaris cc on Solaris 7.
1848 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
1849 This integrates patches from Bruno Haible.
1851 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
1853 Fix some problems reported by Bruno Haible.
1854 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
1855 Skip this test if "chmod g+s d" silently does nothing.
1856 * tests/ls-2/tests: Skip this test suite if we can't set up files
1857 properly for the setuid-etc test. This simplifies some of the
1858 hacks we were using to work around porting problems.
1860 2006-08-16 Jim Meyering <jim@meyering.net>
1862 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
1863 * tests/cp/acl: Instead, skip the test if either setfacl
1865 Reported by Michael Stone.
1867 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
1869 * tests/lang-default (LC_ALL): Set to "C", so we get
1870 English-language diagnostics. Unset the other variables; it
1871 should be portable to use 'unset' for this stuff nowadays.
1872 Problem reported by Bruno Haible. Using "C" reverses the
1873 2000-10-22 change to fileutils in this area.
1875 Fix bugs when printing plurals of numbers that are not
1876 unsigned long int values.
1877 * src/system.h (select_plural): New function.
1878 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
1879 * src/uptime.c (print_uptime): Likewise.
1880 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
1881 print a floating point number, as reducing to 0 or 1 doesn't work
1882 for some languages. Instead, just use "s" for seconds since it
1883 doesn't need a plural form.
1885 2006-08-16 Bruno Haible <bruno@clisp.org>
1887 Old versions of gzip would write --help output to stderr, and it
1888 would be annoying to see that in the output of every "make" command.
1889 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
1892 2006-08-16 Andreas Schwab <schwab@suse.de>
1894 * tests/cp/acl: Don't use non-portable == operator for test.
1896 2006-08-16 Jim Meyering <jim@meyering.net>
1898 * tests/ls/stat-dtype: Use stat to test file system type, rather
1899 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
1901 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
1903 * NEWS: Mention that df exits with nonzero status if it generates
1904 no output. This change was in 6.0 but inadvertently unmentioned.
1905 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
1907 (show_dev): Don't set it until we actually output something.
1908 Print the header if this is the first output.
1909 (main): Don't print a header, as that is now show_dev's job.
1910 * tests/misc/Makefile.am (TESTS): Add df.
1911 * tests/misc/df: New file.
1913 2006-08-15 Eric Blake <ebb9@byu.net>
1915 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
1916 statvfs.f_type not present. See
1917 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
1919 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
1921 * src/dd.c (print_stats): Don't substitute "1" for number, as this
1922 causes confusion for the Hungarian translators. Problem reported
1923 by Egmont Koblinger here:
1924 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
1926 2006-08-15 Jim Meyering <jim@meyering.net>
1928 * .x-sc_require_config_h: Add lib/at-func.c.
1930 * NEWS: Add a line for 6.1-cvs.
1931 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
1933 2006-08-15 Jim Meyering <jim@meyering.net>
1936 * NEWS: Record the 6.0 release date.
1937 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1939 * TODO: Add an item (convert to use gnulib-tool), add to the plan
1940 for id-vs-getgrouplist, and remove a few completed items.
1942 * Makefile.maint (alpha beta major): Fix syntax error.
1944 2006-08-13 Jim Meyering <jim@meyering.net>
1946 * src/shred.c (usage): Don't indent the second line of an item.
1947 Otherwise, help2man would misformat the output.
1948 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
1950 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
1952 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
1953 Suggested by Eric Blake to avoid problems like
1954 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
1956 2006-08-11 Jim Meyering <jim@meyering.net>
1958 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
1959 failure that this test checks for (stat/dirent inode mismatch at
1960 a mount point), so continue to give a diagnostic about the failure,
1961 but don't actually count it as a failure.
1963 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
1965 * ABOUT-NLS: Update from gettext 0.15.
1966 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
1968 * src/csplit.c (struct control): Remove fastmap member.
1969 (extract_regexp): Allocate fastmap separately, since otherwise
1970 it might move due to a realloc. This fixes a bug that led
1971 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
1973 2006-08-10 Jim Meyering <jim@meyering.net>
1975 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
1976 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
1977 Redirect both stdout and stderr of df invocations.
1979 * src/dircolors.hin: Add a TERM directive for each of the following:
1980 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
1981 rxvt-cygwin-native, screen.linux, xterm-256color.
1982 Sort the TERM directives.
1983 From Mike Frysinger.
1985 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
1987 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
1988 See Debian bug 373736.
1990 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
1993 * src/.cvsignore: Add shuf.
1995 * Makefile.maint: Remove the po-update procedure; it doesn't
1996 work with the new repository on http://www.iro.umontreal.ca/.
1997 For now I guess we'll have to fix things by hand.
1998 (do-po-update, po-update): Remove. All references removed.
2000 * src/shuf.c (next_line): New function.
2001 (read_input): Use it, to avoid relying on GCC-specific behavior
2002 with void * arithmetic. Problem reported by Bob Proulx.
2003 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
2004 to detect this sort of problem automatically in the future.
2006 2006-08-09 Jim Meyering <jim@meyering.net>
2008 * src/ls.c: Add a compile-time check to ensure that filetype
2009 and filetype_letter have the same number of elements.
2011 * tests/misc/sort-rand: Remove use of --seed=S.
2013 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
2015 Add a command 'shuf', and modify shred and sort to use the new
2016 random number generator library of 'shuf'.
2018 * AUTHORS: Add shuf.
2020 * NEWS: Likewise. Mention new --random-source option for shred
2021 and sort. Move "sort +1 -2" notice to the appropriate section,
2022 and clarify its role with respect to POSIXLY_CORRECT.
2023 * man/.cvsignore: Add shuf.1.
2024 * man/Makefile.am (dist_man_MANS): Add shuf.1.
2025 (shuf.1): New dependency.
2026 * man/shuf.x: New file.
2027 * src/Makefile.am (bin_PROGRAMS): Add shuf.
2028 (EXTRA_DIST): Remove rand-isaac.c.
2029 (shuf_LDADD): New macro.
2030 * src/rand-isaac.c: Remove, moving most of its contents to
2032 * src/shuf.c: New file.
2033 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
2034 Don't include rand-isaac.c; include randint.h and randread.h instead.
2035 (RANDOM_SOURCE_OPTION): New enum.
2036 (long_opts, usage, main): New option --random-source.
2037 * src/sort.c: Likewise.
2038 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
2039 All callers changed to use randint interface.
2040 (fillrand): Remove. All callers changed to use randread interface.
2041 (dopass): Remove dependency on ISAAC buffer size.
2042 (genpattern): Don't wipe the random state here.
2043 (randint_source): New static var.
2044 (clear_random_data): New function.
2045 (main): Allocate random source, and arrange to wipe it on exit.
2046 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
2047 (longopts, usage, main): Remove undocumented --seed option;
2048 it's now replaced by --random-source.
2049 (rand_state, get_hash): Remove.
2050 (randread_source): New static var.
2051 (random_state, cmp_hashes, compare_random): New functions; they guarantee
2052 no collisions in the random hash function.
2053 (keycompare): Use compare_random for -R; don't fall back on comparing
2054 via memcoll, since compare_random does the right thing.
2055 * tests/misc/Makefile.am (TESTS): Add shuf.
2056 * tests/misc/shuf: New file.
2058 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
2060 * src/copy.c (set_author): Preserve the st_author field via the
2061 file descriptor dest_desc.
2063 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
2065 * NEWS: chmod now preserves setuid and setgid bits on directories
2066 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
2068 Fix test case problems if working directory is setgid,
2069 reported by Bob Proulx.
2070 * tests/cp/fail-perm: Use symbolic mode so that we clear
2071 setgid bit more reliably on directories.
2072 * tests/mkdir/special-1 (set_mode_string): Likewise.
2074 2006-07-27 Jim Meyering <jim@meyering.net>
2076 * src/chgrp.c (usage): Use correct grammar in description of the
2078 * src/chown.c (usage): Likewise.
2080 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
2082 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
2083 Correctly access SRC_SB's element ST_AUTHOR.
2085 2006-07-26 Jim Meyering <jim@meyering.net>
2087 * tests/ls/stat-failed: Adapt to match new expected output.
2090 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
2091 than having the code test for all of the other types first.
2092 Hoist the set-uid/gid-testing code "up" into this new block.
2093 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
2094 C_ORPHAN, not as C_FILE.
2096 2006-07-26 Jim Meyering <jim@meyering.net>
2098 Checking in a change from Paul.
2100 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
2102 * src/ls.c (DT_INIT): Remove. All uses removed.
2103 (enum filetype): Use an ordinary enum rather than trying to keep
2104 the values in sync with DT_FIFO etc. That way, we don't have
2105 to make special assumptions about them. All uses changed.
2106 (whiteout): New constant member of enum filetype.
2107 (filetype_letter): New constant, for use with enum filetype.
2108 (FILETYPE_INDICATORS): New initializer list.
2109 (print_dir): Add case for DT_WHT.
2110 (gobble_file): If stat fails, don't discard information from
2111 readdir; instead, preserve it so it can be printed.
2112 (print_long_format): Fall back on readdir result if stat info
2113 is not available. Use "?" to denote each unknown mode char,
2114 instead of an overall "?", since we now know some of the mode
2116 (print_type_indicator): Now that MODE isn't necessarily
2117 useful, guard all uses.
2118 Now that two blocks in the type-checking tree can set "type = C_FILE",
2119 move the suffix-handling code out and down.
2121 2006-07-26 Jim Meyering <jim@meyering.net>
2123 Prepare for the above change.
2124 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
2125 and adjust uses. From a patch by Paul Eggert.
2127 2006-07-26 Jim Meyering <jim@meyering.net>
2129 * src/ls.c: Correct indentation/formatting in a few places.
2131 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
2133 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
2134 Problem report and fix from Bob Proulx.
2135 * NEWS: Clarify the "chmod 0500" news, and correct the vague
2136 statements about compatibility with BSD.
2138 2006-07-25 Jim Meyering <jim@meyering.net>
2140 * src/ls.c (gobble_file): When handling a stat-failed entry,
2141 print the entry name not the absolute_name -- to be consistent
2142 with the usual case.
2143 * tests/ls/stat-failed: Update accordingly.
2145 * src/ls.c: Add parens around the new uses of ?: ternary operator.
2147 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
2150 Get --dired offsets right when handling stat-failed entries.
2151 * src/ls.c (print_long_format): Be careful to increment P by the
2152 appropriate amount, even when inode_number_width and nlink_width
2154 * tests/ls/stat-failed: Test for the above.
2156 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
2157 have_acl member. That would happen for a directory with both a
2158 non-stat'able entry and one with an ACL.
2160 * src/ls.c (gobble_file): Make it so failure to stat a
2161 non-command-line file provokes an exit status of 1, not 0.
2162 Say "cannot access" rather than "cannot stat".
2163 * tests/ls/stat-failed: New file/test, for the above.
2164 * tests/ls/Makefile.am (TESTS): Add stat-failed.
2165 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
2166 of "cannot access " to diagnostic.
2168 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
2170 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
2171 Replace all occurrences of "type == command_line" with the
2172 equivalent, "command_line_arg".
2174 * src/ls.c: Apply the stat-failed parts of Red Hat's
2175 coreutils-selinux.patch. From Ulrich Drepper.
2176 This makes it so files not mentioned on the command line (e.g.,
2177 names read from a directory that *is* mentioned on the command
2178 line) for which stat fails are still listed. With --color,
2179 such files are colored just like ORPHANs (aka dangling symlinks).
2181 * src/df.c (n_valid_args): Declare global to be static.
2183 2006-07-24 Jim Meyering <jim@meyering.net>
2185 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
2186 system lacks d_type support.
2188 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
2190 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
2192 2006-07-21 Jim Meyering <jim@meyering.net>
2194 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
2195 Reported by Tim Waugh.
2196 Also remove the comment duplicating much of --help output.
2198 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
2199 name so the list remains alphabetized.
2201 Fix another bug: ls --indicator-style=file-type would call
2202 stat for a symlink, even though it wasn't always needed.
2203 In some cases, that unnecessary stat would cause ls to fail.
2204 * src/ls.c (gobble_file): Don't treat symlinks specially (in
2205 requiring a stat syscall). Remove the offending exclusion.
2207 * NEWS: Mention the fix.
2209 * tests/ls/stat-dtype: New file/test, for the above fix.
2210 Also exercises the new df feature, below.
2212 * src/df.c (main): Fail and don't print the headers if no
2213 file system is processed. This makes it easy to test whether
2214 a specified directory is on a file system of a given type or types.
2215 Otherwise, applications would have had to parse df's output.
2216 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
2218 Fix a bug: ls --file-type worked like --indicator-style=slash,
2219 rather than like --indicator-style=file-type.
2220 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
2221 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
2223 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
2224 * NEWS: Mention the fix.
2225 * tests/ls-2/tests (file-type): New test, for the above fix.
2227 2006-07-19 Jim Meyering <jim@meyering.net>
2229 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
2231 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
2233 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
2235 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
2236 of directories alone unless you specify them explicitly.
2237 install and mkdir now implement X correctly.
2238 install now creates parent directories with mode 755, without
2239 changing their owner or group.
2240 * src/chmod.c (process_file): Adjust to mode_adjust API change.
2241 * src/install.c: Include mkancesdirs.h.
2242 (announce_mkdir, make_ancestor): New functions.
2243 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
2245 (dir_mode, dir_mode_bits): New vars.
2246 (main): Set dir modes separately from nondir, so that the X
2247 op of -m works correctly.
2248 (main): Remove cwd_errno cruft, since make_dir_parents no longer
2249 affects cwd. Adjust to new make_dir_parents API.
2250 (install_file_in_file_parents): 2nd arg is now char *, not char
2251 const *. Use mkancesdirs instead of rolling our own code.
2252 (change_attributes): Don't worry about AFS, since that kludge
2253 should not be needed any more.
2254 * src/mkdir.c (struct mkdir_options): New struct.
2255 (announce_mkdir, make_ancestor): New functions.
2256 (main): Use them. Adjust to mode_adjust API change. Stick with
2257 umask 0. Use make_dir_parents for all the work.
2258 * src/mkfifo.c (main): Adjust to new mode_adjust API.
2259 * src/mknod.c (main): Likewise.
2260 * tests/chmod/setgid: Do the setgid test instead of bailing.
2261 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
2262 GNU chmod now behaves like other versions of chmod.
2263 * tests/mkdir/perm: Add a test for the X bug.
2265 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
2267 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
2268 This doesn't fix any bugs, since OUT always equals stdout, but it
2269 makes the code easier to understand.
2271 2006-07-14 Jim Meyering <jim@meyering.net>
2273 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
2274 rather than open-coding it. Now supports mercurial, too.
2275 * .hgignore: New file.
2276 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
2277 all generated files, including ones like configure and po/*.po
2278 that are currently version-controlled in cvs.
2280 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
2281 They've been in CVS, just haven't been distributed before this.
2282 Distribute ChangeLog-2005, too.
2283 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
2285 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
2287 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
2290 2006-07-09 Jim Meyering <jim@meyering.net>
2292 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
2293 That happens with Linux/tmpfs.
2294 * tests/mv/Makefile.am (TESTS): Add dir2dir.
2296 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
2298 Adjust to recent updates from gnulib.
2299 * src/dd.c (apply_translations): Use toupper rather than
2300 islower followed by toupper; it's simpler and typically
2301 faster now that we assume at least C89 semantics. Similarly
2303 * src/sort.c (inittables): Likewise.
2304 * src/expand.c (expand): Don't assume that isprint etc. return
2305 booleans (needed for pre-C99 hosts).
2306 * src/fmt.c (check_punctuation): Likewise.
2307 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
2308 * src/tr.c (is_char_class_member): Likewise.
2309 * src/unexpand.c (unexpand): Likewise.
2310 * src/join.c (is_blank): Remove; no longer needed. All uses
2311 replaced by isblank (to_uchar (...)).
2312 * src/pinky.c (create_fullname): Don't assume char is unsigned.
2313 * src/printf.c (print_esc): Likewise.
2314 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
2315 (copy_unescaped_string): Likewise.
2316 * src/stat.c (print_it): Likewise.
2317 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
2318 convenience on GNU systems. All uses changed. Don't bother
2319 looking for any dirent.h substitute other than ndir.h.
2320 (D_INO): Remove unnecessary parentheses.
2321 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
2322 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
2323 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
2324 to ctype.h equivalents.
2325 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
2328 2006-07-08 Jim Meyering <jim@meyering.net>
2330 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
2332 * Makefile.maint (sc_the_the): New rule.
2334 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
2335 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
2338 2006-07-07 Jim Meyering <jim@meyering.net>
2340 * NEWS: Mention that mv can now remove an empty destination directory,
2341 and give an example. Prompted by a report from Florent Bayle.
2343 2006-07-05 Jim Meyering <jim@meyering.net>
2345 * src/ls.c (usage): Correct the description of -G: it is useful
2346 only in a long listing. Reported by Martin Pool in
2347 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
2349 * man/chmod.x: Correct the description of the sticky bit. Reported
2350 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
2352 * src/copy.c (copy_internal): Don't work around old NFS clients like
2353 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
2354 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
2355 a banal failure as a recursive move-into-self failure.
2356 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
2358 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
2360 2006-07-03 Jim Meyering <jim@meyering.net>
2362 Plug another unusual leak.
2363 (AD_mark_helper): Free malloc'd filename if hash_insert says
2364 that string is already in the hash table.
2366 The dev/inode of the topmost directory in each hierarchy were not
2368 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
2369 (AD_push): Call it from here instead.
2371 Fix two small leaks.
2372 * src/remove.c (AD_stack_clear): New function.
2374 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
2376 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
2377 Add $VG_PATH_PREFIX as a prefix to $PATH
2379 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
2380 * tests/Makefile.am (evar-check): Remove rule.
2381 (EXTRA_DIST): Remove .env-warn.
2382 * tests/.env-warn: Remove file. No longer used.
2383 Suggestion from Eric Blake.
2385 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
2387 * src/system.h: Include <stdint.h> unconditionally, since we
2388 now assume the stdint module.
2390 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
2392 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
2393 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
2394 * src/tail.c (main): Implement this.
2395 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
2396 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
2398 2006-07-01 Jim Meyering <jim@meyering.net>
2400 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
2402 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
2405 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
2407 * NEWS: seq now uses long double internally rather than double.
2408 It now defaults to a minimal fixed point format if possible.
2409 It lets you use %a, %A, %E, %F, %G.
2410 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
2411 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
2412 (isfinite) [!defined isfinite]: New macro.
2413 (separator, terminator): Now points to const.
2414 (first, step, last): Remove.
2415 (usage): Update to match new behavior.
2416 (struct operand, operand): New type.
2417 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
2419 Compute and return a value of type operand, not double.
2420 (long_double_format): Renamed from valid_format, and now returns a
2421 new format with an "L" added if needed, if the original format was
2422 valid. Allow %a, %A, %E, %F, and %G formats.
2423 (print_numbers): Take numeric values as args rather than from globals.
2424 Print long double, not double.
2425 (get_width_format): Remove.
2426 (get_default_format): New function.
2427 (main): Implement new way of calculating default format.
2428 Don't worry about locale's representation of the decimal point, since
2429 the arguments are always processed in the C locale.
2430 * tests/seq/basic (neg-2): Adjust to new default format.
2431 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
2432 implementation should do the right thing.
2434 2006-06-30 Jim Meyering <jim@meyering.net>
2436 * tests/stty/basic-1: Work around an intermittent test failure
2437 on HP-UX 11.11. Report and analysis from Bob Proulx.
2438 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
2440 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
2442 * NEWS: Support obsolete usages like "sort +1 -2" even when
2443 conforming to POSIX 1003.1-2001, since this is a pure extension to
2444 POSIX. Problem reported by Christian in:
2445 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
2446 * src/sort.c (main): Implement this.
2448 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
2449 Autoconf 2.60 says this stuff was obsolete.
2451 2006-06-28 Jim Meyering <jim@meyering.net>
2453 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
2455 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
2457 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
2458 (set -x when VERBOSE=yes) when stderr is redirected before stdout
2459 causing shell tracing of the stdout redirection to be written to
2460 the stderr file. Avoid problem and test failure on HP-UX by
2461 redirecting stderr last.
2462 * tests/dd/unblock-sync: Order shell file redirections for
2463 stderr and stdout in the common style.
2464 tests/acl: Likewise.
2466 2006-06-27 Jim Meyering <jim@meyering.net>
2468 * tests/misc/cat-proc: Try to avoid any spurious numeric
2469 differences in frequently-changing /proc/cpuinfo.
2470 Reported by Nelson Beebe.
2472 2006-06-26 Jim Meyering <jim@meyering.net>
2474 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
2475 fd_to_subdirp failure, not just when errno == EACCES.
2476 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
2477 rmdir, here, even though rmdir may happen to be adequate.
2479 * NEWS: rm no longer fails to remove an empty, unreadable directory
2480 * src/remove.c (remove_cwd_entries): If we can't open a directory,
2481 and the failure is not being ignored, try to remove the directory
2482 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
2483 Problem report and test case from Paul Eggert in
2484 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
2486 * tests/rm/empty-inacc: New test, for the above.
2488 Avoid a segfault for wc --files0=- < /dev/null.
2489 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
2491 2006-06-25 Jim Meyering <jim@meyering.net>
2493 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
2494 contains a list of NUL-separated file names.
2496 * src/wc.c: Include "readtokens.h".
2497 (usage): Describe the new option, and adjust the `Usage':
2498 with this option, no FILE may be specified on the command line.
2499 (main): Handle the new option.
2500 * tests/misc/wc-files0: New tests, for the above.
2501 * tests/misc/wc-files0-from: Likewise.
2502 * tests/misc/Makefile.am (TESTS): Add wc-files0.
2504 2006-06-24 Jim Meyering <jim@meyering.net>
2506 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
2508 2006-06-22 Jim Meyering <jim@meyering.net>
2510 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
2511 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
2513 2006-06-19 Jim Meyering <jim@meyering.net>
2515 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2516 so this check is not run as part of "make distcheck".
2518 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
2520 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
2522 2006-06-18 Jim Meyering <jim@meyering.net>
2524 * tests/misc/pwd-long: Make error output a little clearer.
2526 2006-06-17 Jim Meyering <jim@meyering.net>
2528 * tests/rm/inaccessible: Skip this test on systems without openat
2529 support. Reported by Bob Proulx.
2531 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
2533 * tests/misc/mknod: Improve permission checks to handle
2534 running mkdir test in set-gid directories.
2536 2006-06-14 Jim Meyering <jim@meyering.net>
2538 * tests/du/basic: Revamp not to hard-code file system block sizes.
2540 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2542 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
2545 2006-06-11 Jim Meyering <jim@meyering.net>
2547 * .gitignore: New file.
2548 * Makefile.am (EXTRA_DIST): Add .gitignore.
2550 Setting TIME_STYLE=long-iso in the environment would make the
2551 cp/same-file test fail.
2552 * tests/envvar-check (vars): Add TIME_STYLE to the list.
2553 * tests/cp/same-file: Revert last change.
2554 Source the envvar-check script, to ensure that TIME_STYLE
2555 settings don't affect these tests.
2557 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
2559 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
2560 uses POSIX time stamp formats. Problem reported by John Nixon in
2561 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
2563 2006-06-10 Jim Meyering <jim@meyering.net>
2565 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
2567 Require a "Version N.M" line at the top of the ChangeLog
2568 file only when making the actual release, not when running
2570 * Makefile.maint (maintainer-distcheck): Don't depend on
2572 (alpha beta major): Depend on it here, instead.
2574 2006-06-08 Jim Meyering <jim@meyering.net>
2576 Ensure that cat works with any of the options, -A -v -e -E -T,
2577 when applied to files in /proc and /sys, even when the FIONREAD
2578 ioctl produces nonsensical results. Before this change, cat would
2579 produce no output (or truncated output), for some linux kernels.
2581 * src/cat.c (write_pending): New function, factored out of cat.
2582 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
2583 that there are bytes to read. Some versions of linux-2.6.16 do that.
2584 Write any pending output before returning.
2585 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
2586 * NEWS: Mention this bug fix.
2587 * tests/misc/cat-proc: New file. Test for the above.
2588 * tests/misc/Makefile.am (TESTS): Add cat-proc.
2590 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
2592 * src/expr.c (eval4): Detect overflow properly when multiplying
2595 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
2597 * NEWS: The 'expr' command now detects and reports integer overflow.
2598 (It would be better to use extended precision instead, but that
2599 would be more work.)
2600 * src/expr.c (integer_overflow): New function.
2601 (eval4, eval3): Check for integer overflow.
2603 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
2605 Fix problems when building with Solaris/SVR4/etc. make, which uses a
2606 different and somewhat bogus implementation of VPATH. In the
2607 directory tests/misc, rename tests whose names might appear in the
2608 Automake-generated rules. For example, we can't use a test named
2609 'test', since Automake generates a rule that contains the text
2610 "if test -f ./$$tst; ...", and this might expand to something like
2611 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
2612 which executes the 'test' script rather than the 'test' command.
2613 * tests/misc/false-status: Renamed from tests/misc/false.
2614 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
2615 * tests/misc/sort-merge: Renamed from tests/misc/sort.
2616 ($prog): Set to 'sort' rather than to $PROG.
2617 * tests/misc/test-diag: Renamed from tests/misc/test.
2618 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
2619 in case Solaris make has prepended the directory.
2620 (TESTS): Adjust to above renamings.
2621 * tests/misc/expand: Don't assign to PROG; no longer needed
2622 now that Makefile.am sets PROG to the basename.
2623 * tests/misc/fold: Likewise.
2625 2006-06-03 Jim Meyering <jim@meyering.net>
2627 Make `cp --link --no-dereference' work also on systems where the
2628 link system call cannot create a hard link to a symbolic link.
2629 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
2630 the link syscall on a symlink when it would do the wrong thing.
2631 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
2632 * tests/cp/link-no-deref: New file/test for the above.
2633 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
2634 * NEWS: Mention the change (doesn't affect Linux).
2636 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
2638 Fix some porting problems in the test cases reported by
2639 Ralf Wildenhues for HP-UX 11.23 in:
2640 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
2641 * tests/help-version: Don't assume that \< \> works in sed.
2642 * tests/misc/close-stdout: Don't assume that >&- works.
2643 Add a /dev/full test.
2644 * tests/touch/no-create-missing: Don't assume that >&- works.
2646 2006-05-30 Jim Meyering <jim@meyering.net>
2648 * src/ls.c (usage): Add `v' to the list of sorting-related options.
2651 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2653 * tests/cp/fail-perm: source lang-default.
2654 * tests/rm/inaccessible: Likewise.
2656 2006-05-28 Jim Meyering <jim@meyering.net>
2658 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
2659 Recognize it, too. Reported by Ralf Wildenhues, in
2660 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
2662 2006-05-27 Jim Meyering <jim@meyering.net>
2664 * src/chgrp.c: Support new options: --preserve-root and
2665 --no-preserve-root. Somehow this program was skipped when those
2666 options were added to chown, chmod, and rm. Reported by
2667 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
2668 * NEWS: Mention this.
2670 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
2672 * NEWS: Remove mention of --seed. We'll replace it with something
2673 better, and don't want to indicate that it is supported.
2674 * src/sort.c (usage): Likewise.
2676 2006-05-20 Jim Meyering <jim@meyering.net>
2678 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
2680 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
2681 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
2682 FTS_COMFOLLOW. Spotted by Justin Pryzby.
2684 * gnupload: Merge changes from automake, retaining the ""--to...
2685 kludge to placate overzealous `make distcheck' check.
2687 2006-05-19 Jim Meyering <jim@meyering.net>
2689 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
2690 FTS_TIGHT_CYCLE_CHECK directory traversal option.
2691 Reported by Justin Pryzby in http://bugs.debian.org/367691
2693 2006-05-15 Jim Meyering <jim@meyering.net>
2695 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
2696 From Tomas Pospisek.
2698 2006-05-13 Jim Meyering <jim@meyering.net>
2700 * tests/mv/no-target-dir: Test two more cases.
2702 2006-05-11 Jim Meyering <jim@meyering.net>
2704 mv -T DIR EMPTY_DIR no longer fails unconditionally
2705 * src/copy.c (copy_internal): Don't manually prohibit a move where
2706 the destination is an existing directory. Sometimes doing that is
2707 valid. Let the rename system call enforce the rules. That is
2708 allowed only when the source is a directory and the destination
2709 directory (to be replaced) is empty. Reported by Eric Blake.
2710 * tests/mv/no-target-dir: New file/test for this.
2711 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
2712 * NEWS: Mention this.
2714 * tests/mv/atomic: New file/test for yesterday's fix.
2715 * tests/mv/Makefile.am (TESTS): Add atomic.
2717 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
2719 2006-05-10 Jim Meyering <jim@meyering.net>
2721 * src/copy.c (copy_internal): Don't explicitly unlink the destination
2722 when moving a symlink into the place of an existing non-directory.
2723 Reported by Joshua Hudson.
2724 * NEWS: mention this.
2726 2006-05-07 Jim Meyering <jim@meyering.net>
2728 * Makefile.maint (patch-check): Fail if patch generates any output,
2729 even merely for changed offsets.
2731 * src/c99-to-c89.diff: Adjust to reflect new offsets.
2733 * NEWS: Mention changes affecting df, pwd, shred.
2735 2006-05-06 Jim Meyering <jim@meyering.net>
2737 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
2738 system condition where dirent.d_ino != stat.st_ino.
2739 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
2741 2006-05-06 Eric Blake <ebb9@byu.net>
2743 * tests/ls/inode: Expand to test inode from readdir case.
2744 * tests/ls/follow-slink: Expand to test broken links encountered
2745 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
2747 2006-05-06 Eric Blake <ebb9@byu.net>
2749 * tests/mv/leak-fd: Work even on case-insensitive file system.
2751 2006-05-04 Jim Meyering <jim@meyering.net>
2753 * NEWS: Mention the 2006-03-19 pwd-related change that makes
2754 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
2756 2006-05-03 Jim Meyering <jim@meyering.net>
2758 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
2759 Use better macro parameter names: s/basename/key_name/,
2760 s/basefunc/key_cmp_func. Fix typo in comment.
2762 2006-04-29 Eric Blake <ebb9@byu.net>
2764 * src/ls.c (main): On systems with d_type, directories_first only
2765 implies format_needs_type, not format_needs_stat.
2767 2006-05-03 Jim Meyering <jim@meyering.net>
2769 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
2770 after comma in arg list, from Eric Blake.
2772 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2774 * tests/misc/date (relative-3): New test, derived from a bug
2775 report by John Thomas McDole.
2777 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
2779 New option for ls: --group-directories-first.
2780 It makes ls list directories before files.
2781 * NEWS [New features]: Mention it.
2782 * src/ls.c (sort_type): Rearrange to use as an array index when
2783 choosing sort function; added new sort_numtypes member for
2785 (time_type): Add new time_numtypes member for compile-time check.
2786 (directories_first): New global variable.
2787 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
2788 (long_options): Add --directories-first.
2789 (main): Support new option.
2790 (is_directory): New function.
2791 (extract_dirs_from_files): Use it.
2792 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
2793 (LIST_SORTFUNCTION_VARIANTS): New macros.
2794 (sort_functions): New global variable.
2795 (sort_files): Use it.
2796 (usage): Document new option.
2798 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
2800 * src/shred.c (fillrand): The assertion was way too weak, due to
2801 what must be a typo. Strengthen it to its intended value.
2802 (dopass): Don't use alloca; it's not worth the aggravation here,
2803 since it's used only to get a page-aligned buffer, and page
2804 alignment doesn't buy us much here. I'm suspicious that alloca
2805 causes problems on some hosts, due to a recent bug report by Adam
2806 Waltman: http://bugs.gentoo.org/130246.
2808 2006-04-18 Jim Meyering <jim@meyering.net>
2810 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
2811 sha384sum, sha512sum.
2813 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
2815 * src/chmod.c (describe_change): Adjust to filemode changes.
2816 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
2817 (print_long_format): Use (new) filemodestring rather than
2818 (old) mode_string, so that we get more file types right, at least
2819 in theory. Adjust to filemode changes.
2820 * src/stat.c (human_access): Likewise.
2822 2006-04-18 Jim Meyering <jim@meyering.net>
2824 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
2825 ignore file. This has never been enabled. Reported by Eric Blake.
2827 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
2829 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
2830 bug in Interix. Just call symlink or link directly. All uses changed.
2831 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
2832 * src/stat.c (USE_STATVFS): New macro.
2833 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
2834 (NAMEMAX_FORMAT): define a bit more clearly, now that the
2835 statvfs-using code is a bit more regular.
2836 * src/system.h (sync) [!HAVE_SYNC]: New macro.
2838 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
2840 * NEWS: csplit, nl, expr now conform to POSIX better, and are
2841 more-compatible with traditional Unix, with respect to regular
2843 * src/csplit.c (extract_regexp): Set re_syntax_options to a
2844 value that is compatible with what POSIX requires.
2845 * src/nl.c (build_type_arg): Likewise.
2846 * src/expr.c (docolon): Likewise. Also, don't let anchors match
2847 newline; this fixes an incompatibility with tradition and with POSIX.
2848 Don't warn about leading ^. POSIX says it is unspecified whether
2849 ^ is a special character, which means that implementations can
2850 either treat it as special or not, but either way a warning is not
2851 allowed (unless the regexp is otherwise invalid). Instead, anchor
2852 the expression but treat ^ as an anchor; this is the traditional
2853 behavior (e.g., Solaris 10).
2854 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
2855 and the like as invalid expressions (exit status 2), not as
2856 failure of 'expr' (exit status 3). This is more consistent with
2857 how Solaris behaves.
2858 * tests/expr/basic (fail-a): Adjust exit status to match new expr
2859 behavior, for status 2 versus 3.
2861 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
2862 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
2863 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
2864 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
2865 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
2866 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
2867 (bre61, bre62): New tests.
2868 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
2869 conforming to POSIX.
2872 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
2873 "if !". Do not assume that 'sed' can handle long, newline-free input.
2874 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
2876 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
2878 Adjust to new regex.h API (with new fastmap type), and clean
2879 up the regex storage allocation a bit.
2881 * src/csplit.c (struct control): Put re_compiled member at the
2882 end, since it's large. Change regexpr member from char * to bool;
2883 all uses changed. Add new member fastmap.
2884 (extract_regexp): regexp arg is now char const *, not char *.
2885 Don't bother duplicating the regular expression; it's not needed.
2886 Set fastmap from new fastmap member. Don't bother allocating
2887 a buffer, as the regexp code does a better job than we do.
2888 * src/expr.c (docolon): Allocate and use a fastmap.
2889 Don't bother allocating a buffer.
2890 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
2892 (build_type_arg): New fastmap arg. All uses changed.
2893 Don't bother allocating a buffer, but set a fastmap.
2894 * src/ptx.c (context_regex_string, word_regex_string): Remove.
2895 (context_regex, word_regex): New vars, replacing the above.
2897 (struct regex_data): New type.
2898 (compile_regex): Renamed from alloc_and_compile_regex, since
2899 we no longer allocate storage. Arg is now a struct regex_data *,
2900 not a const char *. All uses changed. Don't allocate the fastmap;
2901 instead, take it from the caller. Don't convert size_t to int,
2902 to avoid arithmetic overflow problems. Don't bother freeing
2903 storage afterwards; it's not worth the aggravation.
2904 * src/tac.c (compiled_separator_fastmap): New ver.
2905 (main): Use it. Don't bother allocating a buffer.
2907 2006-03-30 Jim Meyering <jim@meyering.net>
2909 * src/dd.c (iwrite): Remove assignment without effect.
2910 Reported by Felix Rauch Valenti.
2912 2006-03-22 Eric Blake <ebb9@byu.net>
2914 * src/ptx.c (usage): Remove mention of --copyright/-C.
2915 (main): Alias --copyright to --version plus a deprecation warning.
2916 * NEWS: Mention this.
2918 2006-03-27 Jim Meyering <jim@meyering.net>
2920 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
2921 use of strtod. Tiny patch from Nickolai Zeldovich.
2923 2006-03-11 Eric Blake <ebb9@byu.net>
2925 * tests/misc/dirname: New file.
2926 * tests/basename/Makefile.am: Delete.
2927 * tests/basename/basic: Move to...
2928 * tests/misc/basename: ... this new file. Add some tests,
2929 including fixed behavior for //.
2930 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
2931 * tests/Makefile.am (SUBDIRS): Remove basename.
2932 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
2934 Improvements to dirname/basename handling on platforms like
2935 cygwin with distinct // and with drive letters.
2936 * NEWS: Document new behavior.
2937 * src/basename.c (main): Don't strip suffix from file system
2939 * src/cp.c (target_directory_operand): Use new last_component.
2940 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
2941 traversing the string.
2942 * src/dircolors.c (guess_shell_syntax): Use new last_component.
2943 * src/install.c (target_directory_operand, install_file_in_dir):
2945 * src/ln.c (target_directory_operand, main): Likewise.
2946 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2947 * src/mv.c (target_directory_operand, movefile): Likewise.
2948 * src/remove.c (rm_1): Likewise.
2949 * src/shred.c (wipename): Likewise.
2950 * src/split.c (next_file_name): Likewise.
2951 * src/su.c (log_su, run_shell): Likewise.
2953 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
2955 * NEWS: nohup diagnostics are now more precise, and nohup now
2956 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2957 * src/nohup.c (main): Implement this.
2958 * tests/misc/nohup: Test the new behavior.
2960 2006-03-12 Jim Meyering <jim@meyering.net>
2962 * src/copy.c (set_author): Rename function, from preserve_author.
2964 * src/remove.c (AD_pop_and_chdir): Use new macro,
2965 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
2967 * src/system.h (SAME_INODE): Remove definition.
2968 Include "same-inode.h", instead.
2970 2006-03-11 Eric Blake <ebb9@byu.net>
2972 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
2974 2006-03-10 Jim Meyering <jim@meyering.net>
2976 Fix a bug whereby a user with write access to a directory being removed
2977 could cause the removal of that directory to fail with an erroneous
2978 diagnostic about a directory cycle. Reported by Vineet Chadha.
2980 * NEWS: Mention this.
2981 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
2982 leave (and try to rmdir) is the one whose dev_ino is being used to
2983 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
2985 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2987 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
2988 * src/dd.c (set_fd_flags): Handle file-creation flags on file
2989 descriptors, rather than ignoring them.
2990 * tests/dd/misc: Add test cases for append, nofollow, directory,
2991 and nolinks flags. Simplify redirection to /dev/null in some cases.
2993 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
2994 noatime test never tested anything.
2996 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
2998 * src/dd.c (flags, usage): New flags directory, nolinks.
2999 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
3001 * src/ls.c (usage): Mention that -f disables --color.
3002 Problem reported by Niels Möller.
3004 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
3006 * man/*.x: Add references to syscalls from utilities of the same name.
3008 2006-03-05 Jim Meyering <jim@meyering.net>
3010 * tests/help-version: Set SHELL, if not already set, in order to
3011 avoid failure when `make check' is run through debuild; dircolors
3012 would fail due to lack of $SHELL. Reported by Sven Joachim.
3014 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
3015 * src/base64.c (wrap_write, do_encode, main): Change type of
3016 parameters and locals, wrap_column, form size_t to uintmax_t.
3017 (main): Adjust to use xstrtoumax, accordingly.
3019 2006-03-03 Jim Meyering <jim@meyering.net>
3021 Don't fail when run from an environment with SHELL not a Bourne
3022 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
3023 * tests/dircolors/simple: Invoke each non-failing test with -b.
3024 Reported by Michael Stone.
3026 2006-02-27 Jim Meyering <jim@meyering.net>
3028 * tests/misc/base64: Derive --decode-using tests from the
3031 * tests/misc/base64: Factor out a long constant string.
3032 Split lines to stay within 80 columns.
3034 * tests/misc/Makefile.am (TESTS): Add base64.
3035 * tests/misc/base64: Test base64. From Simon Josefsson.
3037 * src/base64.c (do_decode): Use correct type for parameter,
3038 ignore_garbage: s/size_t/bool/.
3040 * src/base64.c: Don't include .h files already included by system.h:
3041 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
3042 Include "system.h" before the other lib/*.h header files.
3043 Include <sys/types.h> before "system.h".
3044 (wrap_write): Remove declaration of unused local, initial_column.
3045 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
3047 * README: Add base64 to the list.
3049 2006-02-17 Simon Josefsson <jas@extundo.com>
3051 New program: base64.
3052 * AUTHORS: Mention base64.
3054 * man/Makefile.am: Build base64.1.
3055 * man/base64.x: New file.
3056 * src/Makefile.am (bin_PROGRAMS): Add base64.
3057 * src/base64.c: New file.
3059 2006-02-25 Eric Blake <ebb9@byu.net>
3061 In ls, avoid calling stat for --inode (-i), when possible.
3062 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
3063 * src/system.h: ... here, for use in ...
3064 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
3066 (gobble_file): Add inode argument.
3067 (print_dir): Pass inode if available.
3068 (usage): Remove inaccuracy.
3070 2006-02-23 Jim Meyering <jim@meyering.net>
3072 * TODO: Update/correct some obsolete entries.
3074 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
3076 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
3077 * src/join.c (usage): Likewise.
3078 Documentation problem reported by Philip Kensche.
3080 2006-02-20 Eric Blake <ebb9@byu.net>
3082 * man/rm.x: Update documentation to match previous patch.
3084 2006-02-18 Eric Blake <ebb9@byu.net>
3086 New option for rm: --interactive=once (-I).
3087 * NEWS: Document it, along with change to rm --interactive.
3088 * TODO: Remove entry for implementing rm -I
3089 * src/rm.c (INTERACTIVE_OPTION): New enum value.
3090 (interactive_type): New enum.
3091 (long_opts): Let interactive take an optional argument.
3092 (interactive_args, interactive_types): New option arguments.
3093 (usage): Document -I, --interactive=WHEN. Use program_name
3094 instead of a basename.
3095 (main): New -I option, new behavior to --interactive.
3096 * tests/rm/interactive-once: New tests.
3097 * tests/rm/interactive-always: Ditto.
3098 * tests/rm/Makefile.am (TESTS): Run them.
3100 2006-02-18 Jim Meyering <jim@meyering.net>
3102 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
3103 expression match more of the target lines, e.g., those that start with
3104 `-S,' (short option followed by a comma) or that include `=[...]'.
3105 Patch by Nicolas François.
3106 Fix the four offenders thus exposed:
3107 * src/join.c (usage): Use two spaces (not one) to separate the
3108 --first-only option string from its description, so help2man formats
3109 the derived man page properly.
3110 * src/pr.c (usage): Likewise.
3111 * src/uniq.c (usage): Likewise.
3112 * src/install.c (usage): Likewise.
3114 2006-02-15 Jim Meyering <jim@meyering.net>
3116 * Makefile.maint (alpha beta major): For `make major', ensure that the
3117 version string is of the form N.N[.N]*, where N is one or more digits.
3119 2006-02-14 Jim Meyering <jim@meyering.net>
3121 * INSTALL: Update from gnulib.
3123 2006-02-13 Jim Meyering <jim@meyering.net>
3125 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
3127 2006-02-12 Jim Meyering <jim@meyering.net>
3129 * Makefile.maint (patch-check): New target.
3130 (local-checks-available): Add to the list.
3132 2006-02-11 Jim Meyering <jim@meyering.net>
3134 * src/c99-to-c89.diff: New file.
3135 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
3137 * .x-po-check: New file, with exclusions so that `make distcheck'
3139 * Makefile.am (EXTRA_DIST): Add .x-po-check.
3141 rm -r must remove an empty directory, even if it is inaccessible.
3142 * src/remove.c (close_preserve_errno): New function.
3143 (fd_to_subdirp): Don't print a diagnostic in this function.
3144 Do it from the callers instead, unless rmdir succeeds.
3145 (remove_cwd_entries, remove_dir): Adjust callers.
3146 * tests/rm/empty-inacc: New test for the above.
3147 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
3148 * NEWS: Mention this bug fix.
3149 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
3150 a tiny bit less precise: cannot remove `a/1': ... instead of
3151 cannot open directory `a/1': ...
3153 * Makefile.maint (syntax-check-rules): Automatically derive this
3154 list of sc_-prefixed rule names.
3156 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
3158 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
3159 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
3160 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
3161 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
3162 go away? was that an accident?)
3163 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3164 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
3165 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
3166 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
3167 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
3168 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
3169 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
3170 (author_mark_check, makefile_path_separator_check):
3171 Output line numbers, to simplify navigation of Emacs *compilation*
3173 (sc_prohibit_atoi_atof, sc_file_system):
3174 Rework slightly so that Makefile.maint doesn't get reported as a
3175 violation of its own syntax rules.
3176 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
3177 it at run-time (which didn't work with Bison). Fix a makefile typo,
3178 caught by Makefile.maint itself: spaces where a tab should be.
3179 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
3180 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
3181 Ignore djgpp and man subdirectories, to avoid false matches with
3182 Bison and coreutils, respectively. Use sort -u to remove the
3183 resulting duplicates.
3184 * gnupload: Rework slightly to avoid bogus warning from
3185 sc_two_space_separator_in_usage.
3187 2006-02-10 Jim Meyering <jim@meyering.net>
3189 Use gzip's --rsyncable option only if it's available.
3190 * Makefile.maint (gzip_rsyncable): New variable.
3193 2006-02-08 Jim Meyering <jim@meyering.net>
3195 * Makefile.maint (local-checks-available): Define in terms of
3196 the expansion, $(syntax-check-rules), rather than the single,
3197 top-level target `syntax-check', so that it's easier to exclude
3198 individual rules (via $(local-checks-to-skip)).
3199 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
3201 2006-02-07 Jim Meyering <jim@meyering.net>
3203 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
3204 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
3206 * tests/help-version (expected_failure_status_vdir):
3207 Redirect an expected disk-full diagnostic to /dev/null.
3209 2006-02-06 Jim Meyering <jim@meyering.net>
3211 * src/unexpand.c (usage): Use two spaces (not one) to separate the
3212 --first-only option string from its description, so help2man formats
3213 the derived man page properly.
3214 * src/rm.c (usage): Likewise for --no-preserve-root.
3215 * src/chown.c (usage): Likewise.
3216 * src/chgrp.c (usage): Likewise.
3218 Add a rule to ensure that the above doesn't happen again.
3219 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
3220 (syntax-check-rules): Add it.
3221 * .x-sc_two_space_separator_in_usage: New empty file.
3222 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
3224 2006-02-06 Jim Meyering <jim@meyering.net>
3226 * src/cp.c (usage): Use two spaces (not one) to separate each
3227 option string from its description, so help2man formats the
3228 derived man page properly.
3229 * src/mv.c (usage): Likewise.
3230 Patch from Nicolas François in http://bugs.debian.org/351601.
3232 2006-02-04 Jim Meyering <jim@meyering.net>
3234 * src/copy.c (copy_internal): cp -RL would fail when encountering
3235 the same directory more than once in the hierarchy beneath a single
3236 command-line argument. That is legitimate, e.g. when there are
3237 two or more symbolic links, each pointing to some directory that
3238 would not otherwise be copied. Reported by Christophe LYON.
3239 * tests/cp/cp-deref: New file. Test for today's fix.
3240 * tests/cp/Makefile.am (TESTS): Add cp-deref.
3241 * NEWS: Document this.
3243 2006-02-03 Jim Meyering <jim@meyering.net>
3245 * configure.ac: Require automake-1.9.6, not 1.8.3.
3247 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
3249 * src/od.c (usage): Mention that -t a ignores high order bit.
3250 Documentation problem reported by Ed Avis.
3252 2006-02-01 Jim Meyering <jim@meyering.net>
3254 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
3256 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
3258 * src/head.c (main): Use a better diagnostic when someone uses a
3259 trailing numeric option in an invalid way. Problem reported by
3261 * src/tail.c (parse_options): Likewise.
3263 2006-01-30 Jim Meyering <jim@meyering.net>
3265 * man/wc.x: Include `count' keyword in man page synopsis,
3266 per suggestion from http://bugs.debian.org/181585.
3268 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
3270 * src/df.c (show_dev): If the file system claims to have
3271 more available than total blocks, report the number of used
3272 blocks as being total - available (a negative number) rather
3273 than as garbage. Problem reported by Toralf Foerster.
3275 2006-01-24 Jim Meyering <jim@meyering.net>
3277 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
3278 to put a regular file in O_NONBLOCK mode fails with EPERM.
3279 That happens on Linux (up to 2.6.15) when using tail -f on a file with
3280 the append-only attribute. Reported by Dean Gaudet. For details,
3281 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
3282 * NEWS: Mention this fix.
3283 * tests/tail-2/append-only: New file. Test for the above.
3284 * tests/tail-2/Makefile.am (TESTS): Add append-only.
3285 * tests/Makefile.am (check-root): Add tail-2/append-only
3287 2006-01-21 Jim Meyering <jim@meyering.net>
3289 * NEWS: Mention fts-related improvements and bug fixes.
3291 2006-01-19 Jim Meyering <jim@meyering.net>
3293 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
3294 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
3296 2006-01-18 Jim Meyering <jim@meyering.net>
3298 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
3300 2006-01-17 Jim Meyering <jim@meyering.net>
3302 Now that fts no longer changes the current working directory, adjust
3303 its clients accordingly -- note that du.c uses fts but doesn't need
3304 any adjustment, since it doesn't operate on the actual files,
3305 but rather just uses the stat buffers provided by fts.
3307 * src/chown-core.c: Include "openat.h".
3308 Don't include "lchown.h".
3309 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
3310 calling openat, lchownat, chownat, rather than open, lchown, chown.
3312 * src/chmod.c: Include "openat.h".
3313 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
3315 * tests/du/long-from-unreadable: New test, to exercise one small
3318 2006-01-13 Jim Meyering <jim@meyering.net>
3320 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
3321 addition of new directories under tests/.
3323 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
3326 2006-01-12 Jim Meyering <jim@meyering.net>
3328 * tests/du/long-sloop: Adjust not to hard-code the expected
3329 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
3330 from that of GNU libc. Reported by Paul Eggert.
3332 * tests/du/long-sloop: Create file at end of symlink chain.
3334 * tests/misc/test: New file, with a test for one of the
3335 bugs fixed by yesterday's test.c changes.
3336 * tests/misc/Makefile.am (TESTS): Add test.
3338 2006-01-11 Jim Meyering <jim@meyering.net>
3340 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
3341 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
3342 a very long sequence of symbolic links (not necessarily a loop).
3343 * tests/du/Makefile.am (TESTS): Add long-sloop.
3345 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
3347 * src/test.c (test_syntax_error): Append a newline. All callers
3348 changed, except for the ones that didn't already append a newline.
3349 Bug reported by Eric Blake.
3351 2006-01-11 Jim Meyering <jim@meyering.net>
3353 * src/system.h (X2NREALLOC): Now that verify_true is no longer
3354 void, cast its result to void, to avoid gcc's warning that
3355 ``left-hand operand of comma expression has no effect''.
3356 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
3358 2006-01-10 Jim Meyering <jim@meyering.net>
3360 * tests/chmod/no-x: Add a test for today's fts.c fix.
3362 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
3364 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
3365 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
3367 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
3369 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
3370 Use verify_true instead of verify_expr, to sync with gnulib.
3372 2006-01-08 Jim Meyering <jim@meyering.net>
3374 * src/date.c (usage): Adjust the formatting of the entries for
3375 %::z and %:::z (separate with two spaces, not one) so that help2man
3376 formats them properly. Reported by Philip Rowlands.
3378 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
3380 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
3382 2006-01-06 Jim Meyering <jim@meyering.net>
3384 * Makefile.maint (copyright-check): Use date +%Y in place of
3387 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
3388 First off, the attribute should have been `volatile' (not static)
3389 to avoid longjmp-related risk of clobber. Secondly, now there is
3390 no longer any risk of a local variable being clobbered, so there's
3391 no need for any attribute at all.
3393 2006-01-05 Jim Meyering <jim@meyering.net>
3395 * src/remove.c: Give a few functions the inline attribute.
3396 (AD_pop_and_chdir): Use gotos to avoid some duplication.
3397 (AD_push): Rewrite an assertion so that the entire computation
3398 goes away when assertions are turned off.
3400 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
3401 It's already defined in "system.h".
3402 * Makefile.maint: Add a FIXME comment.
3404 2006-01-04 Jim Meyering <jim@meyering.net>
3406 * ChangeLog: Remove entries from 2005-10-22 and earlier.
3407 * ChangeLog-2005: New file, for entries up to version 5.92.
3409 2006-01-03 Jim Meyering <jim@meyering.net>
3411 * tests/du/no-x: Also allow a slightly different diagnostic -- the
3412 one you get when using openat-enabled fts.c and du (coming soon).
3413 * tests/chmod/no-x: Likewise.
3414 * tests/chgrp/no-x: Likewise.
3416 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
3418 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
3420 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
3421 (restricted_chown): Return it, if the file cannot be accessed due
3422 to EPERM, or if no uid or gid are required, or if the file is
3423 neither a directory nor a regular file. Rewrite to avoid gotos.
3424 (change_file_owner): Handle RC_do_ordinary_chown case.
3425 Rewrite to avoid gotos.
3426 * tests/chgrp/basic: Make sure we can change the group of
3429 * src/date.c (usage): Explain %g, %G, and %V a bit better.
3431 2006-01-02 Jim Meyering <jim@meyering.net>
3433 * src/copy.c (set_owner): Correct a comment.
3435 * src/tail.c (parse_options): Change warning to say that --retry
3436 is useful `mainly' (not `only') when following by name.
3437 Reported here: http://bugs.debian.org/273781
3439 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
3441 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
3442 * src/copy.c: Include lchmod.h.
3443 (copy_internal): Use lchmod rather than chmod.
3444 * src/cp.c: Include lchmod.h.
3445 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
3446 * src/mkdir.c: Include lchmod.h.
3447 (usage): Clarify -m's operation.
3448 (main): Use lchmod rather than chmod. Don't use lchmod unless the
3449 new mode contains bits outside the 777 range.
3450 * src/mkfifo.c (usage): Clarify -m's operation.
3451 (main): If -m is given, don't invoke chmod; use umask 0 instead.
3452 Report an error if -m asks for bits outside the 777 range.
3453 * src/mknod.c (usage, main): Likewise.
3455 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
3457 2005-12-27 Jim Meyering <jim@meyering.net>
3459 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
3460 (sc_prohibit_assert_without_use): New rule.
3461 (syntax-check-rules): Add it to the list.
3462 * .x-sc_prohibit_assert_without_use: New empty file.
3463 * Makefile.am (EXTRA_DIST): Add it.
3465 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
3467 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
3468 Don't include <assert.h>; it wasn't used.
3470 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
3472 * src/chown-core.c (restricted_chown):
3473 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
3474 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
3475 | O_NOFOLLOW too, for consistency with other dir-openers.
3476 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
3477 (is_empty_dir): Likewise.
3478 * src/shred.c (wipename): Likewise. Don't bother trying to open
3479 dir for writing, since POSIX prohibits it.
3481 2005-12-22 Jim Meyering <jim@meyering.net>
3483 * tests/help-version: Redirect stderr to /dev/full, to suppress
3484 write error diagnostic.
3486 2005-12-19 Jim Meyering <jim@meyering.net>
3488 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
3489 Avoid a minor race condition when `-m MODE' is specified, by using
3490 open, fchown, and close rather than just chown. To do that reliably --
3491 even with an overly restrictive umask -- ensure that each mkdir,
3492 mknod and mkfifo call uses a mode including at least owner-read access.
3493 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
3494 the subsequent chown (or equivalent open,fchown,close) fails.
3495 * tests/misc/mknod: New tests.
3496 * tests/misc/Makefile.am (TESTS): Add mknod.
3498 2005-12-17 Jim Meyering <jim@meyering.net>
3500 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
3501 e.g., on a named pipe.
3502 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
3503 place of all uses, since it is guaranteed (system.h) to be defined.
3505 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
3507 Add POSIX ACL support
3508 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
3509 is no requirement for ACL support; particularly, it does not exist
3510 on systems that have POSIX ACLs.
3511 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
3512 * src/cp.c (umask_kill): With default acls, the umask is not to be
3513 applied. Remove umask_kill, don't change the process umask, and let
3514 the kernel apply the umask where appropriate.
3515 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
3516 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
3518 (copy_reg, copy_internal): Use copy_acl and set_acl
3519 instead of fchown/chown. Fix the logic for POSIX ACLs.
3520 (chown_succeded): Remove; we now always copy acls and
3521 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
3522 did a chown before or not.
3523 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
3524 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
3525 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
3526 to link with it via $(LIB_ACL), for the utilities that need it.
3528 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
3530 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
3531 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
3532 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
3533 value is now signified by whether cwd_errno is null.
3534 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
3535 pointer-to-bool to pointer-to-errno-value. All callers changed.
3536 (rm_1): Don't bother setting a local cwd failure flag and then
3537 ORing it into the caller's. Just set the caller's.
3538 (rm): Use cwd failure errno value to print a slightly-better
3541 2005-12-15 Jim Meyering <jim@meyering.net>
3543 * src/stat.c (print_it): Properly handle a backslash at the
3544 end of a --printf format string. Reported by Paul Eggert.
3545 * tests/misc/stat-printf (end-bs): Add a test for the above.
3547 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
3549 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
3550 Don't assume /etc/passwd contains user names; use 'id' instead.
3552 2005-12-15 Jim Meyering <jim@meyering.net>
3554 stat: revert behavior of --format=FMT (-c)
3555 stat: add new option: --printf=FMT
3556 * NEWS: Mention this.
3557 * src/stat.c (isodigit, octtobin, hextobin): Define.
3558 (PRINTF_OPTION): Define.
3559 (interpret_backslash_escapes, trailing_delim): New globals.
3560 (usage): Document them. Alphabetize on long option names.
3561 (print_esc_char): New function.
3562 (print_it): Rewrite, in order to handle backslash escapes.
3563 (main): Handle new option. Set globals for --format, too.
3565 * tests/misc/stat-printf: Test --printf and --format.
3566 * tests/misc/Makefile.am (TESTS): Add stat-printf.
3568 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
3570 * NEWS: sort now reports incompatible options.
3571 * src/sort.c (incompatible_options, check_ordering_compatibility):
3573 (main): Use them. Don't bother with a usage message for
3574 "sort -c a b", for consistency with other error diagnostics.
3575 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
3578 * src/cat.c (main): Undo previous change. close_stdout already
3579 does the check, so the previous change wasn't necessary.
3581 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
3583 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
3585 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
3587 Install a more-conservative approach for sort -R. It's the
3588 same basic idea as the existing code, except it uses the full ISAAC
3589 approach (called the "more kosher" approach in the existing comments).
3590 This makes "sort -R" quite a bit slower (about a factor of 2 on my
3591 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
3592 better to be conservative here at first, and review any performance
3593 improvements carefully.
3594 * .x-sc_require_config_h: Add src/rand-isaac.c.
3595 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
3596 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
3597 (shred_SOURCES, sort_SOURCES): Remove.
3598 (EXTRA_DIST): Add rand-isaac.c.
3599 * src/rand-isaac.c: Revert to what used to be in shred.c, without
3600 changing it to allow for varying numbers of words in the state.
3601 Alter so that we include rand-isaac.c directly rather than
3602 compiling it and linking to it. Don't include config.h or
3603 system.h; that's the includer's responsibility.
3604 Omit functions that are specific to shred.
3605 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
3606 (isaac_step, struct irand_state):
3607 Resurrect these, with the same defns that used to be in shred.c.
3608 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
3609 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
3611 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
3612 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
3613 (irand_init, irand32, irand_mod):
3614 Number of words is constant again.
3615 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
3616 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
3617 * src/sort.c: Likewise.
3618 * src/shred.c (fillrand, dopass, main): Undo previous change.
3619 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
3621 * src/sort.c: Don't include md5.h; it wasn't needed.
3622 (struct keyfield): Rename random_hash to random, for consistency
3623 with the other member names. All uses changed.
3624 (usage): Tweak wording to mention STRING for --seed option.
3625 (short_options): Rorder for consistency with other programs.
3626 (rand_state): Now a struct, not a pointer to one. All uses changed.
3627 (HASH_WORDS, HASH_SIZE): Remove.
3628 (get_hash): Remove comments around resbuf size, since we can assume C89.
3629 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
3630 (keycompare): Adjust to the new get_hash.
3632 (badfieldspec): Omit recently-introduced comment; it isn't needed.
3633 (main): Don't set need_random simply because gkey has it set; that
3634 doesn't necessarily mean we'll need random numbers.
3635 Redo seeding to match new get_hash approach.
3637 2005-12-10 Jim Meyering <jim@meyering.net>
3639 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
3641 Avoid shred segfault on 64-bit systems.
3642 * src/rand-isaac.c (isaac_refill): Don't try to negate a
3643 local of type uint32_t. Make the local an `int' instead.
3645 * NEWS: Mention sort's new options.
3647 * src/rand-isaac.c (isaac_mix): Declare to be static.
3648 Mark all other functions as `extern' so the tight-scope
3649 part of `make distcheck' passes once again.
3650 * src/rand-isaac.h (isaac_mix): Remove declaration.
3652 * src/sort.c (get_hash): Change position of `*' in parameter
3653 type to conform with convention.
3654 (main): Split a long line so it fits in 80 columns.
3655 (keycompare): Remove stray SPACE before TAB that was
3656 causing `make distcheck' to fail.
3658 * src/shred.c: Don't include gethrxtime.h. No longer needed.
3660 * tests/misc/sort-rand: New file: basic tests for the new options.
3661 * tests/misc/Makefile.am (TESTS): Add sort-rand.
3663 2005-12-10 Frederik Eaton <frederik@ofb.net>
3665 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
3666 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
3667 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
3668 Make state size runtime-configurable.
3669 (isaac_new, isaac_copy): New functions.
3670 * src/rand-isaac.h: New file.
3671 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
3672 (fillrand, main): Adjust to the fact that the state size is now
3673 runtime-configurable.
3674 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
3675 (usage): Add options --random-sort and --seed to implement a random
3677 Include md5.h and rand-isaac.h.
3678 (get_hash): New function.
3679 (rand_state): New var.
3680 (HASH_WORDS, HASH_SIZE): New macros.
3682 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
3684 * tests/dd/misc: Add test for dd iflags=noatime.
3686 2005-12-09 Jim Meyering <jim@meyering.net>
3688 * src/sort.c (usage): Mention white space vs -b and -t options.
3691 2005-12-09 Eric Blake <ebb9@byu.net>
3693 * src/test.c (main): Fix misleading comment.
3695 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3697 * NEWS: Mention dd's new noatime flag.
3698 * src/system.h (O_NOATIME): Define to 0 if not already defined.
3699 * src/dd.c (flags, usage): Add support for noatime flag.
3701 2005-12-07 Jim Meyering <jim@meyering.net>
3703 Distribute the cvsu script, used only by `make syntax-check'.
3704 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
3705 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
3706 distribute a copy of this script.
3707 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
3709 * tests/mv/acl: exit-77 before the trap, not after, if we fail
3710 to create a temporary directory on another partition.
3711 From Andreas Gruenbacher.
3713 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
3715 * man/basename.x: Cross-reference to dirname and readlink.
3716 * man/dirname.x: Cross-reference to basename and readlink.
3718 2005-12-05 Andreas Gruenbacher
3720 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
3721 (set_owner, preserve_author): New functions, factored out of copy_reg.
3722 (copy_reg): Use them.
3723 (copy_internal): Use them here, too.
3725 2005-12-04 Jim Meyering <jim@meyering.net>
3727 * src/sleep.c (usage): Say what happens with two or more arguments.
3728 Suggested by Justin Pryzby.
3730 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
3733 2005-12-03 Jim Meyering <jim@meyering.net>
3735 * src/rm.c (long_opts): Change the name of each undocumented, for-
3736 testing-only option to start with `-', so that it cannot render
3737 ambiguous any prefix it happens to share with some other option name.
3738 Problem reported by Eric Blake.
3739 * src/head.c (long_options): Likewise.
3740 * src/tail.c (long_options): Likewise.
3742 * tests/misc/head-elide-tail: Update uses of undocumented, for-
3743 testing-only --presume* options to start with `---'.
3744 * tests/rm/dangling-symlink: Likewise.
3745 * tests/rm/dir-no-w: Likewise.
3746 * tests/rm/isatty: Likewise.
3748 2005-11-30 Jim Meyering <jim@meyering.net>
3750 * Makefile.maint: Add a comment about cvsu.
3752 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
3754 * NEWS: df updates for "none", "proc", inaccessible file systems.
3755 * src/df.c (show_point): Ignore inaccessible file systems.
3756 (usage): -a includes dummy file systems, not size-0 file systems.
3758 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
3759 to avoid collision with POSIX name space. All uses changed.
3761 2005-11-24 Jim Meyering <jim@meyering.net>
3763 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
3764 * tests/acl: Add `$0: ' prefix to diagnostics.
3766 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
3768 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
3770 * src/copy.c: Improve performance a bit by optimizing away
3771 unnecessary system calls and going to a block size of at least
3772 8192 (on normal hosts, anyway). This improved performance 5% on my
3773 Debian stable host (2.4.27 kernel, x86, copying from root
3774 ext3 file system to itself).
3775 Include "buffer-lcm.h".
3776 (copy_reg): Omit last argument. All callers changed.
3777 Use xmalloc to allocate rather than trusting alloca
3778 (which is unwise with large block sizes).
3779 Declare locals more locally, if possible.
3780 Use uintptr_t words instead of int words, for a bit more speed
3781 when looking for null blocks on 64-bit hosts.
3782 Optimize away reads of zero bytes on regular files.
3783 In the typical case, insist on 8 KiB buffers, at least.
3784 Avoid unnecessary extra call to fstat when checking for sparse files.
3785 Avoid now-unnecessary cast to off_t, and "0L".
3786 Avoid unnecessary test of *new_dst when checking for same owner
3789 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
3791 * src/remove.c (rm): Don't assume C99 for-loop syntax.
3793 2005-11-22 Jim Meyering <jim@meyering.net>
3795 * src/remove.c (AD_push): Remove debugging cruft.
3797 * tests/rm/unread2 (rm): Change expected diagnostic,
3798 `cannot open directory' to `cannot remove', to align with
3800 * tests/rm/rm2: Ensure that rm now continues removing entries
3801 even after certain types of failure.
3803 * src/remove.c: Rewrite. Now, this module is reentrant on systems
3804 that provide openat (Solaris), and on systems like Linux+procfs
3805 where our openat emulation code is reentrant. This also fixes a
3806 few low-probability leaks and eliminates some code that could,
3807 in very unusual circumstances, cause rm() (via a callee) to exit.
3808 * NEWS: Mention this.
3810 * configure.ac: Put copyright dates all on one line so the
3811 emacs function that updates them works properly.
3813 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3815 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
3816 Problem reported by Eric Blake.
3817 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
3818 we get a standard-conforming compiler. This relies on the new
3819 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
3820 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
3821 m4/c.m4 can go away with Autoconf 2.60 comes out.
3823 2005-11-17 Jim Meyering <jim@meyering.net>
3825 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
3826 (AD_mark_current_as_unremovable): Likewise, but for a local.
3829 * tests/mv/acl: Let traps handle removing temporary directories.
3831 Expect acl-related tests to fail, until the corresponding
3832 patches are committed.
3833 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
3834 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
3836 ACL tests, from Andreas Gruenbacher.
3837 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
3838 * tests/mv/Makefile.am (TESTS): Add acl.
3839 * tests/cp/Makefile.am (TESTS): Add acl.
3841 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
3843 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
3845 * NEWS: Improve quality of ln's diagnostics.
3846 * src/ln.c (do_link, usage): Likewise.
3847 (do_link): Don't use alloca on a buffer of unbounded size.
3849 2005-11-16 Jim Meyering <jim@meyering.net>
3851 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
3852 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
3853 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
3854 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
3855 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3857 2005-11-14 Jim Meyering <jim@meyering.net>
3859 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
3861 2005-11-13 Jim Meyering <jim@meyering.net>
3863 * announce-gen: Accept new option, --gpg-key-id=ID and
3864 emit a blurb telling how to use the .sig files.
3865 * Makefile.cfg (gpg_key_ID): Define.
3866 * Makefile.maint (announcement): Use new option and key.
3868 Require that most .c files include <config.h>.
3869 * Makefile.maint (sc_require_config_h): New rule.
3870 (syntax-check-rules): Add it.
3871 * .x-sc_require_config_h: New file listing exceptions to the
3872 above rule. Some are legit, others are simply grandfathered in.
3873 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
3875 2005-11-12 Jim Meyering <jim@meyering.net>
3877 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
3879 2005-11-11 Jim Meyering <jim@meyering.net>
3881 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
3882 Mention new readlink options in 5.3.0's `New features' section.
3883 Spotted by Thomas Hood.
3885 2005-11-08 Jim Meyering <jim@meyering.net>
3887 * NEWS: Merge in changes from b5_9x branch.
3889 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
3891 * NEWS: ls now defaults to --time-style='locale', which in turn acts
3892 like --time-style='posix-long-iso' if the locale settings are messed up.
3893 * src/ls.c (decode_switches): Implement this.
3895 2005-11-08 Jim Meyering <jim@meyering.net>
3897 * tests/du/2g: s/expensive/very expensive/ in a comment.
3900 2005-10-17 Eric Blake <ebb9@byu.net>
3902 * src/ls.c (usage): Fix descriptions of --sort, --time.
3903 Reported by Vitaly A. Ostanin.
3905 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
3907 * src/ln.c: Include filenamecat.c.
3908 (FILE_BASENAME_CONCAT): Remove.
3909 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
3910 (main): Use file_name_concat, base_name, and strip_trailing_slashes
3911 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
3914 2005-11-04 Jim Meyering <jim@meyering.net>
3916 * src/du.c (process_file): Don't overflow for files of size >= 2^31
3917 on systems with stat.st_blocks of a signed 32-bit type.
3918 This bug causes trouble on some AIX 5.1 systems.
3919 Report and trivial patch from Paul Townsend:
3920 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
3921 * NEWS: Mention this.
3923 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
3924 * tests/du/Makefile.am (TESTS): Add it here.
3925 * tests/very-expensive: New file.
3926 * tests/Makefile.am (EXTRA_DIST): Add it here.
3927 * tests/cp/perm: Mark this test as `very-expensive', too.
3929 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
3931 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
3933 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
3935 * src/rm.c (usage): Don't mention rm -d.
3937 2005-11-02 Jim Meyering <jim@meyering.net>
3939 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
3940 From Andreas Schwab.
3942 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
3943 `M+N records in/out' lines don't pollute `make check' output.
3945 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
3946 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
3947 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
3948 to indicate that the input file should be piped into the command
3949 under test (via `cat FILE | $prog ...').
3951 * src/remove.c (remove_entry): Emit a better diagnostic when rm
3952 (without -r) fails to remove a directory on a non-Linux system.
3953 This change affects only newer Solaris systems (with priv_*
3954 functions like priv_allocset). Reported by Keith Thompson.
3956 * tests/rm/dir-nonrecur: New file/test for the above fix.
3957 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
3959 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
3961 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
3962 POSIX 1002.1-2001 requires.
3963 * src/tail.c (parse_obsolete_option): Implement this.
3964 Problem reported by Vincent Lefevre.
3965 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
3966 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
3967 (test_vector): Add special cases for _POSIX2_VERSION, and
3968 regularize the old ones a bit.
3969 * tests/touch/obsolescent: Add y2000 test.
3971 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
3973 * src/dd.c (skip): Fix off-by-one error reported by
3974 Theodoros V. Kalamatianos.
3976 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3978 * tests/mkdir/p-3: Require that the test be run as non-root.
3979 Problem and trivial fix reported by Theodoros V. Kalamatianos.
3981 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
3983 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
3984 boundary between DEST and SOURCE in the result.
3986 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
3988 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
3989 back to text, to sync with documentation and for backwards
3992 2005-10-25 Jim Meyering <jim@meyering.net>
3994 * tests/dircolors/simple (other-wr): Add an explicit test for
3995 the dircolors bug (NULL-dereference) fixed yesterday.
3997 2005-10-24 Jim Meyering <jim@meyering.net>
3999 * src/tac.c (tac_file): When determining whether a file is seekable,
4000 also test whether it is a tty. Using only the lseek-based test would
4001 give a false positive on Solaris. Reported by Peter Fales.
4003 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
4005 * tests/install/d-slashdot: New test, for "install -d" failure.
4006 * tests/install/Makefile.am (TESTS): Add d-slashdot.
4007 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
4008 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
4010 2005-10-24 Jim Meyering <jim@meyering.net>
4012 * src/dircolors.c (ls_codes): Add missing comma.
4013 Anonymous report and patch from
4014 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
4016 * src/dircolors.c: Add compile-time assertion that the slack_codes
4017 and ls_codes arrays have the same number of elements. This would
4018 have prevented the above-fixed bug.
4020 * src/expand.c (parse_tab_stops): Add a comment to make this function
4021 identical to the one in unexpand.c.
4022 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
4023 identical to the one in expand.c.
4025 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
4027 2005-10-23 Jim Meyering <jim@meyering.net>
4029 * src/md5sum.c (digest_check, main): Use ptr_align rather than
4030 a dangerous pointer-value-to-`unsigned' cast.
4031 * NEWS: mention the new sha* programs.
4032 * AUTHORS: Add new sha* programs.
4034 2005-08-28 David Madore <david.madore@ens.fr>
4036 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
4037 * README: Add their names to the list.
4038 * src/md5sum.c: Provide framework for computing sha-2 hashes.
4039 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
4040 Rules for compiling sha-2 utilities
4041 (noinst_HEADERS): Remove checksum.h.
4042 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
4044 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
4045 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
4046 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
4047 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
4048 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
4049 sha384sum, sha512sum test scripts here rather that each in its
4052 2005-08-28 David Madore <david.madore@ens.fr>
4054 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
4055 of the FIPS test vectors).
4057 2005-10-23 Jim Meyering <jim@meyering.net>
4059 * configure.ac: Use 6.0-cvs as the version string.
4060 * NEWS: Adjust accordingly.
4065 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
4067 Copying and distribution of this file, with or without
4068 modification, are permitted provided the copyright notice
4069 and this notice are preserved.