1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 03:12:48 +02:00
Commit Graph

20836 Commits

Author SHA1 Message Date
Paul Eggert
5580780a37 (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
(struct mode_change): Move to modechange.c; callers don't
need to see this stuff.
(MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
(MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
(mode_change, mode_adjust): Reflect the new signatures noted above.
2005-04-28 16:29:22 +00:00
Paul Eggert
498bb2796f Include stat-macros.h, xalloc.h.
(S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
(S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
(S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
Remove.  This is now stat-macros.h's job.
(talloc): Remove.  All callers replaced by xalloc, so that
our invokers don't have to worry about reporting memory failures.
(make_node_op_equals): Remove.
(MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
New constants.
(struct mode_change): Moved here from modechange.h.
(mode_append_entry): Remove.
(mode_compile): Remove MASKED_OPS arg, since it encouraged
apps to have incorrect behavior.  Use simpler algorithm for head
and tail.  Don't futz with umask; that's now the job of mode_adjust.
Detect more invalid usages rather than having somewhat-random behavior.
Don't insert an "a=" action, as that leads to incorrect behavior.
(mode_compile, mode_create_from_ref): Return NULL on error instead
of an enum, since now there's only one way to have an error.  All
callers changed.
(mode_adjust): Accept new arg UMASK_VALUE, and interpret it
at the correct time.  Simplify calculation of "+u" and its ilk.
Don't mishandle "+X".
(mode_free): Remove "register" and localize decls.
2005-04-28 16:29:00 +00:00
Paul Eggert
3f4bb8e0c8 (Mode Structure, Changing Special Permissions):
(Conditional Executability, Numeric Modes):
These days the sticky bit is more often uses as the restricted
deletion flag, so modernize the discussion about this.
(Mode Structure): Linux/GNU -> GNU/Linux.
(Symbolic Modes): Don't imply that "+ur" or "u" is valid.
(Setting Permissions): Don't imply that "+t" is invalid.
Use "rwx" rather than the less-common "rxw" in an example.
(Copying Permissions): Say that ugo is a replacement for
a string of the other letters.  Add spaces around examples.
Use "set-user-ID" rather than "set user ID" to avoid ambiguity.
Use "+t" rather than "o+t", since POSIX doesn't specify the latter.
Mention which combinations are portable and which are GNU.
(Numeric Modes): Don't imply they aren't portable; they are
nowadays.
2005-04-28 16:28:27 +00:00
Paul Eggert
b151294523 Restore support for usages like "head -1" and "tail -1",
even when conforming to POSIX 1003.1-2001.
A few other bug fixes.
2005-04-26 16:45:12 +00:00
Paul Eggert
adcc738109 * coreutils.texi: Don't complain about head -10, etc. 2005-04-26 16:44:51 +00:00
Paul Eggert
6cb41db99f (Standards conformance): Do not mention head -10,
since it now works the same regardless of POSIX version.
(od invocation): -w N -> -w[N].
(pr invocation): -S STRING -> -SSTRING.
(fold invocation): -WIDTH works even when conforming to POSIX
1003.1-2001.
(head invocation, tail invocation): Likewise for -NUM.
(split invocation): Likewise for -LINES.
(uniq invocation): Likewise for -N.
(expand invocation, unexpand invocation): Likewise for -TAB.
(nice invocation): Likewise for -ADJUSTMENT.
(sort invocation): Clarify explanation of +N option.
(uniq invocation): Likewise.
(join invocation): Remove special case for --help, --version.
(touch invocation): Clarify explanation of date options.
(Options for date): -I timespec -> -I[timespec].
2005-04-26 16:44:24 +00:00
Paul Eggert
c906160906 (main): Don't complain about -NUM. 2005-04-26 16:43:45 +00:00
Paul Eggert
c360992faf Remove posixver.h and its uses.
(main): Don't complain about -TAB.
2005-04-26 16:43:33 +00:00
Paul Eggert
369458974f (parse_obsolete_option): Don't complain about -NUM. 2005-04-26 16:43:18 +00:00
Paul Eggert
1e63d9354d Remove posixver.h and its uses.
(main): Don't complain about -NUM option.
2005-04-26 16:43:03 +00:00
Paul Eggert
aa9faf52c4 Remove posixver.h and its uses.
(short_options): New constant, which always supports -y arg.
(COMMON_SHORT_OPTIONS): Remove.
2005-04-26 16:42:51 +00:00
Paul Eggert
8f7612bc5e Remove posixver.h and its uses.
(short_options): New constant, which always supports -S[string].
(COMMON_SHORT_OPTIONS): Remove.
2005-04-26 16:42:38 +00:00
Paul Eggert
d6ac4446c4 Remove posixver.h and its uses.
(short_options): New constant, which always supports -w[num].
(COMMON_SHORT_OPTIONS): Remove.
2005-04-26 16:42:26 +00:00
Paul Eggert
c631833814 Remove posixver.h and its uses.
(main): Always support -NUM option.
2005-04-26 16:41:59 +00:00
Paul Eggert
f9118c1c2e Remove posixver.h and its uses.
(obsolete_usage): Remove.
(join_field_1, join_field_2): Initialize to SIZE_MAX to indicate
they haven't been set yet.
(tab): Now int, not char.  Initialize to -1 to indicate white space
separates columns, so that we can use NUL as a separator.
All uses changed.
(OBSOLETE_LONG_OPTIONS, get_option): Remove.
(string_to_join_field): Remove ERR_MSG_FMT arg; a single format
suffices.  Use xstrtoul for sizes; it suffices.
(decode_field_spec): Report an error and exit on failure.  Return void,
not bool.
(add_field_list): Likewise.
(set_join_field): New function.
(enum operand_status): New enum.
(add_file_name): New args OPERAND_STATUS, JOPTION_COUNT,
PREV_OPTC_STATUS, OPTC_STATUS to handle the bewildering array of
possibilities with obsolete option parsing.
(main): Use it.  Do not depend on POSIX version.
Check for conflicting options.  Parse obsolete options -j1 and -j2
so that it is a pure extension to POSIX 1003.1-2001.
Allow '-t\0' to specify a NUL tab, stealing the code from 'sort'.
2005-04-26 16:41:45 +00:00
Paul Eggert
e8e6441094 Remove posixver.h and its uses.
(header_mode_option): Remove.
(main): Don't complain about obsolete -NUM args.
2005-04-26 16:41:29 +00:00
Paul Eggert
bcb5f0e6da Remove posixver.h and its uses.
(shortopts): New constant.  -DIGIT now always takes an optional arg.
(main): Don't preprocess arg list; that was buggy.  Use method
similar to expand.
2005-04-26 16:41:17 +00:00
Paul Eggert
cf8a5565cf Remove posixver.h and its uses.
(shortopts): New constant.  -DIGIT now always takes an optional arg.
(main): Revamp parsing of -DIGIT to let parse_tab_stops handle it.
Don't complain about -DIGIT.
2005-04-26 16:41:03 +00:00
Paul Eggert
3263435391 Remove posixver.h and its uses.
(COMMON_SHORT_OPTIONS): Remove.
(short_options): New constant.
(short_options, usage): -I now always takes an optional arg.
2005-04-26 16:40:43 +00:00
Paul Eggert
a1a83b43d4 Restore support for usages like "head -1" and "tail -1",
even when conforming to POSIX 1003.1-2001.
Fix bug with "POSIXLY_CORRECT=1 fold file -3".
join now supports a NUL field separator, e.g., "join -t '\0'".
join now detects and reports incompatible options, e.g.,
2005-04-26 16:40:16 +00:00
Paul Eggert
8e794ef5bd * coreutils.texi (install invocation): Use a= instead of 0 for
the point of departure for -m, and explain what it meeams.
(mkdir invocation, mkfifo invocation, mknod invocation):
The umask does not affect the point of departure.
2005-04-24 04:46:33 +00:00
Paul Eggert
4bc27aff4c nohup now exits with status 127 (not 1) when given an invalid option. 2005-04-23 06:01:50 +00:00
Paul Eggert
4e7d4dfd8d (main): If getopt fails, exit with status 127, not status 1. 2005-04-23 05:57:33 +00:00
Paul Eggert
39ecad7d9a * src/nice.c (main): Report proper program name when getopt finds trouble. 2005-04-23 05:41:16 +00:00
Paul Eggert
d3eadc9cbf (main): Report proper program name when getopt finds trouble. 2005-04-23 05:39:55 +00:00
Paul Eggert
db3f41ec77 Test for "mkdir -m =+x dir" bug. 2005-04-22 23:54:05 +00:00
Paul Eggert
fde1a93ab8 (main): Compile mode with MODE_MASK_ALL and initial umask. 2005-04-22 23:53:33 +00:00
Paul Eggert
18f6ab0228 (main): Compile mode with MODE_MASK_ALL and initial umask. 2005-04-22 23:53:13 +00:00
Paul Eggert
5ce302fba5 (main): Compile mode with MODE_MASK_ALL and initial umask. 2005-04-22 23:52:35 +00:00
Paul Eggert
e8feb9eaf5 Fix bug with "mkdir -m =+x dir"; the umask was being ignored
when the "+x" was being evaluated.
2005-04-22 23:52:05 +00:00
Paul Eggert
bd82be6ca9 "mkdir -m =+x dir" no longer ignores the umask when evaluating "+x",
and similarly for mkfifo and mknod.
2005-04-22 23:51:34 +00:00
Paul Eggert
406dac3861 Regenerate. 2005-04-21 00:34:47 +00:00
Paul Eggert
de80f585d6 Port test cases to Microsoft-Windows-related environments,
following suggestions from Eric Blake.
2005-04-21 00:30:51 +00:00
Paul Eggert
2d8996299e Undo previous change.
(sig): New var.  Use it insted of "trap '' CHLD".
Append $EXEEXT to executable name.
2005-04-21 00:30:35 +00:00
Paul Eggert
82e7b3c7ca Undo previous change.
(dd, dd2): New vars, which use $EXEEXT.  All uses of dd and dd2 changed.
2005-04-21 00:30:13 +00:00
Paul Eggert
516e0734b5 (TESTS_ENVIRONMENT): Add EXEEXT. 2005-04-21 00:29:50 +00:00
Paul Eggert
16ded268dd Fetish.pm renamed to Coreutils.pm. 2005-04-20 07:58:09 +00:00
Paul Eggert
42ff8eeaae "fetish" -> "coreutils" in more places. 2005-04-20 07:57:27 +00:00
Paul Eggert
9118673ca3 Renamed Fetish package to Coreutils. 2005-04-20 07:54:54 +00:00
Paul Eggert
6195b00513 (EXTRA_DIST): Add Coreutils.pm and remove Fetish.pm. 2005-04-20 07:53:53 +00:00
Paul Eggert
ee3fb6fadc (package Coreutils): Renamed from package Fetish. 2005-04-20 07:53:09 +00:00
Paul Eggert
50397b4278 * tests/mv/setup (dot_mount_point): Use stat -L. 2005-04-19 07:36:59 +00:00
Paul Eggert
e3f1529533 (dot_mount_point): Use stat -L, in case the
directory is actually a symbolic link.
2005-04-19 07:36:39 +00:00
Paul Eggert
f3a8588fd5 * tests/mv/mv-special-1: Use test -p to test for fifos. 2005-04-19 07:26:46 +00:00
Paul Eggert
a8f2520b15 Use test -p to test for fifos, rather
than the (incorrect) test -f and the (inadequate) ls.  ls is
inadequate because on some hosts a buggy mv will create a file of
the wrong type (problem reported by Eric Blake).  Skip this test
if test -p doesn't work.
2005-04-19 07:26:18 +00:00
Paul Eggert
f55ce3a2dc * tests/chmod/setgid: Use numeric group ids, not symbolic group names. 2005-04-19 07:08:28 +00:00
Paul Eggert
822c4d9a83 Use numeric group ids, not symbolic group names,
since the latter can have shell metacharacters in them (e.g., spaces).
2005-04-19 07:08:08 +00:00
Paul Eggert
08e7216b2c Regenerate. 2005-04-18 23:38:19 +00:00
Paul Eggert
441a757dc8 fetish -> coreutils in some more places 2005-04-18 23:33:55 +00:00
Paul Eggert
9f79304ead (FETISH_GROUP): Renamed from COREUTILS_GROUP. 2005-04-18 23:33:29 +00:00