On Sunday 16 November 2008 17:01:03 Denys Vlasenko wrote: > On Sunday 16 November 2008 07:02, Rob Landley wrote: > > Even _current_ versions of uClibc still have nasty bugs. Build busybox > > tar against uClibc and then try to do "tar xvjfC filename.tbz dirname" > > and notice that it complains it can't find file "C". That bug's been > > there in uClibc getopt for five years, and _still_ isn't fixed. > > Same happens when I build it against glibc. > > I am surprised that that is a valid syntax at all.
It's bsd syntax, ala "ps ax". Been around for 30 years, some of us old timers learned it in college. :) > For getopt, f is an option with parameter, if it is followed by something, > that is its parameter, not a next option. Apparently GNU tar doesn't > follow this rule... Actually the rule is that with bsd style options, in the absence of any dash -options then arg1[] is treated as a group of option letters, but that group is _only_ single character options. Options that take arguments get them from future arguments, not by consuming the rest of the bsd option group. It's not nearly as funky as getting this right (which busybox does): echo -ne woot echo -nex woot You have to retroactively decide that the -n and the -e _weren't_ valid options when you hit the x. Rob _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
