NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/59828: getopt(3) GNU extension wrong behavior
The following reply was made to PR lib/59828; it has been noted by GNATS.
From: Simon Wollwage <rootnode%wollwage.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: lib/59828: getopt(3) GNU extension wrong behavior
Date: Thu, 11 Dec 2025 21:10:45 +0900
"Robert Elz via gnats" <gnats-admin%NetBSD.org@localhost> writes:
> With single : options, where the optarg is required, it doesn't matter,
> if the optarg value doesn't immediately follow the option character
> (without intervening anything) then the next arg is the optarg value,
> whatever it looks like (if there is none it is an error).
>
> But with optional optargs (::) there needs to be a clear, obvious, way
> to determine if the optional optarg is there or not). And it has to work
> in every conceivable case.
Agreed. But maybe at least the wording can be made clearer in the man
page. See the additional text in the OpenBSD version for example.
If that is acceptable I'll be happy to make a patch for that.
Home |
Main Index |
Thread Index |
Old Index