platform/upstream/coreutils.git
22 years agoUse the version from diffutils-2.8.2.
Jim Meyering [Fri, 14 Jun 2002 07:52:32 +0000 (07:52 +0000)]
Use the version from diffutils-2.8.2.

22 years agoupdate from master sources
Jim Meyering [Thu, 13 Jun 2002 09:30:02 +0000 (09:30 +0000)]
update from master sources

22 years agotweak expected message
Jim Meyering [Wed, 12 Jun 2002 08:02:12 +0000 (08:02 +0000)]
tweak expected message

22 years ago(do_move): Give one diagnostic, not two, when unable to
Jim Meyering [Wed, 12 Jun 2002 08:01:48 +0000 (08:01 +0000)]
(do_move): Give one diagnostic, not two, when unable to
unlink a destination file.  This bug was introduced in fileutils-3.16l.

$ /bin/mv /etc/passwd /tmp
/bin/mv: cannot unlink `/etc/passwd': Permission denied
/bin/mv: cannot remove `/etc/passwd': Permission denied
[Exit 1]

22 years ago(rm): Fix typo in assertion.
Jim Meyering [Wed, 12 Jun 2002 08:00:50 +0000 (08:00 +0000)]
(rm): Fix typo in assertion.

22 years agotweak output: s/ directory//
Jim Meyering [Fri, 7 Jun 2002 14:57:19 +0000 (14:57 +0000)]
tweak output: s/ directory//

22 years ago*** empty log message ***
Jim Meyering [Fri, 7 Jun 2002 14:49:33 +0000 (14:49 +0000)]
*** empty log message ***

22 years agoAlso accept the permission-denied diagnostic
Jim Meyering [Fri, 7 Jun 2002 14:49:21 +0000 (14:49 +0000)]
Also accept the permission-denied diagnostic
issued by some losing systems.  Reported by Volker Borchert.

