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 23:51:58 +0900

 "Valery Ushakov via gnats" <gnats-admin%NetBSD.org@localhost> writes:
 
 >  I don't like the openbsd wording either.  (E.g. pedantically speaking
 >  both -x' foo' and -x ' foo' are examples of "argument has leading
 >  whitespace").
 >  
 >  I've commited my own take.  Let me know if it could be improved.
 
 I guess that looks ok.  I would have preferred to give it a shot first,
 but that is ok.
 
 The part of the OpenBSD wording I was referring to was the "except in
 the case where the argument is optional, denoted with two colons, no
 leading whitespace is permitted." part, which I personally think is
 quite concise as a small addendum and clears up the confusion.
 
 It keeps most of the existing wording intact and only covers the edge
 case of the whitespace for optional arguments for that original GNU
 extension.
 
 If the feeling is that the provided patch is clearer then I will yield
 to that. An improved wording is an improved wording.  Not a hill to
 fight on :D
 


Home | Main Index | Thread Index | Old Index