|
Message-ID: <CAPLrYEQcg-tH_gFy7wgaYJ0Pvg2AW+VqcSgjhV6MupsFi3-aog@mail.gmail.com> Date: Sun, 30 Sep 2012 23:18:33 +0200 From: Daniel Cegiełka <daniel.cegielka@...il.com> To: musl@...ts.openwall.com Subject: Re: better compatibility with bsd getopt() > > 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 OpenBSD solves gnu reset option in this way: /* * XXX Some GNU programs (like cvs) set optind to 0 instead of * XXX using optreset. Work around this braindamage. */ if (optind == 0) optind = optreset = 1; http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/getopt_long.c?rev=1.25;content-type=text%2Fplain So using the gnu reset (optind == 0) and BSD optreset should not be so difficult. Daniel
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.