platform/upstream/coreutils.git
18 years ago* src/c99-to-c89.diff: Update offsets.
Jim Meyering [Tue, 26 Sep 2006 22:57:51 +0000 (22:57 +0000)]
* src/c99-to-c89.diff: Update offsets.

18 years ago* NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
Jim Meyering [Tue, 26 Sep 2006 20:42:43 +0000 (20:42 +0000)]
* NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
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.

18 years ago[ChangeLog]
Paul Eggert [Tue, 26 Sep 2006 19:11:25 +0000 (19:11 +0000)]
[ChangeLog]
* 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.

18 years ago* README: Warn not to run autoreconf manually. Use bootstrap instead.
Jim Meyering [Tue, 26 Sep 2006 13:03:03 +0000 (13:03 +0000)]
* README: Warn not to run autoreconf manually.  Use bootstrap instead.

18 years ago* src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
Jim Meyering [Tue, 26 Sep 2006 09:46:35 +0000 (09:46 +0000)]
* src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
Rewrite to avoid using temporary, $status.

18 years ago* NEWS: Mention the bug fix.
Jim Meyering [Tue, 26 Sep 2006 09:28:17 +0000 (09:28 +0000)]
* NEWS: Mention the bug fix.
* src/groups.sh: Don't hide a write failure.
Reported by Iain Calder <ic56@rogers.com>.

18 years ago*** empty log message ***
Jim Meyering [Tue, 26 Sep 2006 09:18:20 +0000 (09:18 +0000)]
*** empty log message ***

18 years ago* .cvsignore: Add fchmodat.c.
Paul Eggert [Tue, 26 Sep 2006 05:21:55 +0000 (05:21 +0000)]
* .cvsignore: Add fchmodat.c.

18 years ago* fchmodat.c: Remove file. gnulib's copy is identical.
Jim Meyering [Mon, 25 Sep 2006 16:58:53 +0000 (16:58 +0000)]
* fchmodat.c: Remove file.  gnulib's copy is identical.

18 years ago* src/chown.c (usage): Clarify --dereference description.
Jim Meyering [Mon, 25 Sep 2006 06:28:34 +0000 (06:28 +0000)]
* src/chown.c (usage): Clarify --dereference description.
* src/chgrp.c (usage): Likewise.  Suggestion from Jamie McClelland.

18 years ago*** empty log message ***
Jim Meyering [Mon, 25 Sep 2006 06:22:35 +0000 (06:22 +0000)]
*** empty log message ***

18 years ago* NEWS: Mention these fixes.
Jim Meyering [Sun, 24 Sep 2006 19:28:25 +0000 (19:28 +0000)]
* NEWS: Mention these fixes.
* 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.

18 years ago.
Jim Meyering [Sun, 24 Sep 2006 19:27:02 +0000 (19:27 +0000)]
.

18 years ago* tests/mv/hard-verbose: New file. Test for the above fix.
Jim Meyering [Sun, 24 Sep 2006 16:55:13 +0000 (16:55 +0000)]
* tests/mv/hard-verbose: New file.  Test for the above fix.
* tests/mv/Makefile.am (TESTS): Add hard-verbose.

18 years ago* tests/help-version (sync_args): Don't call sync, since it spins up
Jim Meyering [Sun, 24 Sep 2006 16:46:41 +0000 (16:46 +0000)]
* tests/help-version (sync_args): Don't call sync, since it spins up
disks that I've deliberately caused to spin down (but not unmounted).

18 years ago* NEWS: Mention the improvement to sort.
Jim Meyering [Sun, 24 Sep 2006 11:44:16 +0000 (11:44 +0000)]
* NEWS: Mention the improvement to sort.

18 years ago* tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
Jim Meyering [Sun, 24 Sep 2006 07:29:44 +0000 (07:29 +0000)]
* tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
as well as existing.

18 years ago* tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
Jim Meyering [Sun, 24 Sep 2006 07:27:00 +0000 (07:27 +0000)]
* tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
since that predated addition of d_type support.

