Commit Graph
5416 Commits
Author SHA1 Message Date
Jim Meyering b8616748f2 Rewrite. Now, this module is reentrant on systems
that provide openat (Solaris), and on systems like Linux+procfs
where our openat emulation code is reentrant.  This also fixes a
few low-probability leaks and eliminates some code that could,
in very unusual circumstances, cause rm() (via a callee) to exit.
2005-11-22 15:04:51 +00:00
Jim Meyering fd907a33bd . 2005-11-18 23:12:06 +00:00
Jim Meyering ca7cafb093 (AD_mark_helper): Make a char *' parameter const'.
(AD_mark_current_as_unremovable): Likewise, but for a local.
(rm_1): Likewise.
2005-11-17 20:17:47 +00:00
Jim Meyering 97de3a32b6 (basename_is_dot_or_dotdot): Correct wording in comment. 2005-11-17 12:28:34 +00:00
Paul Eggert 24ce72f635 (do_link, usage): Improve quality of ln's diagnostics.
(do_link): Don't use alloca on a buffer of unbounded size.
2005-11-16 22:32:45 +00:00
Jim Meyering fd13239884 remove now-unused file 2005-11-12 08:39:27 +00:00
Jim Meyering 38a1bfa703 . 2005-11-12 08:29:35 +00:00
Paul Eggert 6837183d42 (decode_switches): ls now defaults to --time-style='locale', which in
turn acts like --time-style='posix-long-iso' if the locale settings
are messed up.
2005-11-08 20:59:49 +00:00
Jim Meyering 1ab59b0b84 (usage): Fix descriptions of --sort, --time. 2005-11-07 21:42:23 +00:00
Jim Meyering a8d0fd4c1b Include filenamecat.c.
(FILE_BASENAME_CONCAT): Remove.
(do_link): Remove last arg DEST_IS_DIR.  All callers changed.
(main): Use file_name_concat, base_name, and strip_trailing_slashes
instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
the use of alloca.
2005-11-05 09:34:57 +00:00
Jim Meyering 933576b440 (process_file): Don't overflow for files of size >= 2^31
on systems with stat.st_blocks of a signed 32-bit type.
This bug causes trouble on some AIX 5.1 systems.
Report and trivial patch from Paul Townsend:
<http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
2005-11-04 10:08:51 +00:00
Paul Eggert b38883ea2f (usage): Don't mention rm -d. 2005-11-02 21:53:20 +00:00
Paul Eggert ce1d20289c (rm_option_init): Don't initialize unlink_dirs member, which went away. 2005-11-02 21:52:33 +00:00
Paul Eggert 11fc9bca5f (struct rm_options): Remove unlink_dirs. 2005-11-02 21:51:57 +00:00
Jim Meyering 588df316d9 (remove_entry): Emit a better diagnostic when rm
(without -r) fails to remove a directory on a non-Linux system.
This change affects only newer Solaris systems (with priv_*
functions like priv_allocset).  Reported by Keith Thompson.
2005-11-02 09:47:39 +00:00
Paul Eggert a2bacbdc9c (main): Pass PDS_PRE_2000 to posixtime. 2005-11-01 23:42:36 +00:00
Paul Eggert 99f09784cc (parse_obsolete_option): Implement fix for "tail -c 2 FILE". 2005-11-01 23:05:29 +00:00
Paul Eggert 91f8e15bff (skip): Fix off-by-one error reported by Theodoros V. Kalamatianos. 2005-10-31 08:39:14 +00:00
Paul Eggert 50a6da201b (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
boundary between DEST and SOURCE in the result.
2005-10-28 22:17:00 +00:00
Jim Meyering 84131ca42b (main) [!O_BINARY]: Changed default read mode
back to text, to sync with documentation and for backwards compatibility.
2005-10-27 16:27:04 +00:00
Jim Meyering 9793cca908 Add these: sha224sum sha256sum sha384sum sha512sum 2005-10-26 21:46:24 +00:00
Jim Meyering 91795f6fa2 (tac_file): When determining whether a file is seekable,
also test whether it is a tty.  Using only the lseek-based test would
give a false positive on Solaris.  Reported by Peter Fales.
2005-10-24 16:07:36 +00:00
Jim Meyering 30bf08a3da rename array_cardinality to array_len 2005-10-24 10:39:46 +00:00
Jim Meyering 295bdba02c (ls_codes): Add missing comma.
Anonymous report and patch from
http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
2005-10-24 09:55:00 +00:00
Jim Meyering b648b4af3d Add a compile-time assertion that the slack_codes
and ls_codes arrays have the same number of elements.  This would
have prevented the above-fixed bug.
2005-10-24 09:43:01 +00:00
Jim Meyering 57d5938b17 * src/expand.c (parse_tab_stops): Add comment to make this function
identical to the one in unexpand.c.

* src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
identical to the one in expand.c.
2005-10-24 07:28:39 +00:00
Jim Meyering 315b42ce8e (next_file): Don't assume fopen cannot return stdin. 2005-10-24 07:18:18 +00:00
Jim Meyering d0889c6d10 . 2005-10-23 20:48:56 +00:00
Jim Meyering 708c4e6682 . 2005-10-23 16:00:59 +00:00
Jim Meyering 1974bccc56 (digest_check, main): Use ptr_align rather than
a dangerous pointer-value-to-`unsigned' cast.
2005-10-23 15:29:25 +00:00
Jim Meyering 3b63180c8c (sha224sum, sha256sum, sha384sum, sha512sum): Rules for compiling sha-2 utilities
(noinst_HEADERS): Remove checksum.h.
2005-10-23 15:23:56 +00:00
Jim Meyering 61fa9f0cfe Provide framework for computing sha-2 hashes. 2005-10-23 15:22:02 +00:00
Jim Meyering 7ac64b812e . 2005-10-23 14:19:22 +00:00
Jim Meyering b2bbe32f13 . 2005-10-22 20:59:27 +00:00
Jim Meyering 7aff553950 . 2005-10-19 07:37:10 +00:00
Jim Meyering dee664c8bb (append_quoted): Quote ' correctly.
Problem reported by Eric Blake.
2005-10-19 07:32:14 +00:00
Jim Meyering 9c2e9b49d1 . 2005-10-16 12:28:06 +00:00
Jim Meyering 7baaad040a . 2005-10-16 10:35:27 +00:00
Jim Meyering 2fa2315d0c (usage): Undocument deprecated --idle (-i) option. 2005-10-15 15:01:22 +00:00
Jim Meyering b54de31c76 . 2005-10-15 10:21:39 +00:00
Jim Meyering 15e97882ff (main): Remove --link -l options.
You can use --dereference (-L) instead.
2005-10-15 10:15:48 +00:00
Jim Meyering f90df192b4 (parse_options): Remove --allow-missing option.
You can use --retry instead.
2005-10-15 10:15:34 +00:00
Jim Meyering 69dc13717a (usage): Document -m, once again.
(main): Warn about use of deprecated long options: --kilobytes and --megabytes.
2005-10-15 10:14:13 +00:00
Jim Meyering 4ecdd8ce4c (decode_switches): Warn about the deprecated --kilobytes option. 2005-10-15 09:56:21 +00:00
Jim Meyering 9624dcd0ee (main): Warn about the deprecated --kilobytes option. 2005-10-15 09:56:03 +00:00
Paul Eggert 4778617abc (sortlines_temp): Redo previous change, since I'm no longer confident
that the m4/stdbool.m4 patch suffices.
2005-10-07 18:48:28 +00:00
Paul Eggert 38ffebe4ac (sortlines_temp): Undo previous change, since
today's change to m4/stdbool.m4 should catch it.
2005-10-06 16:40:13 +00:00
Jim Meyering 132aaa2eac Add a comment to go with the last change. 2005-10-05 18:56:29 +00:00
Jim Meyering 111bac9943 (sortlines_temp): Declare temporary as `int' rather
than `bool' to work around AIX 5.3 compiler bug in 64-bit mode.
2005-10-05 18:53:55 +00:00
Jim Meyering c7676c0b6b (MAX_N_FACTORS): Define in terms of sizeof (uintmax_t)
rather than hard-coding to 128.  From Thomas M.Ott.
2005-10-03 12:12:14 +00:00