From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2029 Path: news.gmane.org!not-for-mail From: John Spencer Newsgroups: gmane.linux.lib.musl.general Subject: Re: better compatibility with bsd getopt() Date: Sun, 30 Sep 2012 23:02:26 +0200 Message-ID: <5068B362.5070408@barfooze.de> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1349038445 12825 80.91.229.3 (30 Sep 2012 20:54:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Sep 2012 20:54:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2030-gllmg-musl=m.gmane.org@lists.openwall.com Sun Sep 30 22:54:11 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 1TIQWf-0002FX-9q for gllmg-musl@plane.gmane.org; Sun, 30 Sep 2012 22:54:09 +0200 Original-Received: (qmail 7661 invoked by uid 550); 30 Sep 2012 20:54:03 -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 7653 invoked from network); 30 Sep 2012 20:54:03 -0000 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Mail/1.0 In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:2029 Archived-At: 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.