Re: Re: getopt and Solaris 10
Derek Price <[email protected]> Tue, 10 May 2005 09:42:43 -0400
| Newsgroups | gmane.comp.lib.gnulib.bugs,gmane.comp.version-control.cvs.bugs,gmane.comp.gnu.core-utils.bugs |
|---|---|
| Organization | Get CVS Support from Ximbiot <http://ximbiot.com>! |
| Message-ID | <[email protected]> |
Paul Eggert wrote: >Derek Price <[email protected]> writes: > > > > >>+ myargv[[0]] = "conftest"; >>+ myargv[[1]] = "-+"; >> >> > >This doesn't null-terminate myargv. > >But I still don't get why the change is needed. It sounds like you're >assuming Solaris 11 getopt might get fixed? > Yes, I suppose so, or a later patch release of Solaris 10. Or some other system that decides to ship a getopt.h with a getopt_long(), getopt_clip(), and a GNU compatible getopt(), however unlikely that may sound now. >But even in that case, >the current code will work, right, since it will use GNU getopt? So >this is just an optimization for the hypothetical case if Solaris 11 >getopt gets fixed? > Basically. I was feeling guilty about not detecting the bug, but detecting a feature of the system and assuming the bug. This goes against the whole Autoconf test design philosophy, I thought. It's almost as bad as using `uname -a |sed' to detect the version number and using that to decide against the system getopt(), really. The new test detects the actual bug. >In that case perhaps we should wait for Solaris 11 >and test it before installing this patch, as it's more likely to cause >a bug than to fix one. > > What sort of bug are you worried about? Regards, Derek