platform/upstream/coreutils.git
21 years agochmod now uses fts to perform a directory traversal when -R is
Jim Meyering [Sun, 19 Oct 2003 18:54:10 +0000 (18:54 +0000)]
chmod now uses fts to perform a directory traversal when -R is
specified.  Before, it operated on full path names, and as such
would encounter the PATH_MAX (often 4096) limit.

Include "xfts.h".
(process_file): Rename from change_file_mode.
Adapt to be used with fts.
(process_files): New function.

21 years ago*** empty log message ***
Jim Meyering [Sat, 18 Oct 2003 13:09:51 +0000 (13:09 +0000)]
*** empty log message ***

21 years agoEnsure that du -D now dereferences all
Jim Meyering [Sat, 18 Oct 2003 13:09:45 +0000 (13:09 +0000)]
Ensure that du -D now dereferences all
symlinks specified on the command line, not just those that
reference directories.

21 years ago.
Jim Meyering [Sat, 18 Oct 2003 10:10:50 +0000 (10:10 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Sat, 18 Oct 2003 10:07:07 +0000 (10:07 +0000)]
*** empty log message ***

21 years agoMost .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
Jim Meyering [Sat, 18 Oct 2003 10:05:47 +0000 (10:05 +0000)]
Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
of 2003-09-19.  Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.

* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.

21 years ago.
Jim Meyering [Sat, 18 Oct 2003 10:05:08 +0000 (10:05 +0000)]
.

21 years agotweak diagnostic to match actual output
Jim Meyering [Sat, 18 Oct 2003 08:41:56 +0000 (08:41 +0000)]
tweak diagnostic to match actual output

21 years ago*** empty log message ***
Jim Meyering [Sat, 18 Oct 2003 08:11:26 +0000 (08:11 +0000)]
*** empty log message ***

21 years ago(parse_long_options): Change prototype: the authors
Jim Meyering [Sat, 18 Oct 2003 08:11:19 +0000 (08:11 +0000)]
(parse_long_options): Change prototype: the authors
string is moved to the end and becomes variadic.

21 years agoInclude stdarg.h.
Jim Meyering [Sat, 18 Oct 2003 08:11:09 +0000 (08:11 +0000)]
Include stdarg.h.
(parse_long_options): Make this function variadic, too.
Call version_etc_va, not version_etc.

21 years agoInclude stdarg.h, stdlib.h.
Jim Meyering [Sat, 18 Oct 2003 08:10:55 +0000 (08:10 +0000)]
Include stdarg.h, stdlib.h.
(version_etc_copyright): Declare as readonly.
(version_etc_va): New function. Provide a different translatable string
for each possible number of authors < 10. Abbreviate when there are 10
authors or more.
(version_etc): Make this function variadic. Call version_etc_va.

21 years agoInclude stdarg.h.
Jim Meyering [Sat, 18 Oct 2003 08:10:31 +0000 (08:10 +0000)]
Include stdarg.h.
(version_etc_copyright): Declare as readonly.
(version_etc): Make this function variadic with a NULL-terminated list
of author name strings.
(version_etc_va): New declaration.

21 years agoregenerate
Jim Meyering [Sat, 18 Oct 2003 06:41:17 +0000 (06:41 +0000)]
regenerate

21 years ago.
Jim Meyering [Sat, 18 Oct 2003 06:40:58 +0000 (06:40 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Sat, 18 Oct 2003 06:40:32 +0000 (06:40 +0000)]
*** empty log message ***

21 years ago($(srcdir)/$x-tests): Pass $(srcdir) as first argument of mk-script.
Jim Meyering [Sat, 18 Oct 2003 06:39:04 +0000 (06:39 +0000)]
($(srcdir)/$x-tests): Pass $(srcdir) as first argument of mk-script.
($(srcdir)/Makefile.am): Likewise.  Prepend $(srcdir) to target.

21 years agoGet $srcdir from first parameter instead of hardcoding it.
Jim Meyering [Sat, 18 Oct 2003 06:38:31 +0000 (06:38 +0000)]
Get $srcdir from first parameter instead of hardcoding it.
(main): Update usage.

21 years ago*** empty log message ***
Jim Meyering [Sat, 18 Oct 2003 05:04:39 +0000 (05:04 +0000)]
*** empty log message ***

21 years ago(usage): Tweak descriptions of -i and -f so that the
Jim Meyering [Sat, 18 Oct 2003 05:04:29 +0000 (05:04 +0000)]
(usage): Tweak descriptions of -i and -f so that the
generated `man' page is more readable.  Suggestion from Dan Jacobson.

21 years ago.
Jim Meyering [Fri, 17 Oct 2003 13:50:12 +0000 (13:50 +0000)]
.

21 years ago.
Jim Meyering [Fri, 17 Oct 2003 13:49:05 +0000 (13:49 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Fri, 17 Oct 2003 13:45:28 +0000 (13:45 +0000)]
*** empty log message ***

21 years agoAdd lib/xfts.c.
Jim Meyering [Fri, 17 Oct 2003 13:45:25 +0000 (13:45 +0000)]
Add lib/xfts.c.

21 years ago*** empty log message ***
Jim Meyering [Fri, 17 Oct 2003 13:41:24 +0000 (13:41 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Fri, 17 Oct 2003 13:41:11 +0000 (13:41 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Fri, 17 Oct 2003 13:37:31 +0000 (13:37 +0000)]
*** empty log message ***

21 years ago(change_file_owner): Handle the cases in
Jim Meyering [Fri, 17 Oct 2003 13:37:23 +0000 (13:37 +0000)]
(change_file_owner): Handle the cases in
which fts_info indicates an error with the given entry.

21 years ago(main): Simply assign to bit_flags.
Jim Meyering [Fri, 17 Oct 2003 13:34:46 +0000 (13:34 +0000)]
(main): Simply assign to bit_flags.
Don't bother with bit arithmetic.

21 years ago.
Jim Meyering [Fri, 17 Oct 2003 13:33:23 +0000 (13:33 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Fri, 17 Oct 2003 13:31:36 +0000 (13:31 +0000)]
*** empty log message ***

21 years ago(TESTS): Add no-x.
Jim Meyering [Fri, 17 Oct 2003 13:31:26 +0000 (13:31 +0000)]
(TESTS): Add no-x.

21 years ago(TESTS): Add no-x.
Jim Meyering [Fri, 17 Oct 2003 13:29:01 +0000 (13:29 +0000)]
(TESTS): Add no-x.

21 years ago*** empty log message ***
Jim Meyering [Fri, 17 Oct 2003 13:28:45 +0000 (13:28 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Fri, 17 Oct 2003 11:12:53 +0000 (11:12 +0000)]
*** empty log message ***

21 years agoInclude "xfts.h".
Jim Meyering [Fri, 17 Oct 2003 11:12:44 +0000 (11:12 +0000)]
Include "xfts.h".
(chown_files): Use xfts_open, rather than fts_open.

21 years agoInclude "xfts.h".
Jim Meyering [Fri, 17 Oct 2003 11:12:11 +0000 (11:12 +0000)]
Include "xfts.h".
(du_files): Use xfts_open, rather than fts_open.

21 years ago(libfetish_a_SOURCES): Add xfts.c and xfts.h.
Jim Meyering [Fri, 17 Oct 2003 11:08:42 +0000 (11:08 +0000)]
(libfetish_a_SOURCES): Add xfts.c and xfts.h.

21 years agotweak comment
Jim Meyering [Fri, 17 Oct 2003 10:50:13 +0000 (10:50 +0000)]
tweak comment

21 years agotweak comment
Jim Meyering [Fri, 17 Oct 2003 10:49:38 +0000 (10:49 +0000)]
tweak comment

21 years ago*** empty log message ***
Jim Meyering [Fri, 17 Oct 2003 08:28:26 +0000 (08:28 +0000)]
*** empty log message ***

21 years agoUpdate from gnulib.
Jim Meyering [Fri, 17 Oct 2003 08:28:13 +0000 (08:28 +0000)]
Update from gnulib.

21 years ago.
Jim Meyering [Fri, 17 Oct 2003 08:27:35 +0000 (08:27 +0000)]
.

21 years agoUpdate from gnulib.
Jim Meyering [Fri, 17 Oct 2003 08:26:58 +0000 (08:26 +0000)]
Update from gnulib.

21 years agoUpdate from gnulib.
Jim Meyering [Fri, 17 Oct 2003 08:26:16 +0000 (08:26 +0000)]
Update from gnulib.

21 years ago.
Jim Meyering [Fri, 17 Oct 2003 06:18:49 +0000 (06:18 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Thu, 16 Oct 2003 09:21:15 +0000 (09:21 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Thu, 16 Oct 2003 08:23:46 +0000 (08:23 +0000)]
*** empty log message ***

21 years agoInclude <errno.h>, <stdlib.h>.
Jim Meyering [Thu, 16 Oct 2003 08:23:41 +0000 (08:23 +0000)]
Include <errno.h>, <stdlib.h>.
(getgroups): First arg is int, not size_t.
Don't let 'free' mangle errno.

21 years ago*** empty log message ***
Jim Meyering [Thu, 16 Oct 2003 07:58:57 +0000 (07:58 +0000)]
*** empty log message ***

21 years agoFix indentation, from gnulib.
Jim Meyering [Thu, 16 Oct 2003 07:58:53 +0000 (07:58 +0000)]
Fix indentation, from gnulib.

21 years ago.
Jim Meyering [Thu, 16 Oct 2003 07:56:35 +0000 (07:56 +0000)]
.

21 years ago(main): Simply assign to bit_flags.
Jim Meyering [Thu, 16 Oct 2003 07:56:02 +0000 (07:56 +0000)]
(main): Simply assign to bit_flags.
Don't bother with bit arithmetic.
Rename a couple of local variables.
Remove unnecessary casts.

21 years ago(main): Simply assign to bit_flags.
Jim Meyering [Thu, 16 Oct 2003 07:51:57 +0000 (07:51 +0000)]
(main): Simply assign to bit_flags.
Don't bother with bit arithmetic.

21 years ago*** empty log message ***
Jim Meyering [Thu, 16 Oct 2003 07:28:12 +0000 (07:28 +0000)]
*** empty log message ***

21 years ago(start_bytes): Rename local, remainder, to avoid
Jim Meyering [Thu, 16 Oct 2003 07:28:01 +0000 (07:28 +0000)]
(start_bytes): Rename local, remainder, to avoid
gcc's warning about shadowing a global.

21 years ago*** empty log message ***
Jim Meyering [Thu, 16 Oct 2003 07:08:47 +0000 (07:08 +0000)]
*** empty log message ***

21 years agoInclude <string.h>, for declarations of memset and memcpy.
Jim Meyering [Thu, 16 Oct 2003 07:07:33 +0000 (07:07 +0000)]
Include <string.h>, for declarations of memset and memcpy.

21 years agoUpdate from gnulib.
Jim Meyering [Thu, 16 Oct 2003 07:05:31 +0000 (07:05 +0000)]
Update from gnulib.

21 years ago*** empty log message ***
Jim Meyering [Thu, 16 Oct 2003 07:05:26 +0000 (07:05 +0000)]
*** empty log message ***

21 years ago(libfetish_a_SOURCES): Add xgethostname.h.
Jim Meyering [Thu, 16 Oct 2003 06:27:37 +0000 (06:27 +0000)]
(libfetish_a_SOURCES): Add xgethostname.h.

21 years agoInclude xgethostname.h.
Jim Meyering [Thu, 16 Oct 2003 06:26:56 +0000 (06:26 +0000)]
Include xgethostname.h.

21 years ago(xgethostname): New file, from gnulib.
Jim Meyering [Thu, 16 Oct 2003 06:26:23 +0000 (06:26 +0000)]
(xgethostname): New file, from gnulib.

21 years ago.
Jim Meyering [Wed, 15 Oct 2003 21:47:54 +0000 (21:47 +0000)]
.

21 years agochange to 5.1.0
Jim Meyering [Wed, 15 Oct 2003 21:25:37 +0000 (21:25 +0000)]
change to 5.1.0

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 21:25:20 +0000 (21:25 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 21:23:53 +0000 (21:23 +0000)]
*** empty log message ***

21 years agoUpdate tests accordingly.
Jim Meyering [Wed, 15 Oct 2003 21:23:46 +0000 (21:23 +0000)]
Update tests accordingly.

21 years ago.
Jim Meyering [Wed, 15 Oct 2003 21:22:02 +0000 (21:22 +0000)]
.

21 years ago.
Jim Meyering [Wed, 15 Oct 2003 21:21:42 +0000 (21:21 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 21:21:34 +0000 (21:21 +0000)]
*** empty log message ***

21 years agoInclude "fts_.h".
Jim Meyering [Wed, 15 Oct 2003 21:21:29 +0000 (21:21 +0000)]
Include "fts_.h".
(WRITTEN_BY): Add my name.
(MAXUID, MAXGID): Remove definitions.  Use GID_T_MAX instead of
the latter.
(usage): Update.
(main): Handle new options.
Call new function, chown_files rather than change_file_owner.

21 years agochown now accepts POSIX-mandated -H, -L, -P options and uses
Jim Meyering [Wed, 15 Oct 2003 21:16:46 +0000 (21:16 +0000)]
chown now accepts POSIX-mandated -H, -L, -P options and uses
fts to perform a directory traversal when -R is specified.
Before, it used explicit recursion, and as such was limited by
the user's stack size to handling hierarchies no deeper than
about 30,000 levels.

Include "userspec.h" and "fts_.h".
(WRITTEN_BY): Add my name.
(getpwnam, getgrnam, getgrgid): Remove declarations.
(endpwent): Remove definition.
(usage): Update
(main): Handle new options.
Call new function, chown_files rather than change_file_owner.

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 14:23:37 +0000 (14:23 +0000)]
*** empty log message ***

21 years agoInclude "userspec.h".
Jim Meyering [Wed, 15 Oct 2003 14:23:25 +0000 (14:23 +0000)]
Include "userspec.h".

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 14:22:19 +0000 (14:22 +0000)]
*** empty log message ***

21 years ago(libfetish_a_SOURCES): Add userspec.h.
Jim Meyering [Wed, 15 Oct 2003 14:22:13 +0000 (14:22 +0000)]
(libfetish_a_SOURCES): Add userspec.h.

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 14:21:51 +0000 (14:21 +0000)]
*** empty log message ***

21 years ago[enum Dereference_symlink]: Remove declaration.
Jim Meyering [Wed, 15 Oct 2003 13:57:21 +0000 (13:57 +0000)]
[enum Dereference_symlink]: Remove declaration.
[struct Chown_option] (recurse, force_silent): Change type to `bool'.
[struct Chown_option] (dereference): Remove member with ambiguous name.
[struct Chown_option] (affect_symlink_referent): New member.
(chown_files): New prototype.

21 years agoRewrite to iterate through hierarchies using fts rather than
Jim Meyering [Wed, 15 Oct 2003 13:56:28 +0000 (13:56 +0000)]
Rewrite to iterate through hierarchies using fts rather than
via explicit recursion.

Include "fts_.h"
(change_file_owner): Rewrite to use FTS* and FTSENT* and to operate
on a single file at a time.
(chown_files): New function.

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 08:39:41 +0000 (08:39 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 07:43:07 +0000 (07:43 +0000)]
*** empty log message ***

21 years ago(ln invocation): Note that --directory, -d, -F
Jim Meyering [Wed, 15 Oct 2003 07:43:04 +0000 (07:43 +0000)]
(ln invocation): Note that --directory, -d, -F
probably won't work even for superuser.

21 years ago(usage): Clarify that --directory, -d, -F probably won't
Jim Meyering [Wed, 15 Oct 2003 07:40:52 +0000 (07:40 +0000)]
(usage): Clarify that --directory, -d, -F probably won't
work even for superuser.  Suggestion from Dan Jacobson.

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 07:27:00 +0000 (07:27 +0000)]
*** empty log message ***

21 years agoSync with gnulib.
Jim Meyering [Wed, 15 Oct 2003 07:26:36 +0000 (07:26 +0000)]
Sync with gnulib.

21 years agoSync with gnulib.
Jim Meyering [Wed, 15 Oct 2003 07:26:01 +0000 (07:26 +0000)]
Sync with gnulib.

21 years ago*** empty log message ***
Jim Meyering [Wed, 15 Oct 2003 07:25:53 +0000 (07:25 +0000)]
*** empty log message ***

21 years ago(parse_field_count): Handle the case where overflow
Jim Meyering [Wed, 15 Oct 2003 07:24:39 +0000 (07:24 +0000)]
(parse_field_count): Handle the case where overflow
and invalid suffix char are both reported.

21 years ago(decode_switches) [TIOCGWINSZ]: Comment out the
Jim Meyering [Tue, 14 Oct 2003 20:59:50 +0000 (20:59 +0000)]
(decode_switches) [TIOCGWINSZ]: Comment out the
warning-inducing test, ws.ws_col <= SIZE_MAX, since it was always
true on Linux.

21 years ago*** empty log message ***
Jim Meyering [Tue, 14 Oct 2003 14:55:18 +0000 (14:55 +0000)]
*** empty log message ***

21 years ago.
Jim Meyering [Tue, 14 Oct 2003 14:44:28 +0000 (14:44 +0000)]
.

21 years ago.
Jim Meyering [Tue, 14 Oct 2003 14:43:59 +0000 (14:43 +0000)]
.

21 years ago*** empty log message ***
Jim Meyering [Tue, 14 Oct 2003 14:04:35 +0000 (14:04 +0000)]
*** empty log message ***

21 years ago*** empty log message ***
Jim Meyering [Tue, 14 Oct 2003 13:58:18 +0000 (13:58 +0000)]
*** empty log message ***

21 years ago(TESTS): Add posix-H.
Jim Meyering [Tue, 14 Oct 2003 13:22:32 +0000 (13:22 +0000)]
(TESTS): Add posix-H.

21 years agoadd a blank line
Jim Meyering [Tue, 14 Oct 2003 09:34:05 +0000 (09:34 +0000)]
add a blank line

21 years ago*** empty log message ***
Jim Meyering [Tue, 14 Oct 2003 09:09:47 +0000 (09:09 +0000)]
*** empty log message ***

21 years agoFix to avoid a denial-of-service attack if the display width is
Jim Meyering [Tue, 14 Oct 2003 09:09:43 +0000 (09:09 +0000)]
Fix to avoid a denial-of-service attack if the display width is
enormous.  Also, clean up the code a bit by removing duplicate code.

(init_column_info): Remove forward decl; no longer needed.
(calculate_columns): New function, that contains code that used
to be common to print_many_per_line and print_horizontal.
(print_many_per_line, print_horizontal): Use it.
(decode_switches): Set max_idx here, not in calculate_columns.
(print_current_files): Don't call init_column_info; calculate_columns
now does that.
(init_column_info): Don't allocate a lot more space than is needed
to represent the current set of files.  Allocate all the new
size_t cells in one call to xnmalloc, rather than a row at a time.

21 years ago*** empty log message ***
Jim Meyering [Tue, 14 Oct 2003 09:04:57 +0000 (09:04 +0000)]
*** empty log message ***