From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2028 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: better compatibility with bsd getopt() Date: Sun, 30 Sep 2012 16:28:19 -0400 Message-ID: <20120930202819.GN254@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1349037421 5786 80.91.229.3 (30 Sep 2012 20:37:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Sep 2012 20:37:01 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2029-gllmg-musl=m.gmane.org@lists.openwall.com Sun Sep 30 22:37:07 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TIQGA-0002lU-Gl for gllmg-musl@plane.gmane.org; Sun, 30 Sep 2012 22:37:06 +0200 Original-Received: (qmail 2023 invoked by uid 550); 30 Sep 2012 20:37:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 2015 invoked from network); 30 Sep 2012 20:37:00 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2028 Archived-At: On Sun, Sep 30, 2012 at 10:30:56PM +0200, Daniel Cegiełka wrote: > http://www.openbsd.org/cgi-bin/man.cgi?query=getopt&sektion=3 As submitted, this patch makes it nonconforming; optreset is a name reserved for use by the application. It might can be fixed with weak symbols, but isn't there another fairly standard way to reset parsing (setting optind to 0 or something)? Also, I think some other vars need to be reset in this case... Rich