[Top][All Lists]

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

Re: Reentrant argp

From: Niels Möller
Subject: Re: Reentrant argp
Date: 20 May 2003 12:29:54 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

"M. Gerards" <> writes:

> So I cannot trust the comments in the code and it doesn't work or should I be 
> carefull when using it recursively?

For recursive calls, you have to use

  /* This hack to allow programs that know what's going on to call argp
     recursively.  If someday argp is changed not to use the non-reentrant
     getopt interface, we can get rid of this shit.  XXX */
  _argp_unlock_xxx (void)

This is from the glibc version, of course. I don't really know what
else is needed, you could try to save and restore optind, but you
can't do that with getopt's nextchar, because that is static in

> > I think the glibc folks are aware of it. I also mail Miles to remind
> > him once a year or so ;-)
> URG :(
> How long will it take before this code will be in glibc (I mean: what do you 
> expect)? Otherwise I'll rewrite my code :(

I have no idea. What's needed is some glibc hacker with some time and
interest in putting the code back into glibc. And then it will take
some time to sort out any problems that occur.


reply via email to

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