Funkiness in getopt_long().

Mike Frysinger vapier at gentoo.org
Tue Nov 15 00:01:39 UTC 2005


On Mon, Nov 14, 2005 at 04:36:55PM -0600, Rob Landley wrote:
> On Monday 14 November 2005 08:05, Mike Frysinger wrote:
> > On Mon, Nov 14, 2005 at 12:04:53AM -0600, Rob Landley wrote:
> > > Busybox, linked against glibc, can handle "tar xvjCf directory
> > > filename.tbz" Linked against uclibc, the optarg fetched by C isn't
> > > "directory", it's "f".
> >
> > could you try the getopt tests in test/unistd/ and see if they work ?  if
> > they do, can you update them to reproduce this bug and post the patch ?
> 
> I wandered into test/unistd and all I saw were .c files, so I ran make, and it 
> did lots of things verbosely with no obvious way to tell if any of them 
> failed.  I'm assuming that since the build didn't stop, it didn't fail.  At 
> the end, $? was 0...

run `make <test>` and `make <test>_glibc`
in this case, `make getopt_long` will test against uclibc while 
`make getopt_long_glibc` will test against glibc

> I'll take a look at reproducing it with a stripped-down C snippet.

i was looking for a patch against getopt_long.c which would reproduce
the bug :)
-mike



More information about the uClibc mailing list