18 years ago* Makefile.am (EXTRA_DIST): Sort file names.
Jim Meyering [Sat, 23 Sep 2006 17:00:29 +0000 (17:00 +0000)]
* Makefile.am (EXTRA_DIST): Sort file names.
Add bootstrap and gl/modules/getloadavg.diff

18 years agoremove trailing blanks
Jim Meyering [Sat, 23 Sep 2006 17:00:08 +0000 (17:00 +0000)]
remove trailing blanks

18 years ago* gl/modules/getloadavg.diff: New file. Work around the way the latest
Jim Meyering [Sat, 23 Sep 2006 16:51:53 +0000 (16:51 +0000)]
* gl/modules/getloadavg.diff: New file.  Work around the way the latest
version of the getloadavg module interacts with our bootstrap script.
* bootstrap (gnulib_tool_options): Add "--local-dir gl".

18 years ago* bootstrap: Add support for --force.
Paul Eggert [Wed, 20 Sep 2006 21:28:26 +0000 (21:28 +0000)]
* bootstrap: Add support for --force.
(usage): New function.  Describe usage less tersely.
(CVS_only_file): New var.

18 years ago* NEWS: Document fix for cp -i and mv -i.
Paul Eggert [Wed, 20 Sep 2006 17:32:14 +0000 (17:32 +0000)]
* NEWS: Document fix for cp -i and mv -i.
* 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.

18 years ago* NEWS: Mention the chmod bug fix.
Jim Meyering [Wed, 20 Sep 2006 13:30:55 +0000 (13:30 +0000)]
* NEWS: Mention the chmod bug fix.

18 years ago*** empty log message ***
Jim Meyering [Wed, 20 Sep 2006 12:41:20 +0000 (12:41 +0000)]
*** empty log message ***

18 years ago* tests/chmod/inaccessible: New test.
Jim Meyering [Wed, 20 Sep 2006 12:38:22 +0000 (12:38 +0000)]
* tests/chmod/inaccessible: New test.
* tests/chmod/Makefile.am (TESTS): Add inaccessible.

18 years agoFix the 2006-09-18 bug differently.
Jim Meyering [Wed, 20 Sep 2006 11:50:46 +0000 (11:50 +0000)]
Fix the 2006-09-18 bug differently.
* 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.

18 years ago* src/chmod.c: Revert last change. There is a better way.
Jim Meyering [Wed, 20 Sep 2006 11:26:18 +0000 (11:26 +0000)]
* src/chmod.c: Revert last change.  There is a better way.
* src/chown-core.c: Likewise.

18 years ago* coreutils.texi (Disk usage): Clarify intro. Problem reported by Van Ly.
Paul Eggert [Tue, 19 Sep 2006 22:39:38 +0000 (22:39 +0000)]
* coreutils.texi (Disk usage): Clarify intro.  Problem reported by Van Ly.

18 years ago* src/ln.c (target_directory_operand): Rewrite to avoid porting
Paul Eggert [Tue, 19 Sep 2006 22:11:38 +0000 (22:11 +0000)]
* src/ln.c (target_directory_operand): Rewrite to avoid porting
problem on Tandem reported by Matthew Woehlke in
<https://savannah.gnu.org/bugs/?17172>.

18 years ago(cp invocation): Clarify cp -i a bit more.
Paul Eggert [Tue, 19 Sep 2006 21:54:01 +0000 (21:54 +0000)]
(cp invocation): Clarify cp -i a bit more.

18 years ago* coreutils.texi (cp invocation): Say that -i and -f are
Paul Eggert [Tue, 19 Sep 2006 16:49:06 +0000 (16:49 +0000)]
* coreutils.texi (cp invocation): Say that -i and -f are
independent.  Clarify -i's behavior.

18 years agoFix bug where chmod, chown, and chgrp did not process operands
Paul Eggert [Mon, 18 Sep 2006 22:09:49 +0000 (22:09 +0000)]
Fix bug where chmod, chown, and chgrp did not process operands
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.

