1 2006-10-11 Jim Meyering <jim@meyering.net>
3 * src/ls.c (usage): Correct description of -s, --size.
4 It works even without -l. Suggestion from Karl Berry.
6 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
8 * src/ls.c (quote_name): Use initializer rather than memset to
9 initialize an object to zero. This is easier to read and is less
10 likely to introduce an runtime error due to a mixup. It causes
11 gcc -W to issue a warning, but you can work around this by
12 appending -Wno-missing-field-initializers.
13 * src/pathchk.c (portable_chars_only): Likewise.
14 * src/shred.c (main): Likewise.
15 * src/stty.c (main): Likewise.
16 * src/tr.c (card_of_complement): Likewise.
17 * src/wc.c (wc): Likewise.
19 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
21 * src/sort.c (usage): Mention again that sort fields are origin 1.
23 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
26 * bootstrap (usage, main program, symlink_to_gnulib): Add option
27 --copy. Inspired by a suggestion from Bruno Haible.
29 2006-10-09 Jim Meyering <jim@meyering.net>
31 Avoid a compiler warning.
32 * src/pathchk.c (portable_chars_only): Initialize variable of type
33 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
35 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
37 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
38 wrong file name in some cases. Lars Wendler reported a bug in
40 * src/install.c (make_ancestor): New arg COMPONENT.
41 * src/mkdir.c (make_ancestor): Likewise.
42 * tests/install/basic-1: Check for install -Dv bug.
43 * tests/mkdir/Makefile.am (TESTS): Add p-v.
44 * tests/mkdir/p-v: New file, to test this bug.
46 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
48 * src/chgrp.c: Don't include lchown.h; no longer needed.
49 * src/chown.c: Likewise.
51 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
52 current file system has useful d_type info.
54 * src/dd.c (flags): noatime and nofollow now depend on
55 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
56 (usage): Output info about noatime and nofollow only if
57 they are known to work.
58 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
59 than O_NOFOLLOW, when testing whether it's possible to avoid a
60 race condition reliably.
62 2006-10-05 Jim Meyering <jim@meyering.net>
64 * src/c99-to-c89.diff: Update to reflect new offsets.
66 * tests/install/basic-1: Skip the latter part of this test if the
67 just-built dd binary is not readable. Otherwise, this test would fail
68 when binaries were created as root. Reported by Bauke Jan Douma in
69 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
71 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
73 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
74 MiB, since XFS hosts can legitimately have large values of
75 st_blksize. Problem reported by Tony Ernst in
76 <http://savannah.gnu.org/bugs/?17903>.
78 2006-10-04 Jim Meyering <jim@meyering.net>
80 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
81 Paul Eggert pointed out that the specified file may exist,
82 in spite of such an errno value.
83 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
84 * tests/rm/ignore-name-too-long: Remove file.
85 * NEWS: Update here, too.
87 2006-10-03 Jim Meyering <jim@meyering.net>
89 * tests/rm/fail-eperm: Report failure also if rm is terminated by
92 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
93 and one in shred.c -- that were added before coreutils-6.3.
94 Reported by Michael Deutschmann.
96 * src/c99-to-c89.diff: Update to reflect new offsets.
98 * src/remove.c (remove_entry): With -f, exit successfully in spite
99 of a missing file under some very unusual conditions (with errno
100 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
102 With --force (-f), rm no longer fails for ENOTDIR.
103 * src/remove.c (ignorable_missing): New function.
104 Use it everywhere, rather than open-coding the test.
105 Andreas Schwab reported the ENOTDIR problem.
106 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
108 * NEWS: Mention the bug fix.
109 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
110 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
111 * tests/rm/Makefile.am (TESTS): Add the new file names.
113 * bootstrap: Undo last change to this file, since now gnulib-tool
114 sticks with the automake default in generating dependencies.
116 * NEWS: Add a line for 6.4-cvs.
117 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
119 2006-09-30 Jim Meyering <jim@meyering.net>
122 * NEWS: Record the 6.3 release date.
123 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
125 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
127 * src/c99-to-c89.diff: Update offsets.
129 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
131 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
132 as it doesn't work with Solaris /bin/sh.
134 2006-09-29 Jim Meyering <jim@meyering.net>
136 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
139 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
140 use .1 as the increment. Actual output varies too much.
141 [eq-wid-3]: New, commented out test.
143 * src/shuf.c (read_input): Fix an off-by-one error that
144 would cause an infloop for piped input of 8KB or more.
145 * NEWS: Mention the fix.
146 * tests/misc/shuf: Test for the above fix.
148 Since any system may be affected by the Darwin readdir bug,
149 perform the extra rewinddir unconditionally. The performance
150 impact of rewinding a directory is negligible.
151 * src/remove.c (NEED_REWIND): Define to use
152 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
154 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
155 increment translates to a slightly larger value.
156 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
157 The final expected value wasn't being printed.
159 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
160 and NFS, whereby rm would not remove all files in a directory.
161 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
162 (NEED_REWIND): New macro, so that we incur the cost of the work-around
163 rewinddir only on afflicted systems.
164 * NEWS: Clarify and correct.
165 * tests/rm/readdir-bug: New file. Test for the above fix.
166 * tests/rm/Makefile.am (TESTS): Add it.
167 Prompted by testing and analysis from Bruno Haible:
168 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
170 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
172 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
173 suggested for Debian stable, which uses Perl 5.8.4.
175 2006-09-28 Jim Meyering <jim@meyering.net>
177 Automatically generated dependencies are important even
178 when all of the sources in a directory come from gnulib.
179 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
180 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
182 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
183 Ensure that IFS is set properly and unset PATH.
185 Work properly even when the name of the selected file starts with "-".
186 Invoke rm via "../../src/rm", and adjust expected output.
187 Prompted by a patch from Tim Waugh.
189 * README-cvs: Add Bison to the list of required packages.
191 2006-09-26 Jim Meyering <jim@meyering.net>
193 * src/c99-to-c89.diff: Update offsets.
195 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
196 it from removing a directory containing 188 or more entries.
197 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
198 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
199 Reported by Matthew Woehlke.
201 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
203 * NEWS: "groups user" no longer outputs "user :"; you need at least
204 two users. "groups" now processes options like --help more compatibly.
205 * src/groups.sh: Implement the option-processing change.
206 Handle user and group names with special characters more robustly.
207 Report write errors instead of exiting silently with status 1.
209 2006-09-26 Jim Meyering <jim@meyering.net>
211 * README: Warn not to run autoreconf manually. Use bootstrap instead.
213 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
214 Rewrite to avoid using temporary, $status.
216 * NEWS: Mention the bug fix.
217 * src/groups.sh: Don't hide a write failure.
218 Reported by Iain Calder <ic56@rogers.com>.
220 2006-09-25 Jim Meyering <jim@meyering.net>
222 * src/chown.c (usage): Clarify --dereference description.
223 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
225 2006-09-24 Jim Meyering <jim@meyering.net>
227 * NEWS: Mention these fixes.
228 * src/copy.c (copy_reg): With --verbose (-v), print
229 "removed `file_name'" just after unlinking a file.
230 (copy_internal): Likewise, in three more places.
231 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
232 * tests/mv/hard-verbose: New file. Test for the above fix.
233 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
235 * tests/help-version (sync_args): Don't call sync, since it spins up
236 disks that I've deliberately caused to spin down (but not unmounted).
238 * NEWS: Mention the improvement to sort.
240 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
243 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
244 since that predated addition of d_type support.
246 2006-09-23 Jim Meyering <jim@meyering.net>
248 * gl/modules/getloadavg.diff: New file. Work around the way the latest
249 version of the getloadavg module interacts with our bootstrap script.
250 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
251 * Makefile.am (EXTRA_DIST): Sort file names.
252 Add bootstrap and gl/modules/getloadavg.diff
254 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
256 * bootstrap: Add support for --force.
257 (usage): New function. Describe usage less tersely.
258 (CVS_only_file): New var.
260 * NEWS: Document fix for cp -i and mv -i.
261 * src/copy.c (copy_internal): With -i, prompt even if the source
262 is a directory and the destination is not. This is required by
263 POSIX and gives the user a chance to bail out before failing.
264 * tests/cp/Makefile.am (TESTS): Add cp-i.
265 * tests/cp/cp-i: New file.
266 * tests/mv/Makefile.am (TESTS): Add i-5.
267 * tests/mv/i-5: New file.
269 2006-09-20 Jim Meyering <jim@meyering.net>
271 * NEWS: Mention the chmod bug fix.
273 * tests/chmod/inaccessible: New test, specifically for this bug.
274 Based on a test case from Paul Eggert.
275 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
277 Fix the 2006-09-18 bug differently.
278 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
279 tell fts_read to stat the file again, in case it has become
280 accessible since the initial fts_open call.
281 * src/chown-core.c (change_file_owner): Likewise.
283 * src/chmod.c: Revert last change. There is a better way.
284 * src/chown-core.c: Likewise.
286 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
288 * src/ln.c (target_directory_operand): Rewrite to avoid porting
289 problem on Tandem reported by Matthew Woehlke in
290 <https://savannah.gnu.org/bugs/?17172>.
292 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
294 Fix bug where chmod, chown, and chgrp did not process operands
295 left-to-right in some cases.
296 * src/chmod.c (wd_errno): New var.
297 (chmod_file): New function, with most of the contents of the
298 old prcess_file function.
299 (process_files): Use it. This gives file names to fts one
300 at a time, so that they are processed left-to-right as POSIX
302 * src/chown-core.c (wd_errno, chown_files): Likewise.
303 (chown_file): New function.
304 * tests/install/basic-1: Redo test so as to not workaround
305 the chmod bug, thereby testing for it.
307 * src/shuf.c (main): Quote the entire range when reporting an
308 invalid one, rather than just the part that contained the error.
310 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
311 sometimes left behind if the test is skipped or interrupted.
313 * bootstrap (symlink_to_gnulib): New function.
314 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
316 (cp_mark_as_generated, slurp, gnulib_files):
317 Avoid making a copy if it's the same as the old version.
318 (gnulib_files): Add support for this variable (used by Bison).
320 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
321 indicating flaw in kernel. Reword to say that the flaw isn't
322 serious for coreutils, since the flaw does affect ls -i.
324 * tests/chgrp/basic: Fix bug in test case exposed by building on
325 Solaris 8 in a setgid directory. The test case incorrectly
326 assumed that 'symlink' would be in group $g1.
328 2006-09-18 Jim Meyering <jim@meyering.net>
330 * NEWS: Add a line for 6.3-cvs.
331 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
334 * NEWS: Record the 6.2 release date.
335 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
337 2006-09-17 Jim Meyering <jim@meyering.net>
339 * tests/chgrp/basic: On an OpenBSD system, rather than failing
340 due to a known problem, merely warn about it.
341 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
342 Instead, use stat to test file system for desired results, directly.
343 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
345 * tests/envvar-check: Add more variable names to the list of those
346 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
347 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
349 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
351 * NEWS: Document that mkdir -p and install -d now fork on occasion.
352 * bootstrap.conf (gnulib_modules): Add savewd.
353 * src/install.c: Include savewd.h.
354 (process_dir): New function.
355 (main, install_file_in_file_parents): Use it, along with the new
356 savewd module, to avoid some race conditions.
357 * src/mkdir.c: Include savewd.h.
358 (struct mkdir_options): New members make_ancestor_function, mode,
360 (make_ancestor): Return 1 if the resulting directory is not readable.
361 (process_dir): New function.
362 (main): Use it, along with new savewd module, to avoid some
363 race conditions. Fill in new slots of struct mkdir_options, so
364 that callees get the values.
365 * tests/install/basic-1: Test for coreutils 5.97 bug that was
366 fixed in coreutils 6.0, and which should still be fixed with
368 * tests/mkdir/p-3: Likewise.
370 2006-09-15 Jim Meyering <jim@meyering.net>
372 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
373 The 2006-09-08 changes made it so "mv dir new-name/" would
374 fail on NetBSD 1.6. This makes it work once again.
376 2006-09-14 Jim Meyering <jim@meyering.net>
378 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
379 Instead, since it's a little fragile, assert the condition.
380 (target_directory_operand): Update comment to reflect latest change.
382 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
384 * src/who.c (print_user): Rewrite to avoid warning from
385 GCC 4.1.1 with -Wall.
387 2006-09-12 Jim Meyering <jim@meyering.net>
389 * tests/mv/atomic: Check for specific strace output, rather than
390 simply nonempty. RHEL AS 4 would fail this test due to strace
391 generating "[ Process PID=14434 runs in 32 bit mode. ]".
392 Reported by Nelson Beebe.
394 2006-09-11 Jim Meyering <jim@meyering.net>
396 * src/remove.c (remove_dir): Move new cache_stat_init call onto
398 (rm_1): Move declaration of "st" and new cache_stat_init call
399 "down" to nearer where they're used.
400 * src/c99-to-c89.diff: Add another set of curly braces.
402 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
404 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
405 substr's last operand is very large. Performance problem reported
408 2006-09-09 Jim Meyering <jim@meyering.net>
410 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
412 (sc_require_config_h): Skip this test if there are no version-
414 (sc_prohibit_assert_without_use): Likewise.
416 2006-09-08 Jim Meyering <jim@meyering.net>
418 * bootstrap: Export CVS_RSH separate from its assignment, to work
419 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
421 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
423 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
424 no file operand is given, and standard input is any FIFO.
425 This is in response to Open Group XCU ERN 114.
426 * src/tail.c (main): Likewise.
428 2006-09-08 Jim Meyering <jim@meyering.net>
430 mv and "cp -r" no longer fail when invoked with two arguments
431 where the first one names a directory and the second name ends in
432 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
433 now succeeds, once more. This reverts part of the 2004-06-27
435 * NEWS: Say the above.
436 * src/mv.c (target_directory_operand): Don't require (here)
437 that the target operand "look like" a directory. This change
438 pushes the test down to the rename syscall level, where a
439 "mv dir existing-non-dir/" will mistakenly succeed on older systems
440 that ignore trailing slashes in the rename destination argument.
441 * src/cp.c (target_directory_operand): Likewise, but for cp.
442 * tests/mv/trailing-slash: Exercise the above fixes.
443 * tests/cp/trailing-slash: New file.
444 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
446 * bootstrap: Use the previously unused variable, $src,
447 to avoid repeating "$GNULIB_SRCDIR/$file".
449 * bootstrap (cp_mark_as_generated): Don't use "local", to
450 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
451 Rename now-global "$src" and "$dst" to have cp_ prefix.
452 Safer, and avoids confusion.
454 * bootstrap (cp_mark_as_generated): New function.
455 (slurp): Use it to prepend editor hints and a warning that
456 the file we're copying is generated.
457 Suggestion from Bruce Korb.
458 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
459 Fix last-minute typo.
461 2006-09-07 Jim Meyering <jim@meyering.net>
463 * bootstrap: Revert last change. There are less disruptive ways
464 to mark these generated files as read-only.
466 * src/c99-to-c89.diff: Update to have proper offsets.
468 2006-09-06 Jim Meyering <jim@meyering.net>
470 Ensure that some gnulib-tool-generated files are read-only.
471 * bootstrap (slurp): Put the body of this function in a sub-shell,
472 with "umask a-w" so that all new files are read-only. Remove each
473 file before we write to it, in case it's read-only.
474 Make po/Makevars and runtime-po/Makevars read-only, too.
476 2006-09-05 Jim Meyering <jim@meyering.net>
478 * tests/cp/acl: Skip this test when cp lacks ACL support.
479 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
481 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
482 context from change of 2006-09-02.
484 2006-09-04 Jim Meyering <jim@meyering.net>
486 * README-cvs: Fix typo in update command.
488 2006-09-03 Jim Meyering <jim@meyering.net>
490 * NEWS: Tweak the wording in the new change description so that
491 no one can think this change causes e.g., `rm -fr foo../' to fail.
493 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
494 Use $CONFIG_HEADER, rather than hard-coding it.
495 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
497 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
499 * NEWS: rm now rejects attempts to remove /, ./, and ../.
500 * src/basename.c: Don't include dirname.h, since system.h does it now.
501 * src/chmod.c: Likewise.
502 * src/copy.c: Likewise.
503 * src/cp.c: Likewise.
504 * src/df.c: Likewise.
505 * src/dircolors.c: Likewise.
506 * src/dirname.c: Likewise.
507 * src/du.c: Likewise.
508 * src/install.c: Likewise.
509 * src/ln.c: Likewise.
510 * src/ls.c: Likewise.
511 * src/mkdir.c: Likewise.
512 * src/mv.c: Likewise.
513 * src/remove.c: Likewise.
514 * src/rm.c: Likewise.
515 * src/rmdir.c: Likewise.
516 * src/shred.c: Likewise.
517 * src/split.c: Likewise.
518 * src/su.c: Likewise.
519 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
521 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
523 * src/rm.c (usage, main): --preserve-root is now the default.
524 * src/remove.h: Fix comment.
525 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
526 (cache_statted, cache_stat_ok): New functions.
527 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
528 which is no longer needed with the new functions. All callers
530 (prompt, is_dir_lstat, remove_entry, remove_dir):
531 New struct stat * arg. All callers changed.
532 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
533 (remove_cwd_entries, remove_dir, rm_1):
534 Use and maintain the file status cache.
535 (prompt, remove_entry): Omit the first "directory" in the diagnostic
536 "Cannot remove directory `foo': is a directory". This causes "rm"
537 to pass a test case that it would otherwise fail now that it
538 "knows" more about its argument. I think the diagnostic is better
539 without the first "directory" anyway.
540 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
541 (rm_1): Reject attempts to remove /, ./, or ../.
542 * tests/rm/Makefile.am (TESTS): Add r-4.
543 * tests/rm/r-4: New file.
545 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
547 * src/stat.c: Include <stddef.h>
548 (alignof): New macro.
549 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
551 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
553 (print_statfs): If f_fsid isn't an integer, grab its words one
554 at a time in little-endian order. This is a bit easier to configure
555 and should avoid a compilation failure on MacOS reported by Bruno
558 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
560 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
561 work around a Mac OS X porting problem reported by Bruno Haible in
562 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
563 (print_statfs): Use them.
565 * bootstrap.conf (gnulib_modules): Add isapipe.
566 * src/tail.c: Include isapipe.h.
567 (IS_PIPE_LIKE_FILE_TYPE): Remove.
568 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
569 tailable, since this seems to be portable.
570 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
571 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
573 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
576 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
578 * src/copy.c (copy_internal): Don't test whether macros like
579 S_ISLNK are defined, since they're always defined now.
580 * src/cp.c (main): Likewise.
581 * src/ln.c (main): Likewise.
582 * src/ls.c (get_link_name, make_link_name): Likewise.
583 * src/mknod.c (main): Likewise.
584 * src/mkfifo.c (usage): Likewise.
585 * src/who.c (S_IWGRP): Likewise.
587 Adjust to recent gnulib changes for the gnulib module.
588 * bootstrap.conf (gnulib_modules): Add fcntl.
589 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
590 is already assuming these macros are defined.
591 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
592 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
593 Remove; the fcntl module now handles these.
595 Adjust to recent gnulib changes for the inttypes module.
596 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
597 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
599 * src/system.h: Don't bother to include <stdint.h>, since we can
600 now assume inttypes.h does the equivalent of including stdint.h.
602 2006-08-27 Jim Meyering <jim@meyering.net>
604 * src/copy.c (copy_internal): Don't make a backup if the last
605 component of the source name is "." or "..".
606 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
607 * NEWS: Mention this.
608 * tests/cp/src-base-dot: New file. Test for the above fix.
609 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
611 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
612 (dot_or_dotdot): ...new static inline function.
613 * src/remove.c (rm_1): Reflect this renaming.
614 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
616 * src/copy.c (copy_internal): Add comments.
618 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
620 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
621 since Automake supplies them for us. It always did -I$(srcdir),
622 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
623 is now also doing -I../lib.
625 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
626 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
627 since there might not be any .po files.
628 (WGET_COMMAND): Set to empty if wget doesn't
629 seem to be available.
631 2006-08-26 Jim Meyering <jim@meyering.net>
633 This test was failing in some environments.
634 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
635 to set LS_COLORS in the environment.
636 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
637 Reported by Bob Proulx.
639 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
641 * Makefile.am (EXTRA_DIST): Remove these files here, too:
642 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
643 .x-sc_two_space_separator_in_usage.
645 Fix "mv --verbose --backup" so its output includes the
646 " (backup: foo.~1~)" suffix also when backing up a directory.
647 * NEWS: Report this bug fix.
648 * src/copy.c (emit_verbose): New function, factored out of...
649 (copy_internal): ...here. Use the new function.
650 * tests/mv/backup-dir: Test for the above fix.
651 * tests/mv/Makefile.am (TESTS): Add backup-dir.
653 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
655 * .x-sc_no_if_have_config_h: Remove; no longer needed.
656 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
657 * .x-sc_two_space_separator_in_usage: Likewise.
658 * Makefile.maint (sc_no_have_config_h): Renamed from
659 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
660 is absent everywhere.
661 * bootstrap.conf (gnulib_modules): Add config-h.
662 * src/shred.c: Include <config.h> unconditionally, since
663 we now assume config.h exists.
664 * src/dircolors.c: Likewise.
666 2006-08-26 Jim Meyering <jim@meyering.net>
668 "ls --color" would highlight other-writable and sticky directories
669 no differently than regular directories on a file system with
670 dirent.d_type support.
671 * NEWS: Say the above.
672 * src/ls.c (gobble_file): With --color, also stat the file when
673 we know it is a directory.
674 Derived from an anonymous one-line fix and bug report:
675 <http://savannah.gnu.org/bugs/?15043>.
676 * tests/ls/color-dtype-dir: New file. Test for the above fix.
677 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
679 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
681 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
683 * bootstrap.conf: Add configmake, verify.
684 * src/.cvsignore: Remove localedir.h.
685 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
686 subsumed by configmake.
687 * src/system.h: Include configmake.h rather than localedir.h
688 (LOCALEDIR): New macro.
690 Rewrite to avoid some unnecessary casts, macros, literals.
691 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
693 (SECTOR_SIZE, SECTOR_MASK): New constants.
694 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
695 and use the SECTOR_* constants when applicable. Check for size <
696 0 rather than size == -1, since negative-size files are a sign of
699 2006-08-25 Bruno Haible <bruno@clisp.org>
701 * src/shred.c (dopass): Assume a continuable error if EIO even
702 if the current position is not a multiple of 512.
704 2006-08-24 Jim Meyering <jim@meyering.net>
706 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
708 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
710 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
711 macro was being used without being defined.
712 (SB_F_NAMEMAX): Remove cast.
713 (f_fsid) [BeOS]: Likewise.
714 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
716 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
718 (xstrcat): Remove. All uses changed to use the above functions.
719 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
720 buffer len. All uses changed. Output '?', not '*', for unknown
721 data or errors. Do not assume signed values can be interchanged
722 with unsigned when printing.
723 (print_statfs): For %i, print the fsid as a single int, not as a
725 (print_it): Quote invalid format better.
727 * NEWS: printf supports the I flag.
728 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
730 2006-08-23 Bruno Haible <bruno@clisp.org>
732 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
733 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
734 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
736 * src/ls.c (SA_RESTART): Fallback define.
738 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
740 * src/system.h (EDQUOT): Define if not already defined.
741 Problem reported by Bruno Haible for BeOS.
743 * .cvsignore: Remove config.h, config.hin, as they are now
745 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
747 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
749 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
750 to accommodate today's gnulib change.
752 2006-08-23 Jim Meyering <jim@meyering.net>
754 * NEWS: Mention the sweeping infrastructure changes.
756 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
758 * bootstrap.conf (gnulib_modules): Add gnupload.
759 * Makefile.maint (emit_upload_commands): gnupload is now
761 * gnupload: Remove from CVS, since it's now a gnulib module.
763 * bootstrap (bootstrap_conf_cleanup): Remove.
764 (excluded_files): New var.
765 * bootstrap.conf: Likewise.
766 * bootstrap (slurp): Exclude files early if they're in the
767 excluded_files list. That way, their names don't get put into
770 * aclocal.m4, config.hin, configure:
771 Remove from CVS, since ./bootstrap generates them automatically.
772 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
773 configure, *.cache, *.lineno, *.log.
774 Remove more-specific entries. This catches files like configure.lineno.
775 * man/.cvsignore: Add Makefile.in.
776 * src/.cvsignore: Add Makefile.in.
777 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
780 * tests/chgrp/.cvsignore:
781 * tests/chmod/.cvsignore:
782 * tests/chown/.cvsignore:
783 * tests/cp/.cvsignore:
784 * tests/cut/.cvsignore:
785 * tests/dd/.cvsignore:
786 * tests/dircolors/.cvsignore:
787 * tests/du/.cvsignore:
788 * tests/expr/.cvsignore:
789 * tests/factor/.cvsignore:
790 * tests/fmt/.cvsignore:
791 * tests/head/.cvsignore:
792 * tests/install/.cvsignore:
793 * tests/join/.cvsignore:
794 * tests/ln/.cvsignore:
795 * tests/ls/.cvsignore:
796 * tests/ls-2/.cvsignore:
797 * tests/md5sum/.cvsignore:
798 * tests/misc/.cvsignore:
799 * tests/mkdir/.cvsignore:
800 * tests/mv/.cvsignore:
801 * tests/od/.cvsignore:
802 * tests/pr/.cvsignore:
803 * tests/readlink/.cvsignore:
804 * tests/rm/.cvsignore:
805 * tests/rmdir/.cvsignore:
806 * tests/seq/.cvsignore:
807 * tests/sha1sum/.cvsignore:
808 * tests/shred/.cvsignore:
809 * tests/sort/.cvsignore:
810 * tests/stty/.cvsignore:
811 * tests/sum/.cvsignore:
812 * tests/tac/.cvsignore:
813 * tests/tail/.cvsignore:
814 * tests/tail-2/.cvsignore:
815 * tests/tee/.cvsignore:
816 * tests/test/.cvsignore:
817 * tests/touch/.cvsignore:
818 * tests/tr/.cvsignore:
819 * tests/tsort/.cvsignore:
820 * tests/unexpand/.cvsignore:
821 * tests/uniq/.cvsignore:
822 * tests/wc/.cvsignore:
823 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
824 *.X, *.O, *-tests, build-script, mk-script if they're never
825 created in this directory.
827 2006-08-22 Bruno Haible <bruno@clisp.org>
830 * src/uptime.c: Include OS.h if it exists.
831 (print_uptime): On BeOS, use the get_system_info function (actually a
832 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
833 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
835 2006-08-22 Jim Meyering <jim@meyering.net>
837 * .cvsignore: Add ABOUT-NLS.
839 Move the check-AUTHORS rule to be run as part of "make distcheck",
840 rather than "make check".
841 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
842 cause "make check" to fail on systems unable to build all binaries.
843 * Makefile.maint (check-AUTHORS): New rule.
844 (local-checks-available): Add it here.
845 Reported by Bruno Haible. Needed for BeOS.
847 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
849 * src/df.c (print_header, show_dev): Use a column width that
850 depends on the block size of -P is specified and not autoscaling.
851 Problem reported by Gustavo G. Rondina in:
852 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
854 2006-08-21 Jim Meyering <jim@meyering.net>
856 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
857 when the shell variable, SHELL, is not set.
858 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
859 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
861 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
862 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
863 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
864 od: invalid type string `u8';
865 this system doesn't provide a 8-byte integral type
866 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
868 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
870 Add a bootstrap procedure, so that the CVS version contains fewer
871 files and we bootstrap the rest from gnulib, gettext, etc.
872 * README-cvs: New file.
873 * bootstrap: New file.
874 * bootstrap.conf: New file.
875 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
876 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
878 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
879 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
881 (gl_MACROS): Call just after gl_EARLY, just for clarity.
882 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
883 * src/kill.c (strtoimax): Remove decl.
884 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
885 * src/wc.c: Likewise.
886 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
887 declaration, so that we don't need to patch this file.
888 * src/printf.c (strtoimax, strtoumax): Remove decls.
889 * src/su.c: Include getpass.h.
891 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
892 Include inttypes.h unconditionally.
893 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
894 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
895 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
896 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
897 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
899 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
900 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
901 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
902 * tests/cp/Makefile.in, tests/cut/Makefile.in:
903 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
904 * tests/du/Makefile.in, tests/expr/Makefile.in:
905 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
906 * tests/general/Makefile.in, tests/head/Makefile.in:
907 * tests/install/Makefile.in, tests/join/Makefile.in:
908 * tests/ln/Makefile.in, tests/ls/Makefile.in:
909 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
910 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
911 * tests/mv/Makefile.in, tests/od/Makefile.in:
912 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
913 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
914 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
915 * tests/shred/Makefile.in, tests/sort/Makefile.in:
916 * tests/stty/Makefile.in, tests/sum/Makefile.in:
917 * tests/tac/Makefile.in, tests/tail/Makefile.in:
918 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
919 * tests/test/Makefile.in, tests/touch/Makefile.in:
920 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
921 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
922 * tests/wc/Makefile.in:
923 Remove from CVS, since ./bootstrap generates them automatically.
925 2006-08-20 Eric Blake <ebb9@byu.net>
927 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
928 the patch from 2006-08-18 broke on cygwin.
930 2006-08-20 Jim Meyering <jim@meyering.net>
932 * NEWS: Add a line for 6.2-cvs.
933 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
935 2006-08-19 Jim Meyering <jim@meyering.net>
938 * NEWS: Record the 6.1 release date.
939 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
941 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
943 Avoid test failure when `make check' is run through debuild.
944 * tests/help-version: Ensure that $SHELL is set to some value
945 and exported. Patch from Sven Joachim. For details, see
946 <http://bugs.debian.org/355368>.
948 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
950 * README: Describe potential "pre-C99 build failure", and work-around.
952 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
953 backed out due to updates provoked by the copyright changes.
954 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
955 it propagates to the derived Makefile.am files.
956 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
957 so we don't mistakenly edit them again.
958 * tests/cut/Makefile.am: Regenerate.
959 * tests/head/Makefile.am: Likewise.
960 * tests/join/Makefile.am: Likewise.
961 * tests/pr/Makefile.am: Likewise.
962 * tests/sort/Makefile.am: Likewise.
963 * tests/tac/Makefile.am: Likewise.
964 * tests/tail/Makefile.am: Likewise.
965 * tests/test/Makefile.am: Likewise.
966 * tests/tr/Makefile.am: Likewise.
967 * tests/uniq/Makefile.am: Likewise.
968 * tests/wc/Makefile.am: Likewise.
970 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
971 when the file's apparent size is not a multiple of its block size.
972 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
973 For some file sizes, writing that single byte would unnecessarily
974 waste a few file blocks. That write may have been necessary in the
975 early days of Linux, but now, removing it should be safe.
976 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
977 * tests/cp/sparse: New test for the above.
978 * tests/cp/Makefile.am (TESTS): Add sparse.
980 * tests/sparse-file: New file, essence factored out of...
981 * tests/du/8gb: ... here. Use the new script.
983 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
985 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
986 the CVS gettext manual now suggests 1000000.
988 2006-08-18 Bruno Haible <bruno@clisp.org>
990 Add support for NetBSD 3.0.
991 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
993 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
994 has a field f_fstypename.
995 This undoes the 2006-08-15 to src/stat.c.
997 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
999 Copyright notice fixes.
1001 * COPYING: Upgrade to latest version from FSF.
1003 * src/uname.c: Use (C) in copyright notice.
1005 * .vg-suppressions: Add copyright notice.
1006 * ChangeLog: Likewise.
1007 * ChangeLog-2005: Likewise.
1008 * Makefile.am: Likewise.
1011 * README-valgrind: Likewise.
1013 * announce-gen: Likewise.
1014 * man/Makefile.am: Likewise.
1015 * man/chmod.x: Likewise.
1016 * man/chown.x: Likewise.
1017 * man/df.x: Likewise.
1018 * man/du.x: Likewise.
1019 * man/rm.x: Likewise.
1020 * src/dircolors.hin: Likewise.
1021 * src/du-tests: Likewise.
1022 * src/extract-magic: Likewise.
1023 * src/tac-pipe.c: Likewise.
1024 * src/wheel-gen.pl: Likewise.
1025 * tests/Coreutils.pm: Likewise.
1026 * tests/Makefile.am.in: Likewise.
1027 * tests/acl: Likewise.
1028 * tests/envvar-check: Likewise.
1029 * tests/expensive: Likewise.
1030 * tests/group-names: Likewise.
1031 * tests/help-version: Likewise.
1032 * tests/mk-script: Likewise.
1033 * tests/priv-check: Likewise.
1034 * tests/rwx-to-mode: Likewise.
1035 * tests/sample-test: Likewise.
1036 * tests/setgid-check: Likewise.
1037 * tests/chgrp/basic: Likewise.
1038 * tests/chgrp/deref: Likewise.
1039 * tests/chgrp/no-x: Likewise.
1040 * tests/chgrp/posix-H: Likewise.
1041 * tests/chgrp/recurse: Likewise.
1042 * tests/chmod/c-option: Likewise.
1043 * tests/chmod/equal-x: Likewise.
1044 * tests/chmod/equals: Likewise.
1045 * tests/chmod/no-x: Likewise.
1046 * tests/chmod/octal: Likewise.
1047 * tests/chmod/setgid: Likewise.
1048 * tests/chmod/umask-x: Likewise.
1049 * tests/chmod/usage: Likewise.
1050 * tests/chown/basic: Likewise.
1051 * tests/chown/deref: Likewise.
1052 * tests/chown/separator: Likewise.
1053 * tests/cp/Makefile.am: Likewise.
1054 * tests/cp/acl: Likewise.
1055 * tests/cp/backup-1: Likewise.
1056 * tests/cp/backup-is-src: Likewise.
1057 * tests/cp/cp-HL: Likewise.
1058 * tests/cp/cp-deref: Likewise.
1059 * tests/cp/cp-mv-backup: Likewise.
1060 * tests/cp/cp-parents: Likewise.
1061 * tests/cp/deref-slink: Likewise.
1062 * tests/cp/dir-rm-dest: Likewise.
1063 * tests/cp/dir-slash: Likewise.
1064 * tests/cp/dir-vs-file: Likewise.
1065 * tests/cp/fail-perm: Likewise.
1066 * tests/cp/into-self: Likewise.
1067 * tests/cp/link: Likewise.
1068 * tests/cp/link-no-deref: Likewise.
1069 * tests/cp/link-preserve: Likewise.
1070 * tests/cp/no-deref-link1: Likewise.
1071 * tests/cp/no-deref-link2: Likewise.
1072 * tests/cp/no-deref-link3: Likewise.
1073 * tests/cp/perm: Likewise.
1074 * tests/cp/preserve-2: Likewise.
1075 * tests/cp/r-vs-symlink: Likewise.
1076 * tests/cp/same-file: Likewise.
1077 * tests/cp/slink-2-slink: Likewise.
1078 * tests/cp/special-bits: Likewise.
1079 * tests/cp/symlink-slash: Likewise.
1080 * tests/cut/Makefile.am: Likewise.
1081 * tests/cut/Test.pm: Likewise.
1082 * tests/dd/misc: Likewise.
1083 * tests/dd/not-rewound: Likewise.
1084 * tests/dd/skip-seek: Likewise.
1085 * tests/dd/skip-seek2: Likewise.
1086 * tests/dd/unblock-sync: Likewise.
1087 * tests/dircolors/simple: Likewise.
1088 * tests/du/2g: Likewise.
1089 * tests/du/8gb: Likewise.
1090 * tests/du/Makefile.am: Likewise.
1091 * tests/du/basic: Likewise.
1092 * tests/du/deref: Likewise.
1093 * tests/du/deref-args: Likewise.
1094 * tests/du/exclude: Likewise.
1095 * tests/du/fd-leak: Likewise.
1096 * tests/du/files0-from: Likewise.
1097 * tests/du/hard-link: Likewise.
1098 * tests/du/inaccessible-cwd: Likewise.
1099 * tests/du/long-from-unreadable: Likewise.
1100 * tests/du/long-sloop: Likewise.
1101 * tests/du/no-deref: Likewise.
1102 * tests/du/no-x: Likewise.
1103 * tests/du/restore-wd: Likewise.
1104 * tests/du/slash: Likewise.
1105 * tests/du/slink: Likewise.
1106 * tests/du/trailing-slash: Likewise.
1107 * tests/du/two-args: Likewise.
1108 * tests/expr/basic: Likewise.
1109 * tests/factor/basic: Likewise.
1110 * tests/fmt/basic: Likewise.
1111 * tests/fmt/long-line: Likewise.
1112 * tests/general/Makefile.am: Likewise.
1113 * tests/general/atgeneral.m4: Likewise.
1114 * tests/general/dd.at: Likewise.
1115 * tests/head/Makefile.am: Likewise.
1116 * tests/head/Test.pm: Likewise.
1117 * tests/install/basic-1: Likewise.
1118 * tests/install/create-leading: Likewise.
1119 * tests/install/d-slashdot: Likewise.
1120 * tests/install/trap: Likewise.
1121 * tests/join/Makefile.am: Likewise.
1122 * tests/join/Test.pm: Likewise.
1123 * tests/ln/backup-1: Likewise.
1124 * tests/ln/misc: Likewise.
1125 * tests/ln/sf-1: Likewise.
1126 * tests/ln/target-1: Likewise.
1127 * tests/ls/Makefile.am: Likewise.
1128 * tests/ls/Test.pm: Likewise.
1129 * tests/ls/dangle: Likewise.
1130 * tests/ls/dired: Likewise.
1131 * tests/ls/file-type: Likewise.
1132 * tests/ls/follow-slink: Likewise.
1133 * tests/ls/infloop: Likewise.
1134 * tests/ls/inode: Likewise.
1135 * tests/ls/m-option: Likewise.
1136 * tests/ls/no-arg: Likewise.
1137 * tests/ls/recursive: Likewise.
1138 * tests/ls/rt-1: Likewise.
1139 * tests/ls/stat-dtype: Likewise.
1140 * tests/ls/stat-failed: Likewise.
1141 * tests/ls/stat-vs-dirent: Likewise.
1142 * tests/ls/symlink-slash: Likewise.
1143 * tests/ls/time-1: Likewise.
1144 * tests/ls-2/tests: Likewise.
1145 * tests/md5sum/basic-1: Likewise.
1146 * tests/md5sum/newline-1: Likewise.
1147 * tests/misc/Makefile.am: Likewise.
1148 * tests/misc/base64: Likewise.
1149 * tests/misc/basename: Likewise.
1150 * tests/misc/cat-proc: Likewise.
1151 * tests/misc/close-stdout: Likewise.
1152 * tests/misc/csplit: Likewise.
1153 * tests/misc/date: Likewise.
1154 * tests/misc/date-sec: Likewise.
1155 * tests/misc/df: Likewise.
1156 * tests/misc/dirname: Likewise.
1157 * tests/misc/expand: Likewise.
1158 * tests/misc/false-status: Likewise.
1159 * tests/misc/fold: Likewise.
1160 * tests/misc/head-c: Likewise.
1161 * tests/misc/head-elide-tail: Likewise.
1162 * tests/misc/head-pos: Likewise.
1163 * tests/misc/mknod: Likewise.
1164 * tests/misc/nice: Likewise.
1165 * tests/misc/nl: Likewise.
1166 * tests/misc/nohup: Likewise.
1167 * tests/misc/paste-no-nl: Likewise.
1168 * tests/misc/pathchk1: Likewise.
1169 * tests/misc/printf: Likewise.
1170 * tests/misc/printf-hex: Likewise.
1171 * tests/misc/pwd-long: Likewise.
1172 * tests/misc/sha224sum: Likewise.
1173 * tests/misc/sha256sum: Likewise.
1174 * tests/misc/sha384sum: Likewise.
1175 * tests/misc/sha512sum: Likewise.
1176 * tests/misc/shuf: Likewise.
1177 * tests/misc/sort-merge: Likewise.
1178 * tests/misc/sort-rand: Likewise.
1179 * tests/misc/split-a: Likewise.
1180 * tests/misc/split-fail: Likewise.
1181 * tests/misc/split-l: Likewise.
1182 * tests/misc/stat-fmt: Likewise.
1183 * tests/misc/stat-printf: Likewise.
1184 * tests/misc/tac-continue: Likewise.
1185 * tests/misc/test-diag: Likewise.
1186 * tests/misc/tty-eof: Likewise.
1187 * tests/misc/wc-files0: Likewise.
1188 * tests/misc/wc-files0-from: Likewise.
1189 * tests/mkdir/concurrent-1: Likewise.
1190 * tests/mkdir/p-1: Likewise.
1191 * tests/mkdir/p-2: Likewise.
1192 * tests/mkdir/p-3: Likewise.
1193 * tests/mkdir/p-slashdot: Likewise.
1194 * tests/mkdir/p-thru-slink: Likewise.
1195 * tests/mkdir/parents: Likewise.
1196 * tests/mkdir/perm: Likewise.
1197 * tests/mkdir/special-1: Likewise.
1198 * tests/mkdir/t-slash: Likewise.
1199 * tests/mkdir/writable-under-readonly: Likewise.
1200 * tests/mv/Makefile.am: Likewise.
1201 * tests/mv/acl: Likewise.
1202 * tests/mv/atomic: Likewise.
1203 * tests/mv/backup-is-src: Likewise.
1204 * tests/mv/childproof: Likewise.
1205 * tests/mv/diag: Likewise.
1206 * tests/mv/dir-file: Likewise.
1207 * tests/mv/dir2dir: Likewise.
1208 * tests/mv/dup-source: Likewise.
1209 * tests/mv/force: Likewise.
1210 * tests/mv/hard-2: Likewise.
1211 * tests/mv/hard-3: Likewise.
1212 * tests/mv/hard-4: Likewise.
1213 * tests/mv/hard-link-1: Likewise.
1214 * tests/mv/i-1: Likewise.
1215 * tests/mv/i-2: Likewise.
1216 * tests/mv/i-3: Likewise.
1217 * tests/mv/i-4: Likewise.
1218 * tests/mv/i-link-no: Likewise.
1219 * tests/mv/into-self: Likewise.
1220 * tests/mv/into-self-2: Likewise.
1221 * tests/mv/into-self-3: Likewise.
1222 * tests/mv/into-self-4: Likewise.
1223 * tests/mv/leak-fd: Likewise.
1224 * tests/mv/mv-special-1: Likewise.
1225 * tests/mv/no-target-dir: Likewise.
1226 * tests/mv/part-fail: Likewise.
1227 * tests/mv/part-hardlink: Likewise.
1228 * tests/mv/part-rename: Likewise.
1229 * tests/mv/part-symlink: Likewise.
1230 * tests/mv/partition-perm: Likewise.
1231 * tests/mv/perm-1: Likewise.
1232 * tests/mv/reply-no: Likewise.
1233 * tests/mv/setup: Likewise.
1234 * tests/mv/to-symlink: Likewise.
1235 * tests/mv/trailing-slash: Likewise.
1236 * tests/mv/update: Likewise.
1237 * tests/mv/vfat: Likewise.
1238 * tests/od/od-N: Likewise.
1239 * tests/od/x8: Likewise.
1240 * tests/pr/Makefile.am: Likewise.
1241 * tests/pr/Test.pm: Likewise.
1242 * tests/readlink/can-e: Likewise.
1243 * tests/readlink/can-f: Likewise.
1244 * tests/readlink/can-m: Likewise.
1245 * tests/readlink/rl-1: Likewise.
1246 * tests/rm/Makefile.am: Likewise.
1247 * tests/rm/cycle: Likewise.
1248 * tests/rm/dangling-symlink: Likewise.
1249 * tests/rm/deep-1: Likewise.
1250 * tests/rm/dir-no-w: Likewise.
1251 * tests/rm/dir-nonrecur: Likewise.
1252 * tests/rm/dot-rel: Likewise.
1253 * tests/rm/empty-inacc: Likewise.
1254 * tests/rm/empty-name: Likewise.
1255 * tests/rm/f-1: Likewise.
1256 * tests/rm/fail-2eperm: Likewise.
1257 * tests/rm/fail-eperm: Likewise.
1258 * tests/rm/hash: Likewise.
1259 * tests/rm/i-1: Likewise.
1260 * tests/rm/i-no-r: Likewise.
1261 * tests/rm/inaccessible: Likewise.
1262 * tests/rm/interactive-always: Likewise.
1263 * tests/rm/interactive-once: Likewise.
1264 * tests/rm/ir-1: Likewise.
1265 * tests/rm/isatty: Likewise.
1266 * tests/rm/no-give-up: Likewise.
1267 * tests/rm/r-1: Likewise.
1268 * tests/rm/r-2: Likewise.
1269 * tests/rm/r-3: Likewise.
1270 * tests/rm/rm1: Likewise.
1271 * tests/rm/rm2: Likewise.
1272 * tests/rm/rm3: Likewise.
1273 * tests/rm/rm4: Likewise.
1274 * tests/rm/rm5: Likewise.
1275 * tests/rm/sunos-1: Likewise.
1276 * tests/rm/unread2: Likewise.
1277 * tests/rm/unread3: Likewise.
1278 * tests/rm/unreadable: Likewise.
1279 * tests/rmdir/fail-perm: Likewise.
1280 * tests/rmdir/ignore: Likewise.
1281 * tests/rmdir/t-slash: Likewise.
1282 * tests/seq/basic: Likewise.
1283 * tests/sha1sum/basic-1: Likewise.
1284 * tests/sha1sum/sample-vec: Likewise.
1285 * tests/shred/exact: Likewise.
1286 * tests/shred/remove: Likewise.
1287 * tests/sort/Makefile.am: Likewise.
1288 * tests/sort/Test.pm: Likewise.
1289 * tests/sort-time/Makefile: Likewise.
1290 * tests/sort-time/README: Likewise.
1291 * tests/sort-time/rand-gen: Likewise.
1292 * tests/stty/basic-1: Likewise.
1293 * tests/stty/row-col-1: Likewise.
1294 * tests/sum/basic-1: Likewise.
1295 * tests/sum/sysv: Likewise.
1296 * tests/tac/Makefile.am: Likewise.
1297 * tests/tac/Test.pm: Likewise.
1298 * tests/tail/Makefile.am: Likewise.
1299 * tests/tail/Test.pm: Likewise.
1300 * tests/tail-2/Makefile.am: Likewise.
1301 * tests/tail-2/append-only: Likewise.
1302 * tests/tail-2/assert: Likewise.
1303 * tests/tail-2/assert-2: Likewise.
1304 * tests/tail-2/big-4gb: Likewise.
1305 * tests/tail-2/fflush: Likewise.
1306 * tests/tail-2/infloop-1: Likewise.
1307 * tests/tail-2/proc-ksyms: Likewise.
1308 * tests/tail-2/start-middle: Likewise.
1309 * tests/tail-2/tail-n0f: Likewise.
1310 * tests/tee/basic: Likewise.
1311 * tests/tee/dash: Likewise.
1312 * tests/test/Makefile.am: Likewise.
1313 * tests/test/Test.pm: Likewise.
1314 * tests/touch/Makefile.am: Likewise.
1315 * tests/touch/dangling-symlink: Likewise.
1316 * tests/touch/empty-file: Likewise.
1317 * tests/touch/fail-diag: Likewise.
1318 * tests/touch/fifo: Likewise.
1319 * tests/touch/no-create-missing: Likewise.
1320 * tests/touch/no-rights: Likewise.
1321 * tests/touch/not-owner: Likewise.
1322 * tests/touch/obsolescent: Likewise.
1323 * tests/touch/read-only: Likewise.
1324 * tests/touch/relative: Likewise.
1325 * tests/tr/Makefile.am: Likewise.
1326 * tests/tr/Test.pm: Likewise.
1327 * tests/tr/failures: Likewise.
1328 * tests/tsort/basic-1: Likewise.
1329 * tests/unexpand/basic-1: Likewise.
1330 * tests/uniq/Makefile.am: Likewise.
1331 * tests/uniq/Test.pm: Likewise.
1332 * tests/wc/Makefile.am: Likewise.
1333 * tests/wc/Test.pm: Likewise.
1335 2006-08-17 Jim Meyering <jim@meyering.net>
1337 ls -CF would misalign columns in some cases.
1338 * src/ls.c (get_type_indicator): New function. extracted from...
1339 (print_type_indicator): ...here. Use it.
1340 (length_of_file_name_and_frills): Use it here, too, rather than
1341 assuming stat.st_mode is valid.
1342 Reported by Andreas Schwab, here:
1343 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
1344 See the test for this above. FYI, I did ls -CF /proc and visually
1345 inspected the result.
1347 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
1348 to mention the now-removed cp_options.xstat member.
1350 * Makefile.maint (patch-check): Adapt to work now that the patch
1351 modifies more than one file in src/.
1353 With this patch, permit building with Solaris cc on Solaris 7.
1354 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
1355 This integrates patches from Bruno Haible.
1357 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
1359 Fix some problems reported by Bruno Haible.
1360 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
1361 Skip this test if "chmod g+s d" silently does nothing.
1362 * tests/ls-2/tests: Skip this test suite if we can't set up files
1363 properly for the setuid-etc test. This simplifies some of the
1364 hacks we were using to work around porting problems.
1366 2006-08-16 Jim Meyering <jim@meyering.net>
1368 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
1369 * tests/cp/acl: Instead, skip the test if either setfacl
1371 Reported by Michael Stone.
1373 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
1375 * tests/lang-default (LC_ALL): Set to "C", so we get
1376 English-language diagnostics. Unset the other variables; it
1377 should be portable to use 'unset' for this stuff nowadays.
1378 Problem reported by Bruno Haible. Using "C" reverses the
1379 2000-10-22 change to fileutils in this area.
1381 Fix bugs when printing plurals of numbers that are not
1382 unsigned long int values.
1383 * src/system.h (select_plural): New function.
1384 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
1385 * src/uptime.c (print_uptime): Likewise.
1386 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
1387 print a floating point number, as reducing to 0 or 1 doesn't work
1388 for some languages. Instead, just use "s" for seconds since it
1389 doesn't need a plural form.
1391 2006-08-16 Bruno Haible <bruno@clisp.org>
1393 Old versions of gzip would write --help output to stderr, and it
1394 would be annoying to see that in the output of every "make" command.
1395 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
1398 2006-08-16 Andreas Schwab <schwab@suse.de>
1400 * tests/cp/acl: Don't use non-portable == operator for test.
1402 2006-08-16 Jim Meyering <jim@meyering.net>
1404 * tests/ls/stat-dtype: Use stat to test file system type, rather
1405 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
1407 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
1409 * NEWS: Mention that df exits with nonzero status if it generates
1410 no output. This change was in 6.0 but inadvertently unmentioned.
1411 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
1413 (show_dev): Don't set it until we actually output something.
1414 Print the header if this is the first output.
1415 (main): Don't print a header, as that is now show_dev's job.
1416 * tests/misc/Makefile.am (TESTS): Add df.
1417 * tests/misc/df: New file.
1419 2006-08-15 Eric Blake <ebb9@byu.net>
1421 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
1422 statvfs.f_type not present. See
1423 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
1425 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
1427 * src/dd.c (print_stats): Don't substitute "1" for number, as this
1428 causes confusion for the Hungarian translators. Problem reported
1429 by Egmont Koblinger here:
1430 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
1432 2006-08-15 Jim Meyering <jim@meyering.net>
1434 * .x-sc_require_config_h: Add lib/at-func.c.
1436 * NEWS: Add a line for 6.1-cvs.
1437 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
1439 2006-08-15 Jim Meyering <jim@meyering.net>
1442 * NEWS: Record the 6.0 release date.
1443 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1445 * TODO: Add an item (convert to use gnulib-tool), add to the plan
1446 for id-vs-getgrouplist, and remove a few completed items.
1448 * Makefile.maint (alpha beta major): Fix syntax error.
1450 2006-08-13 Jim Meyering <jim@meyering.net>
1452 * src/shred.c (usage): Don't indent the second line of an item.
1453 Otherwise, help2man would misformat the output.
1454 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
1456 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
1458 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
1459 Suggested by Eric Blake to avoid problems like
1460 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
1462 2006-08-11 Jim Meyering <jim@meyering.net>
1464 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
1465 failure that this test checks for (stat/dirent inode mismatch at
1466 a mount point), so continue to give a diagnostic about the failure,
1467 but don't actually count it as a failure.
1469 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
1471 * ABOUT-NLS: Update from gettext 0.15.
1472 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
1474 * src/csplit.c (struct control): Remove fastmap member.
1475 (extract_regexp): Allocate fastmap separately, since otherwise
1476 it might move due to a realloc. This fixes a bug that led
1477 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
1479 2006-08-10 Jim Meyering <jim@meyering.net>
1481 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
1482 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
1483 Redirect both stdout and stderr of df invocations.
1485 * src/dircolors.hin: Add a TERM directive for each of the following:
1486 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
1487 rxvt-cygwin-native, screen.linux, xterm-256color.
1488 Sort the TERM directives.
1489 From Mike Frysinger.
1491 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
1493 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
1494 See Debian bug 373736.
1496 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
1499 * src/.cvsignore: Add shuf.
1501 * Makefile.maint: Remove the po-update procedure; it doesn't
1502 work with the new repository on http://www.iro.umontreal.ca/.
1503 For now I guess we'll have to fix things by hand.
1504 (do-po-update, po-update): Remove. All references removed.
1506 * src/shuf.c (next_line): New function.
1507 (read_input): Use it, to avoid relying on GCC-specific behavior
1508 with void * arithmetic. Problem reported by Bob Proulx.
1509 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
1510 to detect this sort of problem automatically in the future.
1512 2006-08-09 Jim Meyering <jim@meyering.net>
1514 * src/ls.c: Add a compile-time check to ensure that filetype
1515 and filetype_letter have the same number of elements.
1517 * tests/misc/sort-rand: Remove use of --seed=S.
1519 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
1521 Add a command 'shuf', and modify shred and sort to use the new
1522 random number generator library of 'shuf'.
1524 * AUTHORS: Add shuf.
1526 * NEWS: Likewise. Mention new --random-source option for shred
1527 and sort. Move "sort +1 -2" notice to the appropriate section,
1528 and clarify its role with respect to POSIXLY_CORRECT.
1529 * man/.cvsignore: Add shuf.1.
1530 * man/Makefile.am (dist_man_MANS): Add shuf.1.
1531 (shuf.1): New dependency.
1532 * man/shuf.x: New file.
1533 * src/Makefile.am (bin_PROGRAMS): Add shuf.
1534 (EXTRA_DIST): Remove rand-isaac.c.
1535 (shuf_LDADD): New macro.
1536 * src/rand-isaac.c: Remove, moving most of its contents to
1538 * src/shuf.c: New file.
1539 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
1540 Don't include rand-isaac.c; include randint.h and randread.h instead.
1541 (RANDOM_SOURCE_OPTION): New enum.
1542 (long_opts, usage, main): New option --random-source.
1543 * src/sort.c: Likewise.
1544 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
1545 All callers changed to use randint interface.
1546 (fillrand): Remove. All callers changed to use randread interface.
1547 (dopass): Remove dependency on ISAAC buffer size.
1548 (genpattern): Don't wipe the random state here.
1549 (randint_source): New static var.
1550 (clear_random_data): New function.
1551 (main): Allocate random source, and arrange to wipe it on exit.
1552 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
1553 (longopts, usage, main): Remove undocumented --seed option;
1554 it's now replaced by --random-source.
1555 (rand_state, get_hash): Remove.
1556 (randread_source): New static var.
1557 (random_state, cmp_hashes, compare_random): New functions; they guarantee
1558 no collisions in the random hash function.
1559 (keycompare): Use compare_random for -R; don't fall back on comparing
1560 via memcoll, since compare_random does the right thing.
1561 * tests/misc/Makefile.am (TESTS): Add shuf.
1562 * tests/misc/shuf: New file.
1564 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
1566 * src/copy.c (set_author): Preserve the st_author field via the
1567 file descriptor dest_desc.
1569 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
1571 * NEWS: chmod now preserves setuid and setgid bits on directories
1572 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
1574 Fix test case problems if working directory is setgid,
1575 reported by Bob Proulx.
1576 * tests/cp/fail-perm: Use symbolic mode so that we clear
1577 setgid bit more reliably on directories.
1578 * tests/mkdir/special-1 (set_mode_string): Likewise.
1580 2006-07-27 Jim Meyering <jim@meyering.net>
1582 * src/chgrp.c (usage): Use correct grammar in description of the
1584 * src/chown.c (usage): Likewise.
1586 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
1588 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
1589 Correctly access SRC_SB's element ST_AUTHOR.
1591 2006-07-26 Jim Meyering <jim@meyering.net>
1593 * tests/ls/stat-failed: Adapt to match new expected output.
1596 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
1597 than having the code test for all of the other types first.
1598 Hoist the set-uid/gid-testing code "up" into this new block.
1599 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
1600 C_ORPHAN, not as C_FILE.
1602 2006-07-26 Jim Meyering <jim@meyering.net>
1604 Checking in a change from Paul.
1606 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
1608 * src/ls.c (DT_INIT): Remove. All uses removed.
1609 (enum filetype): Use an ordinary enum rather than trying to keep
1610 the values in sync with DT_FIFO etc. That way, we don't have
1611 to make special assumptions about them. All uses changed.
1612 (whiteout): New constant member of enum filetype.
1613 (filetype_letter): New constant, for use with enum filetype.
1614 (FILETYPE_INDICATORS): New initializer list.
1615 (print_dir): Add case for DT_WHT.
1616 (gobble_file): If stat fails, don't discard information from
1617 readdir; instead, preserve it so it can be printed.
1618 (print_long_format): Fall back on readdir result if stat info
1619 is not available. Use "?" to denote each unknown mode char,
1620 instead of an overall "?", since we now know some of the mode
1622 (print_type_indicator): Now that MODE isn't necessarily
1623 useful, guard all uses.
1624 Now that two blocks in the type-checking tree can set "type = C_FILE",
1625 move the suffix-handling code out and down.
1627 2006-07-26 Jim Meyering <jim@meyering.net>
1629 Prepare for the above change.
1630 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
1631 and adjust uses. From a patch by Paul Eggert.
1633 2006-07-26 Jim Meyering <jim@meyering.net>
1635 * src/ls.c: Correct indentation/formatting in a few places.
1637 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
1639 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
1640 Problem report and fix from Bob Proulx.
1641 * NEWS: Clarify the "chmod 0500" news, and correct the vague
1642 statements about compatibility with BSD.
1644 2006-07-25 Jim Meyering <jim@meyering.net>
1646 * src/ls.c (gobble_file): When handling a stat-failed entry,
1647 print the entry name not the absolute_name -- to be consistent
1648 with the usual case.
1649 * tests/ls/stat-failed: Update accordingly.
1651 * src/ls.c: Add parens around the new uses of ?: ternary operator.
1653 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
1656 Get --dired offsets right when handling stat-failed entries.
1657 * src/ls.c (print_long_format): Be careful to increment P by the
1658 appropriate amount, even when inode_number_width and nlink_width
1660 * tests/ls/stat-failed: Test for the above.
1662 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
1663 have_acl member. That would happen for a directory with both a
1664 non-stat'able entry and one with an ACL.
1666 * src/ls.c (gobble_file): Make it so failure to stat a
1667 non-command-line file provokes an exit status of 1, not 0.
1668 Say "cannot access" rather than "cannot stat".
1669 * tests/ls/stat-failed: New file/test, for the above.
1670 * tests/ls/Makefile.am (TESTS): Add stat-failed.
1671 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
1672 of "cannot access " to diagnostic.
1674 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
1676 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
1677 Replace all occurrences of "type == command_line" with the
1678 equivalent, "command_line_arg".
1680 * src/ls.c: Apply the stat-failed parts of Red Hat's
1681 coreutils-selinux.patch. From Ulrich Drepper.
1682 This makes it so files not mentioned on the command line (e.g.,
1683 names read from a directory that *is* mentioned on the command
1684 line) for which stat fails are still listed. With --color,
1685 such files are colored just like ORPHANs (aka dangling symlinks).
1687 * src/df.c (n_valid_args): Declare global to be static.
1689 2006-07-24 Jim Meyering <jim@meyering.net>
1691 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
1692 system lacks d_type support.
1694 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
1696 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
1698 2006-07-21 Jim Meyering <jim@meyering.net>
1700 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
1701 Reported by Tim Waugh.
1702 Also remove the comment duplicating much of --help output.
1704 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
1705 name so the list remains alphabetized.
1707 Fix another bug: ls --indicator-style=file-type would call
1708 stat for a symlink, even though it wasn't always needed.
1709 In some cases, that unnecessary stat would cause ls to fail.
1710 * src/ls.c (gobble_file): Don't treat symlinks specially (in
1711 requiring a stat syscall). Remove the offending exclusion.
1713 * NEWS: Mention the fix.
1715 * tests/ls/stat-dtype: New file/test, for the above fix.
1716 Also exercises the new df feature, below.
1718 * src/df.c (main): Fail and don't print the headers if no
1719 file system is processed. This makes it easy to test whether
1720 a specified directory is on a file system of a given type or types.
1721 Otherwise, applications would have had to parse df's output.
1722 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
1724 Fix a bug: ls --file-type worked like --indicator-style=slash,
1725 rather than like --indicator-style=file-type.
1726 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
1727 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
1729 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
1730 * NEWS: Mention the fix.
1731 * tests/ls-2/tests (file-type): New test, for the above fix.
1733 2006-07-19 Jim Meyering <jim@meyering.net>
1735 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
1737 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
1739 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
1741 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
1742 of directories alone unless you specify them explicitly.
1743 install and mkdir now implement X correctly.
1744 install now creates parent directories with mode 755, without
1745 changing their owner or group.
1746 * src/chmod.c (process_file): Adjust to mode_adjust API change.
1747 * src/install.c: Include mkancesdirs.h.
1748 (announce_mkdir, make_ancestor): New functions.
1749 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
1751 (dir_mode, dir_mode_bits): New vars.
1752 (main): Set dir modes separately from nondir, so that the X
1753 op of -m works correctly.
1754 (main): Remove cwd_errno cruft, since make_dir_parents no longer
1755 affects cwd. Adjust to new make_dir_parents API.
1756 (install_file_in_file_parents): 2nd arg is now char *, not char
1757 const *. Use mkancesdirs instead of rolling our own code.
1758 (change_attributes): Don't worry about AFS, since that kludge
1759 should not be needed any more.
1760 * src/mkdir.c (struct mkdir_options): New struct.
1761 (announce_mkdir, make_ancestor): New functions.
1762 (main): Use them. Adjust to mode_adjust API change. Stick with
1763 umask 0. Use make_dir_parents for all the work.
1764 * src/mkfifo.c (main): Adjust to new mode_adjust API.
1765 * src/mknod.c (main): Likewise.
1766 * tests/chmod/setgid: Do the setgid test instead of bailing.
1767 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
1768 GNU chmod now behaves like other versions of chmod.
1769 * tests/mkdir/perm: Add a test for the X bug.
1771 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
1773 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
1774 This doesn't fix any bugs, since OUT always equals stdout, but it
1775 makes the code easier to understand.
1777 2006-07-14 Jim Meyering <jim@meyering.net>
1779 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
1780 rather than open-coding it. Now supports mercurial, too.
1781 * .hgignore: New file.
1782 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
1783 all generated files, including ones like configure and po/*.po
1784 that are currently version-controlled in cvs.
1786 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
1787 They've been in CVS, just haven't been distributed before this.
1788 Distribute ChangeLog-2005, too.
1789 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
1791 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
1793 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
1796 2006-07-09 Jim Meyering <jim@meyering.net>
1798 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
1799 That happens with Linux/tmpfs.
1800 * tests/mv/Makefile.am (TESTS): Add dir2dir.
1802 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1804 Adjust to recent updates from gnulib.
1805 * src/dd.c (apply_translations): Use toupper rather than
1806 islower followed by toupper; it's simpler and typically
1807 faster now that we assume at least C89 semantics. Similarly
1809 * src/sort.c (inittables): Likewise.
1810 * src/expand.c (expand): Don't assume that isprint etc. return
1811 booleans (needed for pre-C99 hosts).
1812 * src/fmt.c (check_punctuation): Likewise.
1813 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
1814 * src/tr.c (is_char_class_member): Likewise.
1815 * src/unexpand.c (unexpand): Likewise.
1816 * src/join.c (is_blank): Remove; no longer needed. All uses
1817 replaced by isblank (to_uchar (...)).
1818 * src/pinky.c (create_fullname): Don't assume char is unsigned.
1819 * src/printf.c (print_esc): Likewise.
1820 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
1821 (copy_unescaped_string): Likewise.
1822 * src/stat.c (print_it): Likewise.
1823 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
1824 convenience on GNU systems. All uses changed. Don't bother
1825 looking for any dirent.h substitute other than ndir.h.
1826 (D_INO): Remove unnecessary parentheses.
1827 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
1828 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
1829 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
1830 to ctype.h equivalents.
1831 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
1834 2006-07-08 Jim Meyering <jim@meyering.net>
1836 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
1838 * Makefile.maint (sc_the_the): New rule.
1840 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
1841 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
1844 2006-07-07 Jim Meyering <jim@meyering.net>
1846 * NEWS: Mention that mv can now remove an empty destination directory,
1847 and give an example. Prompted by a report from Florent Bayle.
1849 2006-07-05 Jim Meyering <jim@meyering.net>
1851 * src/ls.c (usage): Correct the description of -G: it is useful
1852 only in a long listing. Reported by Martin Pool in
1853 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
1855 * man/chmod.x: Correct the description of the sticky bit. Reported
1856 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
1858 * src/copy.c (copy_internal): Don't work around old NFS clients like
1859 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
1860 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
1861 a banal failure as a recursive move-into-self failure.
1862 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
1864 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
1866 2006-07-03 Jim Meyering <jim@meyering.net>
1868 Plug another unusual leak.
1869 (AD_mark_helper): Free malloc'd filename if hash_insert says
1870 that string is already in the hash table.
1872 The dev/inode of the topmost directory in each hierarchy were not
1874 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
1875 (AD_push): Call it from here instead.
1877 Fix two small leaks.
1878 * src/remove.c (AD_stack_clear): New function.
1880 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
1882 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
1883 Add $VG_PATH_PREFIX as a prefix to $PATH
1885 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
1886 * tests/Makefile.am (evar-check): Remove rule.
1887 (EXTRA_DIST): Remove .env-warn.
1888 * tests/.env-warn: Remove file. No longer used.
1889 Suggestion from Eric Blake.
1891 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
1893 * src/system.h: Include <stdint.h> unconditionally, since we
1894 now assume the stdint module.
1896 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
1898 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
1899 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
1900 * src/tail.c (main): Implement this.
1901 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
1902 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
1904 2006-07-01 Jim Meyering <jim@meyering.net>
1906 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
1908 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
1911 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
1913 * NEWS: seq now uses long double internally rather than double.
1914 It now defaults to a minimal fixed point format if possible.
1915 It lets you use %a, %A, %E, %F, %G.
1916 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
1917 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
1918 (isfinite) [!defined isfinite]: New macro.
1919 (separator, terminator): Now points to const.
1920 (first, step, last): Remove.
1921 (usage): Update to match new behavior.
1922 (struct operand, operand): New type.
1923 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
1925 Compute and return a value of type operand, not double.
1926 (long_double_format): Renamed from valid_format, and now returns a
1927 new format with an "L" added if needed, if the original format was
1928 valid. Allow %a, %A, %E, %F, and %G formats.
1929 (print_numbers): Take numeric values as args rather than from globals.
1930 Print long double, not double.
1931 (get_width_format): Remove.
1932 (get_default_format): New function.
1933 (main): Implement new way of calculating default format.
1934 Don't worry about locale's representation of the decimal point, since
1935 the arguments are always processed in the C locale.
1936 * tests/seq/basic (neg-2): Adjust to new default format.
1937 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
1938 implementation should do the right thing.
1940 2006-06-30 Jim Meyering <jim@meyering.net>
1942 * tests/stty/basic-1: Work around an intermittent test failure
1943 on HP-UX 11.11. Report and analysis from Bob Proulx.
1944 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
1946 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
1948 * NEWS: Support obsolete usages like "sort +1 -2" even when
1949 conforming to POSIX 1003.1-2001, since this is a pure extension to
1950 POSIX. Problem reported by Christian in:
1951 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
1952 * src/sort.c (main): Implement this.
1954 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
1955 Autoconf 2.60 says this stuff was obsolete.
1957 2006-06-28 Jim Meyering <jim@meyering.net>
1959 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
1961 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
1963 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
1964 (set -x when VERBOSE=yes) when stderr is redirected before stdout
1965 causing shell tracing of the stdout redirection to be written to
1966 the stderr file. Avoid problem and test failure on HP-UX by
1967 redirecting stderr last.
1968 * tests/dd/unblock-sync: Order shell file redirections for
1969 stderr and stdout in the common style.
1970 tests/acl: Likewise.
1972 2006-06-27 Jim Meyering <jim@meyering.net>
1974 * tests/misc/cat-proc: Try to avoid any spurious numeric
1975 differences in frequently-changing /proc/cpuinfo.
1976 Reported by Nelson Beebe.
1978 2006-06-26 Jim Meyering <jim@meyering.net>
1980 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
1981 fd_to_subdirp failure, not just when errno == EACCES.
1982 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
1983 rmdir, here, even though rmdir may happen to be adequate.
1985 * NEWS: rm no longer fails to remove an empty, unreadable directory
1986 * src/remove.c (remove_cwd_entries): If we can't open a directory,
1987 and the failure is not being ignored, try to remove the directory
1988 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
1989 Problem report and test case from Paul Eggert in
1990 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
1992 * tests/rm/empty-inacc: New test, for the above.
1994 Avoid a segfault for wc --files0=- < /dev/null.
1995 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
1997 2006-06-25 Jim Meyering <jim@meyering.net>
1999 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
2000 contains a list of NUL-separated file names.
2002 * src/wc.c: Include "readtokens.h".
2003 (usage): Describe the new option, and adjust the `Usage':
2004 with this option, no FILE may be specified on the command line.
2005 (main): Handle the new option.
2006 * tests/misc/wc-files0: New tests, for the above.
2007 * tests/misc/wc-files0-from: Likewise.
2008 * tests/misc/Makefile.am (TESTS): Add wc-files0.
2010 2006-06-24 Jim Meyering <jim@meyering.net>
2012 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
2014 2006-06-22 Jim Meyering <jim@meyering.net>
2016 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
2017 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
2019 2006-06-19 Jim Meyering <jim@meyering.net>
2021 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2022 so this check is not run as part of "make distcheck".
2024 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
2026 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
2028 2006-06-18 Jim Meyering <jim@meyering.net>
2030 * tests/misc/pwd-long: Make error output a little clearer.
2032 2006-06-17 Jim Meyering <jim@meyering.net>
2034 * tests/rm/inaccessible: Skip this test on systems without openat
2035 support. Reported by Bob Proulx.
2037 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
2039 * tests/misc/mknod: Improve permission checks to handle
2040 running mkdir test in set-gid directories.
2042 2006-06-14 Jim Meyering <jim@meyering.net>
2044 * tests/du/basic: Revamp not to hard-code file system block sizes.
2046 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2048 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
2051 2006-06-11 Jim Meyering <jim@meyering.net>
2053 * .gitignore: New file.
2054 * Makefile.am (EXTRA_DIST): Add .gitignore.
2056 Setting TIME_STYLE=long-iso in the environment would make the
2057 cp/same-file test fail.
2058 * tests/envvar-check (vars): Add TIME_STYLE to the list.
2059 * tests/cp/same-file: Revert last change.
2060 Source the envvar-check script, to ensure that TIME_STYLE
2061 settings don't affect these tests.
2063 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
2065 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
2066 uses POSIX time stamp formats. Problem reported by John Nixon in
2067 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
2069 2006-06-10 Jim Meyering <jim@meyering.net>
2071 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
2073 Require a "Version N.M" line at the top of the ChangeLog
2074 file only when making the actual release, not when running
2076 * Makefile.maint (maintainer-distcheck): Don't depend on
2078 (alpha beta major): Depend on it here, instead.
2080 2006-06-08 Jim Meyering <jim@meyering.net>
2082 Ensure that cat works with any of the options, -A -v -e -E -T,
2083 when applied to files in /proc and /sys, even when the FIONREAD
2084 ioctl produces nonsensical results. Before this change, cat would
2085 produce no output (or truncated output), for some linux kernels.
2087 * src/cat.c (write_pending): New function, factored out of cat.
2088 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
2089 that there are bytes to read. Some versions of linux-2.6.16 do that.
2090 Write any pending output before returning.
2091 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
2092 * NEWS: Mention this bug fix.
2093 * tests/misc/cat-proc: New file. Test for the above.
2094 * tests/misc/Makefile.am (TESTS): Add cat-proc.
2096 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
2098 * src/expr.c (eval4): Detect overflow properly when multiplying
2101 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
2103 * NEWS: The 'expr' command now detects and reports integer overflow.
2104 (It would be better to use extended precision instead, but that
2105 would be more work.)
2106 * src/expr.c (integer_overflow): New function.
2107 (eval4, eval3): Check for integer overflow.
2109 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
2111 Fix problems when building with Solaris/SVR4/etc. make, which uses a
2112 different and somewhat bogus implementation of VPATH. In the
2113 directory tests/misc, rename tests whose names might appear in the
2114 Automake-generated rules. For example, we can't use a test named
2115 'test', since Automake generates a rule that contains the text
2116 "if test -f ./$$tst; ...", and this might expand to something like
2117 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
2118 which executes the 'test' script rather than the 'test' command.
2119 * tests/misc/false-status: Renamed from tests/misc/false.
2120 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
2121 * tests/misc/sort-merge: Renamed from tests/misc/sort.
2122 ($prog): Set to 'sort' rather than to $PROG.
2123 * tests/misc/test-diag: Renamed from tests/misc/test.
2124 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
2125 in case Solaris make has prepended the directory.
2126 (TESTS): Adjust to above renamings.
2127 * tests/misc/expand: Don't assign to PROG; no longer needed
2128 now that Makefile.am sets PROG to the basename.
2129 * tests/misc/fold: Likewise.
2131 2006-06-03 Jim Meyering <jim@meyering.net>
2133 Make `cp --link --no-dereference' work also on systems where the
2134 link system call cannot create a hard link to a symbolic link.
2135 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
2136 the link syscall on a symlink when it would do the wrong thing.
2137 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
2138 * tests/cp/link-no-deref: New file/test for the above.
2139 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
2140 * NEWS: Mention the change (doesn't affect Linux).
2142 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
2144 Fix some porting problems in the test cases reported by
2145 Ralf Wildenhues for HP-UX 11.23 in:
2146 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
2147 * tests/help-version: Don't assume that \< \> works in sed.
2148 * tests/misc/close-stdout: Don't assume that >&- works.
2149 Add a /dev/full test.
2150 * tests/touch/no-create-missing: Don't assume that >&- works.
2152 2006-05-30 Jim Meyering <jim@meyering.net>
2154 * src/ls.c (usage): Add `v' to the list of sorting-related options.
2157 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2159 * tests/cp/fail-perm: source lang-default.
2160 * tests/rm/inaccessible: Likewise.
2162 2006-05-28 Jim Meyering <jim@meyering.net>
2164 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
2165 Recognize it, too. Reported by Ralf Wildenhues, in
2166 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
2168 2006-05-27 Jim Meyering <jim@meyering.net>
2170 * src/chgrp.c: Support new options: --preserve-root and
2171 --no-preserve-root. Somehow this program was skipped when those
2172 options were added to chown, chmod, and rm. Reported by
2173 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
2174 * NEWS: Mention this.
2176 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
2178 * NEWS: Remove mention of --seed. We'll replace it with something
2179 better, and don't want to indicate that it is supported.
2180 * src/sort.c (usage): Likewise.
2182 2006-05-20 Jim Meyering <jim@meyering.net>
2184 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
2186 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
2187 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
2188 FTS_COMFOLLOW. Spotted by Justin Pryzby.
2190 * gnupload: Merge changes from automake, retaining the ""--to...
2191 kludge to placate overzealous `make distcheck' check.
2193 2006-05-19 Jim Meyering <jim@meyering.net>
2195 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
2196 FTS_TIGHT_CYCLE_CHECK directory traversal option.
2197 Reported by Justin Pryzby in http://bugs.debian.org/367691
2199 2006-05-15 Jim Meyering <jim@meyering.net>
2201 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
2202 From Tomas Pospisek.
2204 2006-05-13 Jim Meyering <jim@meyering.net>
2206 * tests/mv/no-target-dir: Test two more cases.
2208 2006-05-11 Jim Meyering <jim@meyering.net>
2210 mv -T DIR EMPTY_DIR no longer fails unconditionally
2211 * src/copy.c (copy_internal): Don't manually prohibit a move where
2212 the destination is an existing directory. Sometimes doing that is
2213 valid. Let the rename system call enforce the rules. That is
2214 allowed only when the source is a directory and the destination
2215 directory (to be replaced) is empty. Reported by Eric Blake.
2216 * tests/mv/no-target-dir: New file/test for this.
2217 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
2218 * NEWS: Mention this.
2220 * tests/mv/atomic: New file/test for yesterday's fix.
2221 * tests/mv/Makefile.am (TESTS): Add atomic.
2223 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
2225 2006-05-10 Jim Meyering <jim@meyering.net>
2227 * src/copy.c (copy_internal): Don't explicitly unlink the destination
2228 when moving a symlink into the place of an existing non-directory.
2229 Reported by Joshua Hudson.
2230 * NEWS: mention this.
2232 2006-05-07 Jim Meyering <jim@meyering.net>
2234 * Makefile.maint (patch-check): Fail if patch generates any output,
2235 even merely for changed offsets.
2237 * src/c99-to-c89.diff: Adjust to reflect new offsets.
2239 * NEWS: Mention changes affecting df, pwd, shred.
2241 2006-05-06 Jim Meyering <jim@meyering.net>
2243 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
2244 system condition where dirent.d_ino != stat.st_ino.
2245 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
2247 2006-05-06 Eric Blake <ebb9@byu.net>
2249 * tests/ls/inode: Expand to test inode from readdir case.
2250 * tests/ls/follow-slink: Expand to test broken links encountered
2251 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
2253 2006-05-06 Eric Blake <ebb9@byu.net>
2255 * tests/mv/leak-fd: Work even on case-insensitive file system.
2257 2006-05-04 Jim Meyering <jim@meyering.net>
2259 * NEWS: Mention the 2006-03-19 pwd-related change that makes
2260 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
2262 2006-05-03 Jim Meyering <jim@meyering.net>
2264 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
2265 Use better macro parameter names: s/basename/key_name/,
2266 s/basefunc/key_cmp_func. Fix typo in comment.
2268 2006-04-29 Eric Blake <ebb9@byu.net>
2270 * src/ls.c (main): On systems with d_type, directories_first only
2271 implies format_needs_type, not format_needs_stat.
2273 2006-05-03 Jim Meyering <jim@meyering.net>
2275 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
2276 after comma in arg list, from Eric Blake.
2278 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2280 * tests/misc/date (relative-3): New test, derived from a bug
2281 report by John Thomas McDole.
2283 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
2285 New option for ls: --group-directories-first.
2286 It makes ls list directories before files.
2287 * NEWS [New features]: Mention it.
2288 * src/ls.c (sort_type): Rearrange to use as an array index when
2289 choosing sort function; added new sort_numtypes member for
2291 (time_type): Add new time_numtypes member for compile-time check.
2292 (directories_first): New global variable.
2293 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
2294 (long_options): Add --directories-first.
2295 (main): Support new option.
2296 (is_directory): New function.
2297 (extract_dirs_from_files): Use it.
2298 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
2299 (LIST_SORTFUNCTION_VARIANTS): New macros.
2300 (sort_functions): New global variable.
2301 (sort_files): Use it.
2302 (usage): Document new option.
2304 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
2306 * src/shred.c (fillrand): The assertion was way too weak, due to
2307 what must be a typo. Strengthen it to its intended value.
2308 (dopass): Don't use alloca; it's not worth the aggravation here,
2309 since it's used only to get a page-aligned buffer, and page
2310 alignment doesn't buy us much here. I'm suspicious that alloca
2311 causes problems on some hosts, due to a recent bug report by Adam
2312 Waltman: http://bugs.gentoo.org/130246.
2314 2006-04-18 Jim Meyering <jim@meyering.net>
2316 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
2317 sha384sum, sha512sum.
2319 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
2321 * src/chmod.c (describe_change): Adjust to filemode changes.
2322 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
2323 (print_long_format): Use (new) filemodestring rather than
2324 (old) mode_string, so that we get more file types right, at least
2325 in theory. Adjust to filemode changes.
2326 * src/stat.c (human_access): Likewise.
2328 2006-04-18 Jim Meyering <jim@meyering.net>
2330 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
2331 ignore file. This has never been enabled. Reported by Eric Blake.
2333 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
2335 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
2336 bug in Interix. Just call symlink or link directly. All uses changed.
2337 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
2338 * src/stat.c (USE_STATVFS): New macro.
2339 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
2340 (NAMEMAX_FORMAT): define a bit more clearly, now that the
2341 statvfs-using code is a bit more regular.
2342 * src/system.h (sync) [!HAVE_SYNC]: New macro.
2344 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
2346 * NEWS: csplit, nl, expr now conform to POSIX better, and are
2347 more-compatible with traditional Unix, with respect to regular
2349 * src/csplit.c (extract_regexp): Set re_syntax_options to a
2350 value that is compatible with what POSIX requires.
2351 * src/nl.c (build_type_arg): Likewise.
2352 * src/expr.c (docolon): Likewise. Also, don't let anchors match
2353 newline; this fixes an incompatibility with tradition and with POSIX.
2354 Don't warn about leading ^. POSIX says it is unspecified whether
2355 ^ is a special character, which means that implementations can
2356 either treat it as special or not, but either way a warning is not
2357 allowed (unless the regexp is otherwise invalid). Instead, anchor
2358 the expression but treat ^ as an anchor; this is the traditional
2359 behavior (e.g., Solaris 10).
2360 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
2361 and the like as invalid expressions (exit status 2), not as
2362 failure of 'expr' (exit status 3). This is more consistent with
2363 how Solaris behaves.
2364 * tests/expr/basic (fail-a): Adjust exit status to match new expr
2365 behavior, for status 2 versus 3.
2367 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
2368 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
2369 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
2370 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
2371 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
2372 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
2373 (bre61, bre62): New tests.
2374 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
2375 conforming to POSIX.
2378 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
2379 "if !". Do not assume that 'sed' can handle long, newline-free input.
2380 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
2382 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
2384 Adjust to new regex.h API (with new fastmap type), and clean
2385 up the regex storage allocation a bit.
2387 * src/csplit.c (struct control): Put re_compiled member at the
2388 end, since it's large. Change regexpr member from char * to bool;
2389 all uses changed. Add new member fastmap.
2390 (extract_regexp): regexp arg is now char const *, not char *.
2391 Don't bother duplicating the regular expression; it's not needed.
2392 Set fastmap from new fastmap member. Don't bother allocating
2393 a buffer, as the regexp code does a better job than we do.
2394 * src/expr.c (docolon): Allocate and use a fastmap.
2395 Don't bother allocating a buffer.
2396 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
2398 (build_type_arg): New fastmap arg. All uses changed.
2399 Don't bother allocating a buffer, but set a fastmap.
2400 * src/ptx.c (context_regex_string, word_regex_string): Remove.
2401 (context_regex, word_regex): New vars, replacing the above.
2403 (struct regex_data): New type.
2404 (compile_regex): Renamed from alloc_and_compile_regex, since
2405 we no longer allocate storage. Arg is now a struct regex_data *,
2406 not a const char *. All uses changed. Don't allocate the fastmap;
2407 instead, take it from the caller. Don't convert size_t to int,
2408 to avoid arithmetic overflow problems. Don't bother freeing
2409 storage afterwards; it's not worth the aggravation.
2410 * src/tac.c (compiled_separator_fastmap): New ver.
2411 (main): Use it. Don't bother allocating a buffer.
2413 2006-03-30 Jim Meyering <jim@meyering.net>
2415 * src/dd.c (iwrite): Remove assignment without effect.
2416 Reported by Felix Rauch Valenti.
2418 2006-03-22 Eric Blake <ebb9@byu.net>
2420 * src/ptx.c (usage): Remove mention of --copyright/-C.
2421 (main): Alias --copyright to --version plus a deprecation warning.
2422 * NEWS: Mention this.
2424 2006-03-27 Jim Meyering <jim@meyering.net>
2426 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
2427 use of strtod. Tiny patch from Nickolai Zeldovich.
2429 2006-03-11 Eric Blake <ebb9@byu.net>
2431 * tests/misc/dirname: New file.
2432 * tests/basename/Makefile.am: Delete.
2433 * tests/basename/basic: Move to...
2434 * tests/misc/basename: ... this new file. Add some tests,
2435 including fixed behavior for //.
2436 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
2437 * tests/Makefile.am (SUBDIRS): Remove basename.
2438 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
2440 Improvements to dirname/basename handling on platforms like
2441 cygwin with distinct // and with drive letters.
2442 * NEWS: Document new behavior.
2443 * src/basename.c (main): Don't strip suffix from file system
2445 * src/cp.c (target_directory_operand): Use new last_component.
2446 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
2447 traversing the string.
2448 * src/dircolors.c (guess_shell_syntax): Use new last_component.
2449 * src/install.c (target_directory_operand, install_file_in_dir):
2451 * src/ln.c (target_directory_operand, main): Likewise.
2452 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2453 * src/mv.c (target_directory_operand, movefile): Likewise.
2454 * src/remove.c (rm_1): Likewise.
2455 * src/shred.c (wipename): Likewise.
2456 * src/split.c (next_file_name): Likewise.
2457 * src/su.c (log_su, run_shell): Likewise.
2459 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
2461 * NEWS: nohup diagnostics are now more precise, and nohup now
2462 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2463 * src/nohup.c (main): Implement this.
2464 * tests/misc/nohup: Test the new behavior.
2466 2006-03-12 Jim Meyering <jim@meyering.net>
2468 * src/copy.c (set_author): Rename function, from preserve_author.
2470 * src/remove.c (AD_pop_and_chdir): Use new macro,
2471 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
2473 * src/system.h (SAME_INODE): Remove definition.
2474 Include "same-inode.h", instead.
2476 2006-03-11 Eric Blake <ebb9@byu.net>
2478 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
2480 2006-03-10 Jim Meyering <jim@meyering.net>
2482 Fix a bug whereby a user with write access to a directory being removed
2483 could cause the removal of that directory to fail with an erroneous
2484 diagnostic about a directory cycle. Reported by Vineet Chadha.
2486 * NEWS: Mention this.
2487 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
2488 leave (and try to rmdir) is the one whose dev_ino is being used to
2489 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
2491 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2493 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
2494 * src/dd.c (set_fd_flags): Handle file-creation flags on file
2495 descriptors, rather than ignoring them.
2496 * tests/dd/misc: Add test cases for append, nofollow, directory,
2497 and nolinks flags. Simplify redirection to /dev/null in some cases.
2499 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
2500 noatime test never tested anything.
2502 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
2504 * src/dd.c (flags, usage): New flags directory, nolinks.
2505 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
2507 * src/ls.c (usage): Mention that -f disables --color.
2508 Problem reported by Niels Möller.
2510 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
2512 * man/*.x: Add references to syscalls from utilities of the same name.
2514 2006-03-05 Jim Meyering <jim@meyering.net>
2516 * tests/help-version: Set SHELL, if not already set, in order to
2517 avoid failure when `make check' is run through debuild; dircolors
2518 would fail due to lack of $SHELL. Reported by Sven Joachim.
2520 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
2521 * src/base64.c (wrap_write, do_encode, main): Change type of
2522 parameters and locals, wrap_column, form size_t to uintmax_t.
2523 (main): Adjust to use xstrtoumax, accordingly.
2525 2006-03-03 Jim Meyering <jim@meyering.net>
2527 Don't fail when run from an environment with SHELL not a Bourne
2528 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
2529 * tests/dircolors/simple: Invoke each non-failing test with -b.
2530 Reported by Michael Stone.
2532 2006-02-27 Jim Meyering <jim@meyering.net>
2534 * tests/misc/base64: Derive --decode-using tests from the
2537 * tests/misc/base64: Factor out a long constant string.
2538 Split lines to stay within 80 columns.
2540 * tests/misc/Makefile.am (TESTS): Add base64.
2541 * tests/misc/base64: Test base64. From Simon Josefsson.
2543 * src/base64.c (do_decode): Use correct type for parameter,
2544 ignore_garbage: s/size_t/bool/.
2546 * src/base64.c: Don't include .h files already included by system.h:
2547 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
2548 Include "system.h" before the other lib/*.h header files.
2549 Include <sys/types.h> before "system.h".
2550 (wrap_write): Remove declaration of unused local, initial_column.
2551 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
2553 * README: Add base64 to the list.
2555 2006-02-17 Simon Josefsson <jas@extundo.com>
2557 New program: base64.
2558 * AUTHORS: Mention base64.
2560 * man/Makefile.am: Build base64.1.
2561 * man/base64.x: New file.
2562 * src/Makefile.am (bin_PROGRAMS): Add base64.
2563 * src/base64.c: New file.
2565 2006-02-25 Eric Blake <ebb9@byu.net>
2567 In ls, avoid calling stat for --inode (-i), when possible.
2568 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
2569 * src/system.h: ... here, for use in ...
2570 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
2572 (gobble_file): Add inode argument.
2573 (print_dir): Pass inode if available.
2574 (usage): Remove inaccuracy.
2576 2006-02-23 Jim Meyering <jim@meyering.net>
2578 * TODO: Update/correct some obsolete entries.
2580 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
2582 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
2583 * src/join.c (usage): Likewise.
2584 Documentation problem reported by Philip Kensche.
2586 2006-02-20 Eric Blake <ebb9@byu.net>
2588 * man/rm.x: Update documentation to match previous patch.
2590 2006-02-18 Eric Blake <ebb9@byu.net>
2592 New option for rm: --interactive=once (-I).
2593 * NEWS: Document it, along with change to rm --interactive.
2594 * TODO: Remove entry for implementing rm -I
2595 * src/rm.c (INTERACTIVE_OPTION): New enum value.
2596 (interactive_type): New enum.
2597 (long_opts): Let interactive take an optional argument.
2598 (interactive_args, interactive_types): New option arguments.
2599 (usage): Document -I, --interactive=WHEN. Use program_name
2600 instead of a basename.
2601 (main): New -I option, new behavior to --interactive.
2602 * tests/rm/interactive-once: New tests.
2603 * tests/rm/interactive-always: Ditto.
2604 * tests/rm/Makefile.am (TESTS): Run them.
2606 2006-02-18 Jim Meyering <jim@meyering.net>
2608 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
2609 expression match more of the target lines, e.g., those that start with
2610 `-S,' (short option followed by a comma) or that include `=[...]'.
2611 Patch by Nicolas François.
2612 Fix the four offenders thus exposed:
2613 * src/join.c (usage): Use two spaces (not one) to separate the
2614 --first-only option string from its description, so help2man formats
2615 the derived man page properly.
2616 * src/pr.c (usage): Likewise.
2617 * src/uniq.c (usage): Likewise.
2618 * src/install.c (usage): Likewise.
2620 2006-02-15 Jim Meyering <jim@meyering.net>
2622 * Makefile.maint (alpha beta major): For `make major', ensure that the
2623 version string is of the form N.N[.N]*, where N is one or more digits.
2625 2006-02-14 Jim Meyering <jim@meyering.net>
2627 * INSTALL: Update from gnulib.
2629 2006-02-13 Jim Meyering <jim@meyering.net>
2631 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
2633 2006-02-12 Jim Meyering <jim@meyering.net>
2635 * Makefile.maint (patch-check): New target.
2636 (local-checks-available): Add to the list.
2638 2006-02-11 Jim Meyering <jim@meyering.net>
2640 * src/c99-to-c89.diff: New file.
2641 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
2643 * .x-po-check: New file, with exclusions so that `make distcheck'
2645 * Makefile.am (EXTRA_DIST): Add .x-po-check.
2647 rm -r must remove an empty directory, even if it is inaccessible.
2648 * src/remove.c (close_preserve_errno): New function.
2649 (fd_to_subdirp): Don't print a diagnostic in this function.
2650 Do it from the callers instead, unless rmdir succeeds.
2651 (remove_cwd_entries, remove_dir): Adjust callers.
2652 * tests/rm/empty-inacc: New test for the above.
2653 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
2654 * NEWS: Mention this bug fix.
2655 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
2656 a tiny bit less precise: cannot remove `a/1': ... instead of
2657 cannot open directory `a/1': ...
2659 * Makefile.maint (syntax-check-rules): Automatically derive this
2660 list of sc_-prefixed rule names.
2662 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2664 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
2665 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
2666 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
2667 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
2668 go away? was that an accident?)
2669 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2670 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
2671 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
2672 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
2673 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
2674 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
2675 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
2676 (author_mark_check, makefile_path_separator_check):
2677 Output line numbers, to simplify navigation of Emacs *compilation*
2679 (sc_prohibit_atoi_atof, sc_file_system):
2680 Rework slightly so that Makefile.maint doesn't get reported as a
2681 violation of its own syntax rules.
2682 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
2683 it at run-time (which didn't work with Bison). Fix a makefile typo,
2684 caught by Makefile.maint itself: spaces where a tab should be.
2685 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
2686 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
2687 Ignore djgpp and man subdirectories, to avoid false matches with
2688 Bison and coreutils, respectively. Use sort -u to remove the
2689 resulting duplicates.
2690 * gnupload: Rework slightly to avoid bogus warning from
2691 sc_two_space_separator_in_usage.
2693 2006-02-10 Jim Meyering <jim@meyering.net>
2695 Use gzip's --rsyncable option only if it's available.
2696 * Makefile.maint (gzip_rsyncable): New variable.
2699 2006-02-08 Jim Meyering <jim@meyering.net>
2701 * Makefile.maint (local-checks-available): Define in terms of
2702 the expansion, $(syntax-check-rules), rather than the single,
2703 top-level target `syntax-check', so that it's easier to exclude
2704 individual rules (via $(local-checks-to-skip)).
2705 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
2707 2006-02-07 Jim Meyering <jim@meyering.net>
2709 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
2710 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
2712 * tests/help-version (expected_failure_status_vdir):
2713 Redirect an expected disk-full diagnostic to /dev/null.
2715 2006-02-06 Jim Meyering <jim@meyering.net>
2717 * src/unexpand.c (usage): Use two spaces (not one) to separate the
2718 --first-only option string from its description, so help2man formats
2719 the derived man page properly.
2720 * src/rm.c (usage): Likewise for --no-preserve-root.
2721 * src/chown.c (usage): Likewise.
2722 * src/chgrp.c (usage): Likewise.
2724 Add a rule to ensure that the above doesn't happen again.
2725 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
2726 (syntax-check-rules): Add it.
2727 * .x-sc_two_space_separator_in_usage: New empty file.
2728 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
2730 2006-02-06 Jim Meyering <jim@meyering.net>
2732 * src/cp.c (usage): Use two spaces (not one) to separate each
2733 option string from its description, so help2man formats the
2734 derived man page properly.
2735 * src/mv.c (usage): Likewise.
2736 Patch from Nicolas François in http://bugs.debian.org/351601.
2738 2006-02-04 Jim Meyering <jim@meyering.net>
2740 * src/copy.c (copy_internal): cp -RL would fail when encountering
2741 the same directory more than once in the hierarchy beneath a single
2742 command-line argument. That is legitimate, e.g. when there are
2743 two or more symbolic links, each pointing to some directory that
2744 would not otherwise be copied. Reported by Christophe LYON.
2745 * tests/cp/cp-deref: New file. Test for today's fix.
2746 * tests/cp/Makefile.am (TESTS): Add cp-deref.
2747 * NEWS: Document this.
2749 2006-02-03 Jim Meyering <jim@meyering.net>
2751 * configure.ac: Require automake-1.9.6, not 1.8.3.
2753 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2755 * src/od.c (usage): Mention that -t a ignores high order bit.
2756 Documentation problem reported by Ed Avis.
2758 2006-02-01 Jim Meyering <jim@meyering.net>
2760 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
2762 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2764 * src/head.c (main): Use a better diagnostic when someone uses a
2765 trailing numeric option in an invalid way. Problem reported by
2767 * src/tail.c (parse_options): Likewise.
2769 2006-01-30 Jim Meyering <jim@meyering.net>
2771 * man/wc.x: Include `count' keyword in man page synopsis,
2772 per suggestion from http://bugs.debian.org/181585.
2774 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
2776 * src/df.c (show_dev): If the file system claims to have
2777 more available than total blocks, report the number of used
2778 blocks as being total - available (a negative number) rather
2779 than as garbage. Problem reported by Toralf Foerster.
2781 2006-01-24 Jim Meyering <jim@meyering.net>
2783 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
2784 to put a regular file in O_NONBLOCK mode fails with EPERM.
2785 That happens on Linux (up to 2.6.15) when using tail -f on a file with
2786 the append-only attribute. Reported by Dean Gaudet. For details,
2787 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
2788 * NEWS: Mention this fix.
2789 * tests/tail-2/append-only: New file. Test for the above.
2790 * tests/tail-2/Makefile.am (TESTS): Add append-only.
2791 * tests/Makefile.am (check-root): Add tail-2/append-only
2793 2006-01-21 Jim Meyering <jim@meyering.net>
2795 * NEWS: Mention fts-related improvements and bug fixes.
2797 2006-01-19 Jim Meyering <jim@meyering.net>
2799 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
2800 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
2802 2006-01-18 Jim Meyering <jim@meyering.net>
2804 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
2806 2006-01-17 Jim Meyering <jim@meyering.net>
2808 Now that fts no longer changes the current working directory, adjust
2809 its clients accordingly -- note that du.c uses fts but doesn't need
2810 any adjustment, since it doesn't operate on the actual files,
2811 but rather just uses the stat buffers provided by fts.
2813 * src/chown-core.c: Include "openat.h".
2814 Don't include "lchown.h".
2815 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
2816 calling openat, lchownat, chownat, rather than open, lchown, chown.
2818 * src/chmod.c: Include "openat.h".
2819 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
2821 * tests/du/long-from-unreadable: New test, to exercise one small
2824 2006-01-13 Jim Meyering <jim@meyering.net>
2826 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
2827 addition of new directories under tests/.
2829 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
2832 2006-01-12 Jim Meyering <jim@meyering.net>
2834 * tests/du/long-sloop: Adjust not to hard-code the expected
2835 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
2836 from that of GNU libc. Reported by Paul Eggert.
2838 * tests/du/long-sloop: Create file at end of symlink chain.
2840 * tests/misc/test: New file, with a test for one of the
2841 bugs fixed by yesterday's test.c changes.
2842 * tests/misc/Makefile.am (TESTS): Add test.
2844 2006-01-11 Jim Meyering <jim@meyering.net>
2846 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
2847 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
2848 a very long sequence of symbolic links (not necessarily a loop).
2849 * tests/du/Makefile.am (TESTS): Add long-sloop.
2851 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
2853 * src/test.c (test_syntax_error): Append a newline. All callers
2854 changed, except for the ones that didn't already append a newline.
2855 Bug reported by Eric Blake.
2857 2006-01-11 Jim Meyering <jim@meyering.net>
2859 * src/system.h (X2NREALLOC): Now that verify_true is no longer
2860 void, cast its result to void, to avoid gcc's warning that
2861 ``left-hand operand of comma expression has no effect''.
2862 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
2864 2006-01-10 Jim Meyering <jim@meyering.net>
2866 * tests/chmod/no-x: Add a test for today's fts.c fix.
2868 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
2870 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
2871 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
2873 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
2875 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
2876 Use verify_true instead of verify_expr, to sync with gnulib.
2878 2006-01-08 Jim Meyering <jim@meyering.net>
2880 * src/date.c (usage): Adjust the formatting of the entries for
2881 %::z and %:::z (separate with two spaces, not one) so that help2man
2882 formats them properly. Reported by Philip Rowlands.
2884 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
2886 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
2888 2006-01-06 Jim Meyering <jim@meyering.net>
2890 * Makefile.maint (copyright-check): Use date +%Y in place of
2893 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
2894 First off, the attribute should have been `volatile' (not static)
2895 to avoid longjmp-related risk of clobber. Secondly, now there is
2896 no longer any risk of a local variable being clobbered, so there's
2897 no need for any attribute at all.
2899 2006-01-05 Jim Meyering <jim@meyering.net>
2901 * src/remove.c: Give a few functions the inline attribute.
2902 (AD_pop_and_chdir): Use gotos to avoid some duplication.
2903 (AD_push): Rewrite an assertion so that the entire computation
2904 goes away when assertions are turned off.
2906 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
2907 It's already defined in "system.h".
2908 * Makefile.maint: Add a FIXME comment.
2910 2006-01-04 Jim Meyering <jim@meyering.net>
2912 * ChangeLog: Remove entries from 2005-10-22 and earlier.
2913 * ChangeLog-2005: New file, for entries up to version 5.92.
2915 2006-01-03 Jim Meyering <jim@meyering.net>
2917 * tests/du/no-x: Also allow a slightly different diagnostic -- the
2918 one you get when using openat-enabled fts.c and du (coming soon).
2919 * tests/chmod/no-x: Likewise.
2920 * tests/chgrp/no-x: Likewise.
2922 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
2924 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
2926 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
2927 (restricted_chown): Return it, if the file cannot be accessed due
2928 to EPERM, or if no uid or gid are required, or if the file is
2929 neither a directory nor a regular file. Rewrite to avoid gotos.
2930 (change_file_owner): Handle RC_do_ordinary_chown case.
2931 Rewrite to avoid gotos.
2932 * tests/chgrp/basic: Make sure we can change the group of
2935 * src/date.c (usage): Explain %g, %G, and %V a bit better.
2937 2006-01-02 Jim Meyering <jim@meyering.net>
2939 * src/copy.c (set_owner): Correct a comment.
2941 * src/tail.c (parse_options): Change warning to say that --retry
2942 is useful `mainly' (not `only') when following by name.
2943 Reported here: http://bugs.debian.org/273781
2945 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
2947 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
2948 * src/copy.c: Include lchmod.h.
2949 (copy_internal): Use lchmod rather than chmod.
2950 * src/cp.c: Include lchmod.h.
2951 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
2952 * src/mkdir.c: Include lchmod.h.
2953 (usage): Clarify -m's operation.
2954 (main): Use lchmod rather than chmod. Don't use lchmod unless the
2955 new mode contains bits outside the 777 range.
2956 * src/mkfifo.c (usage): Clarify -m's operation.
2957 (main): If -m is given, don't invoke chmod; use umask 0 instead.
2958 Report an error if -m asks for bits outside the 777 range.
2959 * src/mknod.c (usage, main): Likewise.
2961 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
2963 2005-12-27 Jim Meyering <jim@meyering.net>
2965 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
2966 (sc_prohibit_assert_without_use): New rule.
2967 (syntax-check-rules): Add it to the list.
2968 * .x-sc_prohibit_assert_without_use: New empty file.
2969 * Makefile.am (EXTRA_DIST): Add it.
2971 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
2973 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
2974 Don't include <assert.h>; it wasn't used.
2976 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
2978 * src/chown-core.c (restricted_chown):
2979 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
2980 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
2981 | O_NOFOLLOW too, for consistency with other dir-openers.
2982 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
2983 (is_empty_dir): Likewise.
2984 * src/shred.c (wipename): Likewise. Don't bother trying to open
2985 dir for writing, since POSIX prohibits it.
2987 2005-12-22 Jim Meyering <jim@meyering.net>
2989 * tests/help-version: Redirect stderr to /dev/full, to suppress
2990 write error diagnostic.
2992 2005-12-19 Jim Meyering <jim@meyering.net>
2994 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
2995 Avoid a minor race condition when `-m MODE' is specified, by using
2996 open, fchown, and close rather than just chown. To do that reliably --
2997 even with an overly restrictive umask -- ensure that each mkdir,
2998 mknod and mkfifo call uses a mode including at least owner-read access.
2999 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
3000 the subsequent chown (or equivalent open,fchown,close) fails.
3001 * tests/misc/mknod: New tests.
3002 * tests/misc/Makefile.am (TESTS): Add mknod.
3004 2005-12-17 Jim Meyering <jim@meyering.net>
3006 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
3007 e.g., on a named pipe.
3008 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
3009 place of all uses, since it is guaranteed (system.h) to be defined.
3011 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
3013 Add POSIX ACL support
3014 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
3015 is no requirement for ACL support; particularly, it does not exist
3016 on systems that have POSIX ACLs.
3017 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
3018 * src/cp.c (umask_kill): With default acls, the umask is not to be
3019 applied. Remove umask_kill, don't change the process umask, and let
3020 the kernel apply the umask where appropriate.
3021 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
3022 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
3024 (copy_reg, copy_internal): Use copy_acl and set_acl
3025 instead of fchown/chown. Fix the logic for POSIX ACLs.
3026 (chown_succeded): Remove; we now always copy acls and
3027 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
3028 did a chown before or not.
3029 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
3030 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
3031 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
3032 to link with it via $(LIB_ACL), for the utilities that need it.
3034 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
3036 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
3037 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
3038 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
3039 value is now signified by whether cwd_errno is null.
3040 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
3041 pointer-to-bool to pointer-to-errno-value. All callers changed.
3042 (rm_1): Don't bother setting a local cwd failure flag and then
3043 ORing it into the caller's. Just set the caller's.
3044 (rm): Use cwd failure errno value to print a slightly-better
3047 2005-12-15 Jim Meyering <jim@meyering.net>
3049 * src/stat.c (print_it): Properly handle a backslash at the
3050 end of a --printf format string. Reported by Paul Eggert.
3051 * tests/misc/stat-printf (end-bs): Add a test for the above.
3053 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
3055 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
3056 Don't assume /etc/passwd contains user names; use 'id' instead.
3058 2005-12-15 Jim Meyering <jim@meyering.net>
3060 stat: revert behavior of --format=FMT (-c)
3061 stat: add new option: --printf=FMT
3062 * NEWS: Mention this.
3063 * src/stat.c (isodigit, octtobin, hextobin): Define.
3064 (PRINTF_OPTION): Define.
3065 (interpret_backslash_escapes, trailing_delim): New globals.
3066 (usage): Document them. Alphabetize on long option names.
3067 (print_esc_char): New function.
3068 (print_it): Rewrite, in order to handle backslash escapes.
3069 (main): Handle new option. Set globals for --format, too.
3071 * tests/misc/stat-printf: Test --printf and --format.
3072 * tests/misc/Makefile.am (TESTS): Add stat-printf.
3074 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
3076 * NEWS: sort now reports incompatible options.
3077 * src/sort.c (incompatible_options, check_ordering_compatibility):
3079 (main): Use them. Don't bother with a usage message for
3080 "sort -c a b", for consistency with other error diagnostics.
3081 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
3084 * src/cat.c (main): Undo previous change. close_stdout already
3085 does the check, so the previous change wasn't necessary.
3087 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
3089 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
3091 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
3093 Install a more-conservative approach for sort -R. It's the
3094 same basic idea as the existing code, except it uses the full ISAAC
3095 approach (called the "more kosher" approach in the existing comments).
3096 This makes "sort -R" quite a bit slower (about a factor of 2 on my
3097 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
3098 better to be conservative here at first, and review any performance
3099 improvements carefully.
3100 * .x-sc_require_config_h: Add src/rand-isaac.c.
3101 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
3102 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
3103 (shred_SOURCES, sort_SOURCES): Remove.
3104 (EXTRA_DIST): Add rand-isaac.c.
3105 * src/rand-isaac.c: Revert to what used to be in shred.c, without
3106 changing it to allow for varying numbers of words in the state.
3107 Alter so that we include rand-isaac.c directly rather than
3108 compiling it and linking to it. Don't include config.h or
3109 system.h; that's the includer's responsibility.
3110 Omit functions that are specific to shred.
3111 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
3112 (isaac_step, struct irand_state):
3113 Resurrect these, with the same defns that used to be in shred.c.
3114 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
3115 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
3117 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
3118 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
3119 (irand_init, irand32, irand_mod):
3120 Number of words is constant again.
3121 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
3122 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
3123 * src/sort.c: Likewise.
3124 * src/shred.c (fillrand, dopass, main): Undo previous change.
3125 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
3127 * src/sort.c: Don't include md5.h; it wasn't needed.
3128 (struct keyfield): Rename random_hash to random, for consistency
3129 with the other member names. All uses changed.
3130 (usage): Tweak wording to mention STRING for --seed option.
3131 (short_options): Rorder for consistency with other programs.
3132 (rand_state): Now a struct, not a pointer to one. All uses changed.
3133 (HASH_WORDS, HASH_SIZE): Remove.
3134 (get_hash): Remove comments around resbuf size, since we can assume C89.
3135 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
3136 (keycompare): Adjust to the new get_hash.
3138 (badfieldspec): Omit recently-introduced comment; it isn't needed.
3139 (main): Don't set need_random simply because gkey has it set; that
3140 doesn't necessarily mean we'll need random numbers.
3141 Redo seeding to match new get_hash approach.
3143 2005-12-10 Jim Meyering <jim@meyering.net>
3145 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
3147 Avoid shred segfault on 64-bit systems.
3148 * src/rand-isaac.c (isaac_refill): Don't try to negate a
3149 local of type uint32_t. Make the local an `int' instead.
3151 * NEWS: Mention sort's new options.
3153 * src/rand-isaac.c (isaac_mix): Declare to be static.
3154 Mark all other functions as `extern' so the tight-scope
3155 part of `make distcheck' passes once again.
3156 * src/rand-isaac.h (isaac_mix): Remove declaration.
3158 * src/sort.c (get_hash): Change position of `*' in parameter
3159 type to conform with convention.
3160 (main): Split a long line so it fits in 80 columns.
3161 (keycompare): Remove stray SPACE before TAB that was
3162 causing `make distcheck' to fail.
3164 * src/shred.c: Don't include gethrxtime.h. No longer needed.
3166 * tests/misc/sort-rand: New file: basic tests for the new options.
3167 * tests/misc/Makefile.am (TESTS): Add sort-rand.
3169 2005-12-10 Frederik Eaton <frederik@ofb.net>
3171 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
3172 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
3173 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
3174 Make state size runtime-configurable.
3175 (isaac_new, isaac_copy): New functions.
3176 * src/rand-isaac.h: New file.
3177 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
3178 (fillrand, main): Adjust to the fact that the state size is now
3179 runtime-configurable.
3180 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
3181 (usage): Add options --random-sort and --seed to implement a random
3183 Include md5.h and rand-isaac.h.
3184 (get_hash): New function.
3185 (rand_state): New var.
3186 (HASH_WORDS, HASH_SIZE): New macros.
3188 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
3190 * tests/dd/misc: Add test for dd iflags=noatime.
3192 2005-12-09 Jim Meyering <jim@meyering.net>
3194 * src/sort.c (usage): Mention white space vs -b and -t options.
3197 2005-12-09 Eric Blake <ebb9@byu.net>
3199 * src/test.c (main): Fix misleading comment.
3201 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3203 * NEWS: Mention dd's new noatime flag.
3204 * src/system.h (O_NOATIME): Define to 0 if not already defined.
3205 * src/dd.c (flags, usage): Add support for noatime flag.
3207 2005-12-07 Jim Meyering <jim@meyering.net>
3209 Distribute the cvsu script, used only by `make syntax-check'.
3210 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
3211 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
3212 distribute a copy of this script.
3213 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
3215 * tests/mv/acl: exit-77 before the trap, not after, if we fail
3216 to create a temporary directory on another partition.
3217 From Andreas Gruenbacher.
3219 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
3221 * man/basename.x: Cross-reference to dirname and readlink.
3222 * man/dirname.x: Cross-reference to basename and readlink.
3224 2005-12-05 Andreas Gruenbacher
3226 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
3227 (set_owner, preserve_author): New functions, factored out of copy_reg.
3228 (copy_reg): Use them.
3229 (copy_internal): Use them here, too.
3231 2005-12-04 Jim Meyering <jim@meyering.net>
3233 * src/sleep.c (usage): Say what happens with two or more arguments.
3234 Suggested by Justin Pryzby.
3236 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
3239 2005-12-03 Jim Meyering <jim@meyering.net>
3241 * src/rm.c (long_opts): Change the name of each undocumented, for-
3242 testing-only option to start with `-', so that it cannot render
3243 ambiguous any prefix it happens to share with some other option name.
3244 Problem reported by Eric Blake.
3245 * src/head.c (long_options): Likewise.
3246 * src/tail.c (long_options): Likewise.
3248 * tests/misc/head-elide-tail: Update uses of undocumented, for-
3249 testing-only --presume* options to start with `---'.
3250 * tests/rm/dangling-symlink: Likewise.
3251 * tests/rm/dir-no-w: Likewise.
3252 * tests/rm/isatty: Likewise.
3254 2005-11-30 Jim Meyering <jim@meyering.net>
3256 * Makefile.maint: Add a comment about cvsu.
3258 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
3260 * NEWS: df updates for "none", "proc", inaccessible file systems.
3261 * src/df.c (show_point): Ignore inaccessible file systems.
3262 (usage): -a includes dummy file systems, not size-0 file systems.
3264 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
3265 to avoid collision with POSIX name space. All uses changed.
3267 2005-11-24 Jim Meyering <jim@meyering.net>
3269 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
3270 * tests/acl: Add `$0: ' prefix to diagnostics.
3272 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
3274 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
3276 * src/copy.c: Improve performance a bit by optimizing away
3277 unnecessary system calls and going to a block size of at least
3278 8192 (on normal hosts, anyway). This improved performance 5% on my
3279 Debian stable host (2.4.27 kernel, x86, copying from root
3280 ext3 file system to itself).
3281 Include "buffer-lcm.h".
3282 (copy_reg): Omit last argument. All callers changed.
3283 Use xmalloc to allocate rather than trusting alloca
3284 (which is unwise with large block sizes).
3285 Declare locals more locally, if possible.
3286 Use uintptr_t words instead of int words, for a bit more speed
3287 when looking for null blocks on 64-bit hosts.
3288 Optimize away reads of zero bytes on regular files.
3289 In the typical case, insist on 8 KiB buffers, at least.
3290 Avoid unnecessary extra call to fstat when checking for sparse files.
3291 Avoid now-unnecessary cast to off_t, and "0L".
3292 Avoid unnecessary test of *new_dst when checking for same owner
3295 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
3297 * src/remove.c (rm): Don't assume C99 for-loop syntax.
3299 2005-11-22 Jim Meyering <jim@meyering.net>
3301 * src/remove.c (AD_push): Remove debugging cruft.
3303 * tests/rm/unread2 (rm): Change expected diagnostic,
3304 `cannot open directory' to `cannot remove', to align with
3306 * tests/rm/rm2: Ensure that rm now continues removing entries
3307 even after certain types of failure.
3309 * src/remove.c: Rewrite. Now, this module is reentrant on systems
3310 that provide openat (Solaris), and on systems like Linux+procfs
3311 where our openat emulation code is reentrant. This also fixes a
3312 few low-probability leaks and eliminates some code that could,
3313 in very unusual circumstances, cause rm() (via a callee) to exit.
3314 * NEWS: Mention this.
3316 * configure.ac: Put copyright dates all on one line so the
3317 emacs function that updates them works properly.
3319 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3321 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
3322 Problem reported by Eric Blake.
3323 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
3324 we get a standard-conforming compiler. This relies on the new
3325 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
3326 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
3327 m4/c.m4 can go away with Autoconf 2.60 comes out.
3329 2005-11-17 Jim Meyering <jim@meyering.net>
3331 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
3332 (AD_mark_current_as_unremovable): Likewise, but for a local.
3335 * tests/mv/acl: Let traps handle removing temporary directories.
3337 Expect acl-related tests to fail, until the corresponding
3338 patches are committed.
3339 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
3340 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
3342 ACL tests, from Andreas Gruenbacher.
3343 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
3344 * tests/mv/Makefile.am (TESTS): Add acl.
3345 * tests/cp/Makefile.am (TESTS): Add acl.
3347 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
3349 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
3351 * NEWS: Improve quality of ln's diagnostics.
3352 * src/ln.c (do_link, usage): Likewise.
3353 (do_link): Don't use alloca on a buffer of unbounded size.
3355 2005-11-16 Jim Meyering <jim@meyering.net>
3357 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
3358 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
3359 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
3360 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
3361 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3363 2005-11-14 Jim Meyering <jim@meyering.net>
3365 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
3367 2005-11-13 Jim Meyering <jim@meyering.net>
3369 * announce-gen: Accept new option, --gpg-key-id=ID and
3370 emit a blurb telling how to use the .sig files.
3371 * Makefile.cfg (gpg_key_ID): Define.
3372 * Makefile.maint (announcement): Use new option and key.
3374 Require that most .c files include <config.h>.
3375 * Makefile.maint (sc_require_config_h): New rule.
3376 (syntax-check-rules): Add it.
3377 * .x-sc_require_config_h: New file listing exceptions to the
3378 above rule. Some are legit, others are simply grandfathered in.
3379 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
3381 2005-11-12 Jim Meyering <jim@meyering.net>
3383 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
3385 2005-11-11 Jim Meyering <jim@meyering.net>
3387 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
3388 Mention new readlink options in 5.3.0's `New features' section.
3389 Spotted by Thomas Hood.
3391 2005-11-08 Jim Meyering <jim@meyering.net>
3393 * NEWS: Merge in changes from b5_9x branch.
3395 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
3397 * NEWS: ls now defaults to --time-style='locale', which in turn acts
3398 like --time-style='posix-long-iso' if the locale settings are messed up.
3399 * src/ls.c (decode_switches): Implement this.
3401 2005-11-08 Jim Meyering <jim@meyering.net>
3403 * tests/du/2g: s/expensive/very expensive/ in a comment.
3406 2005-10-17 Eric Blake <ebb9@byu.net>
3408 * src/ls.c (usage): Fix descriptions of --sort, --time.
3409 Reported by Vitaly A. Ostanin.
3411 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
3413 * src/ln.c: Include filenamecat.c.
3414 (FILE_BASENAME_CONCAT): Remove.
3415 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
3416 (main): Use file_name_concat, base_name, and strip_trailing_slashes
3417 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
3420 2005-11-04 Jim Meyering <jim@meyering.net>
3422 * src/du.c (process_file): Don't overflow for files of size >= 2^31
3423 on systems with stat.st_blocks of a signed 32-bit type.
3424 This bug causes trouble on some AIX 5.1 systems.
3425 Report and trivial patch from Paul Townsend:
3426 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
3427 * NEWS: Mention this.
3429 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
3430 * tests/du/Makefile.am (TESTS): Add it here.
3431 * tests/very-expensive: New file.
3432 * tests/Makefile.am (EXTRA_DIST): Add it here.
3433 * tests/cp/perm: Mark this test as `very-expensive', too.
3435 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
3437 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
3439 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
3441 * src/rm.c (usage): Don't mention rm -d.
3443 2005-11-02 Jim Meyering <jim@meyering.net>
3445 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
3446 From Andreas Schwab.
3448 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
3449 `M+N records in/out' lines don't pollute `make check' output.
3451 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
3452 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
3453 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
3454 to indicate that the input file should be piped into the command
3455 under test (via `cat FILE | $prog ...').
3457 * src/remove.c (remove_entry): Emit a better diagnostic when rm
3458 (without -r) fails to remove a directory on a non-Linux system.
3459 This change affects only newer Solaris systems (with priv_*
3460 functions like priv_allocset). Reported by Keith Thompson.
3462 * tests/rm/dir-nonrecur: New file/test for the above fix.
3463 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
3465 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
3467 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
3468 POSIX 1002.1-2001 requires.
3469 * src/tail.c (parse_obsolete_option): Implement this.
3470 Problem reported by Vincent Lefevre.
3471 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
3472 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
3473 (test_vector): Add special cases for _POSIX2_VERSION, and
3474 regularize the old ones a bit.
3475 * tests/touch/obsolescent: Add y2000 test.
3477 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
3479 * src/dd.c (skip): Fix off-by-one error reported by
3480 Theodoros V. Kalamatianos.
3482 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3484 * tests/mkdir/p-3: Require that the test be run as non-root.
3485 Problem and trivial fix reported by Theodoros V. Kalamatianos.
3487 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
3489 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
3490 boundary between DEST and SOURCE in the result.
3492 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
3494 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
3495 back to text, to sync with documentation and for backwards
3498 2005-10-25 Jim Meyering <jim@meyering.net>
3500 * tests/dircolors/simple (other-wr): Add an explicit test for
3501 the dircolors bug (NULL-dereference) fixed yesterday.
3503 2005-10-24 Jim Meyering <jim@meyering.net>
3505 * src/tac.c (tac_file): When determining whether a file is seekable,
3506 also test whether it is a tty. Using only the lseek-based test would
3507 give a false positive on Solaris. Reported by Peter Fales.
3509 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
3511 * tests/install/d-slashdot: New test, for "install -d" failure.
3512 * tests/install/Makefile.am (TESTS): Add d-slashdot.
3513 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
3514 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
3516 2005-10-24 Jim Meyering <jim@meyering.net>
3518 * src/dircolors.c (ls_codes): Add missing comma.
3519 Anonymous report and patch from
3520 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
3522 * src/dircolors.c: Add compile-time assertion that the slack_codes
3523 and ls_codes arrays have the same number of elements. This would
3524 have prevented the above-fixed bug.
3526 * src/expand.c (parse_tab_stops): Add a comment to make this function
3527 identical to the one in unexpand.c.
3528 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
3529 identical to the one in expand.c.
3531 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
3533 2005-10-23 Jim Meyering <jim@meyering.net>
3535 * src/md5sum.c (digest_check, main): Use ptr_align rather than
3536 a dangerous pointer-value-to-`unsigned' cast.
3537 * NEWS: mention the new sha* programs.
3538 * AUTHORS: Add new sha* programs.
3540 2005-08-28 David Madore <david.madore@ens.fr>
3542 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
3543 * README: Add their names to the list.
3544 * src/md5sum.c: Provide framework for computing sha-2 hashes.
3545 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
3546 Rules for compiling sha-2 utilities
3547 (noinst_HEADERS): Remove checksum.h.
3548 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
3550 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
3551 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
3552 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
3553 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
3554 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
3555 sha384sum, sha512sum test scripts here rather that each in its
3558 2005-08-28 David Madore <david.madore@ens.fr>
3560 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
3561 of the FIPS test vectors).
3563 2005-10-23 Jim Meyering <jim@meyering.net>
3565 * configure.ac: Use 6.0-cvs as the version string.
3566 * NEWS: Adjust accordingly.
3571 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
3573 Copying and distribution of this file, with or without
3574 modification, are permitted provided the copyright notice
3575 and this notice are preserved.