1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 02:36:16 +02:00
Commit Graph

4916 Commits

Author SHA1 Message Date
Paul Eggert
a9626a5d81 Regenerate. 2005-01-03 23:50:12 +00:00
Paul Eggert
30fa7301bc * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
* m4/ullong_max.m4: New file.
* src/system.h: Undo previous change; we now use Autoconf.
2005-01-03 23:43:39 +00:00
Jim Meyering
7f6d0aeb3a If PRIdMAX, PRIoMAX, PRIuMAX, and PRIxMAX are
not all defined and either ULONG_MAX or ULLONG_MAX is not defined,
then fail at compile-time rather than let tools like od produce
invalid results at run time.
2005-01-03 18:43:09 +00:00
Jim Meyering
5e37309f7a . 2005-01-03 18:07:26 +00:00
Jim Meyering
9a98a6c402 . 2004-12-21 21:56:47 +00:00
Jim Meyering
e27c569715 . 2004-12-21 21:12:44 +00:00
Jim Meyering
e03c1883fc (usage): Say the default names are xx00, xx01, ...', not xx01, xx02, ...'.
Reported by Matt Kraai in http://bugs.debian.org/286605
2004-12-21 09:58:38 +00:00
Paul Eggert
7e68c7ad96 (usage): Mention default size. 2004-12-20 20:00:44 +00:00
Paul Eggert
96742fffc4 Regenerate. 2004-12-20 08:02:53 +00:00
Paul Eggert
c4e4091ea4 (print_dir): Use "%s: not listing already-listed
directory", not "not listing already-listed directory: %s", to
format already-listed directories, to be consistent with other
diagnostics involving file names and colons.
2004-12-17 05:08:40 +00:00
Jim Meyering
3ca5e74d7d . 2004-12-15 16:02:35 +00:00
Jim Meyering
a957600333 (__LDADD): Define, so that building `[' on
Solaris still uses the -lgen library that it requires in order
to get a definition of eaccess.
2004-12-14 23:53:48 +00:00
Jim Meyering
9a13cce9ec [DONT_UNLINK_WHILE_OPEN]: Add a FIXME comment explaining that
using atexit like this is wrong.
2004-12-14 10:28:03 +00:00
Jim Meyering
ab8392641b (tac_nonseekable): Return false also if copy_to_temp fails. 2004-12-14 09:52:58 +00:00
Jim Meyering
4c42cf3fdb Include quotearg.h.
Use quotearg_colon in most diagnostics.
(copy_to_temp): Rewrite not to exit upon I/O or temp-file-creation
failure.  Before, this command (with /full/tmp being a full partition)
  TMPDIR=/full/tmp ./tac /proc/modules tac.c
would exit immediately upon the write error while trying to copy
non-seekable /proc/modules to the full partition.  Now it still
reports the failure but continues on with the remaining file.
2004-12-14 08:50:52 +00:00
Paul Eggert
b58dea554e (gobble_file): Change arg name to be command_line_arg
rather than explicit_arg, for consistency with copy.c.
(extract_dirs_from_files): Remove ignore_dot_and_dot_dot arg, since
it is deducible from dirname arg.  All callers changed.
(extract_dirs_from_files, print_dir, queue_directory):
Add command_line_arg arg.  All callers changed.
(struct pending): Add command_line_arg member.
(main): Use NULL rather than 0 when appropriate.
(set_exit_status, file_failure): New functions.
(queue_directory): Store command_line_arg into new structure.
(print_dir, gobble_file, get_link_name):
Use file_failure to report problems in accessing files,
so that the exit status is set consistently.
(print_dir): Simplify readdir failure code yet again.
If closedir fails, report "closing directory" rather than "reading
directory" failure.
(xstrcoll): Use set_exit_status to set status on failure.
2004-12-14 00:42:19 +00:00
Jim Meyering
cbff85ac09 Avoid a race condition vulnerability in chown, when used with
--from=O:G and without the (-h) --no-dereference option.

(restricted_chown): New function.
(change_file_owner): Call it.
Reported by Ulrich Drepper.
2004-12-11 10:24:12 +00:00
Paul Eggert
310ef64346 (LS_MINOR_PROBLEM, LS_FAILURE): New constants.
All uses of EXIT_FAILURE replaced with LS_FAILURE, unless
specified below.
(main): Initialize exit failure to LS_FAILURE.
(print_dir, gobble_file, get_link_name, xstrcoll):
Set exit status to LS_MINOR_PROBLEM if the failure is minor.
(print_dir): Do not give up on entire directory merely because readdir
returns EOVERFLOW.
(usage): Explain exit status.
2004-12-09 17:48:57 +00:00
Paul Eggert
394d21a31e Undo previous change; it's already there. 2004-12-08 23:05:13 +00:00
Paul Eggert
98fe5b67ac (usage): Mention that input files should be sorted. 2004-12-08 23:02:45 +00:00
Paul Eggert
f84a6e71fe (factor): Don't list 1 as a factor of 1.
Problem reported by Thomas Folz-Donahue.
2004-12-07 21:11:59 +00:00
Jim Meyering
97af685a66 . 2004-12-06 11:52:00 +00:00
Jim Meyering
7380cf792a (complement, COMPLEMENT_OPTION): New.
(longopts): Add --complement.
(usage): Say not that -b, -c, and -f `print' fields,
but rather that they `select' fields for printing.
Describe the new --complement option.
(mark_range_start): Extracted from set_fields.
(print_kth): Support --complement.
(compare_ranges): New function.
(set_fields): Rewrite the part that populates range_start_ht,
merging it with the part that populates printable_field.
(main): Handle --complement.

From Paolo Bonzini.
2004-12-04 13:32:48 +00:00
Paul Eggert
cd9d7fd2bd (tail_file): Set errnum to -1 if the initial "tail" failed. 2004-12-04 07:02:35 +00:00
Jim Meyering
d6fed8d35e With using --color and with LS_COLORS saying not to color
executables, don't stat every file.

(is_colored): New function.
(gobble_file): Use it.
(main): Use it here, in place of too-strict tests against NULL:
if either ORPHAN or MISSING was set to 0 from LS_COLORS, the
old test would fail.
2004-12-02 07:47:14 +00:00
Paul Eggert
c82d4cf0b5 (different): Assume setlocale exists. 2004-12-02 06:56:28 +00:00
Paul Eggert
bba741d6c2 Assume locale.h exists.
(HAVE_SETLOCALE): Remove.
2004-12-02 06:56:08 +00:00
Paul Eggert
543696d559 (C_DECIMAL_POINT): Remove. Use changed to '.'.
Assume setlocale exists.
(thousands_sep): Renamed from th_sep.
(IS_THOUSANDS_SEP): Remove.  All uses replaced by comparisons.
(NONZERO): Parenthesize use of arg.
(numcompare): Avoid duplicate loads.  Use ISDIGIT as boolean, for
consistency.  Avoid unnecessary negation by reversing
fraccompare args.
(main): Rewrite localeconv call to match seq.c.
2004-12-02 06:55:31 +00:00
Paul Eggert
d153646bbc (decimal_point): Treat like sort. Now char.
All uses changed.
2004-12-02 06:55:08 +00:00
Paul Eggert
037268041b (keycmp): Assume setlocale exists. 2004-12-02 06:54:40 +00:00
Paul Eggert
a0a9d4c6f4 (compare_files): Assume setlocale exists. 2004-12-02 06:54:16 +00:00
Paul Eggert
29f4f8aff6 (sort_files): Minor cleanup. Remove an unnecessary
'volatile' on a local variable.  Rewrite to avoid unnecessary
double-assignment to 'func' in the usual case where strcoll does
not fail.
2004-12-02 00:31:43 +00:00
Paul Eggert
3b3530057a (USER_PROCESS, RUN_LVL, INIT_PROCESS, LOGIN_PROCESS,
DEAD_PROCESS, BOOT_TIME, NEW_TIME, UT_TYPE_UNDEF, UT_TYPE): Remove.
(IS_USER_PROCESS): Move to ../lib/readutmp.h.
(UT_TYPE_RUN_LVL, UT_TYPE_INIT_PROCESS, UT_TYPE_LOGIN_PROCESS,
UT_TYPE_DEAD_PROCESS, UT_TYPE_NEW_TIME): New macros.
(gethostname): Remove decl.
(list_entries_who, scan_entries): Use the new macros defined above,
for consistency with pinky, uptime, and users.
2004-11-30 21:41:09 +00:00
Paul Eggert
a0d8525938 (list_entries_users): Use IS_USER_PROCESS
instead of by-hand code.
2004-11-30 21:40:52 +00:00
Paul Eggert
78a436fb0b (print_uptime): Use IS_USER_PROCESS and
UT_TYPE_BOOT_TIME instead of by-hand code.
2004-11-30 21:40:29 +00:00
Paul Eggert
76d1b4a434 (gethostname): Remove decl.
(scan_entries): Use IS_USER_PROCESS instead of by-hand code.
* src/uptime.c (print_uptime): Use IS_USER_PROCESS and
UT_TYPE_BOOT_TIME instead of by-hand code.
2004-11-30 21:40:12 +00:00
Jim Meyering
4ed96077e8 . 2004-11-30 14:58:46 +00:00
Jim Meyering
2fadd0587d . 2004-11-28 21:26:17 +00:00
Jim Meyering
b174e49170 . 2004-11-28 21:01:03 +00:00
Paul Eggert
6942c45d50 Regenerate. 2004-11-26 08:11:52 +00:00
Paul Eggert
d45902c31b (link, symlink): Remove decls. 2004-11-26 07:39:57 +00:00
Paul Eggert
cef32c7c86 (stat): Remove decl. 2004-11-26 07:39:32 +00:00
Paul Eggert
2a3e586dee (stat, lstat, rename): Remove decls. 2004-11-26 07:39:14 +00:00
Jim Meyering
3475a2d993 Since the changes of 2004-05-22, the u.saved_cwd member at
the bottom of the active-directory stack was no longer
strictly necessary.  This change removes that member and uses
the newer cwd_state parameter for the final restore_cwd.

(struct AD_ent) [u]: Remove now-unnecessary union.
[dev_ino]: Rename from `a'.
(AD_pop_and_chdir): Add a parameter to play the role of just-removed
bottom-of-stack cwd-state member.
(AD_pop_and_chdir): No longer return boolean.  Adjust caller.
(AD_push_initial): Remove CWD parameter.  Adjust caller.
2004-11-24 21:30:18 +00:00
Paul Eggert
557bd55cd2 (posix_date): Remove; not needed as a static var.
All uses rewritten.
(touch): Use new futimens function to operate more efficiently
in some cases.  Don't stat/fstat existing file when
(!amtime_now && change_times == (CH_ATIME | CH_MTIME)); the
old time stamps aren't needed in that case.
(main): change_times is int, not bool.  Simplify test for
change_times.
2004-11-23 20:43:47 +00:00
Jim Meyering
b90f1a4404 tweak comment 2004-11-23 09:44:17 +00:00
Paul Eggert
c0b70ba29b (usage): Avoid usage that runs afoul of Docbook
translation.  Problem reported by Eric S. Raymond.
2004-11-21 07:29:31 +00:00
Paul Eggert
e5526bf63c (flags, usage, main): Add noctty flag to dd. 2004-11-20 08:56:44 +00:00
Jim Meyering
79fc6d94b6 (usage): Clarified description of --no-group (-G),
--human-readable (-h), --inode (-i), --size (-s), --time,
and --time-style.
2004-11-19 21:41:00 +00:00
Jim Meyering
273e13d35b (find_dir_entry): Update comment to match reality. 2004-11-19 21:36:00 +00:00