Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 2 Dec 2014 19:06:24 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH v2] getopt: add support for non-option arguments

On Tue, Nov 25, 2014 at 08:56:03AM +0100, Gianluca Anzolin wrote:
> Currently getopt() doesn't handle the GNU getopt extension that allows
> to parse non-option arguments when optstring starts with '-'.
> 
> This extensions is used by some common utilities, notably iptables, that
> currently return with errors even with perfectly valid invocations, for
> example:
> 
> $ iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
> 
> The patch add the code needed to implement this extension to getopt.c
> and getopt_long.c
> 
> v2: do not add a second path to return getopt(...) to getopt_long.c
> 
> Signed-off-by: Gianluca Anzolin <gianluca@...tospazio.it>

Committed. Thanks!

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.