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+netbsd%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 02:08:45 +0900

 "Valery Ushakov via gnats" <gnats-admin%NetBSD.org@localhost> writes:
 
 >  So you are making a conceptual mistake here.  The phrase above is
 >  contradiction in terms.
 >  
 >  As the man page says, for double colon optios the argument is:
 >  
 >    optarg is set to the rest of the current argv word ...
 >  
 >  If the current argv word, "-d", it does not have anything after 'd',
 >  there's no argument.  The space that delimts "-d" word is not
 >  "between" anything.
 
 Isn't that maybe then just an issue with the wording?  The description
 of the extension in the man page also says that whitespace doesn't
 matter in this case.
 
 Or at least a conceptual issue. If non-optional arguments, like "-s
 /usr/local/admin/tftproot" are allowed to have a whitespace between the
 option and its value, why not also optional arguments?
 


Home | Main Index | Thread Index | Old Index