This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getopt bugs


On Dec  1 06:53, Eric Blake wrote:
> According to Corinna Vinschen on 12/1/2009 2:42 AM:
> > I tend to the first choice with a rather strong option to the third.
> > 
> > A patch for the first choice might look like this (untested):
> > 
> > 	* libc/getopt.c (getopt_internal): Reevaluate POSIXLY_CORRECT
> > 	if optind is set to 0.  Handle a leading '-' in options independently
> > 	of posixly_correct.
> 
> Looks decent to me, although you might also want to let optreset!=0 cause
> a reread (since later on, optind==0 is translated to optreset=1).

Good idea.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]