[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] Re: getopt and Solaris 10
From: |
Derek Price |
Subject: |
Re: [bug-gnulib] Re: getopt and Solaris 10 |
Date: |
Mon, 09 May 2005 13:30:53 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...I know you already agreed... ...I just thought this was interesting...
In fact, Solaris 10 is the one actually sticking to the letter of the
POSIX spec here, not that I think that assuming argv[0] should not be
processed is going to hurt the GNU version:
The variable /optind/ is the index of the next element of the
/argv/[] vector to be processed. It is initialised to 1 by the system,
...
If, when /getopt()/ is called:
|
/ argv/[optind] is a null pointer
*/argv/[optind] is not the character -
/argv/[optind] points to the string "-"
|
/getopt/() returns -1 without changing /optind./
Cheers,
Derek
Derek Price wrote:
>Regardless, since using an optind = 0 is not specified as supported by
>POSIX, whereas optind = 1 is, and since using optind = 1 in place of
>optind = 0 in CVS would avoid this problem on all platforms and with all
>versions of getopt (supporting optind = 0 provides no additional
>functionality that I know of), I don't think this is properly considered
>a Solaris bug, but a CVS bug.
>
>At least, it would be a CVS bug if we didn't have to use the GNU getopt
>on Solaris due to the "+" problem anyhow.
>
>Cheers,
>
>Derek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCf55NLD1OTBfyMaQRApD/AKDG91RXkmD1GjNyqLJmzFjQq9vCBwCfbjTw
HHeRY0WAPlT67fsFFn0PNuE=
=oFUI
-----END PGP SIGNATURE-----
- Re: [bug-gnulib] Re: getopt and Solaris 10, (continued)
- 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, 2005/05/10
- 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 <=
- Re: [bug-gnulib] Re: getopt and Solaris 10, Matthias Kurz, 2005/05/10