From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2031 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 17:00:13 -0400 Message-ID: <20120930210013.GO254@brightrain.aerifal.cx> References: <5068B362.5070408@barfooze.de> 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 1349039334 19167 80.91.229.3 (30 Sep 2012 21:08:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Sep 2012 21:08:54 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2032-gllmg-musl=m.gmane.org@lists.openwall.com Sun Sep 30 23:09:00 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 1TIQl1-0000Ks-PD for gllmg-musl@plane.gmane.org; Sun, 30 Sep 2012 23:08:59 +0200 Original-Received: (qmail 11826 invoked by uid 550); 30 Sep 2012 21:08:54 -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 11818 invoked from network); 30 Sep 2012 21:08:54 -0000 Content-Disposition: inline In-Reply-To: <5068B362.5070408@barfooze.de> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2031 Archived-At: On Sun, Sep 30, 2012 at 11:02:26PM +0200, John Spencer wrote: > On 09/30/2012 10:30 PM, Daniel Cegiełka wrote: > >http://www.openbsd.org/cgi-bin/man.cgi?query=getopt&sektion=3 > > > >regards, > >Daniel > an application that relies on non-posix getopt behaviour should come > with a configure check and use an alternate impl if the getopt > detected is not compatible. > almost any program does so already, but for those that don't (like > iptables) you can use https://github.com/rofl0r/gnu-getopt (tarball > available on sabotage mirror, or in downloads section of the page). > this bundles the netbsd getopt into a standalone library that can > easily be linked to programs. If the only need is option resetting, I think we can handle that without any cost, and avoid linking in duplicate code to meet applications' needs. Rich