1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-06-07 10:16:46 +02:00
Commit Graph

22460 Commits

Author SHA1 Message Date
Jim Meyering f69fb2f533 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests. 2005-12-17 10:30:09 +00:00
Paul Eggert 1833362111 remove/openat cleanup 2005-12-17 06:56:19 +00:00
Paul Eggert 25c49ccc1c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
(OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
(fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
value is now signified by whether cwd_errno is null.
(fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
pointer-to-bool to pointer-to-errno-value.  All callers changed.
(rm_1): Don't bother setting a local cwd failure flag and then
ORing it into the caller's.  Just set the caller's.
(rm): Use cwd failure errno value to print a slightly-better
diagnostic.
2005-12-17 06:55:54 +00:00
Paul Eggert 3f86aaadcf Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
"gettext.h"; either no longer needed or are guaranteed by openat.h.
(_): Remove; no longer needed.
(openat): Renamed from rpl_openat; no need for rpl_openat
since openat.h renames openat for us.
Replace most of the body with a call to openat_permissive,
to avoid duplicate code.
Port to (probably hypothetical) environments were mode_t is
wider than int.
(openat_permissive): Require mode arg, so that we can check
types better.  Put it just after flags.  Change cwd failure
indicator from pointer-to-bool to pointer-to-errno-value.
All callers changed.
Invoke openat_save_fail and/or openat_restore_fail if
cwd_errno is null, so that openat can call us.
(openat_permissive, fdopendir, fstatat, unlinkat):
Simplify errno handling to avoid some duplicate code,
as it's OK to set errno on success.
2005-12-17 06:55:32 +00:00
Paul Eggert 1c5cebe703 Revamp code so that function macros depend on
__OPENAT_PREFIX only, not also on AT_FDCWD.
(openat_ro): Remove.  Caller changed to use openat_permissive.
(openat_permissive): Now a macro, if not a function.
(openat_restore_fail, openat_save_fail): Now always functions,
since mkdirat needs them even if __OPENAT_PREFIX is defined.
2005-12-17 06:55:01 +00:00
Jim Meyering 0ae5a45fcb *** empty log message *** 2005-12-15 20:16:03 +00:00
Jim Meyering ce79c562f6 (print_it): Properly handle a backslash at the
end of a --printf format string.  Reported by Paul Eggert.
2005-12-15 20:15:20 +00:00
Jim Meyering 41e95465a6 (print_it): Properly handle a backslash at the
end of a --printf format string.  Reported by Paul Eggert.

(end-bs): Add a test for the above.
2005-12-15 20:15:05 +00:00
Paul Eggert c1c8e668de Fix typo in previous change 2005-12-15 19:01:00 +00:00
Paul Eggert a025357bd6 tests/acl porting fixes 2005-12-15 18:58:47 +00:00
Paul Eggert b7c426c0ab Port to pre-POSIX shells like Solaris 8 /bin/sh.
Don't assume /etc/passwd contains user names; use 'id' instead.
2005-12-15 18:58:20 +00:00
Paul Eggert 6dcd2807d7 Regenerate. 2005-12-15 18:24:35 +00:00
Jim Meyering a37438984f Add Kinyarwanda (rw).
Add Croatian (hr).
2005-12-15 14:49:00 +00:00
Jim Meyering fee8c3985a . 2005-12-15 14:48:48 +00:00
Jim Meyering 049a807bc6 . 2005-12-15 14:47:36 +00:00
Jim Meyering 6e7efd30f0 *** empty log message *** 2005-12-15 12:25:04 +00:00
Jim Meyering 5124a296ab stat: revert behavior of --format=FMT (-c)
stat: add new option: --printf=FMT
2005-12-15 12:24:54 +00:00
Jim Meyering 8768b88913 revert behavior of --format=FMT (-c)
add new option: --printf=FMT

(isodigit, octtobin, hextobin): Define.
(PRINTF_OPTION): Define.
(interpret_backslash_escapes, trailing_delim): New globals.
(usage): Document them.  Alphabetize on long option names.
(print_esc_char): New function.
(print_it): Rewrite, in order to handle backslash escapes.
(main): Handle new option.  Set globals for --format, too.
2005-12-15 12:24:30 +00:00
Jim Meyering 7383c9a1a3 (TESTS): Add stat-printf. 2005-12-15 12:23:57 +00:00
Jim Meyering d1f5df777f Test --printf and --format. 2005-12-15 12:23:36 +00:00
Jim Meyering 2a390dea1f *** empty log message *** 2005-12-15 08:37:14 +00:00
Paul Eggert cd42358418 Diagnose "sort -c -o FILE". 2005-12-15 00:00:02 +00:00
Paul Eggert e18c4ff172 (incompatible_options): New function.
(check_ordering_compatibility, main): Use it.
(main): Check for -c and -o.
Don't bother with a usage message for
"sort -c a b", for consistency with other error diagnostics.
2005-12-14 23:59:23 +00:00
Paul Eggert 4382b8ce00 (incompat4): New test. 2005-12-14 23:58:20 +00:00
Paul Eggert 1dbd70442d sort now reports incompatible options. 2005-12-14 22:46:17 +00:00
Paul Eggert 56805cd202 (check_ordering_compatibility): New function.
(main): Use it.
2005-12-14 22:46:02 +00:00
Paul Eggert ce1be021a7 (incompat1, incompat2, incompat3): New tests. 2005-12-14 22:45:29 +00:00
Jim Meyering b0cee61e23 *** empty log message *** 2005-12-14 20:37:24 +00:00
Jim Meyering bd78a76886 (libcoreutils_a_SOURCES): Remove fprintftime.c
and fprintftime.h.  Now they're pulled in via the .m4 file.
2005-12-14 20:37:06 +00:00
Jim Meyering 0d58d63090 *** empty log message *** 2005-12-14 20:36:20 +00:00
Jim Meyering 85fba4dc43 Require gl_FPRINTFTIME. 2005-12-14 20:36:14 +00:00
Paul Eggert 82944b0300 Undo previous change to cat.c. 2005-12-14 18:12:44 +00:00
Paul Eggert dcc1bc1759 Undo previous change. 2005-12-14 18:09:04 +00:00
Paul Eggert 6d577b6fb4 * src/cat.c (main): Check for close (STDOUT_FILENO) failure. 2005-12-14 01:40:19 +00:00
Paul Eggert f5e1bca49d (main): Check for close (STDOUT_FILENO) failure. 2005-12-14 01:39:46 +00:00
Paul Eggert 3463531cd0 One other stdbool.m4 change. 2005-12-14 01:17:51 +00:00
Paul Eggert 8bf7f49616 (AM_STDBOOL_H): Substitue HAVE__BOOL again, reverting
2005-11-25 change.
2005-12-14 01:17:28 +00:00
Paul Eggert 23b2b5c660 * Makefile.am (stdbool.h): Resurrect the 'sed' that goes along
with '#if !@HAVE_BOOL@".
2005-12-14 00:09:23 +00:00
Paul Eggert a6caba2509 (stdbool.h): Resurrect the 'sed' that goes along with '#if !@HAVE_BOOL@". 2005-12-14 00:08:54 +00:00
Paul Eggert 706c4369de Sync from gnulib. 2005-12-13 23:58:55 +00:00
Paul Eggert 4170c66d45 (_Bool): Resurrect the "#if !@HAVE__BOOL@" check, to
work around compilers that have a (possibly-broken) _Bool but lack
a working <stdbool.h>.
2005-12-13 19:42:27 +00:00
Paul Eggert eaebfec990 (AC_HEADER_STDBOOL): Check for buggy compiler that
has _Bool but mishandles _Bool |= _Bool.
2005-12-13 19:41:57 +00:00
Paul Eggert a867264a18 Install a more-conservative approach for sort -R. 2005-12-12 22:47:57 +00:00
Paul Eggert c5174f6fb2 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
from rand-isaac.c.
2005-12-12 22:43:16 +00:00
Paul Eggert b22d6cc592 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c. 2005-12-12 22:42:58 +00:00
Paul Eggert d2af4ddbeb (EXTRA_DIST): Add rand-isaac.c. 2005-12-12 22:42:37 +00:00
Paul Eggert 9df4b20557 (sort invocation): Clarify explanation of
--random-sort, and use a simpler example.
2005-12-12 22:42:16 +00:00
Paul Eggert 1f20820f7e Clarify sort -R. 2005-12-12 22:41:56 +00:00
Paul Eggert 6078d7175d Add src/rand-isaac.c. 2005-12-12 22:41:42 +00:00
Paul Eggert 0abb871873 Remove. All uses now simply include rand-isaac.c. 2005-12-12 22:16:30 +00:00