18 years ago* src/shuf.c (main): Quote the entire range when reporting an
Paul Eggert [Mon, 18 Sep 2006 20:38:54 +0000 (20:38 +0000)]
* src/shuf.c (main): Quote the entire range when reporting an
invalid one, rather than just the part that contained the error.

18 years ago* tests/stty/row-col-1: Rewrite to avoid temporary file that is
Paul Eggert [Mon, 18 Sep 2006 20:34:50 +0000 (20:34 +0000)]
* tests/stty/row-col-1: Rewrite to avoid temporary file that is
sometimes left behind if the test is skipped or interrupted.

18 years ago* bootstrap (symlink_to_gnulib): New function.
Paul Eggert [Mon, 18 Sep 2006 20:20:03 +0000 (20:20 +0000)]
* bootstrap (symlink_to_gnulib): New function.
(cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
to copies-of-gnulib.
(cp_mark_as_generated, slurp, gnulib_files):
Avoid making a copy if it's the same as the old version.
(gnulib_files): Add support for this variable (used by Bison).

18 years ago* tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
Paul Eggert [Mon, 18 Sep 2006 16:34:27 +0000 (16:34 +0000)]
* tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
indicating flaw in kernel.  Reword to say that the flaw isn't
serious for coreutils, since the flaw does affect ls -i.

18 years agoFix bug in test case exposed by building on
Paul Eggert [Mon, 18 Sep 2006 16:11:00 +0000 (16:11 +0000)]
Fix bug in test case exposed by building on
Solaris 8 in a setgid directory.  The test case incorrectly
assumed that 'symlink' would be in group $g1.

18 years ago* NEWS: Add a line for 6.3-cvs.
Jim Meyering [Mon, 18 Sep 2006 13:01:09 +0000 (13:01 +0000)]
* NEWS: Add a line for 6.3-cvs.
* configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.

18 years ago.
Jim Meyering [Mon, 18 Sep 2006 08:09:54 +0000 (08:09 +0000)]
.

18 years agoduh COREUTILS-6_2 v6.2
Jim Meyering [Mon, 18 Sep 2006 07:51:48 +0000 (07:51 +0000)]
duh

18 years ago*** empty log message ***
Jim Meyering [Mon, 18 Sep 2006 07:51:33 +0000 (07:51 +0000)]
*** empty log message ***

18 years ago*** empty log message ***
Jim Meyering [Mon, 18 Sep 2006 07:51:07 +0000 (07:51 +0000)]
*** empty log message ***

18 years agoVersion 6.2.
Jim Meyering [Mon, 18 Sep 2006 05:58:55 +0000 (05:58 +0000)]
Version 6.2.
* NEWS: Record the 6.2 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.

18 years ago* tests/chgrp/basic: On an OpenBSD system, rather than failing
Jim Meyering [Sun, 17 Sep 2006 20:58:34 +0000 (20:58 +0000)]
* tests/chgrp/basic: On an OpenBSD system, rather than failing
due to a known problem, merely warn about it.
Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
Instead, use stat to test file system for desired results, directly.
* tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.

18 years ago* tests/envvar-check: Add more variable names to the list of those
Jim Meyering [Sun, 17 Sep 2006 20:29:05 +0000 (20:29 +0000)]
* tests/envvar-check: Add more variable names to the list of those
that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
QUOTING_STYLE, TABSIZE, TERM, TMPDIR.

18 years ago.
Jim Meyering [Sun, 17 Sep 2006 20:15:52 +0000 (20:15 +0000)]
.

18 years ago* NEWS: Document that mkdir -p and install -d now fork on occasion.
Paul Eggert [Sat, 16 Sep 2006 20:03:56 +0000 (20:03 +0000)]
* NEWS: Document that mkdir -p and install -d now fork on occasion.
* 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.

18 years ago* Makefile.maint (sc_require_config_h, sc_prohibit_assert_without_use):
Jim Meyering [Sat, 16 Sep 2006 08:44:18 +0000 (08:44 +0000)]
* Makefile.maint (sc_require_config_h, sc_prohibit_assert_without_use):
Discard stdout from the new use of grep.

18 years ago* bootstrap.conf (gnulib_modules): Add rename-dest-slash.
Jim Meyering [Fri, 15 Sep 2006 14:11:39 +0000 (14:11 +0000)]
* bootstrap.conf (gnulib_modules): Add rename-dest-slash.
The 2006-09-08 changes made it so "mv dir new-name/" would
fail on NetBSD 1.6.  This makes it work once again.

18 years ago* src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
Jim Meyering [Thu, 14 Sep 2006 10:06:42 +0000 (10:06 +0000)]
* src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
Instead, since it's a little fragile, assert the condition.
(target_directory_operand): Update comment to reflect latest change.

18 years ago(print_user): Rewrite to avoid warning from GCC 4.1.1 with -Wall.
Paul Eggert [Tue, 12 Sep 2006 23:32:16 +0000 (23:32 +0000)]
(print_user): Rewrite to avoid warning from GCC 4.1.1 with -Wall.

18 years ago* tests/mv/atomic: Check for specific strace output, rather than
Jim Meyering [Tue, 12 Sep 2006 09:33:40 +0000 (09:33 +0000)]
* tests/mv/atomic: Check for specific strace output, rather than
simply nonempty.  RHEL AS 4 would fail this test due to strace
generating "[ Process PID=14434 runs in 32 bit mode. ]".
Reported by Nelson Beebe.

18 years ago* src/c99-to-c89.diff: Add another set of curly braces.
Jim Meyering [Mon, 11 Sep 2006 13:56:15 +0000 (13:56 +0000)]
* src/c99-to-c89.diff: Add another set of curly braces.

18 years ago* src/remove.c (remove_dir): Move new cache_stat_init call onto
Jim Meyering [Mon, 11 Sep 2006 13:22:04 +0000 (13:22 +0000)]
* src/remove.c (remove_dir): Move new cache_stat_init call onto
it's own line.
(rm_1): Move declaration of "st" and new cache_stat_init call
"down" to nearer where they're used.

18 years ago(eval6): Fix buffer overrun, or bad performance, if
Paul Eggert [Mon, 11 Sep 2006 04:56:43 +0000 (04:56 +0000)]
(eval6): Fix buffer overrun, or bad performance, if
substr's last operand is very large.  Performance problem reported
by Sebastian Kreft.

18 years ago* Makefile.maint (sc_prohibit_assert_without_use): Likewise.
Jim Meyering [Sat, 9 Sep 2006 16:18:57 +0000 (16:18 +0000)]
* Makefile.maint (sc_prohibit_assert_without_use): Likewise.

18 years ago* Makefile.maint (sc_require_config_h): Skip this test if there are no version-
Jim Meyering [Sat, 9 Sep 2006 15:58:36 +0000 (15:58 +0000)]
* Makefile.maint (sc_require_config_h): Skip this test if there are no version-
controlled .c files.

18 years ago.
Jim Meyering [Sat, 9 Sep 2006 15:32:03 +0000 (15:32 +0000)]
.

18 years agorestore leading "@"
Jim Meyering [Sat, 9 Sep 2006 14:59:37 +0000 (14:59 +0000)]
restore leading "@"

18 years ago* Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
Jim Meyering [Sat, 9 Sep 2006 14:59:11 +0000 (14:59 +0000)]
* Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
are no .m4 files.

18 years ago* bootstrap: Export CVS_RSH separate from its assignment, to work
Jim Meyering [Fri, 8 Sep 2006 19:28:46 +0000 (19:28 +0000)]
* bootstrap: Export CVS_RSH separate from its assignment, to work
even with Solaris 10's /bin/sh.  Suggestion from Mark D. Baushke.

18 years agotail now ignores the -f option if POSIXLY_CORRECT is set,
Paul Eggert [Fri, 8 Sep 2006 17:19:51 +0000 (17:19 +0000)]
tail now ignores the -f option if POSIXLY_CORRECT is set,
no file operand is given, and standard input is any FIFO.

18 years agomv and "cp -r" no longer fail when invoked with two arguments
Jim Meyering [Fri, 8 Sep 2006 17:08:53 +0000 (17:08 +0000)]
mv and "cp -r" no longer fail when invoked with two arguments
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.

18 years ago* bootstrap: Use the previously unused variable, $src,
Jim Meyering [Fri, 8 Sep 2006 08:59:31 +0000 (08:59 +0000)]
* bootstrap: Use the previously unused variable, $src,
to avoid repeating "$GNULIB_SRCDIR/$file".

18 years ago* bootstrap (cp_mark_as_generated): Don't use "local", to
Jim Meyering [Fri, 8 Sep 2006 08:57:45 +0000 (08:57 +0000)]
* bootstrap (cp_mark_as_generated): Don't use "local", to
accommodate ancient "/bin/sh".  Suggested by Ralf Wildenhues.
Rename now-global "$src" and "$dst" to have cp_ prefix.
Safer, and avoids confusion.

18 years ago* bootstrap: Fix last-minute typo.
Jim Meyering [Fri, 8 Sep 2006 08:01:17 +0000 (08:01 +0000)]
* bootstrap: Fix last-minute typo.

18 years ago* bootstrap (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
Jim Meyering [Fri, 8 Sep 2006 07:57:21 +0000 (07:57 +0000)]
* bootstrap (cp_mark_as_generated): Don't add C-style comments for .l or .y files.

18 years ago* bootstrap (cp_mark_as_generated): New function.
Jim Meyering [Fri, 8 Sep 2006 06:52:24 +0000 (06:52 +0000)]
* bootstrap (cp_mark_as_generated): New function.
(slurp): Use it to prepend editor hints and a warning that
the file we're copying is generated.
Suggestion from Bruce Korb.

18 years ago* bootstrap: Revert last change. There are less disruptive ways
Jim Meyering [Thu, 7 Sep 2006 21:00:58 +0000 (21:00 +0000)]
* bootstrap: Revert last change.  There are less disruptive ways
to mark these generated files as read-only.

18 years ago* src/c99-to-c89.diff: Update to have proper offsets.
Jim Meyering [Thu, 7 Sep 2006 09:21:00 +0000 (09:21 +0000)]
* src/c99-to-c89.diff: Update to have proper offsets.

18 years agoEnsure that some gnulib-tool-generated files are read-only.
Jim Meyering [Wed, 6 Sep 2006 22:00:15 +0000 (22:00 +0000)]
Ensure that some gnulib-tool-generated files are read-only.
* bootstrap (slurp): Put the body of this function in a sub-shell,
with "umask a-w" so that all new files are read-only.  Remove each
file before we write to it, in case it's read-only.
Make po/Makevars and runtime-po/Makevars read-only, too.

18 years ago* tests/cp/acl: Skip this test when cp lacks ACL support.
Jim Meyering [Tue, 5 Sep 2006 11:50:56 +0000 (11:50 +0000)]
* tests/cp/acl: Skip this test when cp lacks ACL support.
* tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).

18 years ago* src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
Jim Meyering [Tue, 5 Sep 2006 11:12:06 +0000 (11:12 +0000)]
* src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
context from change of 2006-09-02.

18 years ago(Infrastructure changes): make wording more accurate
Jim Meyering [Mon, 4 Sep 2006 07:50:16 +0000 (07:50 +0000)]
(Infrastructure changes): make wording more accurate

18 years ago* README-cvs: Fix typo in update command.
Jim Meyering [Mon, 4 Sep 2006 07:44:56 +0000 (07:44 +0000)]
* README-cvs: Fix typo in update command.

18 years ago* NEWS: Tweak the wording in the new change description so that
Jim Meyering [Sun, 3 Sep 2006 20:16:38 +0000 (20:16 +0000)]
* NEWS: Tweak the wording in the new change description so that
no one can think this change causes e.g., `rm -fr foo../' to fail.

18 years agoUse $CONFIG_HEADER, rather than hard-coding it.
Jim Meyering [Sun, 3 Sep 2006 07:22:08 +0000 (07:22 +0000)]
Use $CONFIG_HEADER, rather than hard-coding it.
* tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.

18 years ago* tests/rm/inaccessible: Adjust for movement of config.h to lib/.
Jim Meyering [Sun, 3 Sep 2006 07:18:52 +0000 (07:18 +0000)]
* tests/rm/inaccessible: Adjust for movement of config.h to lib/.

18 years agorm now rejects attempts to remove /, ./, and ../.
Paul Eggert [Sun, 3 Sep 2006 02:56:51 +0000 (02:56 +0000)]
rm now rejects attempts to remove /, ./, and ../.

18 years ago(Treating / specially): --preserve-root is
Paul Eggert [Sun, 3 Sep 2006 02:56:34 +0000 (02:56 +0000)]
(Treating / specially): --preserve-root is
now the default for rm.
(rm invocation): Likewise.  Also, document that you can't
remove `.' or `..'.  Use the POSIX term "root directory"
rather than the more-ambiguous "file system root".

18 years agoNew file.
Paul Eggert [Sun, 3 Sep 2006 02:55:32 +0000 (02:55 +0000)]
New file.

18 years ago(TESTS): Add r-4.
Paul Eggert [Sun, 3 Sep 2006 02:55:20 +0000 (02:55 +0000)]
(TESTS): Add r-4.

18 years agoDon't include dirname.h, since system.h does it now.
Paul Eggert [Sun, 3 Sep 2006 02:54:51 +0000 (02:54 +0000)]
Don't include dirname.h, since system.h does it now.
(cache_fstatat, cache_stat_init): New functions.
(cache_statted, cache_stat_ok): New functions.
(write_protected_non_symlink): Remove struct stat ** buf_p arg,
which is no longer needed with the new functions.  All callers
changed.
(prompt, is_dir_lstat, remove_entry, remove_dir):
New struct stat * arg.  All callers changed.
(write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
(remove_cwd_entries, remove_dir, rm_1):
Use and maintain the file status cache.
(prompt, remove_entry): Omit the first "directory" in the diagnostic
"Cannot remove directory `foo': is a directory".  This causes "rm"
to pass a test case that it would otherwise fail now that it
"knows" more about its argument.  I think the diagnostic is better
without the first "directory" anyway.
(prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
(rm_1): Reject attempts to remove /, ./, or ../.

18 years agoFix comment.
Paul Eggert [Sun, 3 Sep 2006 02:54:16 +0000 (02:54 +0000)]
Fix comment.

18 years agoDon't include dirname.h, since system.h does it now.
Paul Eggert [Sun, 3 Sep 2006 02:53:58 +0000 (02:53 +0000)]
Don't include dirname.h, since system.h does it now.
(usage, main): --preserve-root is now the default.

18 years agoInclude "dirname.h", since dot_or_dotdot needs it
Paul Eggert [Sun, 3 Sep 2006 02:53:37 +0000 (02:53 +0000)]
Include "dirname.h", since dot_or_dotdot needs it
now.
(dot_or_dotdot): Succeed even if "." or ".." is followed by a
slash.

18 years agoDon't include dirname.h, since system.h does it now.
Paul Eggert [Sun, 3 Sep 2006 02:53:16 +0000 (02:53 +0000)]
Don't include dirname.h, since system.h does it now.

18 years agorm now rejects attempts to remove /, ./, and ../.
Paul Eggert [Sun, 3 Sep 2006 02:50:41 +0000 (02:50 +0000)]
rm now rejects attempts to remove /, ./, and ../.

18 years agoFix typo in previous change; an unsigned int wasn't converted to
Paul Eggert [Fri, 1 Sep 2006 22:07:18 +0000 (22:07 +0000)]
Fix typo in previous change; an unsigned int wasn't converted to
uintmax_t at the right time.  Problem reported by Bruno.

18 years agoUpdate to match current gnulib.
Paul Eggert [Fri, 1 Sep 2006 19:44:43 +0000 (19:44 +0000)]
Update to match current gnulib.

18 years ago* m4/jm-macros.m4 (gl_MACROS): Call cu_PREREQ_STAT_PROG rather
Paul Eggert [Fri, 1 Sep 2006 19:40:46 +0000 (19:40 +0000)]
* m4/jm-macros.m4 (gl_MACROS): Call cu_PREREQ_STAT_PROG rather
than AC_REQUIREing, so that sys/mount.h isn't tested for after
the test result.  I'm not sure why this fix is needed, but it
works.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Revamp to reflect better
what stat.c actually needs.
* src/stat.c: Include <stddef.h>
(alignof): New macro.
(HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
Remove.
(STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
(FSID_VAL): Remove.
(print_statfs): If f_fsid isn't an integer, grab its words one
at a time in little-endian order.  This is a bit easier to configure
and should avoid a compilation failure on MacOS reported by Bruno
Haible.

18 years ago* src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
Paul Eggert [Tue, 29 Aug 2006 21:53:29 +0000 (21:53 +0000)]
* src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
work around a Mac OS X porting problem reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
(print_statfs): Use them.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Check for __val versus val
components of fsid.  Omit some checks that stat.c doesn't care about.

18 years ago* bootstrap.conf (gnulib_modules): Add isapipe.
Paul Eggert [Tue, 29 Aug 2006 20:50:21 +0000 (20:50 +0000)]
* bootstrap.conf (gnulib_modules): Add isapipe.
* src/tail.c: Include isapipe.h.
(IS_PIPE_LIKE_FILE_TYPE): Remove.
(IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
tailable, since this seems to be portable.
(main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.

18 years ago* src/system.h (LOCALEDIR): Remove, since configmake.h now defines
Paul Eggert [Tue, 29 Aug 2006 14:26:52 +0000 (14:26 +0000)]
* src/system.h (LOCALEDIR): Remove, since configmake.h now defines
it for us.

18 years ago(main): Don't test whether macros like
Paul Eggert [Tue, 29 Aug 2006 00:32:33 +0000 (00:32 +0000)]
(main): Don't test whether macros like
S_ISLNK are defined, since they're always defined now.

18 years ago* src/copy.c (copy_internal): Don't test whether macros like
Paul Eggert [Mon, 28 Aug 2006 23:29:38 +0000 (23:29 +0000)]
* src/copy.c (copy_internal): Don't test whether macros like
S_ISLNK are defined, since they're always defined now.
* src/cp.c (main): Likewise.
* src/ln.c (main): Likewise.
* src/ls.c (get_link_name, make_link_name): Likewise.
* src/mkfifo.c (usage): Likewise.
* src/who.c (S_IWGRP): Likewise.

18 years agoAdjust to recent gnulib changes for the gnulib module.
Paul Eggert [Mon, 28 Aug 2006 23:05:13 +0000 (23:05 +0000)]
Adjust to recent gnulib changes for the gnulib module.
* bootstrap.conf (gnulib_modules): Add fcntl.
* src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove.  Other code
is already assuming these macros are defined.
(O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
(O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
Remove; the fcntl module now handles these.

18 years agoAdjust to recent gnulib changes for the inttypes module.
Paul Eggert [Mon, 28 Aug 2006 20:51:56 +0000 (20:51 +0000)]
Adjust to recent gnulib changes for the inttypes module.
* bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
(excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
* src/system.h: Don't bother to include <stdint.h>, since we can
now assume inttypes.h does the equivalent of including stdint.h.

18 years agoUse http://, not https:// for savannah.gnu.org bug URLs.
Jim Meyering [Sun, 27 Aug 2006 19:59:15 +0000 (19:59 +0000)]
Use , not https:// for savannah.gnu.org bug URLs.