[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 03 Oct 2003 21:46:26 -0700
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2
I'm having a problem with getopt. In particular, I'm finding that optind
doesn't seem to be containing the correct value. I think that
something's getting confused about where optind is supposed to be.
I'm running debian/unstable with glibc-2.3.2.
The following code prints:
optind weirdness 0x80a2bf0 0x405d730c
void *handle = dlopen("/lib/libc.so.6", RTLD_NOW);
_optind = (int *)dlsym(handle, "optind");
if(_optind != &optind)
printf("optind weirdness %p %p\n", &optind, _optind);
fwiw, gdb thinks optind is at 0x405d730c
Where is optind supposed to be? Any ideas about what might be broken?