[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] Re: getopt and Solaris 10
From: |
Matthias Kurz |
Subject: |
Re: [bug-gnulib] Re: getopt and Solaris 10 |
Date: |
Mon, 9 May 2005 18:37:14 +0200 |
User-agent: |
Mutt/1.5.7i |
Hi.
One more clarification. Maybe one or the other missed my last comments
on <https://ccvs.cvshome.org/issues/show_bug.cgi?id=248>. It was me,
who introduced the "'+' myth". I "analysed" the problem wrong in the
beginning. It is not exactly the "+" that makes the problem, but the
fact, that the Solaris getopt refuses to accept a zero value on optind.
When "optind==0", the Solaris getopt returns -1 immediately, leaving
optind==0. When the cvs processing continues, it takes all arguments
left as "file" argument - alas all arguments from the commandline. I
looked at the sources, saw the "+", red the GNU getopt manpage that
states, that the "+" prevents a reorder of the commandline and took
the wrong conclusion, that the _Solaris_ getopt reorders the commandline.
I thought, that using the GNU getopt is still the best solution, because
this is minimal intrusive to the cvs sources and because the fix is
in the gnulib, so other projects, where optind is also set to zero, will
profit from it. When one sets optind to 1, before getopt is entered, this
should also fix the problem. That the Solaris getopt would accept an
option "-+" would just be an ugly side effect. But who knows, what effects
the setting of optint to 1 has on other platforms, where cvs always worked.
I did not want to think that much, so i said from the beginning on "just
use the GNU implementation everywhere". Who needs standards, when there is
a source ?
(mk)
--
Matthias Kurz; Fuldastr. 3; D-28199 Bremen; VOICE +49 421 53 600 47
>> Im prämotorischen Cortex kann jeder ein Held sein. (bdw) <<
- Re: [bug-gnulib] Re: getopt and Solaris 10, (continued)
- Re: [bug-gnulib] Re: getopt and Solaris 10, Derek Price, 2005/05/10
- Re: [bug-gnulib] Re: getopt and Solaris 10, Derek Price, 2005/05/10
- Re: [bug-gnulib] Re: getopt and Solaris 10, Derek Price, 2005/05/10
- Re: [bug-gnulib] Re: getopt and Solaris 10, Larry Jones, 2005/05/10
- Re: [bug-gnulib] Re: getopt and Solaris 10, Paul Eggert, 2005/05/10
- Re: [bug-gnulib] Re: getopt and Solaris 10, Derek Price, 2005/05/10
- Re: [bug-gnulib] Re: getopt and Solaris 10, Matthias Kurz, 2005/05/10
- Re: [bug-gnulib] Re: getopt and Solaris 10, Derek Price, 2005/05/09
- Re: [bug-gnulib] Re: getopt and Solaris 10, Karl Berry, 2005/05/10
- Re: [bug-gnulib] Re: getopt and Solaris 10, Derek Price, 2005/05/10
- Re: [bug-gnulib] Re: getopt and Solaris 10,
Matthias Kurz <=
- Re: [bug-gnulib] Re: getopt and Solaris 10, Derek Price, 2005/05/09
- Re: [bug-gnulib] Re: getopt and Solaris 10, Derek Price, 2005/05/09
- Re: [bug-gnulib] Re: getopt and Solaris 10, Derek Price, 2005/05/09
- Re: [bug-gnulib] Re: getopt and Solaris 10, Matthias Kurz, 2005/05/10