Commit Graph
22888 Commits
Author SHA1 Message Date
Jim Meyering 4ec1048283 *** empty log message *** 2004-06-17 14:41:34 +00:00
Jim Meyering 05c93d0212 *** empty log message *** 2004-06-17 14:40:51 +00:00
Jim Meyering 65f4c6c6bf (yes invocation): "--" is now supported.
(false invocation, true invocation): --help and --version now
work unconditionally.
2004-06-17 14:38:52 +00:00
Jim Meyering 72f51d66bf (main): Recognize --help and --version even if POSIXLY_CORRECT is set. 2004-06-17 14:34:07 +00:00
Jim Meyering 7870fa1081 (main): Handle "--". 2004-06-17 13:09:21 +00:00
Jim Meyering 417a1e5850 *** empty log message *** 2004-06-17 06:46:39 +00:00
Jim Meyering 83e722f66c (GL_FUNC_GETCWD_PATH_MAX): Fix typo: getcwd
was being replaced when it shouldn't have been, and vice versa.
2004-06-17 06:46:33 +00:00
Jim Meyering 75e49a2b17 Remove special cases for POSIXLY_CORRECT when POSIX allows the GNU behavior.
(pr invocation, unlink invocation): Document this.
2004-06-15 21:56:15 +00:00
Jim Meyering 1f3a9c7888 *** empty log message *** 2004-06-15 21:55:28 +00:00
Jim Meyering f888b66ec1 *** empty log message *** 2004-06-15 18:04:54 +00:00
Jim Meyering a77a16acbf Adjust to the new semantics for \x if POSIXLY_CORRECT. 2004-06-15 18:04:47 +00:00
Jim Meyering ba01709da8 (main): Recognize --help, --version even if
POSIXLY_CORRECT.  POSIX does not specify any options, but it
does not prohibit options either, so "unlink" is like "expr" here.
2004-06-15 18:04:13 +00:00
Jim Meyering b10701b78e (parse_obsolescent_option): Support multiple file operands
even if POSIXLY_CORRECT, since POSIX does not require a diagnostic.
2004-06-15 18:00:58 +00:00
Jim Meyering 5afcf8697f (print_esc): Support \x, \u, \U even if POSIXLY_CORRECT,
since POSIX says the behavior is unspecified here.
(main): Recognize --help, --version even if
POSIXLY_CORRECT.  POSIX does not specify any options, but it
does not prohibit options either, so "printf" is like "expr" here.
2004-06-15 18:00:35 +00:00
Jim Meyering db2fa4fdcd Include "hard-locale.h".
(main): When in a non-POSIX locale, ignore POSIXLY_CORRECT, since
POSIX specifies the behavior only in the POSIX locale.
2004-06-15 18:00:20 +00:00
Jim Meyering 1391da81e0 (decode_switches): Pay attention to TABSIZE even if POSIXLY_CORRECT
is set.  POSIX reserves upper-case environment variables to the
implementation, so it's OK for ls to depend on TABSIZE.
2004-06-15 18:00:03 +00:00
Jim Meyering 5034e6bdb2 *** empty log message *** 2004-06-14 18:12:44 +00:00
Jim Meyering 78fcbf003a . 2004-06-14 17:21:55 +00:00
Jim Meyering 72d3fd67af *** empty log message *** 2004-06-14 17:20:29 +00:00
Jim Meyering 5956d74d8b (TESTS): Add pwd.
(BUILD_SRC_DIR): Define BUILD_SRC_DIR.
2004-06-14 17:20:19 +00:00
Jim Meyering 8b7c9bce6f *** empty log message *** 2004-06-14 17:19:52 +00:00
Jim Meyering 8812a1f12a New test, for fix of 2004-04-19. 2004-06-14 17:19:46 +00:00
Jim Meyering 4983ce64d8 *** empty log message *** 2004-06-14 14:40:21 +00:00
Jim Meyering b276da216d Remove declaration of euidaccess.
Instead, include "euidaccess.h".
2004-06-14 14:40:12 +00:00
Jim Meyering 773c6cc76b *** empty log message *** 2004-06-13 22:03:11 +00:00
Jim Meyering 5bca9fb5f3 (PIDSTR_DECL_AND_INIT): Don't assume pid_t fits in int.
(UT_ID) [!HAVE_STRUCT_XTMP_UT_ID]: Remove bogus comment,
as (sizeof "??") reliably returns 3.
(print_line): Guard against idle and pid being too long
(which is possible when printing headers).
(print_user): Allocate enough bytes for idlestr.  Use IDLESTR_LEN.
Avoid unnecessary cast of sizeof to int.
(make_id_equals_comment): Do not assume that UT_ID returns
a string; it might return a non-null-terminated array.
Use strncat instead.  It's not very often where strncat is
exactly what you want, but this is one of those rare cases.
2004-06-13 22:03:07 +00:00
Jim Meyering ae2fbd3ee7 *** empty log message *** 2004-06-12 08:07:41 +00:00
Jim Meyering 33c1c51c49 (extract_trimmed_name): Don't apply strchr to a
non-string; this leads to undefined behavior.
2004-06-12 08:07:30 +00:00
Jim Meyering b5e189c8ef *** empty log message *** 2004-06-12 08:06:12 +00:00
Jim Meyering 69cf3d4811 (list_entries_who): Don't output a trailing space. 2004-06-12 08:05:59 +00:00
Jim Meyering 7b4fe61887 *** empty log message *** 2004-06-09 15:13:33 +00:00
Jim Meyering 315eae50a5 (AC_FUNC_CALLOC): Remove use of AN_FUNCTION. 2004-06-09 15:13:27 +00:00
Jim Meyering 24c8603356 *** empty log message *** 2004-06-09 14:47:36 +00:00
Jim Meyering d25e88d25a (usage): Improve wording in description of the --time=WORD option. 2004-06-09 14:47:29 +00:00
Jim Meyering 0774a224fe Adjust to accommodate Paul Eggert's changes of 2004-06-08. 2004-06-09 14:45:38 +00:00
Jim Meyering fc61fc852f *** empty log message *** 2004-06-09 13:54:21 +00:00
Jim Meyering d46131360a (change_file_owner): Change names of parameters
old_uid and old_gid to required_uid and required_gid respectively.
2004-06-09 13:54:11 +00:00
Jim Meyering ce487455bd *** empty log message *** 2004-06-09 13:37:58 +00:00
Jim Meyering e4ccef8ddc Adjust chmod and chown to be similar if -c or -v are given. In
particular, a no-op chown is no longer reported as a change; this
reverts to previous behavior.  Also, fix both commands so that -v
report failures even if the failure is not due to the chmod or
chown syscalls.

