unzip applet not working ?
John Spencer
maillist-busybox at barfooze.de
Thu Jun 14 21:36:06 UTC 2012
On 06/14/2012 09:50 PM, Dan Fandrich wrote:
> On Wed, Jun 13, 2012 at 07:37:13PM +0200, John Spencer wrote:
>> I could trace it back to
>>
>> /* '-' makes getopt return 1 for non-options */
>> while ((opt = getopt(argc, argv, "-d:lnopqxv")) != -1)
>>
>> this returns *not* 1 with musl. according to Rich the commented
>> behaviour is a gnuism and not POSIX.
> I've run into the same issue. Attached is the patch I use to work around
> it.
>
the unzip applet may be a candidate for custom argv parsing code, getopt
doesn't seem to be a good fit in this case,
especially considering Doug Clapp's report (apparently not even on glibc
all options behave as they should).
but then, i've never gotten around to study the getopt manpage, so there
may be some trick to make it work in a POSIX conformant fashion.
More information about the busybox
mailing list