[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Ryan Gammon
Subject: optind
Date: Fri, 03 Oct 2003 21:46:26 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2

Hello folks,

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

The code:
   int *_optind;
   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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]