* src/chown-core.c (change_file_owner): Return -1 on error, not
1 sometimes and -1 on others.  Our caller ORs together our results,
and (-1 | 1) == 0 on ones-complement hosts.
With -v report all errors verbosely, not just some.
Fix bug when chopt->root_dev_ino && !chopt->affect_symlink_referent:
file_stats wasn't set properly in that case.
2004-06-09 13:37:52 +00:00
Jim Meyering 7c6999b6f8 (mode_changed): Return false, not 0, now that the function returns `bool'. 2004-06-09 09:06:34 +00:00
Jim Meyering bc580f6a56 Adjust chmod and chown to be similar if -c or -v are given. In
particular, a no-op chown is no longer reported as a change; this
reverts to previous behavior.  Also, fix both commands so that -v
report failures even if the failure is not due to the chmod or
chown syscalls.

* src/chmod.c (CH_NOT_APPLIED): New constant.
(describe_change): Handle it.
(process_file): Use it, if a symlink wasn't changed.
(mode_changed): Return bool, not int.  Accept new argument
NEW_MODE; all callers changed.  This lets us avoid statting the
file unless the new mode has unusual bits.
(process_file): Return -1 on error.  With -v, report all errors
verbosely, not just some.
2004-06-09 09:05:02 +00:00
Jim Meyering 91476b4612 . 2004-06-08 17:07:19 +00:00
Jim Meyering 095b41255b *** empty log message *** 2004-06-08 16:58:37 +00:00
Jim Meyering e76b4fe2e3 *** empty log message *** 2004-06-08 16:58:32 +00:00
Jim Meyering 57a06c9366 Test that chgrp -h does not fail on
symlinks, even on hosts where that's not supported.
Test that if -R is specified without -H or L, -h is assumed.
Test that chown() is not optimized away.
2004-06-08 16:58:28 +00:00
Jim Meyering 4925135810 s/FTS_STAT/FTS_NOSTAT/ 2004-06-08 16:32:14 +00:00
Jim Meyering 5fe68c2d94 Adjust error-diagnostic spelling to match new behavior. 2004-06-08 15:26:45 +00:00
Jim Meyering f41716a4ef Do not attempt to combine -h and -H; these
options are incompatible, and their behavior is undefined with POSIX.
(changed, not_changed): Adjust to match the fact that -h is no longer
specified.  Sort names.
2004-06-08 15:25:59 +00:00
Jim Meyering 8dbd36d925 Use chown --from to discover whether the
group changed, since chgrp now changes unconditionally.  This
complicates the sed script a bit.  Do not specify --dereference,
since it's the default (and we want to test this).  Adjust output
to match the fact that chgrp no longer optimizes the case of
changing a file's group to the same value as before.
2004-06-08 15:25:45 +00:00
Jim Meyering b50934d2a9 . 2004-06-08 14:58:57 +00:00