[Issue 248] incorrect build on Solaris 1 10
[email protected] 6 May 2005 12:08:12 -0000
| Newsgroups | gmane.comp.version-control.cvs.issuezilla |
|---|---|
| Message-ID | <[email protected]> |
https://ccvs.cvshome.org/issues/show_bug.cgi?id=248 ------- Additional comments from [email protected] Fri May 6 05:08:11 -0700 2005 ------- After reading http://docs.sun.com/app/docs/doc/816-5165/6mbb0m9b0?l=en&a=view, i did some more investigation. Because according to the text, everything should work as expected - no word about a reorder of the command line. I wrote a test program and it turned out, that not the reorder of the command line was the problem, but the setting of optind to zero (optind=0). The 'getopt' call then returns -1 immediately under Solaris (leaving optind=0). When i do a optind=1, the Solaris getopt behaves like the GNU one - provided the GNU one finds a '+' as first character in the option string. Very complicated. So, leaving the '+' and setting optind=1 instead of optind=0 should give the same result on Solaris and under GNU - but then it would be possible to specify an option "-+" under Solaris... I think using the GNU getopt implementation under Solaris is still the best way to solve this. (mk)