From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 27 05:14:36 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A603C106566C; Mon, 27 Sep 2010 05:14:36 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 8638D8FC16; Mon, 27 Sep 2010 05:14:36 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id o8R5EZZm047930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 26 Sep 2010 22:14:35 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id o8R5EZZD047929; Sun, 26 Sep 2010 22:14:35 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA20362; Sun, 26 Sep 10 22:08:46 PDT Date: Sun, 26 Sep 2010 22:08:46 -0700 From: perryh@pluto.rain.com To: arundel@freebsd.org Message-Id: <4ca026de.pOkFIzh1Wymrvuow%perryh@pluto.rain.com> References: <20100927012936.GA32352@freebsd.org> In-Reply-To: <20100927012936.GA32352@freebsd.org> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: adding a new lib for more advanced argument parsing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 05:14:36 -0000 Alexander Best wrote: > ... getopt(3) is clearly not suitable for handling such complex > options. camcontrol.c even contains a whole paragraph about why > getopt(3) is considered not appropriate to handle camcontrol's > argument parsing requirements ... > why not do a vendor import of popt 1.16 e.g.? are there license > restrictions? AFAIK it is GPL; it was used in Red Hat Linux prior to the split into Fedora and RHEL (and may still be, for all I know). > or maybe some other lib... Dunno what-all may be available. popt has its own set of limitations. Check the archives from the RPM mailing list from around the time when RPM switched to popt, or perhaps it was when rpmbuild was split out into a separate executable, for the laundry list of issues they encountered in attempting to maintain compatibility at the command line level between what they had before and after.