[Freeciv-Dev] Re: GUI-specific options don't work properly in 1.12.0 (PR
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Andreas Kemnade <akemnade@xxxxxxxxxxx> wrote:
> Kevin Brown writes:
[...]
> > Anyone have any historical insight into the reasons we don't use
> > getopt?
> I think there are portability problems. Not every platform freeciv is
> compiled for has getopt (windows, amigaos, etc.). As far as I can
> remember getopt is not very portable. But maybe that has changed.
It would take a platform that doesn't use
int main (int argc, char *argv[])
as the definition of main() to break getopt's portability, since
getopt doesn't even rely on any external functions (except perhaps for
malloc/free). At least, for any implementation of getopt that's worth
anything.
But if those are the issues you're dealing with on these other
platforms, aren't you better off porting getopt to them instead of
writing your own implementation that basically does the same thing
(and therefore has to contend with exactly the same issues)?
Ah, well. I'm sure many have concluded that it's probably too late to
change things like this (when in reality, of course, it's never too
late since this *is* a Free Software project after all). But I think
for the long term we're better off using something reasonably standard
like getopt. New developers have enough Freeciv-specific stuff to
learn without extra hassles like this...
--
Kevin Brown kevin@xxxxxxxxxxxxxx
It's really hard to define what "unexpected behavior" means when you're
talking about Windows.
|
|