mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-05 08:10:15 +02:00
(main): Manually handle `--', since we no longer
call getopt. Reported by Joseph S. Myers.
This commit is contained in:
@@ -100,6 +100,13 @@ main (int argc, char **argv)
|
||||
|
||||
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
|
||||
AUTHORS, usage);
|
||||
/* The above handles --help and --version.
|
||||
Since there is no other invocation of getopt, handle `--' here. */
|
||||
if (argc > 1 && STREQ (argv[1], "--"))
|
||||
{
|
||||
--argc;
|
||||
++argv;
|
||||
}
|
||||
|
||||
if (argc == 1 || argc > 3)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user