From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7522 Path: news.gmane.org!not-for-mail From: Michael Forney Newsgroups: gmane.linux.lib.musl.general Subject: getopt_long incompatibility Date: Sun, 26 Apr 2015 23:24:32 -0700 Message-ID: <20150427062432.GA30394@mforney.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" X-Trace: ger.gmane.org 1430115942 29890 80.91.229.3 (27 Apr 2015 06:25:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Apr 2015 06:25:42 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7535-gllmg-musl=m.gmane.org@lists.openwall.com Mon Apr 27 08:25:36 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YmcU0-0008J8-HN for gllmg-musl@m.gmane.org; Mon, 27 Apr 2015 08:25:32 +0200 Original-Received: (qmail 23650 invoked by uid 550); 27 Apr 2015 06:25:20 -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 23615 invoked from network); 27 Apr 2015 06:25:14 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=q+zEdzfzJEkJaUKUHbjQRDjQlQMnYSjxVVPxTV6TDXU=; b=Sthtk+EfkKlksZDvyH3D1Zg0uMynkjB9Xik2HSQmisl7E1yO/OJ3qiTwKwl+hslD3s FfBmCOrU9Ef7k2l6gsXTDxaTcuqj9oHXfGq5IoKFW3ZNc7NbzBi1M4kCjAwUD3GBhZrN 53M+/EhLbqszPyWYLa7+8UClP7sSxXicOzD/RBPN2ldov2WWT/+V4JB//KL0rspwLcut 4LiriNcnFwNYwQKes7KV2/2Yqe+uWAhllmiqhXU95HWP1TIGp6vG2Csm9D7Jxl2K01eM If9DzQymIwvEAzy1Z2cUwGV54oLdplGgetd2BMeZujh6mv/rfZjg7uSXlFSAlO4KunRe tirw== X-Gm-Message-State: ALoCoQl2yAdm6nOeYjETicqnCtVQXgSlE/AFVyRv165E2x7grj6dQvZR0E7KDzHaKDjVasrW4c2r X-Received: by 10.66.156.198 with SMTP id wg6mr19232418pab.126.1430115902090; Sun, 26 Apr 2015 23:25:02 -0700 (PDT) X-Google-Original-From: Michael Forney Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:7522 Archived-At: --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I noticed when building gzip with musl that gnulib is still replacing getopt and getopt_long. After some investigation, it looks to be because it expects getopt_long to accept ambiguous options with the same has_arg, flag, and val values[0]. The code responsible for this seems to only do this for getopt_long and not getopt_long_only[1]. I have no idea why, but since musl aims to conform to glibc's getopt_long behavior, we should probably do the same. [0] http://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/getopt.m4#n313 [1] http://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dposix/getopt.c;hb= =3DHEAD#l562 --=20 Michael Forney --0F1p//8PRICkK4MW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVPdYgAAoJEKzi1cRTxFmA4v0H/iXUeCdyKU81UAwgQ6bGEIl1 ub1xEeE+slK1sGkv4evTX86AaOdQ8N/ghMv77dbh+YE6XgrzFZ7I15xHZYuSr1Hc qVqs6L5a9FkKzIVNqpkvCcmOEH2hEUlYzPZ60oVWPe2l9bmWJ9GXdZ4UCYjcX6kR /WGym5naTCAZylzv5YQm7jV2mRKOHpUtALcP8BZsSS6zTxs4oquHx4iuFtbfSseI Up1j++XkM34ax/acf3CM4aWv74ulW0nGFibZzr1ZKSU11WFSI8N9j/u4eOL/IsB/ lhZfUaIHJcnH8TYIT2i/244TJ7rnwebxonaDJuhHeJNFkIgMyo7LFG96gCVK0Q4= =2TRF -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW--