tsort: add do-nothing -w option

This is for conformance to POSIX.1-2024
* src/tsort.c: Include getopt.h.
(main): Accept and ignore -w.  Do not bother altering
the usage message, as the option is useless.
* tests/misc/tsort.pl (cycle-3): New test.
This commit is contained in:
Paul Eggert
2025-08-14 09:17:51 -07:00
parent 2543c0052c
commit 39eec70f7b
4 changed files with 36 additions and 5 deletions

View File

@@ -6280,8 +6280,9 @@ total ordering. In the context of the call graph above, the function
@code{parse_options} may be placed anywhere in the list as long as it
precedes @code{main}.
The only options are @option{--help} and @option{--version}. @xref{Common
options}.
To conform to POSIX.1-2024, @command{tsort} accepts and ignores the
option @option{-w}. The only other options are @option{--help} and
@option{--version}. @xref{Common options}.
@exitstatus