22 years ago.
Jim Meyering [Fri, 7 Jun 2002 14:44:02 +0000 (14:44 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Fri, 7 Jun 2002 14:43:41 +0000 (14:43 +0000)]
*** empty log message ***

22 years ago(jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
Jim Meyering [Fri, 7 Jun 2002 14:43:36 +0000 (14:43 +0000)]
(jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
They're needed at least for NetBSD 1.5.2.
($statxfs_includes): Include those same headers.
($statxfs_includes): Include sys/vfs.h if available.
($statxfs_includes): Likewise for sys/statvfs.h.
Check for the following members in both structs statfs and statvfs:
f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.

22 years ago*** empty log message ***
Jim Meyering [Fri, 7 Jun 2002 14:39:21 +0000 (14:39 +0000)]
*** empty log message ***

22 years ago(remove_entry): Use DT_IS_DIR only if
Jim Meyering [Fri, 7 Jun 2002 14:39:09 +0000 (14:39 +0000)]
(remove_entry): Use DT_IS_DIR only if
HAVE_STRUCT_DIRENT_D_TYPE is defined.

22 years ago.
Jim Meyering [Thu, 6 Jun 2002 07:48:26 +0000 (07:48 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Mon, 3 Jun 2002 11:07:02 +0000 (11:07 +0000)]
*** empty log message ***

22 years ago(rm invocation): Add the warning (also in the --help output)
Jim Meyering [Mon, 3 Jun 2002 11:06:58 +0000 (11:06 +0000)]
(rm invocation): Add the warning (also in the --help output)
that the contents of a removed file are often recoverable.

22 years ago*** empty log message ***
Jim Meyering [Sun, 2 Jun 2002 21:30:07 +0000 (21:30 +0000)]
*** empty log message ***

22 years ago(enum RM_status) [RM_NONEMPTY_DIR]: New member.
Jim Meyering [Sun, 2 Jun 2002 21:28:41 +0000 (21:28 +0000)]
(enum RM_status) [RM_NONEMPTY_DIR]: New member.
(UPDATE_STATUS): New macro.
Include save-cwd.h.
(struct File_spec): Remove declaration.
Update prototypes.

22 years ago(main): Adapt to new calling sequence for rm.
Jim Meyering [Sun, 2 Jun 2002 20:50:33 +0000 (20:50 +0000)]
(main): Adapt to new calling sequence for rm.

22 years ago(do_move): Adapt to new calling sequence for rm.
Jim Meyering [Sun, 2 Jun 2002 20:50:20 +0000 (20:50 +0000)]
(do_move): Adapt to new calling sequence for rm.

22 years agoMerge in all changes from no-recursion branch.
Jim Meyering [Sun, 2 Jun 2002 20:49:03 +0000 (20:49 +0000)]
Merge in all changes from no-recursion branch.

* src/remove.c (enum Ternary): Define type.
(prompt): Add a parameter.  Adjust callers.
(remove_entry): Attempt rmdir here, only if a directory is
`known' to be empty.  Significant rework.
(remove_dir): Propagate failure `up' also when rmdir fails.

In interactive mode, prompt only once about an empty directory.
* src/remove.c (enum Prompt_action): Define.
(prompt): Two new parameters.  Adjust all callers.

Performance.
* src/remove.c (remove_entry) [!ROOT_CAN_UNLINK_DIRS]:
Don't call rmdir here.

* src/remove.c (AD_pop_and_chdir): Don't use errno (it's not valid)
in diagnostic for changed dev/ino.
(remove_entry): Tweak diagnostic.

* src/remove.c (ROOT_CAN_UNLINK_DIRS): Define.
(AD_pop_and_chdir): Propagate status as we traverse back `up' the tree.
(DO_UNLINK, DO_RMDIR): Define.
(remove_entry) [ROOT_CAN_UNLINK_DIRS]: Add code so this works also on
systems where root can use `unlink' to remove directories.

* src/remove.c: Include file-type.h.
Include file type in prompt when asking whether to remove file.
Based on a patch from Paul Eggert.

* src/remove.c (prompt): Add comment.

* src/remove.c (remove_dir): Fix another (known) leak.

* src/remove.c (hash_freer): New function.
(AD_mark_helper): Use it.
(AD_mark_as_unremovable): xstrdup the filename argument.
(remove_dir): Free directory name.

* src/remove.c (remove_entry): Fail also when trying to remove a
directory without the --recursive option.
Change a diagnostic, s/unlink/remove/, now that it can apply also
to a directory.

* src/remove.c (is_empty_dir): New function.
(prompt): New function, factored out of...
(remove_entry): ...here.  Call it.
(remove_dir): Call prompt before rmdir.

* src/remove.c (remove_entry): Add support for prompting (e.g., -i).

* src/remove.h (UPDATE_STATUS): New macro.
* src/remove.c [AD_ent] (status): New member.  This lets us propagate
the status from a subdirectory to its parent via AD_pop_and_chdir.
(AD_push_initial): Set it.
(AD_push): Likewise.
(remove_cwd_entries): Change return type to enum RM_status, and
adjust all callers.
(rm): Use UPDATE_STATUS rather than open-coding it.

* src/remove.c (remove_entry): New function, factored out of...
(remove_cwd_entries): ...here, and...
(rm_1): ...here.

* src/remove.c (remove_cwd_entries): Add support for --verbose.
(remove_dir): Likewise.
(rm_1): Likewise.

* src/remove.c (rm): Free cwd_state, if necessary.

* src/remove.c (rm_1): Remove now useless (always true)
user_specified_name parameter.  Adjust sole caller.

* src/remove.c (rm): New function.  This interface allows
one to remove multiple arguments at a time.  This is important in
that it allows us to hide the remove_init/remove_fini functions and
the cwd_state parameter.
(rm_1): Renamed from rm.
(remove_init, remove_fini): Remove functions.  Each body is now
part of `rm'.

22 years ago*** empty log message ***
Jim Meyering [Sun, 2 Jun 2002 20:45:46 +0000 (20:45 +0000)]
*** empty log message ***

22 years ago.
Jim Meyering [Sun, 2 Jun 2002 20:39:20 +0000 (20:39 +0000)]
.

22 years ago(TESTS): Add rm5.
Jim Meyering [Sun, 2 Jun 2002 20:39:00 +0000 (20:39 +0000)]
(TESTS): Add rm5.

22 years agoAdjust, now that we no longer report `removing all entries of directory ...'.
Jim Meyering [Sun, 2 Jun 2002 20:37:43 +0000 (20:37 +0000)]
Adjust, now that we no longer report `removing all entries of directory ...'.

22 years agoadjust
Jim Meyering [Sun, 2 Jun 2002 20:36:19 +0000 (20:36 +0000)]
adjust

22 years agodon't give a diagnostic about each parent
Jim Meyering [Sun, 2 Jun 2002 20:35:07 +0000 (20:35 +0000)]
don't give a diagnostic about each parent

22 years ago*** empty log message ***
Jim Meyering [Sat, 1 Jun 2002 09:38:48 +0000 (09:38 +0000)]
*** empty log message ***

22 years agoRemove use of D_TYPE_IN_DIRENT, now that that symbol has been renamed.
Jim Meyering [Sat, 1 Jun 2002 09:38:41 +0000 (09:38 +0000)]
Remove use of D_TYPE_IN_DIRENT, now that that symbol has been renamed.

22 years ago*** empty log message ***
Jim Meyering [Sat, 1 Jun 2002 09:37:58 +0000 (09:37 +0000)]
*** empty log message ***

22 years ago(jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
Jim Meyering [Sat, 1 Jun 2002 09:37:53 +0000 (09:37 +0000)]
(jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.

22 years ago*** empty log message ***
Jim Meyering [Sat, 1 Jun 2002 08:41:31 +0000 (08:41 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Thu, 30 May 2002 07:50:19 +0000 (07:50 +0000)]
*** empty log message ***

22 years ago(copy_reg): Use a temporary to avoid a warning
Jim Meyering [Thu, 30 May 2002 07:49:56 +0000 (07:49 +0000)]
(copy_reg): Use a temporary to avoid a warning
from gcc -W about comparison between signed and unsigned.
(copy_internal): Likewise, but use a cast.

22 years ago.
Jim Meyering [Wed, 29 May 2002 13:16:40 +0000 (13:16 +0000)]
.

22 years agomore acronyms
Jim Meyering [Tue, 28 May 2002 10:03:56 +0000 (10:03 +0000)]
more acronyms

22 years ago*** empty log message ***
Jim Meyering [Tue, 28 May 2002 08:50:57 +0000 (08:50 +0000)]
*** empty log message ***

22 years ago(jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
Jim Meyering [Tue, 28 May 2002 08:50:53 +0000 (08:50 +0000)]
(jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.

22 years agouse a better test
Jim Meyering [Mon, 27 May 2002 21:38:21 +0000 (21:38 +0000)]
use a better test

22 years ago*** empty log message ***
Jim Meyering [Mon, 27 May 2002 20:05:16 +0000 (20:05 +0000)]
*** empty log message ***

22 years agoUse @acronym in place of most uses of @sc.
Jim Meyering [Mon, 27 May 2002 20:05:03 +0000 (20:05 +0000)]
Use @acronym in place of most uses of @sc.

22 years ago(check-texinfo): Adapt to reflect that now we use @acronym{POSIX}.
Jim Meyering [Mon, 27 May 2002 20:01:03 +0000 (20:01 +0000)]
(check-texinfo): Adapt to reflect that now we use @acronym{POSIX}.

22 years ago*** empty log message ***
Jim Meyering [Mon, 27 May 2002 16:44:12 +0000 (16:44 +0000)]
*** empty log message ***

22 years ago(AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace localtime.
Jim Meyering [Mon, 27 May 2002 16:44:07 +0000 (16:44 +0000)]
(AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace localtime.

22 years ago*** empty log message ***
Jim Meyering [Mon, 27 May 2002 16:43:00 +0000 (16:43 +0000)]
*** empty log message ***

22 years agoFix a problem seen only on nonconforming systems whereby ls.c's
Jim Meyering [Mon, 27 May 2002 16:42:55 +0000 (16:42 +0000)]
Fix a problem seen only on nonconforming systems whereby ls.c's
use of localtime, and then of gettimeofday would cause trouble:
the localtime call used to initialize rpl_gettimeofday's save
mechanism would clobber ls's current local time information so
that in any long listing the first file would always be listed
with date 1970-01-01.  Analysis by Volker Borchert.

(localtime): Undefine.
(rpl_localtime): New function.

22 years ago*** empty log message ***
Jim Meyering [Mon, 27 May 2002 15:09:34 +0000 (15:09 +0000)]
*** empty log message ***

22 years ago(jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
Jim Meyering [Mon, 27 May 2002 15:09:29 +0000 (15:09 +0000)]
(jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
use the replacement function; it wouldn't resolve at link time.
Reported by Volker Borchert.

22 years ago*** empty log message ***
Jim Meyering [Sun, 26 May 2002 15:29:17 +0000 (15:29 +0000)]
*** empty log message ***

22 years agoUse @acronym in place of most uses of @sc.
Jim Meyering [Sun, 26 May 2002 15:29:10 +0000 (15:29 +0000)]
Use @acronym in place of most uses of @sc.

22 years agofix typo: s/S_TYPEISTMO/S_TYPEISMQ/
Jim Meyering [Sat, 25 May 2002 22:42:05 +0000 (22:42 +0000)]
fix typo: s/S_TYPEISTMO/S_TYPEISMQ/

22 years agofix typo
Jim Meyering [Sat, 25 May 2002 22:39:13 +0000 (22:39 +0000)]
fix typo

22 years agoremove typo
Jim Meyering [Sat, 25 May 2002 22:39:07 +0000 (22:39 +0000)]
remove typo

22 years agoAdapt for changed format of --verbose output.
Jim Meyering [Fri, 24 May 2002 16:40:33 +0000 (16:40 +0000)]
Adapt for changed format of --verbose output.

22 years ago.
Jim Meyering [Fri, 24 May 2002 14:09:45 +0000 (14:09 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Fri, 24 May 2002 09:01:11 +0000 (09:01 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Fri, 24 May 2002 08:59:17 +0000 (08:59 +0000)]
*** empty log message ***

22 years agorenamed from nice
Jim Meyering [Fri, 24 May 2002 08:37:05 +0000 (08:37 +0000)]
renamed from nice

22 years ago*** empty log message ***
Jim Meyering [Fri, 24 May 2002 08:26:57 +0000 (08:26 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Fri, 24 May 2002 08:24:37 +0000 (08:24 +0000)]
*** empty log message ***

22 years ago(validate_path): Compare the result of the function --
Jim Meyering [Fri, 24 May 2002 08:24:29 +0000 (08:24 +0000)]
(validate_path): Compare the result of the function --
not its (constant) address -- against zero.

22 years agotest for fix in 2.0.13
Jim Meyering [Fri, 24 May 2002 08:23:19 +0000 (08:23 +0000)]
test for fix in 2.0.13

22 years ago*** empty log message ***
Jim Meyering [Fri, 24 May 2002 07:41:19 +0000 (07:41 +0000)]
*** empty log message ***

22 years ago.
Jim Meyering [Thu, 23 May 2002 07:02:11 +0000 (07:02 +0000)]
.

22 years agotweak for new diagnostics
Jim Meyering [Wed, 22 May 2002 09:49:14 +0000 (09:49 +0000)]
tweak for new diagnostics
add a nonempty file

22 years agoInclude "file-type.h", etc.
Jim Meyering [Wed, 22 May 2002 08:39:30 +0000 (08:39 +0000)]
Include "file-type.h", etc.

22 years ago*** empty log message ***
Jim Meyering [Wed, 22 May 2002 08:38:33 +0000 (08:38 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Wed, 22 May 2002 08:38:30 +0000 (08:38 +0000)]
*** empty log message ***

22 years ago.
Jim Meyering [Wed, 22 May 2002 08:37:58 +0000 (08:37 +0000)]
.

22 years ago(libfetish_a_SOURCES): Add file-type.c and file-type.h.
Jim Meyering [Wed, 22 May 2002 08:37:35 +0000 (08:37 +0000)]
(libfetish_a_SOURCES): Add file-type.c and file-type.h.

22 years ago*** empty log message ***
Jim Meyering [Wed, 22 May 2002 08:36:32 +0000 (08:36 +0000)]
*** empty log message ***

22 years ago(S_ISREG, S_ISDIR): Define if not already defined.
Jim Meyering [Wed, 22 May 2002 08:35:31 +0000 (08:35 +0000)]
(S_ISREG, S_ISDIR): Define if not already defined.
(S_TYPEISSEM, S_TYPEISSHM, S_TYPEISTMO): Likewise.

22 years ago(file_type): New file/function. Extracted from diffutils.
Jim Meyering [Wed, 22 May 2002 07:49:35 +0000 (07:49 +0000)]
(file_type): New file/function.  Extracted from diffutils.

22 years ago*** empty log message ***
Jim Meyering [Wed, 22 May 2002 07:33:54 +0000 (07:33 +0000)]
*** empty log message ***

22 years ago[struct dummy]: Renamed. Don't rely on portability of
Jim Meyering [Wed, 22 May 2002 07:33:43 +0000 (07:33 +0000)]
[struct dummy]: Renamed.  Don't rely on portability of
zero-length arrays.  Instead, use sizes of -1 or +1.

22 years ago*** empty log message ***
Jim Meyering [Tue, 21 May 2002 23:15:19 +0000 (23:15 +0000)]
*** empty log message ***

22 years ago(S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR): Define here instead.
Jim Meyering [Tue, 21 May 2002 23:15:05 +0000 (23:15 +0000)]
(S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR): Define here instead.

22 years ago(S_ISLNK, S_ISFIFO S_ISSOCK S_ISCHR S_ISBLK S_ISDOOR): Remove definitions.
Jim Meyering [Tue, 21 May 2002 23:14:42 +0000 (23:14 +0000)]
(S_ISLNK, S_ISFIFO S_ISSOCK S_ISCHR S_ISBLK S_ISDOOR): Remove definitions.

22 years ago.
Jim Meyering [Tue, 21 May 2002 23:08:27 +0000 (23:08 +0000)]
.

22 years ago.
Jim Meyering [Tue, 21 May 2002 23:02:51 +0000 (23:02 +0000)]
.

22 years ago(TESTS): Add rm1, rm2, rm3, rm4.
Jim Meyering [Tue, 21 May 2002 22:59:16 +0000 (22:59 +0000)]
(TESTS): Add rm1, rm2, rm3, rm4.

22 years ago.
Jim Meyering [Tue, 21 May 2002 22:58:48 +0000 (22:58 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Tue, 14 May 2002 21:31:48 +0000 (21:31 +0000)]
*** empty log message ***

22 years agoThis bug was introduced with my change of 2000-10-22 (textutils-2.0.8).
Jim Meyering [Tue, 14 May 2002 21:31:42 +0000 (21:31 +0000)]
This bug was introduced with my change of 2000-10-22 (textutils-2.0.8).

(ulonglong_t): Move declaration to precede new use.
[enum size_spec] (N_SIZE_SPECS): New member.
(width_bytes): Add initializer corresponding to ulonglong_t type.
(struct assert_width_bytes_matches_size_spec_decl): Declare.
Based on a patch from Tony Kocurko.

22 years ago*** empty log message ***
Jim Meyering [Tue, 14 May 2002 21:22:57 +0000 (21:22 +0000)]
*** empty log message ***

22 years agoundo last delta -- it belongs on the no-recursion branch
Jim Meyering [Mon, 13 May 2002 08:50:50 +0000 (08:50 +0000)]
undo last delta -- it belongs on the no-recursion branch

22 years ago.
Jim Meyering [Mon, 13 May 2002 08:50:15 +0000 (08:50 +0000)]
.

22 years ago*** empty log message ***
Jim Meyering [Sun, 12 May 2002 21:47:24 +0000 (21:47 +0000)]
*** empty log message ***

22 years agoAdd FIXME comment.
Jim Meyering [Fri, 3 May 2002 11:46:59 +0000 (11:46 +0000)]
Add FIXME comment.

22 years ago(print_uptime): Fix last change so that we use ngettext properly.
Jim Meyering [Fri, 3 May 2002 11:17:01 +0000 (11:17 +0000)]
(print_uptime): Fix last change so that we use ngettext properly.

22 years ago(print_uptime): Use ngettext for day/days and user/users.
Jim Meyering [Fri, 3 May 2002 09:58:37 +0000 (09:58 +0000)]
(print_uptime): Use ngettext for day/days and user/users.
Suggestion from Karl Eichwalder.

22 years ago*** empty log message ***
Jim Meyering [Fri, 3 May 2002 08:13:18 +0000 (08:13 +0000)]
*** empty log message ***

22 years ago*** empty log message ***
Jim Meyering [Fri, 3 May 2002 08:13:09 +0000 (08:13 +0000)]
*** empty log message ***

22 years ago(usage): Add a little to the description of --list.
Jim Meyering [Fri, 3 May 2002 08:12:25 +0000 (08:12 +0000)]
(usage): Add a little to the description of --list.
Uncapitalize first word and remove period at end of each one line
option description.

22 years ago*** empty log message ***
Jim Meyering [Fri, 3 May 2002 06:57:52 +0000 (06:57 +0000)]
*** empty log message ***

22 years ago(usage): Tweak description of --users.
Jim Meyering [Fri, 3 May 2002 06:57:43 +0000 (06:57 +0000)]
(usage): Tweak description of --users.
From Karl Eichwalder.

22 years ago*** empty log message ***
Jim Meyering [Wed, 1 May 2002 14:23:15 +0000 (14:23 +0000)]
*** empty log message ***

22 years ago.
Jim Meyering [Wed, 1 May 2002 14:22:33 +0000 (14:22 +0000)]
.

22 years ago.
Jim Meyering [Wed, 1 May 2002 11:49:03 +0000 (11:49 +0000)]
.

22 years ago*** empty log message *** SH-UTILS-2_0_12
Jim Meyering [Wed, 1 May 2002 06:56:32 +0000 (06:56 +0000)]
*** empty log message ***