summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2006-10-14* src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.Jim Meyering
Instead, include "exit.h". This hereby retires the work-around for "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
2006-10-14* src/cksum.c (uint_fast32_t): Don't define.Jim Meyering
Instead, include <stdint.h>.
2006-10-14* src/pinky.c: Don't include stat-macros.h; system.h already does it.Jim Meyering
2006-10-14* src/pinky.c (S_IWGRP): Don't define.Jim Meyering
Instead, include "stat-macros.h".
2006-10-14* NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2Jim Meyering
to dir1/dir2~. * src/copy.c (copy_internal): Although we do create a backup of each destination directory when in move mode, don't do that when copying. Reported by Peter Breitenlohner, in <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>. * tests/cp/backup-dir: New file. Test for the above.
2006-10-13More chown/chgrp dereferencing-related fixes.Jim Meyering
* src/chown-core.c (change_file_owner): Don't use fts_statp if we're dereferencing symlinks. Reverse conjuncts, so that we use dereference file_stats (aka ent->fts_statp) only *after* we've confirmed that chopt->affect_symlink_referent is true. Otherwise, we might use ent->fts_statp uninitialized. Don't turn on FTS_NOSTAT when dereferencing symlinks. * tests/chown/deref: Update the expected diagnostic, now that this test case (trying to use "chown --dereference ..." on a dangling symlink) takes a different code path.
2006-10-13* src/chown-core.c (change_file_owner): Use fstatat, not stat,Jim Meyering
now that we're using fts_open with FTS_CWDFD. * tests/chgrp/posix-H: Add --preserve-root to an invocation of chgrp, to exercise the above fix.
2006-10-13* src/du-tests: Clean up a little, though it's still not portable.Jim Meyering
2006-10-12* configure.ac: Avoid compiler warnings about default returnJim Meyering
type in function definitions and unused variables in tests. * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed if this is #defined.
2006-10-11* src/ls.c (usage): Correct description of -s, --size.Jim Meyering
It works even without -l. Suggestion from Karl Berry.
2006-10-10* src/ls.c (quote_name): Use initializer rather than memset toPaul Eggert
initialize an object to zero. This is easier to read and is less likely to introduce an runtime error due to a mixup. It causes gcc -W to issue a warning, but you can work around this by appending -Wno-missing-field-initializers. * src/pathchk.c (portable_chars_only): Likewise. * src/shred.c (main): Likewise. * src/stty.c (main): Likewise. * src/tr.c (card_of_complement): Likewise. * src/wc.c (wc): Likewise.
2006-10-09* src/sort.c (usage): Mention again that sort fields are origin 1.Paul Eggert
2006-10-09Avoid a compiler warning.Jim Meyering
* src/pathchk.c (portable_chars_only): Initialize variable of type mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
2006-10-07* src/install.c (make_ancestor): New arg COMPONENT.Paul Eggert
* src/mkdir.c (make_ancestor): Likewise. * tests/install/basic-1: Check for install -Dv bug.
2006-10-06Fix bug reported today by Mike Frysinger: mkdir -pv is logging thePaul Eggert
wrong file name in some cases. * src/install.c (struct install_options): New type. (install_file_in_file_parents, main): Use it instead of struct cp_options. (process_dir): Remember the full name. (announce_mkdir, make_ancestor): Use the full name in announcements. * src/mkdir.c (struct mkdir_options): Add full_name member. (make_ancestor): Use the full name in announcements. (process_dir): Remember the full name. * tests/mkdir/Makefile.am (TESTS): Add p-v. * tests/mkdir/p-v: New file, to test this bug.
2006-10-06* src/c99-to-c89.diff: Update to reflect new offsets.Jim Meyering
2006-10-05* src/chgrp.c: Don't include lchown.h; no longer needed.Paul Eggert
* src/chown.c: Likewise.
2006-10-05* src/dd.c (flags): noatime and nofollow now depend onPaul Eggert
HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too. (usage): Output info about noatime and nofollow only if they are known to work. * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather than O_NOFOLLOW, when testing whether it's possible to avoid a race condition reliably.
2006-10-03* src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4Paul Eggert
MiB, since XFS hosts can legitimately have large values of st_blksize. Problem reported by Tony Ernst in <http://savannah.gnu.org/bugs/?17903>.
2006-10-03* src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.Jim Meyering
Paul Eggert pointed out that the specified file may exist, in spite of such an errno value. * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long. * tests/rm/ignore-name-too-long: Remove file.
2006-10-03* src/c99-to-c89.diff: Convert two c99'isms -- one in remove.cJim Meyering
and one in shred.c -- that were added before coreutils-6.3. Reported by Michael Deutschmann.
2006-10-03* src/c99-to-c89.diff: Update to reflect new offsets.Jim Meyering
2006-10-03* src/remove.c (remove_entry): With -f, exit successfully in spiteJim Meyering
of a missing file under some very unusual conditions (with errno being any of ENOENT, ENOTDIR, ENAMETOOLONG).
2006-10-03With --force (-f), rm no longer fails for ENOTDIR.Jim Meyering
* src/remove.c (ignorable_missing): New function. Use it everywhere, rather than open-coding the test. Andreas Schwab reported the ENOTDIR problem. (ignorable_missing): Similarly, don't fail for ENAMETOOLONG. * NEWS: Mention the bug fix. * tests/rm/ignorable: New file. Test for the ENOTDIR case. * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG. * tests/rm/Makefile.am (TESTS): Add the new file names.
2006-09-30* src/c99-to-c89.diff: Update offsets.Jim Meyering
2006-09-29* src/shuf.c (read_input): Fix an off-by-one error thatJim Meyering
would cause an infloop for piped input of 8KB or more. * NEWS: Mention the fix. * tests/misc/shuf: Test for the above fix.
2006-09-29[ChangeLog]Jim Meyering
Since any system may be affected by the Darwin readdir bug, perform the extra rewinddir unconditionally. The performance impact of rewinding a directory is negligible. * src/remove.c (NEED_REWIND): Define to use CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally. [m4/ChangeLog] * readdir.m4: Remove file once again. * jm-macros.m4: Remove reference to gl_FUNC_READDIR.
2006-09-29Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+Jim Meyering
and NFS, whereby rm would not remove all files in a directory. * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10. (NEED_REWIND): New macro, so that we incur the cost of the work-around rewinddir only on afflicted systems. * NEWS: Clarify and correct. * tests/rm/readdir-bug: New file. Test for the above fix. * tests/rm/Makefile.am (TESTS): Add it. Prompted by testing and analysis from Bruno Haible: http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
2006-09-26* src/c99-to-c89.diff: Update offsets.Jim Meyering
2006-09-26* NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that keptJim Meyering
it from removing a directory containing 188 or more entries. * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by 20, go work around the buggy readdir on Darwin 8.6.1 with NFS. Reported by Matthew Woehlke.
2006-09-26[ChangeLog]Paul Eggert
* NEWS: "groups user" no longer outputs "user :"; you need at least two users. "groups" now processes options like --help more compatibly. * src/groups.sh: Implement the option-processing change. Handle user and group names with special characters more robustly. Report write errors instead of exiting silently with status 1. [doc/ChangeLog] * coreutils.texi (groups invocation): "groups" no longer prefixes the output with "user :" unless more than one user is specified.
2006-09-26* src/groups.sh: When invoked with 0 or 1 argument, just exec "id".Jim Meyering
Rewrite to avoid using temporary, $status.
2006-09-26* NEWS: Mention the bug fix.Jim Meyering
* src/groups.sh: Don't hide a write failure. Reported by Iain Calder <ic56@rogers.com>.
2006-09-25* src/chown.c (usage): Clarify --dereference description.Jim Meyering
* src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
2006-09-24* NEWS: Mention these fixes.Jim Meyering
* src/copy.c (copy_reg): With --verbose (-v), print "removed `file_name'" just after unlinking a file. (copy_internal): Likewise, in three more places. Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
2006-09-20* NEWS: Document fix for cp -i and mv -i.Paul Eggert
* src/copy.c (copy_internal): With -i, prompt even if the source is a directory and the destination is not. This is required by POSIX and gives the user a chance to bail out before failing. * tests/cp/Makefile.am (TESTS): Add cp-i. * tests/cp/cp-i: New file. * tests/mv/Makefile.am (TESTS): Add i-5. * tests/mv/i-5: New file.
2006-09-20Fix the 2006-09-18 bug differently.Jim Meyering
* src/chmod.c: (process_file): Upon FTS_NS for a top-level file, tell fts_read to stat the file again, in case it has become accessible since the initial fts_open call. * src/chown-core.c (change_file_owner): Likewise.
2006-09-20* src/chmod.c: Revert last change. There is a better way.Jim Meyering
* src/chown-core.c: Likewise.
2006-09-19* src/ln.c (target_directory_operand): Rewrite to avoid portingPaul Eggert
problem on Tandem reported by Matthew Woehlke in <https://savannah.gnu.org/bugs/?17172>.
2006-09-18Fix bug where chmod, chown, and chgrp did not process operandsPaul Eggert
left-to-right in some cases. * src/chmod.c (wd_errno): New var. (chmod_file): New function, with most of the contents of the old prcess_file function. (process_files): Use it. This gives file names to fts one at a time, so that they are processed left-to-right as POSIX requires. * src/chown-core.c (wd_errno, chown_files): Likewise. (chown_file): New function. * tests/install/basic-1: Redo test so as to not workaround the chmod bug, thereby testing for it.
2006-09-18* src/shuf.c (main): Quote the entire range when reporting anPaul Eggert
invalid one, rather than just the part that contained the error.
2006-09-16* NEWS: Document that mkdir -p and install -d now fork on occasion.Paul Eggert
* bootstrap.conf (gnulib_modules): Add savewd. * src/install.c: Include savewd.h. (process_dir): New function. (main, install_file_in_file_parents): Use it, along with the new savewd module, to avoid some race conditions. * src/mkdir.c: Include savewd.h. (struct mkdir_options): New members make_ancestor_function, mode, mode_bits. (make_ancestor): Return 1 if the resulting directory is not readable. (process_dir): New function. (main): Use it, along with new savewd module, to avoid some race conditions. Fill in new slots of struct mkdir_options, so that callees get the values. * tests/install/basic-1: Test for coreutils 5.97 bug that was fixed in coreutils 6.0, and which should still be fixed with this change. * tests/mkdir/p-3: Likewise.
2006-09-14* src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.Jim Meyering
Instead, since it's a little fragile, assert the condition. (target_directory_operand): Update comment to reflect latest change.
2006-09-12(print_user): Rewrite to avoid warning from GCC 4.1.1 with -Wall.Paul Eggert
2006-09-11* src/c99-to-c89.diff: Add another set of curly braces.Jim Meyering
2006-09-11* src/remove.c (remove_dir): Move new cache_stat_init call ontoJim Meyering
it's own line. (rm_1): Move declaration of "st" and new cache_stat_init call "down" to nearer where they're used.
2006-09-11(eval6): Fix buffer overrun, or bad performance, ifPaul Eggert
substr's last operand is very large. Performance problem reported by Sebastian Kreft.
2006-09-08tail now ignores the -f option if POSIXLY_CORRECT is set,Paul Eggert
no file operand is given, and standard input is any FIFO.
2006-09-08mv and "cp -r" no longer fail when invoked with two argumentsJim Meyering
where the first one names a directory and the second name ends in a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B, now succeeds, once more. This reverts part of the 2004-06-27 change for 5.3.0. * NEWS: Say the above. * src/mv.c (target_directory_operand): Don't require (here) that the target operand "look like" a directory. This change pushes the test down to the rename syscall level, where a "mv dir existing-non-dir/" will mistakenly succeed on older systems that ignore trailing slashes in the rename destination argument. * src/cp.c (target_directory_operand): Likewise, but for cp. * tests/mv/trailing-slash: Exercise the above fixes. * tests/cp/trailing-slash: New file. * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
2006-09-07* src/c99-to-c89.diff: Update to have proper offsets.Jim Meyering