bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] Re: Autoconf and differences between GNU getopt and Ope


From: Paul Eggert
Subject: Re: [Bug-gnulib] Re: Autoconf and differences between GNU getopt and OpenBSD getopt
Date: Fri, 15 Oct 2004 13:32:12 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> I guess it has come to the point where it actually will have to
> compile and run some small program.

Not if we merely want to test for GNU compatibility.
BSD getopt_long_only has another incompatibility that we can test for
at compile-time: it uses the "optreset" global variable to reset
scanning, whereas GNU getopt_long_only expects you to set optind to
zero.  This is the basis for the patch I just installed.

Some GNU apps depend on the GNU behavior.  Some don't, and could use a
new module ("getopt-bsd-gnu", say?) that tests for the intersection of
GNU and BSD getopt_long, if someone wants to write such a module.

Unfortunately there are several features to check for and it would be
a bit of a hassle to get it exactly "right" for every app.  In the
meantime the current gnulib should result in correct behavior on all
platforms, at the price of sometimes compiling GNU getopt even when
it's not needed.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]